BGP Commands_ M through N

match as-path

To match a BGP autonomous system path that is specified by an access list, use the match as-path command in route-map configuration mode. To remove a path list entry, use the no form of this command.

match as-path path-list-number

no match as-path path-list-number

Syntax Description

path-list-number

Access list that specifies an autonomous system path. An integer from 1 to 199.

Command Default

No matching occurs on an autonomous system path specified by an access list.

Command Modes


Route-map configuration (config-route-map)

Command History

Release

Modification

10.0

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

Use the ip as-path access-list command to create an access list that determines which AS path is specified. Then use the match as-path command to create a route map based on matching the access list that determined the AS path.

The values set by the combination of the match as-path and set weight commands override global values. For example, the weights assigned with the match as-path and set weight route-map configuration commands override the weight assigned using the neighbor weight command.

A route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.

Examples

The following example configures a route map that matches on the autonomous system path specified by access list 20:

route-map IGP2BGP
 match as-path 20

Related Commands

Command

Description

ip as-path access-list

Configures an AS path filter using a regular expression.

match community

Matches a BGP community.

match interface (IP)

Distributes routes that have their next hop out one of the interfaces specified.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.

match ip next-hop

Redistributes any routes that have a next hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric (IP)

Redistributes routes with the metric specified.

match route-type (IP)

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

neighbor weight

Assigns weight to a neighbor connection.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.

set as-path

Modifies an autonomous system path for BGP routes.

set automatic-tag

Automatically computes the tag value in a route map configuration.

set community

Sets the BGP communities attribute.

set level (IP)

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set origin (BGP)

Sets the BGP origin code.

set tag (IP)

Sets the value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.

match community

To match a Border Gateway Protocol (BGP) community, use the match community command in route-map configuration mode. To remove the match community command from the configuration file and restore the system to its default condition where the software removes the BGP community list entry, use the no form of this command.

match community { standard-list-number | expanded-list-number | community-list-name [exact] }

no match community { standard-list-number | expanded-list-number | community-list-name [exact] }

Syntax Description

standard-list-number

Specifies a standard community list number from 1 to 99 that identifies one or more permit or deny groups of communities.

expanded-list-number

Specifies an expanded community list number from 100 to 500 that identifies one or more permit or deny groups of communities.

community-list-name

The community list name.

exact

(Optional) Indicates that an exact match is required. All of the communities and only those communities specified must be present.

Command Default

No community list is matched by the route map.

Command Modes


Route-map configuration (config-route-map)

Command History

Release

Modification

12.1

This command was introduced.

12.1(9)E

Named community list support was integrated into Cisco IOS Release 12.1(9)E.

12.2(8)T

Named community list support was integrated into Cisco IOS Release 12.2(8)T.

12.0(22)S

The maximum number of expanded extended community list numbers was changed from 199 to 500 in Cisco IOS Release 12.0(22)S.

12.2(14)S

The maximum number of expanded community lists was changed from 199 to 500 and named community list support were integrated into Cisco IOS Release 12.2(14)S.

12.2(15)T

The maximum number of expanded extended community list numbers was changed from 199 to 500 in Cisco IOS Release 12.2(15)T.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

A route map can have several parts. Any route that does not match at least one match command relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.

Matching based on community list number is one of the types of match commands applicable to BGP.

Examples

The following example shows that the routes matching community list 1 will have the weight set to 100. Any route that has community 109 will have the weight set to 100.

Router(config)# ip community-list 1 permit 109
Router(config)# route-map set_weight
Router(config-route-map)#  match community 1
Router(config-route-map)# set weight 100

The following example shows that the routes matching community list 1 will have the weight set to 200. Any route that has community 109 alone will have the weight set to 200.

Router(config)# ip community-list 1 permit 109
Router(config)# route-map set_weight
Router(config-route-map)# match community
 1 exact
Router(config-route-map)# set weight 200

In the following example, the routes that match community list LIST_NAME will have the weight set to 100. Any route that has community 101 alone will have the weight set to 100.

Router(config)# ip community-list LIST_NAME permit 101
Router(config)# route-map set_weight
Router(config-route-map)# match community LIST_NAME 
Router(config-route-map)# set weight 100

The following example shows that the routes that match expanded community list 500. Any route that has extended community 1 will have the weight set to 150.

Router(config)# ip community-list 500 permit [0-9]*
Router(config)# route-map MAP_NAME permit 10
Router(config-route-map)# match extcommunity 500
Router(config-route-map)# set weight 150

Related Commands

Command

Description

ip community-list

Creates a community list for BGP and controls access to it.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another.

set weight

Specifies the BGP weight for the routing table.

neighbor activate

To enable the exchange of information with a Border Gateway Protocol (BGP) neighbor, use the neighbor activate command in address family configuration mode or router configuration mode. To disable the exchange of an address with a BGP neighbor, use the no form of this command.

neighbor { ip-address | peer-group-name | ipv6-address% } activate

no neighbor { ip-address | peer-group-name | ipv6-address% } activate

Syntax Description

ip-address

IP address of the neighboring router.

peer-group-name

Name of the BGP peer group.

ipv6-address

IPv6 address of the BGP neighbor.

%

(Optional) IPv6 link-local address identifier. This keyword needs to be added whenever a link-local IPv6 address is used outside the context of its interface.

Command Default

The exchange of addresses with BGP neighbors is enabled for the IPv4 address family. Enabling address exchange for all other address families is disabled.


Note


Address exchange for address family IPv4 is enabled by default for each BGP routing session configured with the neighbor remote-as command unless you configure the no bgp default ipv4-activate command before configuring the neighbor remote-as command, or you disable address exchange for address family IPv4 with a specific neighbor by using the no neighbor activate command.


Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

11.0

This command was introduced.

12.0(5)T

Support for address family configuration mode and the IPv4 address family was added.

12.2(2)T

The ipv6-address argument and support for the IPv6 address family were added.

12.0(21)ST

This command was integrated into Cisco IOS Release 12.0(21)ST.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(25)SG

This command was integrated into Cisco IOS Release 12.2(25)SG.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

The % keyword was added

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was introduced on Cisco ASR 1000 Series Routers.

15.1(2)SNG

This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers.

Usage Guidelines

Use this command to advertise address information in the form of an IP or IPv6 prefix. The address prefix information is known as Network Layer Reachability Information (NLRI) in BGP.

The % keyword is used whenever link-local IPv6 addresses are used outside the context of their interfaces. This keyword does not need to be used for non-link-local IPv6 addresses.


Note


The use of the no form of the neighbor activate command will remove all configurations associated with the neighbor both inside and outside address family configuration mode. This command is not the same as the neighbor shutdown command, and you should not use this command to disconnect a BGP adjacency.


Examples

The following example shows how to enable address exchange for address family vpnv4 for all neighbors in the BGP peer group named PEPEER and for the neighbor 10.0.0.44:

Router(config)# address-family vpnv4
Router(config-router-af)# neighbor PEPEER activate
Router(config-router-af)# neighbor 10.0.0.44 activate
Router(config-router-af)# exit-address-family

Examples

The following example shows how to enable address exchange for address family IPv4 unicast for all neighbors in the BGP peer group named group1 and for the BGP neighbor 172.16.1.1:

Device(config)# address-family ipv4 unicast
Device(config-router-af)# neighbor group1 activate
Device(config-router-af)# neighbor 172.16.1.1 activate

Examples

The following example shows how to enable address exchange for address family IPv6 for all neighbors in the BGP peer group named group2 and for the BGP neighbor 7000::2:

Device(config)# address-family ipv6
Device(config-router-af)# neighbor group2 activate
Device(config-router-af)# neighbor 7000::2 activate

The following example shows that the no command will remove all configurations associated with a neighbor both inside and outside the address family configuration mode. The first set of commands shows the configuration for a specific neighbor.

Device(config)# router bgp 64496
Device(config-router)# bgp log neighbor changes
Device(config-router)# neighbor 10.0.0.1 remote-as 64497
Device(config-router)# neighbor 10.0.0.1 update-source Loopback0
Device(config-router)# address-family ipv4
Device(config-router-af)# no synchronization
Device(config-router-af)# no neighbor 10.0.0.1 activate
Device(config-router-af)# no auto-summary
Device(config-router-af)# exit-address-family
Device(config-router)address-family vpnv4
Device(config-router-af)# neighbor 10.0.0.1 activate
Device(config-router-af)# neighbor 10.0.0.1 send-community extended
Device(config-router-af)# exit-address-family
Device(config-router)# address-family ipv4 vrf vrf1
Device(config-router-af)# no synchronization
Device(config-router-af)# redistribute connected
Device(config-router-af)# neighbor 192.168.1.4 remote-as 100
Device(config-router-af)# neighbor 192.168.1.4 version 4
Device(config-router-af)# neighbor 192.168.1.4 activate
Device(config-router-af)# neighbor 192.168.1.4 weight 200
Device(config-router-af)# neighbor 192.168.1.4 prefix-list test out
Device(config-router-af)# exit-address-family

The following example shows the router configuration after the use of the no command.

Device(config)# router bgp 64496
Device(config-router)# address-family ipv4 vrf vrf1
Device(config-router-af)# no neighbor 192.168.1.4 activate
01:01:19: %BGP_SESSION-5-ADJCHANGE: neighbor 192.168.1.4 IPv4 Unicast vpn vrf vrf1 topology base removed from session  Neighbor deleted
01:01:19: %BGP-5-ADJCHANGE: neighbor 192.168.1.4 vpn vrf vrf1 Down Neighbor deleted
Device(config-router-af)# do show running-config | begin router bgp

router bgp 64496
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 64496
neighbor 10.0.0.1 update-source Loopback0
!
address-family ipv4
  no synchronization
  no neighbor 10.0.0.1 activate
  no auto-summary
exit-address-family
!
address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community extended
exit-address-family
!
address-family ipv4 vrf vrf1
  no synchronization
  redistribute connected
exit-address-family 

This example shows the router configuration when the neighbor is reactivated.

Device(config)# router bgp 64496
Device(config-router)# address-family ipv4 vrf vrf1
Device(config-router-af)# neighbor 192.168.1.4 activate
01:02:26: %BGP-5-ADJCHANGE: neighbor 192.168.1.4 vpn vrf vrf1 Up
Device(config-router-af)# do show running-config | begin router bgp

router bgp 64496
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 64496
neighbor 10.0.0.1 update-source Loopback0
!
address-family ipv4
  no synchronization
  no neighbor 10.0.0.1 activate
  no auto-summary
exit-address-family
!
address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community extended
exit-address-family
!
address-family ipv4 vrf vrf1
  no synchronization
  redistribute connected
  neighbor 192.168.1.4 remote-as 100
  neighbor 192.168.1.4 version 4
  neighbor 192.168.1.4 activate
exit-address-family
 

Related Commands

Command

Description

address-family ipv4

Places the router in address family configuration mode for configuring routing sessions, such as BGP, that use standard IPv4 address prefixes.

address-family ipv6

Places the router in address family configuration mode for configuring routing sessions, such as BGP, that use standard IPv6 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions, such as BGP, that use standard VPNv4 address prefixes.

address-family vpnv6

Places the router in address family configuration mode for configuring routing sessions, such as BGP, that use standard VPNv6 address prefixes.

exit-address-family

Exits from the address family submode.

neighbor remote-as

Adds an entry to the BGP or multiprotocol BGP neighbor table.

neighbor advertise-map

To advertise the routes in the BGP table matching the configured route-map, use the neighbor advertise-map command in router configuration mode. To disable route advertisement, use the no form of this command.

neighbor { ip-address | ipv6-address } advertise-map map-name { exist-map map-name | non-exist-map map-name }

no neighbor { ip-address | ipv6-address } advertise-map map-name { exist-map map-name | non-exist-map map-name }

Syntax Description

ip-address

Specifies the IPv4 address of the router that should receive conditional advertisements.

ipv6-address

Specifies the IPv6 address of the router that should receive conditional advertisements.

advertise-map map-name

Specifies the name of the route map that will be advertised if the conditions of the exist map or non-exist map are met.

exist-map map-name

Specifies the name of the exist-map that is compared with the routes in the BGP table to determine whether the advertise-map route is advertised or not.

non-exist-map map-name

Specifies the name of the non-exist-map that is compared with the routes in the BGP table to determine whether the advertise-map route is advertised or not.

Command Default

No default behavior or values

Command Modes


Router configuration (config-router)

Command History

Release

Modification

11.1CC

This command was introduced.

11.2

This command was integrated into Cisco IOS Release 11.2.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

15.3(2)S

This command was integrated into Cisco IOS Release 15.3(2)S.

Cisco IOS XE Release 3.9S

This command was integrated into Cisco IOS XE Release 3.9S.

Usage Guidelines

Use the neighbor advertise-map command to conditionally advertise selected routes. The routes (prefixes) that will be conditionally advertised are defined in two route maps: an advertise map and either an exist map or non-exist map.

  • The route map associated with the exist map or non-exist map specifies the prefix that the BGP speaker will track.
  • The route map associated with the advertise map specifies the prefix that will be advertised to the specified neighbor when the condition is met.

If an exist map is configured, the condition is met when the prefix exists in both the advertise map and the exist map.

If a non-exist map is configured, the condition is met when the prefix exists in the advertise map, but does not exist in the non-exist map.

If the condition is not met, the route is withdrawn and conditional advertisement does not occur. All routes that may be dynamically advertised or not advertised need to exist in the BGP routing table for conditional advertisement to occur.

Examples

The following router configuration example configures BGP to conditionally advertise a prefix to the 10.2.1.1 neighbor using an exist map. If the prefix exists in MAP1 and MAP2, the condition is met and the prefix is advertised.

router bgp 5
 address-family ipv4 unicast
 neighbor 10.2.1.1 advertise-map MAP1 exist-map MAP2

The following address family configuration example configures BGP to conditionally advertise a prefix to the 10.1.1.1 neighbor using a non-exist map. If the prefix exists in MAP3 but not MAP4, the condition is met and the prefix is advertised.

router bgp 5
 address-family ipv4 unicast
 neighbor 10.1.1.1 advertise-map MAP3 non-exist-map MAP4

Related Commands

Command

Description

address-family ipv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

address-family ipv6

Places router in address family configuration mode for configuring routing sessions, such as BGP, that use standard IPv6 address prefixes

route-map

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.

neighbor advertisement-interval

To set the minimum route advertisement interval (MRAI) between the sending of BGP routing updates, use the neighbor advertisement-interval command in address family or router configuration mode. To restore the default value, use the no form of this command.

neighbor { ip-address | peer-group-name } advertisement-interval seconds

no neighbor { ip-address | peer-group-name } advertisement-interval seconds

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a BGP peer group.

seconds

Time (in seconds) is specified by an integer ranging from 0 to 600.

Command Default

eBGP sessions not in a VRF: 30 seconds

eBGP sessions in a VRF: 0 seconds

iBGP sessions: 0 seconds

Command Modes


Router configuration (config-router)

Command History

Release

Modification

10.3

This command was introduced.

12.0(7)T

Address family configuration mode was added.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4T, 12.2SB, 12.2SE, 12.2SG, 12.2SR, 12.2SX, Cisco IOS XE 2.1

This command was modified. The default value for eBGP sessions in a VRF and for iBGP sessions changed from .5 seconds to 0 seconds.

Usage Guidelines

When the MRAI is equal to 0 seconds, BGP routing updates are sent as soon as the BGP routing table changes.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following router configuration mode example sets the minimum time between sending BGP routing updates to 10 seconds:

router bgp 5
 neighbor 10.4.4.4 advertisement-interval 10

The following address family configuration mode example sets the minimum time between sending BGP routing updates to 10 seconds:

router bgp 5
address-family ipv4 unicast
 neighbor 10.4.4.4 advertisement-interval 10

Related Commands

Command

Description

address-family ipv4 (BGP)

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor capability orf prefix-list

To advertise outbound route filter (ORF) capabilities to a peer router, use the neighbor capability orf prefix-list command in address family or router configuration mode. To disable ORF capabilities, use the no form of this command.

neighbor ip-address capability orf prefix-list [ receive | send | both ]

no neighbor ip-address capability orf prefix-list [ receive | send | both ]

Syntax Description

ip-address

The IP address of the neighbor router.

receive

(Optional) Enables the ORF prefix list capability in receive mode.

send

(Optional) Enables the ORF prefix list capability in send mode.

both

(Optional) Enables the ORF prefix list capability in both receive and send modes.

Command Default

No ORF capabilities are advertised to a peer router.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

12.0(11)ST

This command was introduced.

12.2(4)T

This command was integrated into Cisco IOS Release 12.2(4)T.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

The neighbor capability orf prefix-list command is used to reduce the number of BGP prefixes that a BGP speaker sends or receives from a peer router based on prefix filtering.

In most configurations, this command will be used to advertise both send and receive ORF capabilities with the both keyword. However, this feature can be configured in one direction between two routers with one router configured to send ORF capabilities and another router configured to receive ORF capabilities from the first router.

Examples

The following examples configure routers to advertise ORF send or receive capabilities to BGP neighbors.

Examples

The following example creates an outbound route filter and configures Router-A (10.1.1.1) to advertise the filter to Router-B (172.16.1.2). An IP prefix list named FILTER is created to specify the 192.168.1.0/24 subnet for outbound route filtering. The ORF send capability is configured on Router-A so that Router-A can advertise the outbound route filter to Router-B.

ip prefix-list FILTER seq 10 permit 192.168.1.0/24 
!
router bgp 100
 address-family ipv4 unicast 
 neighbor 172.16.1.2 remote-as 200
 neighbor 172.16.1.2 ebgp-multihop 
 neighbor 172.16.1.2 capability orf prefix-list send
 neighbor 172.16.1.2 prefix-list FILTER in
 exit 

Examples

The following example configures Router-B to advertise the ORF receive capability to Router-A. Router-B will install the outbound route filter, defined in the FILTER prefix list, after ORF capabilities have been exchanged. An inbound soft reset is initiated on Router-B at the end of this configuration to activate the outbound route filter.

router bgp 200
 address-family ipv4 unicast 
 neighbor 10.1.1.1 remote-as 100
 neighbor 10.1.1.1 ebgp-multihop 255
 neighbor 10.1.1.1 capability orf prefix-list receive
 end 
clear ip bgp 10.1.1.1 in prefix-filter

Note


The inbound soft refresh must be initiated with the clear ip bgp command in order for the BGP ORF feature to function.


Related Commands

Command

Description

neighbor prefix-list

Distributes BGP neighbor information as specified in a prefix list.

neighbor default-originate

To allow a BGP speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as a default route, use the neighbor default-originate command in address family or router configuration mode. To send no route as a default, use the no form of this command.

neighbor { ip-address | peer-group-name } default-originate [ route-map map-name ]

no neighbor { ip-address | peer-group-name } default-originate [ route-map map-name ]

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a BGP peer group.

route-map map-name

(Optional) Name of the route map. The route map allows route 0.0.0.0 to be injected conditionally.

Command Default

No default route is sent to the neighbor.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

11.0

This command was introduced.

12.0

Modifications were added to permit extended access lists.

12.0(7)T

Address family configuration mode was added.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

This command does not require the presence of 0.0.0.0 in the local router. When used with a route map, the default route 0.0.0.0 is injected if the route map contains a match ip address clause and there is a route that matches the IP access list exactly. The route map can contain other match clauses also.

You can use standard or extended access lists with the neighbor default-originate command.

Examples

In the following router configuration example, the local router injects route 0.0.0.0 to the neighbor 172.16.2.3 unconditionally:

router bgp 109
 network 172.16.0.0
 neighbor 172.16.2.3 remote-as 200
 neighbor 172.16.2.3 default-originate

In the following example, the local router injects route 0.0.0.0 to the neighbor 172.16.2.3 only if there is a route to 192.168.68.0 (that is, if a route with any mask exists, such as 255.255.255.0 or 255.255.0.0):

router bgp 109
 network 172.16.0.0
 neighbor 172.16.2.3 remote-as 200
 neighbor 172.16.2.3 default-originate route-map default-map
!
route-map default-map 10 permit
 match ip address 1
!
access-list 1 permit 192.168.68.0

In the following example, the last line of the configuration has been changed to show the use of an extended access list. The local router injects route 0.0.0.0 to the neighbor 172.16.2.3 only if there is a route to 192.168.68.0 with a mask of 255.255.0.0:

router bgp 109
 network 172.16.0.0
 neighbor 172.16.2.3 remote-as 200
 neighbor 172.16.2.3 default-originate route-map default-map
!
route-map default-map 10 permit
 match ip address 100
!
access-list 100 permit ip host 192.168.68.0 host 255.255.0.0

Related Commands

Command

Description

address-family ipv4 (BGP)

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

neighbor ebgp-multihop

Accepts and attempts BGP connections to external peers residing on networks that are not directly connected.

neighbor description

To associate a description with a neighbor, use the neighbor description command in router configuration mode or address family configuration mode. To remove the description, use the no form of this command.

neighbor { ip-address | peer-group-name } description text

no neighbor { ip-address | peer-group-name } description [text]

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of an EIGRP peer group. This argument is not available in address-family configuration mode.

text

Text (up to 80 characters in length) that describes the neighbor.

Command Default

There is no description of the neighbor.

Command Modes

Router configuration (config-router) Address family configuration (config-router-af)

Command History

Release

Modification

11.3

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

15.0(1)M

This command was modified. Address-family configuration mode was added.

12.2(33)SRE

This command was integrated into Cisco IOS Release 12.2(33)SRE.

Cisco IOS XE Release 2.6

This command was integrated into Cisco IOS XE Release 2.6.

Examples

In the following examples, the description of the neighbor is “peer with example.com”:

Router(config)# router bgp 109
Router(config-router)# network 172.16.0.0
Router(config-router)# neighbor 172.16.2.3 description peer with example.com

In the following example, the description of the address family neighbor is “address-family-peer”:

Router(config)# router eigrp virtual-name
Router(config-router)# address-family ipv4 autonomous-system 4453
Router(config-router-af)# 
network 172.16.0.0
Router(config-router-af)# 
neighbor 172.16.2.3 description address-family-peer

Related Commands

Command

Description

address-family (EIGRP)

Enters address family configuration mode to configure an EIGRP routing instance.

network (EIGRP)

Specifies the network for an EIGRP routing process.

router eigrp

Configures the EIGRP address family process.

neighbor ebgp-multihop

To accept and attempt BGP connections to external peers residing on networks that are not directly connected, use the neighbor ebgp-multihop command in router configuration mode. To return to the default, use the no form of this command.

neighbor { ip-address | ipv6-address | peer-group-name } ebgp-multihop [ttl]

no neighbor { ip-address | ipv6-address | peer-group-name } ebgp-multihop

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

ipv6-address

IPv6 address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

ttl

(Optional) Time-to-live in the range from 1 to 255 hops.

Command Default

Only directly connected neighbors are allowed.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

10.0

This command was introduced.

11.0

The peer-group-name argument was added.

12.2(33)SRA

The ipv6-address argument and support for the IPv6 address family were added.

12.2(33)SB

This command was integrated into Cisco IOS Release 12.2(33)SB.

12.2(33)SXI

This command was integrated into Cisco IOS Release 12.2(33)SXI.

Cisco IOS XE Release 3.1S

This command was integrated into Cisco IOS XE Release 3.1S.

Usage Guidelines

This feature should be used only under the guidance of Cisco technical support staff.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

To prevent the creation of loops through oscillating routes, the multihop will not be established if the only route to the multihop peer is the default route (0.0.0.0).

Examples

The following example allows connections to or from neighbor 10.108.1.1, which resides on a network that is not directly connected:

router bgp 109
 neighbor 10.108.1.1 ebgp-multihop

Related Commands

Command

Description

neighbor advertise-map non-exist-map

Allows a BGP speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as a default route.

neighbor peer-group (creating)

Creates a BGP peer group.

network (BGP and multiprotocol BGP)

Specifies the list of networks for the BGP routing process.

neighbor ha-mode graceful-restart

To enable or disable the Border Gateway Protocol (BGP) graceful restart capability for a BGP neighbor or peer group, use the neighbor ha-mode graceful-restart command in router configuration mode. To remove from the configuration the BGP graceful restart capability for a neighbor, use the no form of this command.

neighbor { ip-address | peer-group-name } ha-mode graceful-restart [disable]

no neighbor { ip-address | peer-group-name } ha-mode graceful-restart [disable]

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a BGP peer group.

disable

(Optional) Disables BGP graceful restart capability for a neighbor.

Command Default

BGP graceful restart capability is disabled.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

12.2(33)SRC

This command was introduced.

12.2(33)SB

This command was integrated into Cisco IOS Release 12.2(33)SB.

15.1(1)SG

This command was integrated into Cisco IOS Release 15.1(1)SG.

Cisco IOS XE 3.3SG

This command was integrated into Cisco IOS XE Release 3.3SG.

Usage Guidelines

The neighbor ha-mode graceful-restart command is used to enable or disable the graceful restart capability for an individual BGP neighbor or peer group in a BGP network. Use the disable keyword to disable the graceful restart capability when graceful restart has been previously enabled for the BGP peer.

The graceful restart capability is negotiated between nonstop forwarding (NSF)-capable and NSF-aware peers in OPEN messages during session establishment. If the graceful restart capability is enabled after a BGP session has been established, the session will need to be restarted with a soft or hard reset.

The graceful restart capability is supported by NSF-capable and NSF-aware routers. A router that is NSF-capable can perform a stateful switchover (SSO) operation (graceful restart) and can assist restarting peers by holding routing table information during the SSO operation. A router that is NSF-aware functions like a router that is NSF-capable but cannot perform an SSO operation.

To enable the BGP graceful restart capability globally for all BGP neighbors, use the bgp graceful-restartcommand. When the BGP graceful restart capability is configured for an individual neighbor, each method of configuring graceful restart has the same priority, and the last configuration instance is applied to the neighbor.

Use the show ip bgp neighbors command to verify the BGP graceful restart configuration for BGP neighbors.

Examples

The following example enables the BGP graceful restart capability for the BGP neighbor, 172.21.1.2:

router bgp 45000
 bgp log-neighbor-changes
 address-family ipv4 unicast
 neighbor 172.21.1.2 remote-as 45000
 neighbor 172.21.1.2 activate
 neighbor 172.21.1.2 ha-mode graceful-restart
 end

The following example enables the BGP graceful restart capability globally for all BGP neighbors and then disables the BGP graceful restart capability for the BGP peer group PG1. The BGP neighbor 172.16.1.2 is configured as a member of the peer group PG1 and inherits the disabling of the BGP graceful restart capability.

router bgp 45000
 bgp log-neighbor-changes
 bgp graceful-restart
 address-family ipv4 unicast
 neighbor PG1 peer-group
 neighbor PG1 remote-as 45000
 neighbor PG1 ha-mode graceful-restart disable
 neighbor 172.16.1.2 peer-group PG1
 end

Related Commands

Command

Description

bgp graceful-restart

Enables the BGP graceful restart capability globally for all BGP neighbors.

ha-mode graceful-restart

Enables or disables the BGP graceful restart capability for a BGP peer session template.

show ip bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

neighbor inherit peer-session

To send a peer session template to a neighbor so that the neighbor can inherit the configuration, use the neighbor inherit peer-sessioncommand in address family or router configuration mode. To stop sending the peer session template, use the no form of this command.

neighbor ip-address inherit peer-session session-template-name

no neighbor ip-address inherit peer-session session-template-name

Syntax Description

ip-address

IP address of the neighbor.

session-template-name

Name or tag for the peer session template.

Command Default

No default behavior or values

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

12.0(24)S

This command was introduced.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T.

12.2(27)SBC

This command was integrated into Cisco IOS Release 12.2(27)SBC.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

This command is used to send locally configured session templates to the specified neighbor. If the session template is configured to inherit configurations from other session templates, the specified neighbor will also indirectly inherit these configurations from the other session templates. A neighbor can directly inherit only one peer session template and indirectly inherit up to seven peer session templates.


Note


A Border Gateway Protocol (BGP) neighbor cannot be configured to work with both peer groups and peer templates. A BGP neighbor can be configured to belong only to a peer group or to inherit policies only from peer templates.


Examples

The following example configures the 172.16.0.1 neighbor to inherit the CORE1 peer session template. The 172.16.0.1 neighbor will also indirectly inherit the configuration from the peer session template named INTERNAL-BGP. The explicit remote-as statement is required for the neighbor inherit statement to work. If a peering is not configured, the specified neighbor will not accept the session template.

Router(config)# router bgp 101
Router(config)# neighbor 172.16.0.1 remote-as 202
Router(config-router)# neighbor 172.16.0.1 inherit peer-session CORE1

Related Commands

Command

Description

exit peer-session

Exits session-template configuration mode and enters router configuration mode.

inherit peer-session

Configures a peer session template to inherit the configuration from another peer session template.

show ip bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

show ip bgp template peer-session

Displays locally configured peer session templates.

template peer-session

Creates a peer session template and enters session-template configuration mode.

neighbor maximum-prefix (BGP)

To control how many prefixes can be received from a neighbor, use the neighbor maximum-prefix command in router configuration mode. To disable this function, use the no form of this command.

neighbor { ip-address | peer-group-name } maximum-prefix maximum [threshold] [ restart restart-interval ] [warning-only]

no neighbor { ip-address | peer-group-name } maximum-prefix maximum

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a Border Gateway Protocol (BGP) peer group.

maximum

Maximum number of prefixes allowed from the specified neighbor. The number of prefixes that can be configured is limited only by the available system resources on a router.

threshold

(Optional) Integer specifying at what percentage of the maximum-prefix limit the router starts to generate a warning message. The range is from 1 to 100; the default is 75.

restart

(Optional) Configures the router that is running BGP to automatically reestablish a peering session that has been disabled because the maximum-prefix limit has been exceeded. The restart timer is configured with the restart-interval argument.

restart-interval

(Optional) Time interval (in minutes) that a peering session is reestablished. The range is from 1 to 65535 minutes.

warning-only

(optional) Allows the router to generate a sys-log message when the maximum-prefix limitis exceeded, instead of terminating the peering session.

Command Default

This command is disabled by default. Peering sessions are disabled when the maximum number of prefixes is exceeded. If the restart-interval argument is not configured, a disabled session will stay down after the maximum-prefix limit is exceeded.

threshold : 75 percent

Command Modes


Router configuration (config-router)

Command History

Release

Modification

11.3

This command was introduced.

12.0(22)S

The restart keyword was introduced.

12.2(15)T

The restart keyword was integrated into Cisco IOS Release 12.2(15)T.

12.2(18)S

The restart keyword was integrated into Cisco IOS Release 12.2(18)S.

12.2(27)SBC

This command was integrated into Cisco IOS Release 12.2(27)SBC.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

15.2(4)S

This command was integrated into Cisco IOS Release 15.2(4)S.

Usage Guidelines

The neighbor maximum-prefixcommand allows you to configure a maximum number of prefixes that a Border Gateway Protocol (BGP) routing process will accept from the specified peer. This feature provides a mechanism (in addition to distribute lists, filter lists, and route maps) to control prefixes received from a peer.

When the number of received prefixes exceeds the maximum number configured, BGP disables the peering session (by default). If the restart keyword is configured, BGP will automatically reestablish the peering session at the configured time interval. If the restart keyword is not configured and a peering session is terminated because the maximum prefix limit has been exceed, the peering session will not be be reestablished until the clear ip bgp command is entered. If the warning-only keyword is configured, BGP sends only a log message and continues to peer with the sender.

There is no default limit on the number of prefixes that can be configured with this command. Limitations on the number of prefixes that can be configured are determined by the amount of available system resources.

Examples

In the following example, the maximum prefixes that will be accepted from the 192.168.1.1 neighbor is set to 1000:

Router(config)# router bgp 40000
 
Router(config-router)# network 192.168.0.0
 
Router(config-router)# neighbor 192.168.1.1 maximum-prefix 1000

In the following example, the maximum number of prefixes that will be accepted from the 192.168.2.2 neighbor is set to 5000. The router is also configured to display warning messages when 50 percent of the maximum-prefix limit (2500 prefixes) has been reached.

Router(config)# router bgp 40000 
Router(config-router)# network 192.168.0.0
 
Router(config-router)# neighbor 192.168.2.2 maximum-prefix 5000 50

In the following example, the maximum number of prefixes that will be accepted from the 192.168.3.3 neighbor is set to 2000. The router is also configured to reestablish a disabled peering session after 30 minutes.

Router(config)# router bgp 40000
 
Router(config-router) network 192.168.0.0
 
Router(config-router)# neighbor 192.168.3.3 maximum-prefix 2000 restart 30

In the following example, warning messages will be displayed when the threshold of the maximum-prefix limit (500 x 0.75 = 375) for the 192.168.4.4 neighbor is exceeded:

Router(config)# router bgp 40000
 
Router(config-router)# network 192.168.0.0
 
Router(config-router)# neighbor 192.168.4.4 maximum-prefix 500 warning-only
 

Related Commands

Command

Description

clear ip bgp

Resets a BGP connection using BGP soft reconfiguration.

neighbor peer-group (assigning members)

To configure a BGP neighbor to be a member of a peer group, use the neighbor peer-group command in address family or router configuration mode. To remove the neighbor from the peer group, use the noform of this command.

neighbor { ip-address | ipv6-address } peer-group peer-group-name

no neighbor { ip-address | ipv6-address } peer-group peer-group-name

Syntax Description

ip-address

IP address of the BGP neighbor that belongs to the peer group specified by the peer-group-name argument.

ipv6-address

IPv6 address of the BGP neighbor that belongs to the peer group specified by the peer-group-name argument.

peer-group-name

Name of the BGP peer group to which this neighbor belongs.

Command Default

There are no BGP neighbors in a peer group.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

11.0

This command was introduced.

12.0(7)T

Address family configuration mode was added.

12.2(2)T

Support for IPv6 was added.

12.2(25)SG

This command was integrated into Cisco IOS Release 12.2(25)SG.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Cisco IOS XE Release 2.1

This command was introduced on Cisco ASR 1000 Series Routers.

Usage Guidelines

The neighbor at the IP address indicated inherits all the configured options of the peer group.


Note


Using the no form of the neighbor peer-group command removes all of the BGP configuration for that neighbor, not just the peer group association.


Examples

The following router configuration mode example assigns three neighbors to the peer group named internal:

router bgp 100
 neighbor internal peer-group
 neighbor internal remote-as 100
 neighbor internal update-source loopback 0
 neighbor internal route-map set-med out
 neighbor internal filter-list 1 out
 neighbor internal filter-list 2 in
 neighbor 172.16.232.53 peer-group internal
 neighbor 172.16.232.54 peer-group internal
 neighbor 172.16.232.55 peer-group internal
 neighbor 172.16.232.55 filter-list 3 in

The following address family configuration mode example assigns three neighbors to the peer group named internal:

router bgp 100
address-family ipv4 unicast
 neighbor internal peer-group
 neighbor internal remote-as 100
 neighbor internal update-source loopback 0
 neighbor internal route-map set-med out
 neighbor internal filter-list 1 out
 neighbor internal filter-list 2 in
 neighbor 172.16.232.53 peer-group internal
 neighbor 172.16.232.54 peer-group internal
 neighbor 172.16.232.55 peer-group internal
 neighbor 172.16.232.55 filter-list 3 in

Related Commands

Command

Description

address-family ipv4 (BGP)

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor shutdown

Disables a neighbor or peer group.

neighbor peer-group (creating)

To create a BGP or multiprotocol BGP peer group, use the neighbor peer-group command in address family or router configuration mode. To remove the peer group and all of its members, use the noform of this command.

neighbor peer-group-name peer-group

no neighbor peer-group-name peer-group

Syntax Description

peer-group-name

Name of the BGP peer group.

Command Default

There is no BGP peer group.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

11.0

This command was introduced.

11.1(20)CC

The nlri unicast, nlri multicast, and nlri unicast multicast keywords were added.

12.0(2)S

The nlri unicast, nlri multicast, and nlri unicast multicast keywords were added.

12.0(7)T

The nlri unicast, nlri multicast, and nlri unicast multicast keywords were removed.

Address family configuration mode was added.

12.2(25)SG

This command was integrated into Cisco IOS Release 12.2(25)SG.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

Often in a BGP or multiprotocol BGP speaker, many neighbors are configured with the same update policies (that is, same outbound route maps, distribute lists, filter lists, update source, and so on). Neighbors with the same update policies can be grouped into peer groups to simplify configuration and make update calculation more efficient.


Note


Peer group members can span multiple logical IP subnets, and can transmit, or pass along, routes from one peer group member to another.


Once a peer group is created with the neighbor peer-group command, it can be configured with the neighbor commands. By default, members of the peer group inherit all the configuration options of the peer group. Members also can be configured to override the options that do not affect outbound updates.

All the peer group members will inherit the current configuration as well as changes made to the peer group. Peer group members will always inherit the following configuration options by default:

  • remote-as (if configured)
  • version
  • update-source
  • outbound route-maps
  • outbound filter-lists
  • outbound distribute-lists
  • minimum-advertisement-interval
  • next-hop-self

If a peer group is not configured with a remote-as option, the members can be configured with the neighbor {ip-address | peer-group-name} remote-as command. This command allows you to create peer groups containing external BGP (eBGP) neighbors.

Examples

The following example configurations show how to create these types of neighbor peer group:

  • internal Border Gateway Protocol (iBGP) peer group
  • eBGP peer group
  • Multiprotocol BGP peer group

In the following example, the peer group named internal configures the members of the peer group to be iBGP neighbors. By definition, this is an iBGP peer group because the router bgp command and the neighbor remote-as command indicate the same autonomous system (in this case, autonomous system 100). All the peer group members use loopback 0 as the update source and use set-med as the outbound route map. The neighbor internal filter-list 2 in command shows that, except for 172.16.232.55, all the neighbors have filter list 2 as the inbound filter list.

router bgp 100
 neighbor internal peer-group
 neighbor internal remote-as 100
 neighbor internal update-source loopback 0
 neighbor internal route-map set-med out
 neighbor internal filter-list 1 out
 neighbor internal filter-list 2 in
 neighbor 172.16.232.53 peer-group internal
 neighbor 172.16.232.54 peer-group internal
 neighbor 172.16.232.55 peer-group internal
 neighbor 172.16.232.55 filter-list 3 in

The following example defines the peer group named external-peers without the neighbor remote-as command. By definition, this is an eBGP peer group because each individual member of the peer group is configured with its respective autonomous system number separately. Thus the peer group consists of members from autonomous systems 200, 300, and 400. All the peer group members have the set-metric route map as an outbound route map and filter list 99 as an outbound filter list. Except for neighbor 172.16.232.110, all of them have 101 as the inbound filter list.

router bgp 100
 neighbor external-peers peer-group
 neighbor external-peers route-map set-metric out
 neighbor external-peers filter-list 99 out
 neighbor external-peers filter-list 101 in
 neighbor 172.16.232.90 remote-as 200
 neighbor 172.16.232.90 peer-group external-peers
 neighbor 172.16.232.100 remote-as 300
 neighbor 172.16.232.100 peer-group external-peers
 neighbor 172.16.232.110 remote-as 400
 neighbor 172.16.232.110 peer-group external-peers
 neighbor 172.16.232.110 filter-list 400 in

In the following example, all members of the peer group are multicast-capable:

router bgp 100
neighbor 10.1.1.1 remote-as 1
neighbor 172.16.2.2 remote-as 2
address-family ipv4 multicast
 neighbor mygroup peer-group
 neighbor 10.1.1.1 peer-group mygroup
 neighbor 172.16.2.2 peer-group mygroup
 neighbor 10.1.1.1 activate
 neighbor 172.16.2.2 activate

Related Commands

Command

Description

address-family ipv4 (BGP)

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

clear ip bgp peer-group

Removes all the members of a BGP peer group.

show ip bgp peer-group

Displays information about BGP peer groups.

neighbor prefix-list

To prevent distribution of Border Gateway Protocol (BGP) neighbor information as specified in a prefix list, a Connectionless Network Service (CLNS) filter expression, or a CLNS filter set, use the neighbor prefix-list command in address family or router configuration mode. To remove a filter list, use the no form of this command.

neighbor { ip-address | peer-group-name } prefix-list { prefix-list-name | clns-filter-expr-name | clns-filter-set-name } { in | out }

no neighbor { ip-address | peer-group-name } prefix-list { prefix-list-name | clns-filter-expr-name | clns-filter-set-name } { in | out }

Syntax Description

ip-address

IP address of neighbor.

peer-group-name

Name of a BGP peer group.

prefix-list-name

Name of a prefix list. This argument is used only under router configuration mode.

clns-filter-expr-name

Name of a CLNS filter expression. This argument is used only under network service access point (NSAP) address family configuration mode.

clns-filter-set-name

Name of a CLNS filter set. This argument is used only under NSAP address family configuration mode.

in

Filter list is applied to incoming advertisements from that neighbor.

out

Filter list is applied to outgoing advertisements to that neighbor.

Command Default

All external and advertised address prefixes are distributed to BGP neighbors.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

12.0

This command was introduced.

12.0(7)T

Address family configuration mode was added.

12.2(8)T

Under address family configuration mode, the prefix-list-nameargument was amended to specify the name of a CLNS filter expression or a CLNS filter set.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

This command was integrated into Cisco IOS Release 12.2(33)SRB.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Cisco IOS XE 2.6

This command was integrated into Cisco IOS XE Release 2.6.

Usage Guidelines

Using prefix lists is one of three ways to filter BGP advertisements. You can also use AS-path filters, defined with the ip as-path access-list global configuration command and used in the neighbor filter-list command to filter BGP advertisements. The third way to filter BGP advertisements uses access or prefix lists with the neighbor distribute-listcommand.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command. Specifying the command with an IP address will override the value inherited from the peer group.

Use the neighbor prefix-list command in address family configuration mode to filter NSAP BGP advertisements.


Note


Do not apply both a neighbor distribute-list and a neighbor prefix-list command to a neighbor in any given direction (inbound or outbound). These two commands are mutually exclusive, and only one command (neighbor distribute-listor neighbor prefix-list) can be applied to each inbound or outbound direction.


Examples

The following router configuration mode example applies the prefix list named abc to incoming advertisements from neighbor 10.23.4.1:

router bgp 65200
 network 192.168.1.2
 neighbor 10.23.4.1 prefix-list abc in 

The following address family configuration mode example applies the prefix list named abc to incoming advertisements from neighbor 10.23.4.2:

router bgp 65001
address-family ipv4 unicast
 network 192.168.2.4
 neighbor 10.23.4.2 prefix-list abc in 

The following router configuration mode example applies the prefix list named CustomerA to outgoing advertisements to neighbor 10.23.4.3:

router bgp 64800
 network 192.168.3.6
 neighbor 10.23.4.3 prefix-list CustomerA out

The following address family configuration mode example applies the CLNS filter list set named default-prefix-only to outbound advertisements to neighbor 10.1.2.1:

clns filter-set default-prefix-only deny 49...
clns filter-set default-prefix-only permit default
!
router bgp 65202
 address-family nsap
  neighbor 10.1.2.1 activate
  neighbor 10.1.2.1 default-originate
  neighbor 10.1.2.1 prefix-list default-prefix-only out 

Related Commands

Command

Description

address-family ipv4 (BGP)

Enters the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.

address-family vpnv4

Enters the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

clear ip prefix-list

Resets the hit count of the prefix list entries.

clns filter-expr

Creates an entry in a CLNS filter expression.

clns filter-set

Creates an entry in a CLNS filter set.

ip as-path access-list

Defines a BGP-related access list.

ip prefix-list

Creates an entry in a prefix list.

ip prefix-list description

Adds a text description of a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list.

neighbor filter-list

Sets up a BGP filter.

show bgp nsap filter-list

Displays information about a filter list or filter list entries.

show ip bgp peer-group

Displays information about BGP peer groups.

show ip prefix-list

Displays information about a prefix list or prefix list entries.

neighbor remote-as

To add an entry to the BGP or multiprotocol BGP neighbor table, use the neighbor remote-as command in router configuration mode. To remove an entry from the table, use the no form of this command.

neighbor { ip-address | ipv6-address% | peer-group-name } remote-as autonomous-system-number [ alternate-as autonomous-system-number ... ]

no neighbor { ip-address | ipv6-address% | peer-group-name } remote-as autonomous-system-number [ alternate-as autonomous-system-number ... ]

Syntax Description

ip-address

IP address of the neighbor.

ipv6-address

IPv6 address of the neighbor.

%

(Optional) IPv6 link-local address identifier. This keyword needs to be added whenever a link-local IPv6 address is used outside the context of its interface.

peer-group-name

Name of a BGP peer group.

autonomous-system-number

Number of an autonomous system to which the neighbor belongs in the range from 1 to 65535.

  • In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, 4-byte autonomous system numbers are supported in the range from 65536 to 4294967295 in asplain notation and in the range from 1.0 to 65535.65535 in asdot notation.
  • In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, 4-byte autonomous system numbers are supported in the range from 1.0 to 65535.65535 in asdot notation only.

For more details about autonomous system number formats, see the router bgp command.

When used with the alternate-as keyword, up to five autonomous system numbers may be entered.

alternate-as

(Optional) Specifies an alternate autonomous system in which a potential dynamic neighbor can be identified. Up to five autonomous system numbers may be entered when this keyword is specified.

Command Default

There are no BGP or multiprotocol BGP neighbor peers.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

10.0

This command was introduced.

11.0

The peer-group-name argument was added.

11.1(20)CC

The nlri unicast, nlri multicast, and nlri unicast multicast keywords were added.

12.0(7)T

The nlri unicast, nlri multicast, and nlri unicast multicast keywords were removed.

12.2(4)T

Support for the IPv6 address family was added.

12.2(25)SG

This command was integrated into Cisco IOS Release 12.2(25)SG.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

This command was modified. The % keyword was added.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH. The alternate-as keyword was added to support BGP dynamic neighbors.

12.2(33)SB

This command was integrated into Cisco IOS Release 12.2(33)SB.

Cisco IOS XE Release 2.1

This command was introduced on Cisco ASR 1000 Series Routers.

12.0(32)S12

This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.

12.0(32)SY8

This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.

12.4(24)T

This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.

Cisco IOS XE Release 2.3

This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.

12.2(33)SXI1

This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.

12.0(33)S3

This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.

Cisco IOS XE Release 2.4

This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.

12.2(33)SRE

This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.

12.2(33)XNE

This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.

15.0(1)S

This command was integrated into Cisco IOS Release 15.0(1)S.

15.1(1)SG

This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.

Cisco IOS XE Release 3.3SG

This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.

15.1(2)SNG

This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers.

15.2(1)E

This command was integrated into Cisco IOS Release 15.2(1)E.

Usage Guidelines

Specifying a neighbor with an autonomous system number that matches the autonomous system number specified in the router bgp global configuration command identifies the neighbor as internal to the local autonomous system. Otherwise, the neighbor is considered external.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only unicast address prefixes. To exchange other address prefix types, such as multicast and Virtual Private Network (VPN) Version 4, neighbors must also be activated in the appropriate address family configuration mode.

Use the alternate-as keyword introduced in Cisco IOS Release 12.2(33)SXH to specify up to five alternate autonomous systems in which a dynamic BGP neighbor may be identified. BGP dynamic neighbor support allows BGP peering to a group of remote neighbors that are defined by a range of IP addresses. BGP dynamic neighbors are configured using a range of IP addresses and BGP peer groups. After a subnet range is configured and associated with a BGP peer group using the bgp listen command and a TCP session is initiated for an IP address in the subnet range, a new BGP neighbor is dynamically created as a member of that group. The new BGP neighbor will inherit any configuration or templates for the group.

The % keyword is used whenever link-local IPv6 addresses are used outside the context of their interfaces. This keyword does not need to be used for non-link-local IPv6 addresses.

In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain--65538 for example--as the default regular expression match and output display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain format and the asdot format as described in RFC 5396. To change the default regular expression match and output display of 4-byte autonomous system numbers to asdot format, use the bgp asnotation dot command followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions.

In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, the Cisco implementation of 4-byte autonomous system numbers uses asdot--1.2 for example--as the only configuration format, regular expression match, and output display, with no asplain support.


Note


In Cisco IOS releases that include 4-byte ASN support, command accounting and command authorization that include a 4-byte ASN number are sent in the asplain notation irrespective of the format that is used on the command-line interface.


To ensure a smooth transition, we recommend that all BGP speakers within an autonomous system that is identified using a 4-byte autonomous system number, be upgraded to support 4-byte autonomous system numbers.

Examples

The following example specifies that a router at the address 10.108.1.2 is an internal BGP (iBGP) neighbor in autonomous system number 65200:

router bgp 65200
 network 10.108.0.0
 neighbor 10.108.1.2 remote-as 65200

The following example specifies that a router at the IPv6 address 2001:0DB8:1:1000::72a is an external BGP (eBGP) neighbor in autonomous system number 65001:

router bgp 65300
 address-family ipv6 vrf site1
 neighbor 2001:0DB8:1:1000::72a remote-as 65001

The following example assigns a BGP router to autonomous system 65400, and two networks are listed as originating in the autonomous system. Then the addresses of three remote routers (and their autonomous systems) are listed. The router being configured will share information about networks 10.108.0.0 and 192.168.7.0 with the neighbor routers. The first router is a remote router in a different autonomous system from the router on which this configuration is entered (an eBGP neighbor); the second neighbor remote-as command shows an internal BGP neighbor (with the same autonomous system number) at address 10.108.234.2; and the last neighbor remote-as command specifies a neighbor on a different network from the router on which this configuration is entered (also an eBGP neighbor).

router bgp 65400
 network 10.108.0.0
 network 192.168.7.0
 neighbor 10.108.200.1 remote-as 65200
 neighbor 10.108.234.2 remote-as 65400
 neighbor 172.29.64.19 remote-as 65300

The following example configures neighbor 10.108.1.1 in autonomous system 65001 to exchange only multicast routes:

router bgp 65001
 neighbor 10.108.1.1 remote-as 65001
 neighbor 172.31 1.2 remote-as 65001
 neighbor 172.16.2.2 remote-as 65002
 address-family ipv4 multicast
  neighbor 10.108.1.1 activate
  neighbor 172.31 1.2 activate
  neighbor 172.16.2.2 activate
  exit-address-family

The following example configures neighbor 10.108.1.1 in autonomous system 65001 to exchange only unicast routes:

router bgp 65001
 neighbor 10.108.1.1 remote-as 65001
 neighbor 172.31 1.2 remote-as 65001
 neighbor 172.16.2.2 remote-as 65002

The following example, configurable only in Cisco IOS Release 12.2(33)SXH and later releases, configures a subnet range of 192.168.0.0/16 and associates this listen range with a BGP peer group. Note that the listen range peer group that is configured for the BGP dynamic neighbor feature can be activated in the IPv4 address family using the neighbor activate command. After the initial configuration on Router 1, when Router 2 starts a BGP router session and adds Router 1 to its BGP neighbor table, a TCP session is initiated, and Router 1 creates a new BGP neighbor dynamically because the IP address of the new neighbor is within the listen range subnet.

Examples

enable
configure terminal
router bgp 45000
 bgp log-neighbor-changes
 neighbor group192 peer-group 
 bgp listen range 192.168.0.0/16 peer-group group192   
 neighbor group192 remote-as 40000 alternate-as 50000
 address-family ipv4 unicast 
 neighbor group192 activate
 end

Examples

enable
configure terminal
router bgp 50000
 neighbor 192.168.3.1 remote-as 45000
 exit

If the show ip bgp summary command is now entered on Router 1, the output shows the dynamically created BGP neighbor, 192.168.3.2.

Router1# show ip bgp summary
BGP router identifier 192.168.3.1, local AS number 45000
BGP table version is 1, main routing table version 1
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
*192.168.3.2    4 50000       2       2        0    0    0 00:00:37        0
* Dynamically created based on a listen range command
Dynamically created neighbors: 1/(200 max), Subnet ranges: 1
BGP peergroup group192 listen range group members: 
  192.168.0.0/16 

The following example configures a BGP process for autonomous system 65538 and configures two external BGP neighbors in different autonomous systems using 4-byte autonomous system numbers in asplain format. This example is supported only on Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, or later releases.

router bgp 65538
 neighbor 192.168.1.2 remote-as 65536
 neighbor 192.168.3.2 remote-as 65550
 neighbor 192.168.3.2 description finance
 !
 address-family ipv4
  neighbor 192.168.1.2 activate
  neighbor 192.168.3.2 activate
  no auto-summary
  no synchronization
  network 172.17.1.0 mask 255.255.255.0
  exit-address-family

The following example configures a BGP process for autonomous system 1.2 and configures two external BGP neighbors in different autonomous systems using 4-byte autonomous system numbers in asdot format. This example requires Cisco IOS Release 12.0(32)SY8, 12.0(32)S12, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, 12.4(24)T, Cisco IOS XE Release 2.3, or a later release.

router bgp 1.2
 neighbor 192.168.1.2 remote-as 1.0
 neighbor 192.168.3.2 remote-as 1.14
 neighbor 192.168.3.2 description finance
 !
 address-family ipv4
  neighbor 192.168.1.2 activate
  neighbor 192.168.3.2 activate
  no auto-summary
  no synchronization
  network 172.17.1.0 mask 255.255.255.0
  exit-address-family

Related Commands

Command

Description

bgp asnotation dot

Changes the default display and the regular expression match format of BGP 4-byte autonomous system numbers from asplain (decimal values) to dot notation.

bgp listen

Associates a subnet range with a BGP peer group and activates the BGP dynamic neighbors feature.

neighbor peer-group

Creates a BGP peer group.

router bgp

Configures the BGP routing process.

neighbor route-map

To apply a route map to incoming or outgoing routes, use the neighbor route-map command in address family or router configuration mode. To remove a route map, use the no form of this command.

neighbor { ip-address | peer-group-name | ipv6-address [ % ] } route-map map-name { in | out }

no neighbor { ip-address | peer-group-name | ipv6-address [ % ] } route-map map-name { in | out }

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a BGP or multiprotocol BGP peer group.

ipv6-address

IPv6 address of the neighbor.

%

(Optional) IPv6 link-local address identifier. This keyword needs to be added whenever a link-local IPv6 address is used outside the context of its interface.

map-name

Name of a route map.

in

Applies route map to incoming routes.

out

Applies route map to outgoing routes.

Command Default

No route maps are applied to a peer.

Command Modes

Router configuration (config-router)

Command History

Release

Modification

10.0

This command was introduced.

12.0(7)T

Address family configuration mode was added.

12.2(4)T

Support for IPv6 was added.

12.2(25)SG

This command was integrated into Cisco IOS Release 12.2(25)SG.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

The % keyword was added.

12.2(33)SB

This command was integrated into Cisco IOS Release 12.2(33)SB.

Cisco IOS XE Release 2.1

This command was introduced on Cisco ASR 1000 Series Routers.

12.2(33)SXI

This command was integrated into Cisco IOS Release 12.2(33)SXI.

Usage Guidelines

When specified in address family configuration mode, this command applies a route map to that particular address family only. When specified in router configuration mode, this command applies a route map to IPv4 or IPv6 unicast routes only.

If an outbound route map is specified, it is proper behavior to only advertise routes that match at least one section of the route map.

If you specify a BGP or multiprotocol BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command. Specifying the command for a neighbor overrides the inbound policy that is inherited from the peer group.

The % keyword is used whenever link-local IPv6 addresses are used outside the context of their interfaces. This keyword does not need to be used for non-link-local IPv6 addresses.

Examples

The following router configuration mode example applies a route map named internal-map to a BGP incoming route from 172.16.70.24:

router bgp 5
 neighbor 172.16.70.24 route-map internal-map in
route-map internal-map
 match as-path 1
 set local-preference 100

The following address family configuration mode example applies a route map named internal-map to a multiprotocol BGP incoming route from 172.16.70.24:

router bgp 5
address-family ipv4 multicast
 neighbor 172.16.70.24 route-map internal-map in
route-map internal-map
 match as-path 1
 set local-preference 100

Related Commands

Command

Description

address-family ipv4 (BGP)

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IP Version 4 address prefixes.

address-family ipv6

Enters address family configuration mode for configuring routing sessions such as BGP that use standard IPv6 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPN Version 4 address prefixes.

address-family vpnv6

Places the router in address family configuration mode for configuring routing sessions that use standard VPNv6 address prefixes.

neighbor remote-as

Creates a BGP peer group.

neighbor shutdown

To disable a neighbor or peer group or to gracefully shut down a link for maintenance, use the neighbor shutdown command in router configuration mode or address family configuration mode. To reenable the neighbor or peer group, use the no form of this command.

neighbor { ip-address | peer-group-name } shutdown graceful seconds [ community value] [ local-preference value ] [ community value ] [ local-preference value]

no neighbor { ip-address | peer-group-name } shutdown graceful seconds [ community value] [ local-preference value ] [ community value ] [ local-preference value]

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a BGP peer group.

graceful

(Optional) Configures BGP graceful shutdown, and advertises the route with the GSHUT community and the other community, if specified.

seconds

(Optional) Number of seconds in which BGP graceful shutdown will occur.

  • Range is 30 to 65535 seconds.
  • Configure adequate time to allow iBGP peers to converge and to choose an alternate path as the best path.

community

Specifies whether another community value needs to added or not.

value

Specifies whether a value needs to added or not.

  • The GSHUT community is set by default. You may specify a community other than the GSHUT community, which the receiving router can use to apply a routing policy. Number from 1-4294967295.

local-preference

Advertises the route with the GSHUT community and the specified local preference value.

value

Value of the local preference assigned to routes to the neighbor.

  • The range is from 1 to 4294967295.

Command Default

No change is made to the status of any BGP neighbor or peer group.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release

Modification

12.0

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

15.2(2)S

This command was modified. The graceful seconds keyword and argument, the community value keyword and argument, and the local-preference value keyword and argument were added.

Cisco IOS XE 3.6S

This command was modified. The graceful seconds keyword and argument, the community value keyword and argument, and the local-preference value keyword and argument were added.

Cisco IOS XE 3.7S

This command was implemented on the Cisco ASR 903 router.

15.2(4)M

This command was integrated into Cisco IOS Release 15.2(4)M.

15.2(4)S

This command was implemented on the Cisco 7200 series router.

Usage Guidelines

The neighbor shutdown command terminates any active session for the specified neighbor or peer group and removes all associated routing information. In the case of a peer group, a large number of peering sessions could be terminated suddenly.

To display a summary of BGP neighbors and peer group connections, use the show ip bgp summary command. Those neighbors with an Idle status and the Admin entry have been disabled by the neighbor shutdown command.

“State/PfxRcd” shows the current state of the BGP session or the number of prefixes the router has received from a neighbor or peer group. When the maximum number (as set by the neighbor maximum-prefix command) is reached, the string “PfxRcd” appears in the entry, the neighbor is shut down, and the connection is idle.

BGP Graceful Shutdown

Use the BGP Graceful Shutdown feature to shut down a link for planned, manual, maintenance operations and thereby reduce or eliminate packet loss. The feature can be configured globally (for all address families) or for the IPv4 VRF or IPv6 VRF address family.

Keep in mind that you should configure adequate time to allow iBGP peers to converge and to choose an alternate path as the best path. BGP will not prevent a network administrator from specifying too low a number of seconds, in which case there might not be enough time for graceful shutdown to occur.

If you use the graceful keyword, you must also configure at least one of the community or local-preference keywords. You may use both the community and local-preference keywords.

During graceful shutdown timer, there is no nvgen. There will be nvgen of the neighbor shutdown command only after the shutdown.

neighbor ip-address shutdown graceful seconds local-pref value community value

Once the graceful shutdown timer expires, the command will be nvgened as follows:

neighbor ip-address shutdown

If you reset the sessions using the clear ip bgp command, all timers will be reset. Therefore, there will be no graceful shutdown.

Examples

The following example disables any active session for the neighbor 172.16.70.23:

neighbor 172.16.70.23 shutdown

The following example disables all peering sessions for the peer group named internal:

neighbor internal shutdown

The following example configures the specified neighbor to be gracefully shut down in 1200 seconds and advertises the route with the well-known GSHUT community and a local preference of 400:

neighbor 2001:db8:a::1 shutdown graceful 1200 local-preference 400

Related Commands

Command

Description

ip community-list

Creates a BGP community list.

neighbor maximum-prefix

Controls how many prefixes can be received from a neighbor.

show ip bgp community

Displays the neighbors that belong to various communities.

show ip bgp summary

Displays the status of all BGP connections.

neighbor soft-reconfiguration

To configure the Cisco IOS software to start storing updates, use the neighbor soft-reconfiguration command in router configuration mode. To not store received updates, use the noform of this command.

neighbor { ip-address | peer-group-name } soft-reconfiguration inbound

no neighbor { ip-address | peer-group-name } soft-reconfiguration inbound

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

inbound

Indicates that the update to be stored is an incoming update.

Command Default

Soft reconfiguration is not enabled.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

11.2

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

Entering this command starts the storage of updates, which is required to do inbound soft reconfiguration. Outbound BGP soft reconfiguration does not require inbound soft reconfiguration to be enabled.

To use soft reconfiguration, or soft reset, without preconfiguration, both BGP peers must support the soft route refresh capability, which is advertised in the open message sent when the peers establish a TCP session. Routers running Cisco IOS software releases prior to Release 12.1 do not support the route refresh capability and must clear the BGP session using the neighbor soft-reconfiguration command. Clearing the BGP session using the neighbor soft-reconfiguration command has a negative effect on network operations and should only be used as a last resort. Routers running Cisco IOS software Release 12.1 or later releases support the route refresh capability and dynamic soft resets, and can use the clear ip bgp{*| address| peer-group name} in command to clear the BGP session.

To determine whether a BGP router supports this capability, use the show ip bgp neighborscommand. If a router supports the route refresh capability, the following message is displayed:

Received route refresh capability from peer.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following example enables inbound soft reconfiguration for the neighbor 10.108.1.1. All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy. When inbound soft reconfiguration is done later, the stored information will be used to generate a new set of inbound updates.

router bgp 100
 neighbor 10.108.1.1 remote-as 200
 neighbor 10.108.1.1 soft-reconfiguration inbound

Related Commands

Command

Description

clear ip bgp

Resets a BGP connection using BGP soft reconfiguration.

neighbor remote-as

Creates a BGP peer group.

show ip bgp neighbors

Display information about the TCP and BGP connections to neighbors.

neighbor unsuppress-map

To selectively advertise routes previously suppressed by the aggregate-address command, use the neighbor unsuppress-map command in address family or router configuration mode. To restore the system to the default condition, use the no form of this command.

neighbor { ip-address | peer-group-name } unsuppress-map route-map-name

no neighbor { ip-address | peer-group-name } unsuppress-map route-map-name

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

route-map-name

Name of a route map.

Command Default

No routes are unsuppressed.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

12.0(5)T

This command was introduced.

12.0(5)T

Address family configuration mode was added.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

Use of the neighbor unsuppress-map command allows specified suppressed routes to be advertised.

Examples

The following BGP router configuration shows that routes specified by a route map named map1 are suppressed:

access-list 3 deny 172.16.16.6
access-list 3 permit any
route-map map1 permit 10
match ip address 3
!
router bgp 65000 
network 172.16.0.0
neighbor 192.168.1.2 remote-as 40000
aggregate-address 172.0.0.0 255.0.0.0 suppress-map map1
neighbor 192.168.1.2 unsuppress-map map1
neighbor 192.168.1.2 activate

The following example shows the routes specified by internal-map being unsuppressed for neighbor 172.16.16.6:

router bgp 100
address-family ipv4 multicast
 network 172.16.0.0
 neighbor 172.16.16.6 unsuppress-map internal-map

Related Commands

Command

Description

address-family ipv4 (BGP)

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.

address-family vpnv4

Places the routing in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

aggregate-address

Creates an aggregate entry in a BGP routing table.

neighbor route-map

Applies a route map to inbound or outbound routes.

neighbor update-source

To have the Cisco software allow Border Gateway Protocol (BGP) sessions to use any operational interface for TCP connections, use the neighbor update-source command in router configuration mode. To restore the interface assignment to the closest interface, which is called the best local address, use the no form of this command.

neighbor { ip-address | ipv6-address [ % ] | peer-group-name } update-source interface-type interface-number

neighbor { ip-address | ipv6-address [ % ] | peer-group-name } update-source interface-type interface-number

Syntax Description

ip-address

IPv4 address of the BGP-speaking neighbor.

ipv6-address

IPv6 address of the BGP-speaking neighbor.

%

(Optional) IPv6 link-local address identifier. This keyword needs to be added whenever a link-local IPv6 address is used outside the context of its interface.

peer-group-name

Name of a BGP peer group.

interface-type

Interface type.

interface-number

Interface number.

Command Default

Best local address

Command Modes


Router configuration (config-router)

Command History

Release

Modification

10.0

This command was introduced.

12.2(4)T

The ipv6-address argument was added.

12.0(21)ST

This command was integrated into Cisco IOS Release 12.0(21)ST.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(25)SG

This command was integrated into Cisco IOS Release 12.2(25)SG.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

The % keyword was added.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Cisco IOS XE Release 2.1

This command was introduced on Cisco ASR 1000 series routers.

15.1(2)SNG

This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers.

Usage Guidelines

This command can work in conjunction with the loopback interface feature described in the “Interface Configuration Overview” chapter of the Cisco IOS Interface and Hardware Component Configuration Guide.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

The neighbor update-source command must be used to enable IPv6 link-local peering for internal or external BGP sessions.

The % keyword is used whenever link-local IPv6 addresses are used outside the context of their interfaces and for these link-local IPv6 addresses you must specify the interface they are on. The syntax becomes <IPv6 local-link address>%<interface name>, for example, FE80::1%Ethernet1/0. Note that the interface type and number must not contain any spaces, and be used in full-length form because name shortening is not supported in this situation. The % keyword and subsequent interface syntax is not used for non-link-local IPv6 addresses.

Examples

The following example sources BGP TCP connections for the specified neighbor with the IP address of the loopback interface rather than the best local address:

router bgp 65000
 network 172.16.0.0
 neighbor 172.16.2.3 remote-as 110
 neighbor 172.16.2.3 update-source Loopback0

The following example sources IPv6 BGP TCP connections for the specified neighbor in autonomous system 65000 with the global IPv6 address of loopback interface 0 and the specified neighbor in autonomous system 65400 with the link-local IPv6 address of Fast Ethernet interface 0/0. Note that the link-local IPv6 address of FE80::2 is on Ethernet interface 1/0.

router bgp 65000
 neighbor 3ffe::3 remote-as 65000 
 neighbor 3ffe::3 update-source Loopback0 
 neighbor fe80::2%Ethernet1/0 remote-as 65400 
 neighbor fe80::2%Ethernet1/0 update-source FastEthernet 0/0 
 address-family ipv6 
  neighbor 3ffe::3 activate 
  neighbor fe80::2%Ethernet1/0 activate 
  exit-address-family 

Related Commands

Command

Description

neighbor activate

Enables the exchange of information with a BGP neighboring router.

neighbor remote-as

Adds an entry to the BGP or multiprotocol BGP neighbor table.

network (BGP and multiprotocol BGP)

To specify the networks to be advertised by the Border Gateway Protocol (BGP) and multiprotocol BGP routing processes, use the network command in address family or router configuration mode. To remove an entry from the routing table, use the no form of this command.

network { network-number [ mask network-mask ] | nsap-prefix } [ route-map map-tag ]

no network { network-number [ mask network-mask ] | nsap-prefix } [ route-map map-tag ]

Syntax Description

network-number

Network that BGP or multiprotocol BGP will advertise.

mask network-mask

(Optional) Network or subnetwork mask with mask address.

nsap-prefix

Network service access point (NSAP) prefix of the Connectionless Network Service (CLNS) network that BGP or multiprotocol BGP will advertise. This argument is used only under NSAP address family configuration mode.

route-map map-tag

(Optional) Identifier of a configured route map. The route map should be examined to filter the networks to be advertised. If not specified, all networks are advertised. If the keyword is specified, but no route map tags are listed, no networks will be advertised.

Command Default

No networks are specified.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

10.0

This command was introduced.

12.0

The limit of 200 network commands per BGP router was removed.

11.1(20)CC

The nlri unicast, nlri multicast, and nlri unicast multicast keywords were added.

12.0(7)T

The nlri unicast, nlri multicast, and nlri unicast multicast keywords were removed.

Address family configuration mode was added.

12.2(8)T

The nsap-prefix argument was added to address family configuration mode.

12.2(25)SG

This command was integrated into Cisco IOS Release 12.2(25)SG.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

This command was integrated into Cisco IOS Release 12.2(33)SRB.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE 2.6

This command was integrated into Cisco IOS XE Release 2.6.

Usage Guidelines

BGP and multiprotocol BGP networks can be learned from connected routes, from dynamic routing, and from static route sources.

The maximum number of network commands you can use is determined by the resources of the router, such as the configured NVRAM or RAM.

Examples

The following example sets up network 10.108.0.0 to be included in the BGP updates:

router bgp 65100
 network 10.108.0.0

The following example sets up network 10.108.0.0 to be included in the multiprotocol BGP updates:

router bgp 64800
address family ipv4 multicast
 network 10.108.0.0

The following example advertises NSAP prefix 49.6001 in the multiprotocol BGP updates:

router bgp 64500
 address-family nsap
  network 49.6001

Related Commands

Command

Description

address-family ipv4 (BGP)

Enters the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IP Version 4 address prefixes.

address-family vpnv4

Enters the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.

default-information originate (BGP)

Allows the redistribution of network 0.0.0.0 into BGP.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another.

router bgp

Configures the BGP routing process.

network backdoor

To specify a backdoor route to a BGP-learned prefix that provides better information about the network, use the network backdoor command in address family or router configuration mode. To remove an address from the list, use the no form of this command.

network ip-address backdoor

no network ip-address backdoor

Syntax Description

ip-address

IP address of the network to which you want a backdoor route.

Command Default

No network is marked as having a back door.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

10.0

This command was introduced.

12.0(7)T

Address family configuration mode was added.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

A backdoor network is assigned an administrative distance of 200. The objective is to make Interior Gateway Protocol (IGP) learned routes preferred. A backdoor network is treated as a local network, except that it is not advertised. A network that is marked as a back door is not sourced by the local router, but should be learned from external neighbors. The BGP best path selection algorithm does not change when a network is configured as a back door.

Examples

The following address family configuration example configures network 10.108.0.0 as a local network and network 192.168.7.0 as a backdoor network:

router bgp 109
address-family ipv4 multicast
 network 10.108.0.0
 network 192.168.7.0 backdoor

The following router configuration example configures network 10.108.0.0 as a local network and network 192.168.7.0 as a backdoor network:

router bgp 109
 network 10.108.0.0
 network 192.168.7.0 backdoor

Related Commands

Command

Description

address-family ipv4 (BGP)

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IP Version 4 address prefixes.

address-family vpnv4

Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPN Version 4 address prefixes.

distance bgp

Allows the use of external, internal, and local administrative distances that could be a better route to a node.

network (BGP and multiprotocol BGP)

Specifies networks to be advertised by the BGP and multiprotocol BGP routing processes.

router bgp

Assigns an absolute weight to a BGP network.