The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
To enter address family or router scope address family configuration mode to configure a routing session using standard IP Version 4 (IPv4) address prefixes, use the address-family ipv4 command in router configuration or router scope configuration mode. To exit address family configuration mode and remove the IPv4 address family configuration from the running configuration, use the no form of this command.
address-family ipv4 [mdt | tunnel | {multicast | unicast} [vrf vrf-name] | vrf vrf-name]
no address-family ipv4 [mdt | tunnel | {multicast | unicast} [vrf vrf-name] | vrf vrf-name]
address-family ipv4 [mdt | multicast | unicast]
no address-family ipv4 [mdt | multicast | unicast]
mdt |
(Optional) Specifies an IPv4 multicast distribution tree (MDT) address family session. |
tunnel |
(Optional) Specifies an IPv4 routing session for multipoint tunneling. |
multicast |
(Optional) Specifies IPv4 multicast address prefixes. |
unicast |
(Optional) Specifies IPv4 unicast address prefixes. This is the default. |
vrf vrf-name |
(Optional) Specifies the name of the VPN routing and forwarding (VRF) instance to associate with subsequent IPv4 address family configuration mode commands. |
IPv4 address prefixes are not enabled.
Router configuration (config-router)
Router scope configuration (config-router-scope)
Release |
Modification |
---|---|
12.0(5)T |
This command was introduced. This command replaced the match nlri and set nlri commands. |
12.0(28)S |
This command was modified. The tunnel keyword was added. |
12.0(29)S |
This command was modified. The mdt keyword was added. |
12.0(30)S |
This command was modified. Support for the Cisco 12000 series Internet router was added. |
12.2(33)SRA |
This command was integrated into Cisco IOS Release 12.2(33)SRA. |
12.2(31)SB2 |
This command was integrated into Cisco IOS Release 12.2(31)SB2. |
12.2(33)SRB |
This command was modified. Support for router scope configuration mode was added. The tunnel keyword was deprecated. |
12.2(33)SXH |
This command was integrated into Cisco IOS Release 12.2(33)SXH. |
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 Aggregation Services Routers. |
12.4(20)T |
This command was modified. The mdt keyword was added. The tunnel keyword was deprecated. |
Cisco IOS XE Release 3.6S |
This command was modified. VRF-based multicast support was added. |
15.2(4)S |
This command was implemented on the Cisco 7200 series router. |
15.1(2)SNG |
This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers. |
The address-family ipv4 command replaces the match nlri and set nlri commands. The address-family ipv4 command places the device in address family configuration mode (prompt: config-router-af), from which you can configure routing sessions that use standard IPv4 address prefixes. To leave address family configuration mode and return to router configuration mode, type exit.
Note |
Routing information for address family IPv4 is advertised by default for each Border Gateway Protocol (BGP) routing session configured with the neighbor remote-as command unless you enter the no bgp default ipv4-unicast command before configuring the neighbor remote-as command. |
The tunnel keyword is used to enable the tunnel subaddress family identifier (SAFI) under the IPv4 address family identifier. This SAFI is used to advertise the tunnel endpoints and the SAFI-specific attributes (which contain the tunnel type and tunnel capabilities). Redistribution of tunnel endpoints into the BGP IPv4 tunnel SAFI table occurs automatically when the tunnel address family is configured. However, peers need to be activated under the tunnel address family before the sessions can exchange tunnel information.
The mdt keyword is used to enable the MDT SAFI under the IPv4 address family identifier. This SAFI is used to advertise tunnel endpoints for inter-AS multicast VPN peering sessions.
If you specify the address-family ipv4 multicast command, you will then specify the network network-number [mask network-mask] command. The network command advertises (injects) the specified network number and mask into the multicast BGP database. This route must exist in the forwarding table installed by an Interior Gateway Protocol (IGP) (that is, by EIGRP, OSPF, RIP, IGRP, static, or IS-IS), but not BGP.
In Cisco IOS Release 12.2(33)SRB and later releases, the ability to use address family configuration under the router scope configuration mode was introduced. The scope hierarchy can be defined for BGP routing sessions and is required to support Multitopology Routing (MTR). To enter the router scope configuration mode, use the scope command, which can apply globally or for a specific VRF. When using the scope for a specific VRF, only the unicast keyword is available.
The following example places the device in address family configuration mode for the IPv4 address family:
Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 Device(config-router-af)#
The following example places the device in address family configuration mode and specifies only multicast address prefixes for the IPv4 address family:
Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 multicast Device(config-router-af)#
The following example places the device in address family configuration mode and specifies unicast address prefixes for the IPv4 address family:
Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 unicast Device(config-router-af)#
The following example places the device in address family configuration mode and specifies cisco as the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands:
Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 vrf cisco Device(config-router-af)#
Note |
Use this form of the command, which specifies a VRF, only to configure routing exchanges between provider edge (PE) and customer edge (CE) devices. |
The following example places the device in tunnel address family configuration mode:
Device(config)# router bgp 100 Device(config-router)# address-family ipv4 tunnel Device(config-router-af)#
The following example shows how to configure a device to support an IPv4 MDT address-family session:
Device(config)# router bgp 45000 Device(config-router)# address-family ipv4 mdt Device(config-router-af)#
The following example shows how to configure the IPv4 address family under router scope configuration mode. In this example, the scope hierarchy is enabled globally. The device enters router scope address family configuration mode, and only multicast address prefixes for the IPv4 address family are specified:
Device(config)# router bgp 50000 Device(config-router)# scope global Device(config-router-scope)# address-family ipv4 multicast Device(config-router-scope-af)#
Command |
Description |
---|---|
address-family ipv6 |
Places the device in address family configuration mode for configuring routing sessions, such as BGP, that use standard IPv6 address prefixes. |
address-family vpn4 |
Places the device 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. |
bgp default ipv4-unicast |
Enables the IPv4 unicast address family on all neighbors. |
neighbor activate |
Enables the exchange of information with a BGP neighboring device. |
neighbor remote-as |
Adds an entry to the BGP or multiprotocol BGP neighbor table. |
scope |
Defines the scope for a BGP routing session and enters router scope configuration mode. |
To create an aggregate entry in a Border Gateway Protocol (BGP) database, use the aggregate-address command in address family or router configuration mode. To disable this function, use the no form of this command.
aggregate-address address mask [as-set] [as-confed-set] [summary-only] [ suppress-map map-name ] [ advertise-map map-name ] [ attribute-map map-name ]
no aggregate-address address mask [as-set] [as-confed-set] [summary-only] [ suppress-map map-name ] [ advertise-map map-name ] [ attribute-map map-name ]
address |
Aggregate address. |
mask |
Aggregate mask. |
as-set |
(Optional) Generates autonomous system set path information. |
as-confed-set |
(Optional) Generates autonomous confederation set path information. |
summary-only |
(Optional) Filters all more-specific routes from updates. |
suppress-map map-name |
(Optional) Specifies the name of the route map used to select the routes to be suppressed. |
advertise-map map-name |
(Optional) Specifies the name of the route map used to select the routes to create AS_SET origin communities. |
attribute-map map-name |
(Optional) Specifies the name of the route map used to set the attribute of the aggregate route. |
The atomic aggregate attribute is set automatically when an aggregate route is created with this command unless the as-set keyword is specified.
Address family configuration (config-router-af)
Router configuration (config-router)
Release |
Modification |
---|---|
10.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 support was added. |
12.2(33)SRA |
This command was integrated into Cisco IOS Release 12.2(33)SRA. |
12.2(33)SRB |
Support for IPv6 was 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. |
12.2(33)SRE |
The as-confed-set keyword was added. |
Cisco IOS XE Release 3.1S |
This command was introduced on Cisco ASR 1000 series routers. |
You can implement aggregate routing in BGP and Multiprotocol BGP (mBGP) either by redistributing an aggregate route into BGP or mBGP, or by using the conditional aggregate routing feature.
Using the aggregate-addresscommand with no keywords will create an aggregate entry in the BGP or mBGP routing table if any more-specific BGP or mBGP routes are available that fall within the specified range. (A longer prefix that matches the aggregate must exist in the Routing Information Base (RIB).) The aggregate route will be advertised as coming from your autonomous system and will have the atomic aggregate attribute set to show that information might be missing. (By default, the atomic aggregate attribute is set unless you specify the as-set keyword.)
Using the as-setkeyword creates an aggregate entry using the same rules that the command follows without this keyword, but the path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized. Do not use this form of the aggregate-addresscommandwhen aggregating many paths, because this route must be continually withdrawn and updated as autonomous system path reachability information for the summarized routes changes.
Using the as-confed-set keyword creates an aggregate entry using the same rules that the command follows without this keyword. This keyword performs the same function as the as-set keyword, except that it generates autonomous confed set path information.
Using the summary-onlykeyword not only creates the aggregate route (for example, 192.*.*.*) but also suppresses advertisements of more-specific routes to all neighbors. If you want to suppress only advertisements to certain neighbors, you may use the neighbor distribute-list command, with caution. If a more-specific route leaks out, all BGP or mBGP routers will prefer that route over the less-specific aggregate you are generating (using longest-match routing).
Using the suppress-mapkeyword creates the aggregate route but suppresses advertisement of specified routes. You can use the match clauses of route maps to selectively suppress some more-specific routes of the aggregate and leave others unsuppressed. IP access lists and autonomous system path access lists match clauses are supported.
Using the advertise-mapkeyword selects specific routes that will be used to build different components of the aggregate route, such as AS_SET or community. This form of the aggregate-addresscommand is useful when the components of an aggregate are in separate autonomous systems and you want to create an aggregate with AS_SET, and advertise it back to some of the same autonomous systems. You must remember to omit the specific autonomous system numbers from the AS_SET to prevent the aggregate from being dropped by the BGP loop detection mechanism at the receiving router. IP access lists and autonomous system path access lists match clauses are supported.
Using the attribute-mapkeyword allows attributes of the aggregate route to be changed. This form of the aggregate-addresscommand is useful when one of the routes forming the AS_SET is configured with an attribute such as the community no-export attribute, which would prevent the aggregate route from being exported. An attribute map route map can be created to change the aggregate attributes.
In the following example, an aggregate BGP address is created in router configuration mode. The path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized.
Router(config)# router bgp 50000 Router(config-router)# aggregate-address 10.0.0.0 255.0.0.0 as-set
In the following example, an aggregate BGP address is created in address family configuration mode and applied to the multicast database under the IP Version 4 address family. Because the summary-only keyword is configured, more-specific routes are filtered from updates.
Router(config)# router bgp 50000 Router(config-router)# address-family ipv4 multicast Router(config-router-af)# aggregate-address 10.0.0.0 255.0.0.0 summary-only
In the following example, a route map called MAP-ONE is created to match on an AS-path access list. The path advertised for this route will be an AS_SET consisting of elements contained in paths that are matched in the route map.
Router(config)# ip as-path access-list 1 deny ^1234_ Router(config)# ip as-path access-list 1 permit .* Router(config)# ! Router(config)# route-map MAP-ONE Router(config-route-map)# match ip as-path 1 Router(config-route-map)# exit Router(config)# router bgp 50000 Router(config-router)# address-family ipv4 Router(config-router-af)# aggregate-address 10.0.0.0 255.0.0.0 as-set advertise-map MAP-ONE Router(config-router-af)# end
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. |
ip as-path access-list |
Defines a BGP autonomous system path access list. |
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. |
neighbor distribute-list |
Distributes BGP neighbor information in an access list. |
route-map (IP) |
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing. |
To configure automatic summarization of subnet routes into network-level routes, use the auto-summary command in address family or router configuration mode. To disable automatic summarization and send subprefix routing information across classful network boundaries, use the no form of this command.
auto-summary
no auto-summary
This command has no arguments or keywords.
Automatic summarization is disabled by default (the software sends subprefix routing information across classful network boundaries).
Address family configuration (config-router-af)
Router configuration (config-router)
Release |
Modification |
---|---|
10.0 |
This command was introduced. |
12.0(7)T |
Address family configuration mode support was added. |
12.2(8)T |
The command default behavior was changed to disabled. |
12.2(33)SRA |
This command was integrated into Cisco IOS Release 12.2(33)SRA. |
12.2(33)SXH |
This command was integrated into Cisco IOS Release 12.2(33)SXH. |
15.0M, 12.2SRE |
This command was modified. When an interface addressed with an address falling within the summarized range is shut down, that route no longer appears in the BGP routing table. |
BGP automatically summarizes routes to classful network boundaries when this command is enabled. Route summarization is used to reduce the amount of routing information in routing tables. Automatic summarization applies to connected, static, and redistributed routes.
Note |
The MPLS VPN Per VRF Label feature does not support auto-summary. |
By default, automatic summarization is disabled and BGP accepts subnets redistributed from an Interior Gateway Protocol (IGP). To block subnets and create summary subprefixes to the classful network boundary when crossing classful network boundaries, use the auto-summary command.
To advertise and carry subnet routes in BGP when automatic summarization is enabled, use an explicit network command to advertise the subnet. The auto-summarycommand does not apply to routes injected into BGP via the network command or through iBGP or eBGP.
Why auto-summary for BGP Is Disabled By Default
When auto-summary is enabled, routes injected into BGP via redistribution are summarized on a classful boundary. Remember that a 32-bit IP address consists of a network address and a host address. The subnet mask determines the number of bits used for the network address and the number of bits used for the host address. The IP address classes have a natural or standard subnet mask, as shown in the table below.
Class |
Address Range |
Standard Mask |
---|---|---|
A |
1.0.0.0 to 126.0.0.0 |
255.0.0.0 or /8 |
B |
128.1.0.0 to 191.254.0.0 |
255.255.0.0 or /16 |
C |
192.0.1.0 to 223.255.254.0 |
255.255.255.0 or /24 |
Reserved addresses include 128.0.0.0, 191.255.0.0, 192.0.0.0, and 223.255.255.0.
When using the standard subnet mask, Class A addresses have one octet for the network, Class B addresses have two octets for the network, and Class C addresses have three octets for the network.
Consider the Class B address 156.26.32.1 with a 24-bit subnet mask, for example. The 24-bit subnet mask selects three octets, 156.26.32, for the network. The last octet is the host address. If the network 156.26.32.1/24 is learned via an IGP and is then redistributed into BGP, if auto-summary were enabled, the network would be automatically summarized to the natural mask for a Class B network. The network that BGP would advertise is 156.26.0.0/16. BGP would be advertising that it can reach the entire Class B address space from 156.26.0.0 to 156.26.255.255. If the only network that can be reached via the BGP router is 156.26.32.0/24, BGP would be advertising 254 networks that cannot be reached via this router. This is why the auto-summary (BGP)command is disabled by default.
In the following example, automatic summarization is enabled for IPv4 address family prefixes:
Router(config)# router bgp 50000 Router(config-router)# address-family ipv4 unicast Router(config-router-af)# auto-summary Router(config-router-af)# network 7.7.7.7 255.255.255.255
In the example, there are different subnets, such as 7.7.7.6 and 7.7.7.7 on Loopback interface 6 and Loopback interface 7, respectively. Both auto-summary and a network command are configured.
Router# show ip interface brief Interface IP-Address OK? Method Status Protocol Ethernet0/0 100.0.1.7 YES NVRAM up up Ethernet0/1 unassigned YES NVRAM administratively down down Ethernet0/2 unassigned YES NVRAM administratively down down Ethernet0/3 unassigned YES NVRAM administratively down down Ethernet1/0 108.7.9.7 YES NVRAM up up Ethernet1/1 unassigned YES NVRAM administratively down down Ethernet1/2 unassigned YES NVRAM administratively down down Ethernet1/3 unassigned YES NVRAM administratively down down Loopback6 7.7.7.6 YES NVRAM up up Loopback7 7.7.7.7 YES NVRAM up up
Note that in the output below, because of the auto-summary command, the BGP routing table displays the summarized route 7.0.0.0 instead of 7.7.7.6. The 7.7.7.7/32 network is displayed because it was configured with the network command, which is not affected by the auto-summary command.
Router# show ip bgp BGP table version is 10, local router ID is 7.7.7.7 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, x best-external Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 6.6.6.6/32 100.0.1.6 0 0 6 i *> 7.0.0.0 0.0.0.0 0 32768 ? <-- summarization *> 7.7.7.7/32 0.0.0.0 0 32768 i <-- network command r>i9.9.9.9/32 108.7.9.9 0 100 0 i *> 100.0.0.0 0.0.0.0 0 32768 ? r> 100.0.1.0/24 100.0.1.6 0 0 6 ? *> 108.0.0.0 0.0.0.0 0 32768 ? r>i108.7.9.0/24 108.7.9.9 0 100 0 ? *>i200.0.1.0 108.7.9.9
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. |
network (BGP and multiprotocol BGP) |
Specifies the networks to be advertised by BGP and multiprotocol BGP. |
To set the IP version 4 (IPv4) unicast address family as default for BGP peering session establishment, use the bgp default ipv4-unicast command in router configuration mode. To disable default IPv4 unicast address family for peering session establishment, use the no form of this command.
bgp default ipv4-unicast
no bgp default ipv4-unicast
This command has no arguments or keywords.
IPv4 address family routing information is advertised by default for each BGP routing session configured with the neighbor remote-as command, unless you first configure the no bgp default ipv4-unicast command before configuring the neighbor remote-as command.
Router configuration (config-router)
Release |
Modification |
---|---|
12.0(5)T |
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. |
Cisco IOS XE Release 3.7S |
This command was integrated into Cisco IOS XE Release 3.7S. |
15.2(2)SNG |
This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers. |
The bgp default ipv4-unicast command is used to enable the automatic exchange of IPv4 address family prefixes. The neighbor activate address family configuration command must be entered in each IPv4 address family session before prefix exchange will occur.
In the following example, the automatic exchange of IP version 4 unicast address family routing information is disabled:
Device(config)# router bgp 50000 Device(config-router)# no bgp default ipv4-unicast
Command |
Description |
---|---|
neighbor activate |
Enables the exchange of information with a neighboring router. |
To configure a Border Gateway Protocol (BGP) routing process to immediately reset external BGP peering sessions if the link used to reach these peers goes down, use the bgp fast-external-fallover command in router configuration mode. To disable BGP fast external fallover, use the no form of this command.
bgp fast-external-fallover
no bgp fast-external-fallover
This command has no arguments or keywords.
BGP fast external fallover is enabled by default in Cisco IOS software.
Router configuration (config-router)
Release |
Modification |
---|---|
10.0 |
This command was introduced. |
12.0(7)T |
Address family configuration mode support 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. |
The bgp fast-external-fallover command is used to disable or enable fast external fallover for BGP peering sessions with directly connected external peers. The session is immediately reset if link goes down. Only directly connected peering sessions are supported.
If BGP fast external fallover is disabled, the BGP routing process will wait until the default hold timer expires (3 keepalives) to reset the peering session. BGP fast external fallover can also be configured on a per-interface basis using the ip bgp fast-external-fallover interface configuration command.
In the following example, the BGP fast external fallover feature is disabled. If the link through which this session is carried flaps, the connection will not be reset.
Router(config)# router bgp 50000 Router(config-router)# no bgp fast-external-fallover
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. |
ip bgp fast-external-fallover |
Configures per-interface BGP fast external fallover. |
To enable the Border Gateway Protocol (BGP) graceful restart capability globally for all BGP neighbors, use the bgp graceful-restart command in address family or in router configuration mode. To disable the BGP graceful restart capability globally for all BGP neighbors, use the no form of this command.
bgp graceful-restart [ restart-time seconds | stalepath-time seconds ] [all]
no bgp graceful-restart
restart-time seconds |
(Optional) Sets the maximum time period that the local router will wait for a graceful-restart-capable neighbor to return to normal operation after a restart event occurs. The default value for this argument is 120 seconds. The configurable range of values is from 1 to 3600 seconds. |
stalepath-time seconds |
(Optional) Sets the maximum time period that the local router will hold stale paths for a restarting peer. All stale paths are deleted after this timer expires. The default value for this argument is 360 seconds. The configurable range of values is from 1 to 3600 seconds |
all |
(Optional) Enables BGP graceful restart capability for all address family modes. |
The following default values are used when this command is entered without any keywords or arguments:
restart-time : 120 seconds stalepath-time: 360 seconds
Note |
Changing the restart and stalepath timer values is not required to enable the BGP graceful restart capability. The default values are optimal for most network deployments, and these values should be adjusted only by an experienced network operator. |
Address-family configuration (config-router-af)
Router configuration (config-router)
Release |
Modification |
---|---|
12.0(22)S |
This command was introduced. |
12.2(15)T |
This command was integrated into Cisco IOS Release 12.2(15)T. |
12.2(18)S |
This command was integrated into Cisco IOS Release 12.2(18)S. |
12.2(28)SB |
Support for this command was added into Cisco IOS Release 12.2(28)SB. |
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 |
Support for IPv6 was added. The optional all keyword was added. |
12.2(33)SRE |
This command was modified. It was integrated into Cisco IOS Release 12.2(33)SRE. |
12.2(33)XNE |
This command was modified. It was integrated into Cisco IOS Release 12.2(33)XNE . |
The bgp graceful-restart command is used to enable or disable the graceful restart capability globally for all BGP neighbors in a BGP network. 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.
The BGP graceful restart capability is enabled by default when a supporting version of Cisco IOS software is installed. The default timer values for this feature are optimal for most network deployments. We recommend that they are adjusted only by experienced network operators. When adjusting the timer values, the restart timer should not be set to a value greater than the hold time that is carried in the OPEN message. If consecutive restart operations occur, routes (from a restarting router) that were previously marked as stale will be deleted.
Note |
Changing the restart and stalepath timer values is not required to enable the BGP graceful restart capability. The default values are optimal for most network deployments, and these values should be adjusted only by an experienced network operator. |
In the following example, the BGP graceful restart capability is enabled:
Router# configure terminal Router(config)# router bgp 65000 Router(config-router)# bgp graceful-restart
In the following example, the restart timer is set to 130 seconds:
Router# configure terminal Router(config)# router bgp 65000 Router(config-router)# bgp graceful-restart restart-time 130
In the following example, the stalepath timer is set to 350 seconds:
Router# configure terminal Router(config)# router bgp 65000 Router(config-router)# bgp graceful-restart stalepath-time 350
Command |
Description |
---|---|
show ip bgp |
Displays entries in the BGP routing table. |
show ip bgp neighbors |
Displays information about the TCP and BGP connections to neighbors. |
To enable logging of BGP neighbor resets, use the bgp log-neighbor-changes command in router configuration mode. To disable the logging of changes in BGP neighbor adjacencies, use the no form of this command.
bgp log-neighbor-changes
no bgp log-neighbor-changes
This command has no arguments or keywords.
Logging of BGP neighbor resets is not enabled.
Router configuration (config-router)
Release |
Modification |
---|---|
11.1CC |
This command was introduced. |
12.0 |
This command was integrated into Cisco IOS release 12.0. |
12.0(7)T |
Address family configuration mode support was added. |
12.2(33)SRA |
This command was integrated into Cisco IOS Release 12.2(33)SRA. |
12.2(33)SRB |
Support for IPv6 was 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.7S |
This command was integrated into Cisco IOS XE Release 3.7S. |
15.1(2)SNG |
This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers. |
The bgp log-neighbor-changes command enables logging of BGP neighbor status changes (up or down) and resets for troubleshooting network connectivity problems and measuring network stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network and should be investigated.
Using the bgp log-neighbor-changes command to enable status change message logging does not cause a substantial performance impact, unlike, for example, enabling per BGP update debugging. If the UNIX syslog facility is enabled, messages are sent to the UNIX host running the syslog daemon so that the messages can be stored and archived. If the UNIX syslog facility is not enabled, the status change messages are retained in the internal buffer of the router, and are not stored to disk. You can set the size of this buffer, which is dependent upon the available RAM, using the logging buffered command.
The neighbor status change messages are not tracked if the bgp log-neighbor-changes command is not enabled, except for the reset reason, which is always available as output of the show ip bgp neighbors and show bgp ipv6 neighbors commands.
The eigrp log-neighbor-changes command enables logging of Enhanced Interior Gateway Routing Protocol (EIGRP) neighbor adjacencies, but messages for BGP neighbors are logged only if they are specifically enabled with the bgp log-neighbor-changes command.
Use the show logging command to display the log for the BGP neighbor changes.
The following example logs neighbor changes for BGP in router configuration mode:
Device(config)# bgp router 40000 Device(config-router)# bgp log-neighbor-changes
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. |
eigrp log-neighbor-changes |
Enables the logging of neighbor adjacency changes to monitor the stability of the routing system and to help detect problems. |
logging buffered |
Logs messages to an internal buffer. |
show ip bgp ipv4 |
Displays information about the TCP and BGP connections to neighbors. |
show ip bgp neighbors |
Displays information about BGP neighbors. |
show logging |
Displays the state of logging (syslog). |
To configure a fixed router ID for the local Border Gateway Protocol (BGP) routing process, use the bgp router-id command in router or address family configuration mode. To remove the fixed router ID from the running configuration file and restore the default router ID selection, use the no form of this command.
bgp router-id { ip-address | vrf auto-assign }
no bgp router-id [ vrf auto-assign ]
bgp router-id { ip-address | auto-assign }
no bgp router-id
ip-address |
Router identifier in the form of an IP address. |
vrf |
Configures a router identifier for a Virtual Routing and Forwarding (VRF) instance. |
auto-assign |
Automatically assigns a router identifier for each VRF. |
The following behavior determines local router ID selection when this command is not enabled:
Address family configuration (config-router-af)
Router configuration (config-router)
Release |
Modification |
---|---|
10.0 |
This command was introduced. |
12.2(33)SRA |
The vrfand auto-assign keywords were added, and this command was integrated into Cisco IOS Release 12.2(33)SRA. |
12.2(31)SB2 |
This command, including the vrfand auto-assign keywords, was integrated into Cisco IOS Release 12.2(31)SB2. |
12.2(33)SXH |
This command, including the vrfand auto-assign keywords, was integrated into Cisco IOS Release 12.2(33)SXH. |
12.4(20)T |
The vrfand auto-assign keywords were added. |
The bgp router-id command is used to configure a fixed router ID for the local BGP routing process. The router ID is entered in IP address format. Any valid IP address can be used, even an address that is not locally configured on the router. If you use an IP address from a local interface, we recommend that you use the address of a loopback interface rather than the address of a physical interface. (A loopback interface is more effective than a fixed interface as an identifier because there is no physical link to go down.) Peering sessions are automatically reset when the router ID is changed.
In Cisco IOS Release 12.2(33)SRA, 12.2(31)SB2, 12.2(33)SXH, 12.4(20)T, and later releases, the Per-VRF Assignment of BGP Router ID feature introduced VRF-to-VRF peering in BGP on the same router. BGP is designed to refuse a session with itself because of the router ID check. The per-VRF assignment feature allows a separate router ID per VRF. The router ID can be manually configured for each VRF or automatically assigned either for each VRF or globally under address family configuration mode.
The following example shows how to configure the local router with a fixed BGP router ID of 192.168.254.254:
router bgp 50000 bgp router-id 192.168.254.254
The following example shows how to configure a BGP router ID for the VRF named VRF1. This configuration is done under address family IPv4 VRF configuration mode.
router bgp 45000 address-family ipv4 vrf VRF1 bgp router-id 10.1.1.99
The following example shows how to configure an automatically assigned VRF BGP router ID for all VRFs. This configuration is done under BGP router configuration mode.
router bgp 45000 bgp router-id vrf auto-assign
The following example shows how to configure an automatically assigned VRF BGP router ID for a single VRF. This configuration is done under address family IPv4 VRF configuration mode.
router bgp 45000 address-family ipv4 vrf VRF2 bgp router-id auto-assign
Command |
Description |
---|---|
show ip bgp |
Displays entries in the BGP routing table. |
show ip bgp vpnv4 |
Displays VPNv4 address information from the BGP routing table. |
To configure a Border Gateway Protocol (BGP) speaker to perform inbound soft reconfiguration for peers that do not support the route refresh capability, use the bgp soft-reconfig-backup command in address-family or r outer configuration mode. To disable this function, use the no form of this command.
bgp soft-reconfig-backup
no bgp soft-reconfig-backup
This command has no arguments or keywords.
Inbound soft reconfiguration for peers that do not support the route refresh capability is not performed.
Address-family configuration (config-router-af)
Router configuration (config-router)
Release |
Modification |
---|---|
12.3(14)T |
This command was introduced. |
The bgp soft-reconfig-backup command is used to configure BGP to perform inbound soft reconfiguration for peers that do not support the route refresh capability. The configuration of this command allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the route refresh capability are unaffected by the configuration of this command.
Use the show ip bgp neighbors command to determine if a peer supports the route refresh capability. If supported, the following will be displayed in the output:
Route refresh: advertised and received(new)
Use the show ip bgp command to determine if the BGP speaker is storing inbound updates for peer that does not support the route refresh capability. If updates are stored, the following will be displayed in the output:
(received-only)
The following example, starting in Global configuration mode, configures the router perform inbound soft reconfiguration only if the peer does not support the route refresh capability:
Router(config)# router bgp 50000 Router(config-router)# bgp soft-reconfig-backup Router(config-router)# neighbor 10.1.1.1 remote-as 40000 Router(config-router)# neighbor 192.168.1.1 remote-as 60000
Command |
Description |
---|---|
show ip bgp |
Displays entries in the Border Gateway Protocol (BGP) routing table. |
show ip bgp neighbors |
Displays information about the TCP and Border Gateway Protocol (BGP) connections to neighbors. |