-
null
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 no form of this command.
neighbor peer-group-name peer-group
no neighbor peer-group-name peer-group
peer-group-name |
Name of the BGP peer group. |
There is no BGP peer group.
Address family configuration
Router configuration
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.
Peer group members will always inherit the following configuration options: remote-as (if configured), version, update-source, out-route-map, out-filter-list, out-dist-list, minimum-advertisement-interval, and next-hop-self. All the peer group members will inherit changes made to the peer group.
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.
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
iBGP 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 171.69.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 171.69.232.53 peer-group internal
neighbor 171.69.232.54 peer-group internal
neighbor 171.69.232.55 peer-group internal
neighbor 171.69.232.55 filter-list 3 in
eBGP Peer Group
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 171.69.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 171.69.232.90 remote-as 200
neighbor 171.69.232.90 peer-group external-peers
neighbor 171.69.232.100 remote-as 300
neighbor 171.69.232.100 peer-group external-peers
neighbor 171.69.232.110 remote-as 400
neighbor 171.69.232.110 peer-group external-peers
neighbor 171.69.232.110 filter-list 400 in
Multiprotocol BGP Peer Group
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
To distribute BGP neighbor information as specified in a prefix list, use the neighbor prefix-list command in address family or router configuration mode. To remove an entry, use the no form of this command.
neighbor {ip-address | peer-group-name} prefix-list prefix-list-name {in | out}
no neighbor {ip-address | peer-group-name} prefix-list prefix-list-name {in |out}
No BGP neighbor is specified.
Address family configuration
Router configuration
|
|
---|---|
12.0 |
This command was introduced. |
11.0 |
The peer-group-name argument was added. |
12.0(7)T |
Address family configuration mode was added. |
Using prefix lists is one of two ways to filter BGP advertisements. The other way is to use AS-path filters, as with the ip as-path access-list global configuration command and the neighbor filter-list command, and access or prefix lists, as with the neighbor distribute-list command.
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.
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 prefix-list or neighbor distribute-list) can be applied to each inbound or outbound direction.
The following router configuration mode example applies the prefix list named abc to incoming advertisements to neighbor 120.23.4.1:
router bgp 109
network 10.108.0.0
neighbor 120.23.4.1 prefix-list abc in
The following address family configuration mode example applies the prefix list named abc to incoming advertisements to neighbor 120.23.4.1:
router bgp 109
address-family ipv4 unicast
network 10.108.0.0
neighbor 120.23.4.1 prefix-list abc in
The following example applies the prefix list named CustomerA to outgoing advertisements to neighbor 120.23.4.1:
router bgp 109
network 10.108.0.0
neighbor 120.23.4.1 prefix-list CustomerA out
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 | peer-group-name} remote-as as-number
no neighbor {ip-address | peer-group-name} remote-as as-number
ip-address |
IP address of the neighbor. |
peer-group-name |
Name of a BGP peer group. |
as-number |
Autonomous system to which the neighbor belongs. |
There are no BGP or multiprotocol BGP neighbor peers.
Router configuration
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 using the neighbor activate command in address family configuration mode.
The following example specifies that a router at the address 10.108.1.2 is a neighbor in autonomous system number 109:
router bgp 110
network 10.108.0.0
neighbor 10.108.1.2 remote-as 109
The following example assigns a BGP router to autonomous system 109, 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.31.7.0 with the neighbor routers. The first router listed is in the same Class B network address space, but in a different autonomous system; the second neighbor remote-as command illustrates specification of an internal 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.
router bgp 109
network 10.108.0.0
network 192.31.7.0
neighbor 10.108.200.1 remote-as 167
neighbor 10.108.234.2 remote-as 109
neighbor 150.136.64.19 remote-as 99
The following example configures neighbor 10.108.1.1 in autonomous system 1 to exchange only multicast routes:
router bgp 109
neighbor 10.108.1.1 remote-as 1
neighbor 131.108 1.2 remote-as 1
neighbor 172.16.2.2 remote-as 2
address-family ipv4 multicast
neighbor 10.108.1.1 activate
neighbor 131.108 1.2 activate
neighbor 172.16.2.2 activate
The following example configures neighbor 10.108.1.1 in autonomous system 1 to exchange only unicast routes:
router bgp 109
neighbor 10.108.1.1 remote-as 1
neighbor 131.108 1.2 remote-as 1
neighbor 172.16.2.2 remote-as 2
|
|
neighbor remote-as |
Creates a BGP peer group. |
router bgp |
Configures the BGP routing process. |
To remove private autonomous system numbers from t in outbound routing updates, use the neighbor remove-private-as command in router configuration mode. To disable this function, use the no form of this command.
neighbor {ip-address | peer-group-name} remove-private-as
no neighbor {ip-address | peer-group-name} remove-private-as
ip-address |
IP address of the BGP-speaking neighbor. |
peer-group-name |
Name of a BGP peer group. |
This command is disabled by default.
Router configuration
|
|
---|---|
10.3 |
This command was introduced. |
11.0 |
The peer-group-name argument was added. |
This command is available for external BGP (eBGP) neighbors only.
When an update is passed to the external neighbor, if the autonomous system path includes private autonomous system numbers, the software will drop the private autonomous system numbers.
If the autonomous system path includes both private and public autonomous system numbers, the software considers this to be a configuration error and does not remove the private autonomous system numbers.
If the autonomous system path contains the autonomous system number of the eBGP neighbor, the private autonomous system numbers will not be removed.
If this command is used with confederation, it will work as long as the private autonomous system numbers follow the confederation portion of the autonomous path.
The private autonomous system values are from 64512 to 65535.
The following example shows a configuration that will remove the private autonomous system number from the updates sent to 172.16.2.33. The result is that the autonomous system path for the paths advertised by 10.108.1.1 through autonomous system 100 will just contain "100" (as seen by autonomous system 2051).
router bgp 100
neighbor 10.108.1.1 description peer with private-as
neighbor 10.108.1.1 remote-as 65001
neighbor 172.16.2.33 description eBGP peer
neighbor 172.16.2.33 remote-as 2051
neighbor 172.16.2.33 remove-private-as
router-in-AS100# show ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 15
Paths: (1 available, best #1)
Advertised to non peer-group peers:
172.16.2.33
65001
10.108.1.1 from 10.108.1.1
Origin IGP, metric 0, localpref 100, valid, external, best
router-in-AS2501# show ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 3
Paths: (1 available, best #1)
Not advertised to any peer
2
172.16.2.32 from 172.16.2.32
Origin IGP, metric 0, localpref 100, valid, external, best
|
|
neighbor remote-as |
Allows entries to the BGP neighbor table. |
show ip bgp |
Displays entries in the BGP routing table. |
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} route-map map-name {in | out}
no neighbor {ip-address | peer-group-name} route-map map-name {in | out}
No route maps are applied to a peer.
Address family configuration
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
12.0(7)T |
Address family configuration mode was added. |
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 IP Version 4 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 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
To configure the router as a BGP route reflector and configure the specified neighbor as its client, use the neighbor route-reflector-client command in address family or router configuration mode. To indicate that the neighbor is not a client, use the no form of this command.
neighbor ip-address route-reflector-client
no neighbor ip-address route-reflector-client
ip-address |
IP address of the BGP neighbor being identified as a client. |
There is no route reflector in the autonomous system.
Address family configuration
Router configuration
|
|
---|---|
11.1 |
This command was introduced. |
12.0(7)T |
Address family configuration mode was added. |
By default, all internal BGP (iBGP) speakers in an autonomous system must be fully meshed, and neighbors do not readvertise iBGP learned routes to neighbors, thus preventing a routing information loop. When all the clients are disabled, the local router is no longer a route reflector.
If you use route reflectors, all iBGP speakers need not be fully meshed. In the route reflector model, an Interior BGP peer is configured to be a route reflector responsible for passing iBGP learned routes to iBGP neighbors. This scheme eliminates the need for each router to talk to every other router.
Use the neighbor route-reflector-client command to configure the local router as the route reflector and the specified neighbor as one of its clients. All the neighbors configured with this command will be members of the client group and the remaining iBGP peers will be members of the nonclient group for the local route reflector.
The bgp client-to-client reflection command controls client-to-client reflection.
In the following router configuration mode example, the local router is a route reflector. It passes learned iBGP routes to the neighbor at 172.16.70.24.
router bgp 5
neighbor 172.16.70.24 route-reflector-client
In the following address family configuration mode example, the local router is a route reflector. It passes learned iBGP routes to the neighbor at 172.16.70.24.
router bgp 5
address-family ipv4 unicast
neighbor 172.16.70.24 route-reflector-client
To specify that a communities attribute should be sent to a BGP neighbor, use the neighbor send-community command in address family or router configuration mode. To remove the entry, use the no form of this command.
neighbor {ip-address | peer-group-name} send-community [both | standard | extended]
no neighbor {ip-address | peer-group-name} send-community
No communities attribute is sent to any neighbor.
Address family configuration
Router configuration
|
|
---|---|
10.3 |
This command was introduced. |
11.0 |
The peer-group-name argument was added. |
12.0(7)T |
Address family configuration mode was added. |
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.
In the following router configuration mode example, the router belongs to autonomous system 109 and is configured to send the communities attribute to its neighbor at IP address 172.16.70.23:
router bgp 109
neighbor 172.16.70.23 send-community
In the following address family configuration mode example, the router belongs to autonomous system 109 and is configured to send the communities attribute to its neighbor at IP address 172.16.70.23:
router bgp 109
address-family ipv4 multicast
neighbor 172.16.70.23 send-community
To disable a neighbor or peer group, use the neighbor shutdown command in router configuration mode. To reenable the neighbor or peer group, use the no form of this command.
neighbor {ip-address | peer-group-name} shutdown
no neighbor {ip-address | peer-group-name} shutdown
ip-address |
IP address of the neighbor. |
peer-group-name |
Name of a BGP peer group. |
No change is made to the status of any BGP neighbor or peer group.
Router configuration
|
|
---|---|
12.0 |
This command was introduced. |
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.
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
|
|
neighbor maximum-prefix |
Controls how many prefixes can be received from a neighbor. |
show ip bgp summary |
Displays the status of all BGP connections. |
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 no form of this command.
neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound]
no neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound]
ip-address |
IP address of the BGP-speaking neighbor. |
peer-group-name |
Name of a BGP peer group. |
inbound |
(Optional) Indicates that the update to be stored is an incoming update. |
Soft reconfiguration is not enabled.
Router configuration
|
|
---|---|
11.2 |
This command was introduced. |
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 be used only 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 {* | ip-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 neighbors command. 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.
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
To set the timers for a specific BGP peer or peer group, use the neighbor timers command in router configuration mode. To clear the timers for a specific BGP peer or peer group, use the no form of this command.
neighbor [ip-address | peer-group-name] timers keepalive holdtime
no neighbor [ip-address | peer-group-name] timers keepalive holdtime
keepalive: 60 seconds
holdtime: 180 seconds
Router configuration
|
|
---|---|
12.0 |
This command was introduced. |
The timers configured for a specific neighbor or peer group override the timers configured for all BGP neighbors using the timers bgp command.
The following example changes the keepalive timer to 70 seconds and the hold-time timer to 210 seconds for the BGP peer 192.98.47.0:
router bgp 109 neighbor 192.98.47.0 timers 70 210
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
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. |
No routes are unsuppressed.
Address family configuration
Router configuration
|
|
---|---|
12.0(5)T |
This command was introduced. |
12.0(5)T |
Address family configuration mode was added. |
Use of the neighbor unsuppress-map command allows specified suppressed routes to be advertised.
The following BGP router configuration shows that routes specified by a route map named internal-map 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
To have the Cisco IOS software allow Border Gateway Protocol (BGP) sessions to use a specific 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 | peer-group-name} update-source interface-type
no neighbor {ip-address | peer-group-name} update-source interface-type
ip-address |
IP address of the BGP-speaking neighbor. |
peer-group-name |
Name of a BGP peer group. |
interface-type |
Interface to be used as the source. |
Best local address
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
This command works in conjunction with any specified interface on the router. The loopback interface is the interface that is most commonly used with this feature. For more information, refer to the loopback interface feature described in the "Interface Configuration Overview" chapter of the Cisco IOS Interface 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 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 110
network 172.16.0.0
neighbor 172.16.2.3 remote-as 110 neighbor 172.16.2.3 update-source Loopback0
|
|
neighbor remote-as |
Creates a BGP peer group. |
To configure the Cisco IOS software to accept only a particular BGP version, use the neighbor version command in router configuration mode. To use the default version level of a neighbor, use the no form of this command.
neighbor {ip-address | peer-group-name} version number
no neighbor {ip-address | peer-group-name} version number
BGP Version 4
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
Entering this command disables dynamic version negotiation.
Note The Cisco implementation of BGP in Cisco IOS Release 12.0(5)T or earlier releases supports BGP Versions 2, 3, and 4, with dynamic negotiation down to Version 2 if a neighbor does not accept BGP Version 4 (the default version).
The Cisco implementation of BGP in Cisco IOS Release 12.0(6)T or later releases supports BGP Version 4 only and does not support dynamic negotiation down to Version 2.
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 following example locks down to Version 4 of the BGP protocol:
router bgp 109 neighbor 131.104.27.2 version 4
|
|
neighbor remote-as |
Creates a BGP peer group. |
To assign a weight to a neighbor connection, use the neighbor weight command in address family or router configuration mode. To remove a weight assignment, use the no form of this command.
neighbor {ip-address | peer-group-name} weight number
no neighbor {ip-address | peer-group-name} weight number
ip-address |
IP address of the neighbor. |
peer-group-name |
Name of a BGP peer group. |
number |
Weight to assign. Acceptable values are from 0 to 65535. |
Routes learned through another BGP peer have a default weight of 0 and routes sourced by the local router have a default weight of 32768.
Address family configuration
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
12.0(7)T |
Address family configuration mode was added. |
All routes learned from this neighbor will have the assigned weight initially. The route with the highest weight will be chosen as the preferred route when multiple routes are available to a particular network.
The weights assigned with the set weight route-map command override the weights assigned using the neighbor weight command.
Note For weight changes to take effect, use of the clear ip bgp peer-group * command may be necessary.
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 following router configuration mode example sets the weight of all routes learned via 172.16.12.1 to 50:
router bgp 109 neighbor 172.16.12.1 weight 50
The following address family configuration mode example sets the weight of all routes learned via 172.16.12.1 to 50:
router bgp 109
address-family ipv4 multicast neighbor 172.16.12.1 weight 50
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, use the no form of this command.
network network-number [mask network-mask] [route-map map-name]
no network network-number [mask network-mask] [route-map map-name]
No networks are specified.
Address family configuration
Router configuration
This command first appeared in Cisco IOS Release 10.0. The limit of 200 network commands per BGP router was removed in Cisco IOS Release 12.0. The maximum number of network commands you can use is now determined by the resources of the router, such as the amount of configured NVRAM or RAM.
For the information to be advertised by BGP or multiprotocol BGP, a route to the network specified must be present in the routing table. The routing information may be learned from connected routes, dynamic routing, and from static route sources.
Use the route-map keyword to apply a route map to a network to be advertised by the BGP and multiprotocol BGP routing processes. The specified route map can be used in filtering the network, or in setting attributes on the routes advertised by the network command.
The following example sets up network 10.108.0.0 to be included in the BGP updates:
router bgp 65000
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 65000
address family ipv4 multicast
network 10.108.0.0
The following example shows the use of the mask keyword:
router bgp 65001
network 10.0.0.0
mask 255.0.0.0
!
ip route 10.0.0.0 255.0.0.0 null0
Note This configuration will advertise a supernet 10.0.0.0/8. It is necessary to use a static route to provide the information because this summary route may not be learned through dynamic routing or from a connected interface. Specifying the null 0 interface with the ip route command guarantees that the routing information will always be present in the routing table.
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
ip-address |
IP address of the network to which you want a backdoor route. |
No network is marked as having a back door.
Address family configuration
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
12.0(7)T |
Address family configuration mode was added. |
A backdoor network is assigned an administrative distance of 200. The objective is to make Interior Gateway Protocol (IGP) learned routes preferred. A back door network is treated as a local network, except that it is not advertised. A network that is marked as a backdoor 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.
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
To configure the BGP routing process, use the router bgp command in global configuration mode. To remove a routing process, use the no form of this command.
router bgp as-number
no router bgp as-number
as-number |
Number of an autonomous system that identifies the router to other BGP routers and tags the routing information passed along. |
No BGP routing process is enabled by default.
Global configuration
|
|
---|---|
10.0 |
This command was introduced. |
This command allows you to set up a distributed routing core that automatically guarantees the loop-free exchange of routing information between autonomous systems.
The following example configures a BGP process for autonomous system 120:
router bgp 120
|
|
network (BGP and multiprotocol BGP) |
Specifies the list of networks for the BGP routing process. |
timers bgp |
Adjusts BGP network timers. |
To modify an autonomous system path for BGP routes, use the set as-path command in route-map configuration mode. To not modify the autonomous system path, use the no form of this command.
set as-path {tag | prepend as-path-string}
no set as-path {tag | prepend as-path-string}
Autonomous system path is not modified.
Route-map configuration
|
|
---|---|
11.0 |
This command was introduced. |
The only global BGP metric available to influence the best path selection is the autonomous system path length. By varying the length of the autonomous system path, a BGP speaker can influence the best path selection by a peer further away.
By allowing you to convert the tag into an autonomous system path, the set as-path tag variation of this command modifies the autonomous system length. The set as-path prepend variation allows you to "prepend" an arbitrary autonomous system path string to BGP routes. Usually the local autonomous system number is prepended multiple times, increasing the autonomous system path length.
The following example converts the tag of a redistributed route into an autonomous system path:
route-map set-as-path-from-tag
set as-path tag
!
router bgp 100
redistribute ospf 109 route-map set-as-path-from-tag
The following example prepends 100 100 100 to all the routes advertised to 10.108.1.1:
route-map set-as-path
match as-path 1
set as-path prepend 100 100 100
!
router bgp 100
neighbor 10.108.1.1 route-map set-as-path out
To remove communities from the community attribute of an inbound or outbound update, use the set comm-list delete command in route-map configuration mode. To negate a previous set comm-list delete command, use the no form of this command.
set comm-list community-list-number delete
no set comm-list community-list-number delete
community-list-number |
A standard or extended community list number. |
No communities are removed.
Route-map configuration
|
|
---|---|
12.0 |
This command was introduced. |
This route-map set command removes communities from the community attribute of an inbound or outbound update using a route map to filter and determine the communities to be deleted. Depending upon whether the route map is applied to the inbound or outbound update for a neighbor, each community that passes the route map permit clause and matches the given community list will be removed from the community attribute being received from or sent to the BGP neighbor.
Each entry of a standard community list should list only one community when used with the set comm-list delete command. For example, in order to be able to delete communities 10:10 and 10:20, you must use the following format to create the entries:
ip community-list 5 permit 10:10 ip community-list 5 permit 10:20
The following format for a community list entry, while acceptable otherwise, does not work with the set comm-list delete command:
config ip community-list 5 permit 10:10 10:20
When both the set community community-list-number and set comm-list delete commands are configured in the same sequence of a route map attribute, the deletion operation (set comm-list delete) is performed before the set operation (set community community-list-number).
In the following example, the communities 100:10 and 100:20 (if present) will be deleted from updates received from 171.69.233.33. Also, except for 100:50, all communities beginning with 100: will be deleted from updates sent to 171.69.233.33.
router bgp 100 neighbor 171.69.233.33 remote-as 120 neighbor 171.69.233.33 route-map ROUTEMAPIN in neighbor 171.69.233.33 route-map ROUTEMAPOUT out ! ip community-list 1 permit 100:10 ip community-list 1 permit 100:20 ! ip community-list 120 deny 100:50 ip community-list 120 permit 100:.* ! route-map ROUTEMAPIN permit 10 set comm-list 1 delete ! route-map ROUTEMAPOUT permit 10 set comm-list 120 delete
|
|
set community |
Sets the BGP communities attribute. |
To set the BGP communities attribute, use the set community route map configuration command. To delete the entry, use the no form of this command.
set community {community-number [additive]} | none
no set community {community-number [additive]} | none
No BGP communities attributes exist.
Route-map configuration
|
|
---|---|
10.3 |
This command was introduced. |
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
Use the route-map global configuration command, and the match and set route map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route map configuration commands specify the redistribution set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
In the following example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to no-export (these routes will not be advertised to any external BGP [eBGP] peers).
route-map set_community 10 permit
match as-path 1
set community 109
route-map set_community 20 permit
match as-path 2
set community no-export
In the following similar example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to local-as (the router will not advertise this route to peers outside the local autonomous system.
route-map set_community 10 permit
match as-path 1
set community 109
route-map set_community 20 permit
match as-path 2
set community local-as
To set the BGP route dampening factors, use the set dampening route map configuration command. To disable this function, use the no form of this command.
set dampening half-life reuse suppress max-suppress-time
no set dampening
This command is disabled by default.
Route-map configuration
|
|
---|---|
11.0 |
This command was introduced. |
Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
When a BGP peer is reset, the route is withdrawn and the flap statistics cleared. In this instance, the withdrawal does not incur a penalty even though route flap dampening is enabled.
The following example sets the half life to 30 minutes, the reuse value to 1500, the suppress value to 10000; and the maximum suppress time to 120 minutes:
route-map tag
match as path 10
set dampening 30 1500 10000 120
!
router bgp 100
neighbor 171.69.233.52 route-map tag in
To set Border Gateway Protocol (BGP) extended community attributes, use the set extcommunity command in route-map configuration mode. To delete the entry, use the no form of this command.
set extcommunity {rt extended-community-value [additive] | soo extended-community-value}
no set extcommunity {rt extended-community-value [additive] | soo extended-community-value}
Specifying new route targets with the rt keyword replaces existing route targets by default, unless the additive keyword is used. The use of the additive keyword adds the new route target to the existing route target list but does not replace any existing route targets.
Route-map configuration
|
|
---|---|
12.1 |
This command was introduced. |
Extended community attributes are used to configure, filter, and identify routes for virtual routing and forwarding instances (VRFs) and Multiprotocol Label Switching (MPLS) Virtual Private Networks (VPNs).
The set extcommunity command is used to configure set clauses that use extended community attributes in route maps. All of the standard rules of match and set clauses apply to the configuration of extended community attributes.
The route target (RT) extended community attribute is configured with the rt keyword. This attribute is used to identify a set of sites and VRFs that may receive routes that are tagged with the configured route target. Configuring the route target extended attribute with a route allows that route to be placed in the per-site forwarding tables that are used for routing traffic that is received from corresponding sites.
The site of origin (SOO) extended community attribute is configured with the soo keyword. This attribute uniquely identifies the site from which the Provider Edge (PE) router learned the route. All routes learned from a particular site must be assigned the same SOO extended community attribute, whether a site is connected to a single PE router or multiple PE routers. Configuring this attribute prevents routing loops from occurring when a site is multihomed. The SOO extended community attribute is configured on the interface and is propagated into BGP through redistribution. The SOO can be applied to routes that are learned from VRFs. The SOO should not be configured for stub sites or sites that are not multihomed.
The following example sets the route target to extended community attribute 100:2 for routes that are permitted by the route map:
Router(config)# access-list 2 permit 192.168.78.0 255.255.255.0
Router(config)# route-map MAP_NAME permit 10
Router(config-route-map)# match ip-address 2
Router(config-route-map)# set extcommunity rt 100:2
The following example sets the route target to extended community attribute 100:3 for routes that are permitted by the route map. The use of the additive keyword adds route target 100:3 to the existing route target list but does not replace any existing route targets.
Router(config)# access-list 3 permit 192.168.79.0 255.255.255.0
Router(config)# route-map MAP_NAME permit 10
Router(config-route-map)# match ip-address 3
Router(config-route-map)# set extcommunity rt 100:3 additive
Note Configuring route targets with the set extcommunity command will replace existing route targets, unless the additive keyword is used.
The following example sets the site of origin to extended community attribute 100:4 for routes that are permitted by the route map:
Router(config)# access-list 4 permit 192.168.80.0 255.255.255.0
Router(config)# route-map MAP_NAME permit 10
Router(config-route-map)# match ip-address 4
Router(config-route-map)# set extcommunity soo 100:4
To indicate where to output packets that pass a match clause of a route map for policy routing, use the set ip next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.
set ip next-hop ip-address [... ip-address] [peer-address]
no set ip next-hop ip-address [... ip-address] [peer-address]
ip-address |
IP address of the next hop to which packets are output. The next hop must be an adjacent router. |
peer-address |
(Optional) Sets the next hop to be the BGP peering address. |
This command is disabled by default.
Route-map configuration
|
|
---|---|
11.0 |
This command was introduced. |
12.0 |
The peer-address keyword was added. |
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.
Use the ip policy route-map interface configuration command, the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.
If the interface associated with the first next hop specified with the set ip next-hop command is down, the optionally specified IP addresses are tried in turn.
When the set ip next-hop command is used with the peer-address keyword in an inbound route map of a BGP peer, the next hop of the received matching routes will be set to be the neighbor peering address, overriding any third-party next hops. So the same route map can be applied to multiple BGP peers to override third-party next hops.
When the set ip next-hop command is used with the peer-address keyword in an outbound route map of a BGP peer, the next hop of the advertised matching routes will be set to be the peering address of the local router, thus disabling the next hop calculation. The set ip next-hop command has finer granularity than the per-neighbor neighbor next-hop-self command, because you can set the next hop for some routes, but not others. The neighbor next-hop-self command sets the next hop for all routes sent to that neighbor.
The set clauses can be used in conjunction with one another. They are evaluated in the following order:
1. set ip next-hop
2. set interface
3. set ip default next-hop
4. set default interface
In the following example, three routers are on the same FDDI LAN (with IP addresses 10.1.1.1, 10.1.1.2, and 10.1.1.3). Each is in a different autonomous system. The set ip next-hop peer-address command specifies that traffic from the router (10.1.1.3) in remote autonomous system 300 for the router (10.1.1.1) in remote autonomous system 100 that matches the route map is passed through the router bgp 200, rather than sent directly to the router (10.1.1.1) in autonomous system 100 over their mutual connection to the LAN.
router bgp 200
neighbor 10.1.1.3 remote-as 300
neighbor 10.1.1.3 route-map set-peer-address out
neighbor 10.1.1.1 remote-as 100
route-map set-peer-address permit 10
set ip next-hop peer-address
To set the Multi Exit Discriminator (MED) value on prefixes advertised to external BGP (eBGP) neighbors to match the Interior Gateway Protocol (IGP) metric of the next hop, use the set metric-type internal command in route-map configuration mode. To return to the default, use the no form of this command.
set metric-type internal
no set metric-type internal
This command has no arguments or keywords.
This command is disabled by default.
Route-map configuration
|
|
---|---|
10.3 |
This command was introduced. |
This command will cause BGP to advertise a MED value that corresponds to the IGP metric associated with the next hop of the route. This command applies to generated, internal BGP (iBGP)-, and eBGP-derived routes.
If this command is used, multiple BGP speakers in a common autonomous system can advertise different MED values for a particular prefix. Also, note that if the IGP metric changes, BGP will readvertise the route every 10 minutes.
Use the route-map global configuration command and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all of the match criteria of the route map are met. When all match criteria are met, all set actions are performed.
Note This command is not supported for redistributing routes into Border Gateway Protocol (BGP).
In the following example, the MED value for all the advertised routes to neighbor 172.16.2.3 is set to the corresponding IGP metric of the next hop:
router bgp 109
network 172.16.0.0
neighbor 172.16.2.3 remote-as 200
neighbor 172.16.2.3 route-map setMED out
!
route-map setMED permit 10
match as-path 1
set metric-type internal
!
ip as-path access-list 1 permit .*
|
|
route-map (IP) |
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing. |
To set the BGP origin code, use the set origin command in route-map configuration mode. To delete an entry, use the no form of this command.
set origin {igp | egp as-number | incomplete}
no set origin {igp | egp as-number | incomplete}
Default origin, based on route in main IP routing table
Route-map configuration
|
|
---|---|
10.0 |
This command was introduced. |
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
The following example sets the origin of routes that pass the route map to IGP:
route-map set_origin
match as-path 10
set origin igp
To specify the BGP weight for the routing table, use the set weight command in route-map configuration mode. To delete an entry, use the no form of this command.
set weight number
no set weight number
number |
Weight value. It can be an integer from 0 to 65535. |
The weight is not changed by the specified route map.
Route-map configuration
|
|
---|---|
10.0 |
This command was introduced. |
The implemented weight is based on the first matched autonomous system path. Weights indicated when an autonomous system path is matched override the weights assigned by global neighbor commands. In other words, the weights assigned with the set weight route-map configuration command override the weights assigned using the neighbor weight command.
The following example sets the BGP weight for the routes matching the autonomous system path access list to 200:
route-map set-weight
match as-path 10
set weight 200
To display entries in the Border Gateway Protocol (BGP) routing table, use the show ip bgp command in command in EXEC mode.
show ip bgp [ip-address [mask [longer-prefixes [injected] | shorter-prefixes [length]]] | oer-paths | prefix-list name | route-map name]
EXEC
The show ip bgp command is used to display the contents of the BGP routing table. The output can be filtered to display entries for a specific prefix, prefix length, and prefixes injected through a prefix list, route map, or conditional advertisement.
oer-paths keyword
BGP prefixes that are monitored and controlled by Optimized Edge Routing (OER) are displayed by entering the show ip bgp command with the oer-paths keyword.
show ip bgp example
The following example output shows the BGP routing table:
Router# show ip bgp
BGP table version is 5, local router ID is 10.0.33.34
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0 0.0.0.0 0 32768 ?
* 10.2.0.0 10.0.33.35 10 0 35 ?
*> 0.0.0.0 0 32768 ?
* 10.0.0.0 10.0.33.35 10 0 35 ?
*> 0.0.0.0 0 32768 ?
*> 192.168.0.0/16 10.0.33.35 10 0 35 ?
Table 32 describes the significant fields shown in the display.
show ip bgp ip-address example
The following example displays information about the 192.168.1.0 entry in the BGP routing table:
Router B# show ip bgp 192.168.1.0
BGP routing table entry for 192.168.1.0/24, version 48
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Multipath: eBGP
Advertised to update-groups:
1 2
200
172.16.1.1 from 172.16.1.1 (10.1.1.1)
Origin incomplete, metric 0, localpref 100, valid, external, multipath, best
Extended Community: 0x0:0:0
DMZ-Link Bw 278 kbytes
200
172.16.2.2 from 172.16.2.2 (10.2.2.2)
Origin incomplete, metric 0, localpref 100, valid, external, multipath, best
Extended Community: 0x0:0:0
DMZ-Link Bw 625 kbytes
Table 33 describes the significant fields shown in the display.
show ip bgp longer-prefixes example
The following is example output from the show ip bgp command entered with the longer-prefixes keyword:
Router# show ip bgp 10.92.0.0 255.255.0.0 longer-prefixes
BGP table version is 1738, local router ID is 192.168.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.92.0.0 10.92.72.30 8896 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.1.0 10.92.72.30 8796 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.11.0 10.92.72.30 42482 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.14.0 10.92.72.30 8796 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.15.0 10.92.72.30 8696 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.16.0 10.92.72.30 1400 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.17.0 10.92.72.30 1400 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.18.0 10.92.72.30 8876 32768 ?
* 10.92.72.30 0 109 108 ?
*> 10.92.19.0 10.92.72.30 8876 32768 ?
* 10.92.72.30 0 109 108 ?
show ip bgp shorter-prefixes example
The following is example output from the show ip bgp command entered with the shorter-prefixes keyword. An 8 bit prefix length is specified.
Router# show ip bgp 172.16.0.0/16 shorter-prefixes 8
*> 172.16.0.0 10.0.0.2 0 ?
* 10.0.0.2 0 0 200 ?
show ip bgp prefix-list example
The following is example output from the show ip bgp command entered with the prefix-list keyword:
Router# show ip bgp prefix-list ROUTE
BGP table version is 39, local router ID is 10.0.0.1
Status codes:s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes:i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0 10.0.0.2 0 ?
* 10.0.0.2 0 0 200 ?
show ip bgp route-map example
The following is example output from the show ip bgp command entered with the route-map keyword:
Router# show ip bgp route-map LEARNED_PATH
BGP table version is 40, local router ID is 10.0.0.1
Status codes:s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes:i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0 10.0.0.2 0 ?
* 10.0.0.2 0 0 200 ?
To display routes with nonnatural network masks (that is, classless interdomain routing, or CIDR), use the show ip bgp cidr-only command in EXEC mode.
show ip bgp cidr-only
This command has no arguments or keywords.
EXEC
|
|
---|---|
10.0 |
This command was introduced. |
The following is sample output from the show ip bgp cidr-only command in privileged EXEC mode:
Router# show ip bgp cidr-only
BGP table version is 220, local router ID is 172.16.73.131
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 192.168.0.0/8 172.16.72.24 0 1878 ?
*> 172.16.0.0/16 172.16.72.30 0 108 ?
Table 34 describes the significant fields shown in the display.
To display routes that belong to specified BGP communities, use the show ip bgp community command in EXEC mode.
show ip bgp community community-number [exact]
EXEC
|
|
---|---|
10.3 |
This command was introduced. |
12.0 |
The local-as community was added. |
The following is sample output from the show ip bgp community command in privileged EXEC mode:
rou
ter# show ip bgp community 111:12345 local-as
BGP table version is 10, local router ID is 224.0.0.10
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.2.2/32 172.43.222.2 0 0 222 ?
*> 10.0.0.0 172.43.222.2 0 0 222 ?
*> 172.43.0.0 172.43.222.2 0 0 222 ?
*> 172.43.44.44/32 172.43.222.2 0 0 222 ?
* 172.43.222.0/24 172.43.222.2 0 0 222 i
*> 172.17.240.0/21 172.43.222.2 0 0 222 ?
*> 192.168.212.0 172.43.222.2 0 0 222 i
*> 172.39.1.0 172.43.222.2 0 0 222 ?
Table 35 describes the significant fields shown in the display.
To display routes that are permitted by the BGP community list, use the show ip bgp community-list command in EXEC mode.
show ip bgp community-list community-list-number [exact]
community-list-number |
Community list number in the range from 1 to 99. |
exact |
(Optional) Displays only routes that have an exact match. |
EXEC
|
|
---|---|
10.3 |
This command was introduced. |
The following is sample output of the show ip bgp community-list command in privileged EXEC mode:
Router# show ip bgp community-list 20
BGP table version is 716977, local router ID is 193.0.32.1
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i3.0.0.0 193.0.22.1 0 100 0 1800 1239 ?
*>i 193.0.16.1 0 100 0 1800 1239 ?
* i6.0.0.0 193.0.22.1 0 100 0 1800 690 568 ?
*>i 193.0.16.1 0 100 0 1800 690 568 ?
* i7.0.0.0 193.0.22.1 0 100 0 1800 701 35 ?
*>i 193.0.16.1 0 100 0 1800 701 35 ?
* 172.16.72.24 0 1878 704 701 35 ?
* i8.0.0.0 193.0.22.1 0 100 0 1800 690 560 ?
*>i 193.0.16.1 0 100 0 1800 690 560 ?
* 172.16.72.24 0 1878 704 701 560 ?
* i13.0.0.0 193.0.22.1 0 100 0 1800 690 200 ?
*>i 193.0.16.1 0 100 0 1800 690 200 ?
* 172.16.72.24 0 1878 704 701 200 ?
* i15.0.0.0 193.0.22.1 0 100 0 1800 174 ?
*>i 193.0.16.1 0 100 0 1800 174 ?
* i16.0.0.0 193.0.22.1 0 100 0 1800 701 i
*>i 193.0.16.1 0 100 0 1800 701 i
* 172.16.72.24 0 1878 704 701 i
Table 36 describes the significant fields shown in the display.
To display BGP dampened routes, use the show ip bgp dampened-paths command in EXEC mode.
show ip bgp dampened-paths
This command has no arguments or keywords.
EXEC
|
|
---|---|
11.0 |
This command was introduced. |
The following is sample output from the show ip bgp dampened-paths command in privileged EXEC mode:
Router# show ip bgp dampened-paths
BGP table version is 10, local router ID is 171.69.232.182
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network From Reuse Path
*d 10.0.0.0 171.69.232.177 00:18:4 100 ?
*d 12.0.0.0 171.69.232.177 00:28:5 100 ?
Table 37 describes the significant fields shown in the display.
To display routes that conform to a specified filter list, use the show ip bgp filter-list command in EXEC mode.
show ip bgp filter-list access-list-number
access-list-number |
Number of an autonomous system path access list. It can be a number from 1 to 199. |
EXEC
|
|
---|---|
10.0 |
This command was introduced. |
The following is sample output from the show ip bgp filter-list command in privileged EXEC mode:
Router# show ip bgp filter-list 2
BGP table version is 1738, local router ID is 172.16.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 172.16.0.0 172.16.72.30 0 109 108 ?
* 172.16.1.0 172.16.72.30 0 109 108 ?
* 172.16.11.0 172.16.72.30 0 109 108 ?
* 172.16.14.0 172.16.72.30 0 109 108 ?
* 172.16.15.0 172.16.72.30 0 109 108 ?
* 172.16.16.0 172.16.72.30 0 109 108 ?
* 172.16.17.0 172.16.72.30 0 109 108 ?
* 172.16.18.0 172.16.72.30 0 109 108 ?
* 172.16.19.0 172.16.72.30 0 109 108 ?
* 172.16.24.0 172.16.72.30 0 109 108 ?
* 172.16.29.0 172.16.72.30 0 109 108 ?
* 172.16.30.0 172.16.72.30 0 109 108 ?
* 172.16.33.0 172.16.72.30 0 109 108 ?
* 172.16.35.0 172.16.72.30 0 109 108 ?
* 172.16.36.0 172.16.72.30 0 109 108 ?
* 172.16.37.0 172.16.72.30 0 109 108 ?
* 172.16.38.0 172.16.72.30 0 109 108 ?
* 172.16.39.0 172.16.72.30 0 109 108 ?
Table 38 describes the significant fields shown in the display.
To display BGP flap statistics, use the show ip bgp flap-statistics command in EXEC mode.
show ip bgp flap-statistics [{regexp regexp} | {filter-list access-list} | {ip-address mask [longer-prefix]}]
EXEC
|
|
---|---|
11.0 |
This command was introduced. |
If no arguments or keywords are specified, the router displays flap statistics for all routes.
The following is sample output from the show ip bgp flap-statistics command in privileged EXEC mode:
Router# show ip bgp flap-statistics
BGP table version is 10, local router ID is 171.69.232.182
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network From Flaps Duration Reuse Path
*d 10.0.0.0 171.69.232.177 4 00:13:31 00:18:10 100
*d 12.0.0.0 171.69.232.177 4 00:02:45 00:28:20 100
Table 39 describes the significant fields shown in the display.
|
|
bgp dampening |
Enables BGP route dampening or changes various BGP route dampening factors. |
clear ip bgp flap-statistics |
Clears BGP flap statistics. |
To display routes with inconsistent originating autonomous systems, use the show ip bgp inconsistent-as command in EXEC mode.
show ip bgp inconsistent-as
This command has no arguments or keywords.
EXEC
|
|
---|---|
11.0 |
This command was introduced. |
The following is sample output from the show ip bgp inconsistent-as command in privileged EXEC mode:
Router# show ip bgp inconsistent-as
BGP table version is 87, local router ID is 172.19.82.53
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 11.0.0.0 171.69.232.55 0 0 300 88 90 99 ?
*> 171.69.232.52 2222 0 400 ?
* 171.69.0.0 171.69.232.55 0 0 300 90 99 88 200 ?
*> 171.69.232.52 2222 0 400 ?
* 200.200.199.0 171.69.232.55 0 0 300 88 90 99 ?
*> 171.69.232.52 2222 0 400 ?
To display entries in the IP version 4 (IPv4) Border Gateway Protocol (BGP) routing table, use the show ip bgp ipv4 command in EXEC mode.
show ip bgp ipv4 {multicast | unicast}
multicast |
Displays entries for multicast routes. |
unicast |
Displays entries for unicast routes. |
EXEC
|
|
---|---|
12.0(5)T |
This command was introduced. |
The following is sample output from the show ip bgp ipv4 unicast command:
Router# show ip bgp ipv4 unicast
BGP table version is 4, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.0/24 172.16.10.1 0 0 300 i
*> 10.10.20.0/24 172.16.10.1 0 0 300 i
* 10.20.10.0/24 172.16.10.1 0 0 300 i
The following is sample output from the show ip bgp ipv4 multicast command:
Router# show ip bgp ipv4 multicast
BGP table version is 4, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.0/24 172.16.10.1 0 0 300 i
*> 10.10.20.0/24 172.16.10.1 0 0 300 i
* 10.20.10.0/24 172.16.10.1 0 0 300 i
Table 40 describes the significant fields shown in the display.
|
|
---|---|
show ip bgp |
Displays entries in the BGP routing table. |
To display information about the TCP and BGP connections to neighbors, use the show ip bgp neighbors command in EXEC mode.
show ip bgp neighbors [all] [ip-address [advertised-routes | dampened-routes | paths [regexp] | received prefix-filter | received-routes | routes]]
The output of this command displays information for only IPv4 address family sessions if the all keyword is not entered.
EXEC
The show ip bgp neighbors command is used to display BGP and TCP connection information for neighbor sessions. For BGP, this includes detailed neighbor attribute, capability, path, and prefix information. For TCP, this includes statistics related to BGP neighbor session establishment and maintenance. This command displays information only about IPv4 address-family sessions unless the all keyword is entered.
Prefix activity is displayed based on the number of prefixes that are advertised and withdrawn. Policy denials display the number of routes that were advertised but then ignored based the function or attribute that is displayed in the output.
show ip bgp neighbors example
The following example shows the 10.108.50.2 neighbor. This neighbor is an internal BGP (iBGP) peer. This neighbor supports the route refresh and graceful restart capabilities.
Router# show ip bgp neighbors 10.108.50.2
BGP neighbor is 10.108.50.2, remote AS 1, internal link
BGP version 4, remote router ID 192.168.252.252
BGP state = Established, up for 00:24:25
Last read 00:00:24, last write 00:00:24, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Graceful Restart Capabilty:advertised and received
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 3 3
Notifications: 0 0
Updates: 0 0
Keepalives: 113 112
Route Refresh: 0 0
Total: 116 115
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 0 0
Prefixes Total: 0 0
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 0
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Total: 0 0
Number of NLRIs in the update sent: max 0, min 0
Connections established 3; dropped 2
Last reset 00:24:26, due to Peer closed the session
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled
Local host: 10.108.50.1, Local port: 179
Foreign host: 10.108.50.2, Foreign port: 42698
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x68B944):
Timer Starts Wakeups Next
Retrans 27 0 0x0
TimeWait 0 0 0x0
AckHold 27 18 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 3915509457 snduna: 3915510016 sndnxt: 3915510016 sndwnd: 15826
irs: 233567076 rcvnxt: 233567616 rcvwnd: 15845 delrcvwnd: 539
SRTT: 292 ms, RTTO: 359 ms, RTV: 67 ms, KRTT: 0 ms
minRTT: 12 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
IP Precedence value : 6
Datagrams (max data segment is 1460 bytes):
Rcvd: 38 (out of order: 0), with data: 27, total data bytes: 539
Sent: 45 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 08
Table 41 describes the significant fields shown in the display. Fields that are preceded by the asterisk character are displayed only when the counter has a non-zero value.
show ip bgp neighbors advertised-routes example
The following example displays routes advertised for only the 172.16.232.178 neighbor:
Router# show ip bgp neighbors 172.16.232.178 advertised-routes
BGP table version is 27, local router ID is 172.16.232.181
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i110.0.0.0 172.16.232.179 0 100 0 ?
*> 200.2.2.0 0.0.0.0 0 32768 i
Table 42 describes the significant fields shown in the display.
show ip bgp neighbors paths
The following is example output from the show ip bgp neighbors command entered with the paths keyword:
Router# show ip bgp neighbors 172.29.232.178 paths ^10
Address Refcount Metric Path
0x60E577B0 2 40 10 ?
Table 43 describes the significant fields shown in the display.
show ip bgp neighbors received prefix-filter
The following example shows that a prefix-list the filters all routes in the 10.0.0.0 network has be received from the 192.168.20.72 neighbor:
Router# show ip bgp neighbor 192.168.20.72 received prefix-filter
Address family:IPv4 Unicast
ip prefix-list 192.168.20.72:1 entries
seq 5 deny 10.0.0.0/8 le 32
Table 44 describes the significant fields shown in the display.
To display all the BGP paths in the database, use the show ip bgp paths command in EXEC mode.
show ip bgp paths
This command has no arguments or keywords.
EXEC
|
|
---|---|
10.0 |
This command was introduced. |
The following is sample output from the show ip bgp paths command in privileged EXEC mode:
Router# show ip bgp paths
Address Hash Refcount Metric Path
0x60E5742C 0 1 0 i
0x60E3D7AC 2 1 0 ?
0x60E5C6C0 11 3 0 10 ?
0x60E577B0 35 2 40 10 ?
Table 45 describes the significant fields shown in the display.
To display information about BGP peer groups, use the show ip bgp peer-group command in EXEC mode.
show ip bgp peer-group [peer-group-name] [summary]
peer-group-name |
(Optional) Displays information about that specific peer group. |
summary |
(Optional) Displays a summary of the status of all the members of a peer group. |
EXEC
|
|
---|---|
11.0 |
This command was introduced. |
The following is sample output from show ip bgp peer-group command for a peer group named internal in privileged EXEC mode:
Router# show ip bgp peer-group internal
BGP peer-group is internal, remote AS 100
BGP version 4
Minimum time between advertisement runs is 5 seconds
For address family:IPv4 Unicast
BGP neighbor is internal, peer-group internal, members:
10.1.1.1 10.1.1.2
Index 3, Offset 0, Mask 0x8
Incoming update AS path filter list is 53
Outgoing update AS path filter list is 54
Route map for incoming advertisements is MAP193
Route map for outgoing advertisements is MAP194
Update messages formatted 0, replicated 0
To display routes matching the autonomous system path "regular expression," use the show ip bgp quote-regexp command in EXEC mode.
show ip bgp quote-regexp regexp
regexp |
"Regular expression" to match the Border Gateway Protocol (BGP) autonomous system paths. Note |
EXEC
|
|
---|---|
11.1 |
This command was introduced. |
The following is sample output from the show ip bgp quote-regexp command in EXEC mode:
Router# show ip bgp quote-regexp "^10_" | begin 24.40
*> 24.40.0.0/20 10.10.10.10 0 10 2548 1239 10643 i
*> 24.40.16.0/20 10.10.10.10 0 10 2548 6172 i
*> 24.40.32.0/19 10.10.10.10 0 10 2548 6172 i
*> 24.41.0.0/19 10.10.10.10 0 10 2548 3356 3703 ?
*> 24.42.0.0/17 10.10.10.10 0 10 2548 6172 i
Note Although the columns in the above display are not labeled, see Table 46 for detailed information.
Table 46 describes the significant fields shown in the display from left to right.
|
|
---|---|
show ip bgp regexp |
Displays routes matching the autonomous system path regular expression. |
To display routes matching the autonomous system path regular expression, use the show ip bgp regexp command in EXEC mode.
show ip bgp regexp regexp
regexp |
Regular expression to match the BGP autonomous system paths. |
EXEC
|
|
---|---|
10.0 |
This command was introduced. |
The following is sample output from the show ip bgp regexp command in privileged EXEC mode:
Router# show ip bgp regexp 108$
BGP table version is 1738, local router ID is 172.16.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 172.16.0.0 172.16.72.30 0 109 108 ?
* 172.16.1.0 172.16.72.30 0 109 108 ?
* 172.16.11.0 172.16.72.30 0 109 108 ?
* 172.16.14.0 172.16.72.30 0 109 108 ?
* 172.16.15.0 172.16.72.30 0 109 108 ?
* 172.16.16.0 172.16.72.30 0 109 108 ?
* 172.16.17.0 172.16.72.30 0 109 108 ?
* 172.16.18.0 172.16.72.30 0 109 108 ?
* 172.16.19.0 172.16.72.30 0 109 108 ?
* 172.16.24.0 172.16.72.30 0 109 108 ?
* 172.16.29.0 172.16.72.30 0 109 108 ?
* 172.16.30.0 172.16.72.30 0 109 108 ?
* 172.16.33.0 172.16.72.30 0 109 108 ?
* 172.16.35.0 172.16.72.30 0 109 108 ?
* 172.16.36.0 172.16.72.30 0 109 108 ?
* 172.16.37.0 172.16.72.30 0 109 108 ?
* 172.16.38.0 172.16.72.30 0 109 108 ?
* 172.16.39.0 172.16.72.30 0 109 108 ?
To display the status of all Border Gateway Protocol (BGP) connections, use the show ip bgp summary command in EXEC mode.
show ip bgp summary
This command has no arguments or keywords.
EXEC
The show ip bgp summary command is used to display BGP path, prefix, and attribute information for all connections to BGP neighbors.
A prefix is an IP address and network mask. It can represent an entire network, a subset of a network, or a single host route. A path is a route to a given destination. By default, BGP will install only a single path for each destination. If multipath routes are configured, BGP will install a path entry for each multipath route, and only one multipath route will be marked as the bestpath.
BGP attribute and cache entries are displayed in individually and in combinations that affect the bestpath selection process. The fields for this output are displayed when the related BGP feature is configured or attribute is received. Memory usage is displayed in bytes.
The following is sample output from the show ip bgp summary command in privileged EXEC mode:
Router# show ip bgp summary
BGP router identifier 172.16.1.1, local AS number 100
BGP table version is 199, main routing table version 199
37 network entries using 2850 bytes of memory
59 path entries using 5713 bytes of memory
18 BGP path attribute entries using 936 bytes of memory
2 multipath network entries and 4 multipath paths
10 BGP AS-PATH entries using 240 bytes of memory
7 BGP community entries using 168 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
36 received paths for inbound soft reconfiguration
BGP using 34249 total bytes of memory
Dampening enabled. 4 history paths, 0 dampened paths
BGP activity 37/2849 prefixes, 60/1 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.100.1.1 4 200 26 22 199 0 0 00:14:23 23
10.200.1.1 4 300 21 51 199 0 0 00:13:40 0
Table 47 describes the significant fields shown in the display. Fields that are preceded by the asterisk character are not shown in the above output.
To display routes that are permitted by an extended community list, use the show ip extcommunity-list command in EXEC mode.
show ip extcommunity-list [community-list-number]
community-list-number |
(Optional) Community list number in the range from 1 to 199. A standard extended list is from 1 to 99. An expanded extended list is from 100 to 199. |
If a specific extended community list number is not specified when the show ip extcommunity-list command is entered, all locally configured extended community lists will be displayed by default.
EXEC
|
|
---|---|
12.1 |
This command was introduced. |
The following is sample output from the show ip extcommunity-list command in EXEC mode:
Router# show ip extcommunity-list
Extended community standard list 1
permit RT:901:10
permit SoO:802:20
deny RT:703:30 SoO:604:40
Extended community standard list 99
permit RT:604:40 SoO:505:50
deny RT:406:60 SoO:307:70
|
|
show route-map |
Displays configured route maps. |
To display information about a prefix list or prefix list entries, use the show ip prefix-list command user and privileged EXEC mode.
show ip prefix-list [detail | summary] prefix-list-name [network/length] [seq sequence-number] [longer] [first-match]
EXEC
|
|
---|---|
12.0 |
This command was introduced. |
The following example shows the output of the show ip prefix-list command with details about the prefix list named test in privileged EXEC mode:
Router# show ip prefix-list detail test
ip prefix-list test:
Description: test-list count: 1, range entries: 0, sequences: 10 - 10, refcount: 3
seq 10 permit 35.0.0.0/8 (hit count: 0, refcount: 1)
To enable the synchronization between BGP and your Interior Gateway Protocol (IGP) system, use the synchronization command in address family or router configuration mode. To enable the Cisco IOS software to advertise a network route without waiting for the IGP, use the no form of this command.
synchronization
no synchronization
This command has no arguments or keywords.
The behavior of this command is enabled by default.
Address family configuration
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
12.0(7)T |
Address family configuration mode was added. |
Usually, a BGP speaker does not advertise a route to an external neighbor unless that route is local or exists in the IGP. The no synchronization command allows the Cisco IOS software to advertise a network route without waiting for the IGP. This feature allows routers and access servers within an autonomous system to have the route before BGP makes it available to other autonomous systems.
Use the synchronization command if routers in the autonomous system do not speak BGP.
The following router configuration mode example enables a router to advertise a network route without waiting for IGP:
router bgp 120
no synchronization
The following address family configuration mode example enables a router to advertise a network route without waiting for IGP:
router bgp 120
address-family ipv4 unicast
no synchronization
To modify metric and tag values when the IP routing table is updated with BGP learned routes, use the table-map command in address family or router configuration mode. To disable this function, use the no form of the command.
table-map map-name
no table-map map-name
map-name |
Route map name, from the route-map command. |
This command is disabled by default.
Address family configuration
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
12.0(7)T |
Address family configuration mode was added. |
This command adds the route map name defined by the route-map command to the IP routing table. This command is used to set the tag name and the route metric to implement redistribution.
You can use match clauses of route maps in the table-map command. IP access list, autonomous system paths, and next hop match clauses are supported.
In the following router configuration mode example, the Cisco IOS software is configured to automatically compute the tag value for the BGP learned routes and to update the IP routing table:
route-map tag
match as path 10
set automatic-tag
!
router bgp 100
table-map tag
In the following address family configuration mode example, the Cisco IOS software is configured to automatically compute the tag value for the BGP learned routes and to update the IP routing table:
route-map tag
match as path 10
set automatic-tag
!
router bgp 100
address-family ipv4 unicast
table-map tag
To adjust BGP network timers, use the timers bgp command in router configuration mode. To reset the BGP timing defaults, use the no form of this command.
timers bgp keepalive holdtime
no timers bgp
keepalive: 60 seconds
holdtime: 180 seconds
Router configuration
|
|
---|---|
10.0 |
This command was introduced. |
The following example changes the keepalive timer to 70 seconds and the hold-time timer to 210 seconds:
timers bgp 70 210
|
|
clear ip bgp peer-group |
Removes all the members of a BGP peer group. |
router bgp |
Configures the BGP routing process. |
show ip bgp |
Displays entries in the BGP routing table. |