|
Use the commands in this chapter to configure and monitor Border Gateway Protocol (BGP). For BGP configuration information and examples, refer to the "Configuring BGP" chapter of the Network Protocols Configuration Guide, Part 1.
To create an aggregate entry in a BGP routing table, use the aggregate-address router configuration command. To disable this feature, use the no form of this command.
aggregate-address address mask [as-set] [summary-only] [suppress-map map-name]
address | Aggregate address. |
mask | Aggregate mask. |
as-set | (Optional) Generates autonomous system set path information. |
summary-only | (Optional) Filters all more specific routes from updates. |
suppress-map map-name | (Optional) Name of route map used to select the routes to be suppressed. |
advertise-map map-name | (Optional) Name of route map used to select the routes to create AS-SET origin communities. |
attribute-map map-name | (Optional) Name of route map used to set the attribute of the aggregate route. |
Disabled
Router configuration
This command first appeared in Cisco IOS Release 10.0.
You can implement aggregate routing in BGP either by redistributing an aggregate route into BGP or by using this conditional aggregate routing feature.
Using the aggregate-address command with no arguments will create an aggregate entry in the BGP routing table if there are any more-specific BGP routes available that fall in the specified range. The aggregate route will be advertised as coming from your autonomous system and has 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-set keyword 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 aggregate-address when aggregating many paths, because this route must be continually withdrawn and re-updated as autonomous system path reachability information for the summarized routes changes.
Using the summary-only keyword not only creates the aggregate route (for example, 193.*.*.*) but will also suppress advertisements of more-specific routes to all neighbors. If you only want to suppress advertisements to certain neighbors, you may use the neighbor distribute-list command, with caution. If a more specific route leaks out, all BGP speakers will prefer that route over the less-specific aggregate you are generating (using longest-match routing).
Using the suppress-map keyword 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.
In the following example, an aggregate address is created. The path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized.
router bgp 5
aggregate-address 193.0.0.0 255.0.0.0 as-set
You can use the master indexes or search online to find documentation of related commands.
match as-path
match ip address
route-map
To restore the default behavior of automatic summarization of subnet routes into network-level routes, use the auto-summary router configuration command. To disable this feature and transmit subprefix routing information across classful network boundaries, use the no form of this command.
auto-summaryThis command has no arguments or keywords.
Enabled (the software summarizes subprefixes to the classful network boundary when crossing classful network boundaries).
Router configuration
This command first appeared in Cisco IOS Release 10.0.
Route summarization reduces the amount of routing information in the routing tables.
By default, BGP does not accept subnets redistributed from IGP. To advertise and carry subnet routes in BGP, use an explicit network command or the no auto-summary command. If you disable auto-summarization and have not entered a network command, you will not advertise network routes for networks with subnet routes unless they contain a summary route.
In the following example, network numbers are not summarized automatically:
router bgp 6
no auto-summary
To allow the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems, use the bgp always-compare-med router configuration command. To disallow the comparison, use the no form of this command.
bgp always-compare-medThis command has no arguments or keywords.
The Cisco IOS software does not compare MEDs for paths from neighbors in different autonomous systems.
Router configuration
This command first appeared in Cisco IOS Release 11.0.
The MED is one of the parameters that is considered when selecting the best path among many alternative paths. The path with a lower MED is preferred over a path with a higher MED.
By default, during the best-path selection process, MED comparison is done only among paths from the same autonomous system. This command changes the default behavior by allowing comparison of MEDs among paths regardless of the autonomous system from which the paths are received.
In the following example, the BGP speaker in autonomous system 100 is configured to compare MEDs among alternative paths, regardless of the autonomous system from which the paths are received:
router bgp 109
bgp always-compare-med
To restore route reflection from a BGP route reflector to clients, use the bgp client-to-client reflection router configuration command. To disable client-to-client reflection, use the no form of this command.
bgp client-to-client reflectionThis command has no arguments or keywords.
When a route reflector is configured, the route reflector reflects routes from a client to other clients.
Router configuration
This command first appeared in Cisco IOS Release 11.1.
By default, the clients of a route reflector are not required to be fully meshed and the routes from a client are reflected to other clients. However, if the clients are fully meshed, route reflection is not required. Use the no bgp client-to-client reflection command to disable client-to-client reflection.
If client-to-client reflection is enabled, the clients of a route reflector cannot be members of a peer group.
In the following example, the local router is a route reflector. The three neighbors are fully meshed, so client-to-client reflection is disabled.
router bgp 5
neighbor 155.24.95.22 route-reflector-client
neighbor 155.24.95.23 route-reflector-client
neighbor 155.24.95.24 route-reflector-client
no bgp client-to-client reflection
You can use the master indexes or search online to find documentation of related commands.
bgp cluster-id
neighbor route-reflector-client
show ip bgp
To configure the cluster ID if the BGP cluster has more than one route reflector, use the bgp cluster-id router configuration command. To remove the cluster ID, use the no form of this command.
bgp cluster-id cluster-id
cluster-id | Cluster ID of this router acting as a route reflector; maximum of 4 bytes. |
The router ID of the single route reflector in a cluster
Router configuration
This command first appeared in Cisco IOS Release 11.0.
Together, a route reflector and its clients form a cluster.
Usually a cluster of clients will have a single route reflector. In that case, the cluster is identified by the router ID of the route reflector. In order to increase redundancy and avoid a single point of failure, a cluster might have more than one route reflector. In this case, all route reflectors in the cluster must be configured with the 4-byte cluster ID so that a route reflector can recognize updates from route reflectors in the same cluster.
If the cluster has more than one route reflector, use this command to configure the cluster ID.
In the following example, the local router is one of the route reflectors serving the cluster. It is configured with the cluster ID to identify the cluster.
router bgp 5
neighbor 198.92.70.24 route-reflector-client
bgp cluster-id 50000
You can use the master indexes or search online to find documentation of related commands.
bgp client-to-client reflection
neighbor route-reflector-client
show ip bgp
To specify a BGP confederation identifier, use the bgp confederation identifier router configuration command. To remove the confederation identifier, use the no form of this command.
bgp confederation identifier autonomous-system
autonomous-system | Autonomous system number that internally includes multiple autonomous systems. |
No confederation identifier is configured.
Router configuration
This command first appeared in Cisco IOS Release 10.3.
Another way to reduce the IBGP mesh is to divide an autonomous system into multiple autonomous systems and group them into a single confederation. Each autonomous system is fully meshed within itself, and has a few connections to another autonomous system in the same confederation. Even though the peers in different autonomous systems have EBGP sessions, they exchange routing information as if they are IBGP peers. Specifically, the next-hop and local preference information is preserved. This enables to you to retain a single Interior Gateway Protocol (IGP) for all the autonomous systems. To the outside world, the confederation looks like a single autonomous system.
In the following example, the autonomous system is divided into autonomous systems 4001, 4002, 4003, 4004, 4005, 4006, and 4007 and identified by the confederation identifier 5. Neighbor 1.2.3.4 is someone inside your routing domain confederation. Neighbor 3.4.5.6 is someone outside your routing domain confederation. To the outside world, there appears to be a single autonomous system with the number 5.
router bgp 4001
bgp confederation identifier 5
bgp confederation peers 4002 4003 4004 4005 4006 4007
neighbor 1.2.3.4 remote-as 4002
neighbor 3.4.5.6 remote-as 510
You can use the master indexes or search online to find documentation of related commands.
To configure the autonomous systems that belong to the confederation, use the bgp confederation peers router configuration command. To remove an autonomous system from the confederation, use the no form of this command.
bgp confederation peers autonomous-system [autonomous-system]
autonomous-system | Autonomous system number. |
No confederation peers are configured.
Router configuration
This command first appeared in Cisco IOS Release 10.3.
The autonomous systems specified in this command are visible internally to a confederation. Each autonomous system is fully meshed within itself. The bgp confederation identifier command specifies the confederation to which the autonomous systems belong.
The following example specifies that autonomous systems 1090, 1091, 1092, and 1093 belong to a single confederation:
router bgp 1090
bgp confederation peers 1091 1092 1093
You can use the master indexes or search online to find documentation of related commands.
To enable BGP route dampening or change various BGP route dampening factors, use the bgp dampening global configuration command. To disable the feature or restore the default values, use the no form of this command.
bgp dampening [half-life reuse suppress max-suppress-time] [route-map map]
half-life | (Optional) Time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. The range of the half-life period is 1 to 45 minutes. The default is 15 minutes. |
reuse | (Optional) If the penalty for a flapping route decreases enough to fall below this value, the route is unsuppressed. The process of unsuppressing routes occurs at 10-second increments. The range of the reuse value is 1 to 20000; the default is 750. |
suppress | (Optional) A route is suppressed when its penalty exceeds this limit. The range is 1 to 20000; the default is 2000. |
max-suppress-time | (Optional) Maximum time (in minutes) a route can be suppressed. The range is 1 to 20000; the default is 4 times the half-life. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes. |
route-map map | (Optional) Name of route map that controls where BGP route dampening is enabled. |
Disabled by default.
half-life is 15 minutes
reuse is 750
suppress is 2000
max-suppress-time is 4 times half-life
Global configuration
This command first appeared in Cisco IOS Release 11.0.
If this command is used with no arguments, it enables BGP route dampening. The arguments half-life, reuse, suppress, and max-suppress-time are position-dependent. Therefore, if any of them are used, they must all be specified.
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:
bgp dampening 30 1500 10000 120
You can use the master indexes or search online to find documentation of related commands.
clear ip bgp dampening
clear ip bgp flap-statistics
show ip bgp dampened-paths
show ip bgp flap-statistics
To change the default local preference value, use the bgp default local-preference router configuration command. To return to the default setting, use the no form of this command.
bgp default local-preference value
value | Local preference value from 0 to 4294967295. Higher is more preferred. |
Local preference value of 100
Router configuration
This command first appeared in Cisco IOS Release 10.0.
Generally, the default value of 100 allows you to easily define a particular path as less preferable than paths with no local preference attribute. The preference is sent to all routers and access servers in the local autonomous system.
In the following example, the default local preference value is raised from the default of 100 to 200:
router bgp 200
bgp default local-preference 200
You can use the master indexes or search online to find documentation of related commands.
set local-preference
To immediately reset the BGP sessions of any directly adjacent external peers if the link used to reach them goes down, use the bgp fast-external-fallover router configuration command. To disable this feature, use the no form of this command.
bgp fast-external-falloverThis command has no arguments or keywords.
Enabled
Router configuration
This command first appeared in Cisco IOS Release 10.0.
In the following example, the automatic resetting of BGP sessions is disabled:
router bgp 109
no bgp fast-external-fallover
To reset a BGP connection using BGP soft reconfiguration, use the clear ip bgp EXEC command at the system prompt.
clear ip bgp {* | address | peer-group name} [soft [in | out]]
* | Resets all current BGP sessions. |
address | Resets only the identified BGP neighbor. |
peer-group-name | Resets the specified BGP peer group. |
soft | (Optional) Soft reconfiguration. |
in | out | (Optional) Triggers inbound or outbound soft reconfiguration. If the in or out option is not specified, both inbound and outbound soft reconfiguration are triggered. |
EXEC
This command first appeared in Cisco IOS Release 10.0.
If you specify BGP soft reconfiguration, by including the soft keyword, the sessions are not reset and the router sends all routing updates again. To generate new inbound updates without resetting the BGP session, the local BGP speaker should store all received updates without modification regardless of whether it is accepted by the inbound policy. This process is memory intensive and should be avoided if possible. Outbound BGP soft configuration does not have any memory overhead. You can trigger an outbound reconfiguration on the other side of the BGP session to make the new inbound policy take effect.
Use this command whenever any of the following changes occur:
The following example resets all current BGP sessions:
clear ip bgp *
You can use the master indexes or search online to find documentation of related commands.
To clear BGP route dampening information and unsuppress the suppressed routes, use the clear ip bgp dampening EXEC command.
clear ip bgp dampening [address mask]
address | (Optional) IP address of the network about which to clear dampening information. |
mask | (Optional) Network mask applied to the address. |
EXEC
This command first appeared in Cisco IOS Release 11.0.
The following example clears route dampening information about the route to network 150.0.0.0 and unsuppresses its suppressed routes:
clear ip bgp dampening 150.0.0.0 255.255.0.0
You can use the master indexes or search online to find documentation of related commands.
bgp dampening
show ip bgp dampened-paths
To clear BGP flap statistics, use the clear ip bgp flap-statistics EXEC command.
clear ip bgp flap-statistics [{regexp regexp} | {filter-list list} | {address mask}]
regexp regexp | (Optional) Clears flap statistics for all the paths that match the regular expression. |
filter-list list | (Optional) Clears flap statistics for all the paths that pass the access list. |
address | (Optional) Clears flap statistics for a single entry at this IP address. If this argument is placed before flap-statistics, the router clears flap statistics for all paths from the neighbor at this address. |
mask | (Optional) Network mask applied to the address. |
EXEC
This command first appeared in Cisco IOS Release 11.0.
If no arguments or keywords are specified, the router clear flap statistics for all routes.
The flap statistics for a route are also cleared when a BGP peer is reset. Although the reset withdraws the route, there is no penalty applied in this instance, even though route flap dampening is enabled.
The following example clears all of the flap statistics for paths that pass access list 3:
clear ip bgp flap-statistics filter-list 3
You can use the master indexes or search online to find documentation of related commands.
To remove all the members of a BGP peer group, use the clear ip bgp peer-group EXEC command.
clear ip bgp peer-group tag
tag | Name of the BGP peer group to clear. |
EXEC
This command first appeared in Cisco IOS Release 11.0.
The following example removes all members from the BGP peer group internal:
clear ip bgp peer-group internal
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (assigning members)
To allow the redistribution of network 0.0.0.0 into BGP, use the default-information originate router configuration command. To disable this feature, use the no form of this command.
default-information originateThis command has no arguments or keywords.
Disabled
Router configuration
This command first appeared in Cisco IOS Release 10.0.
The same functionality will result from the network 0.0.0.0 command, using the network router configuration command.
The following example configures BGP to redistribute network 0.0.0.0 into BGP:
router bgp 164
default-information originate
To set default metric values for the BGP, OSPF, and RIP routing protocols, use this form of the default-metric router configuration command. To return to the default state, use the no form of this command.
default-metric number
number | Default metric value appropriate for the specified routing protocol. |
Built-in, automatic metric translations, as appropriate for each routing protocol
Router configuration
This command first appeared in Cisco IOS Release 10.0.
The default-metric command is used in conjunction with the redistribute router configuration command to cause the current routing protocol to use the same metric value for all redistributed routes. A default metric helps solve the problem of redistributing routes with incompatible metrics. Whenever metrics do not convert, using a default metric provides a reasonable substitute and enables the redistribution to proceed.
In BGP, this sets the Multi Exit Discriminator (MED) metric. (The name of this metric for BGP Versions 2 and 3 is INTER_AS.)
The following example shows a router in autonomous system 109 using both the RIP and the OSPF routing protocols. The example advertises OSPF-derived routes using the RIP protocol and assigns the IGRP-derived routes a RIP metric of 10.
router rip
default-metric 10
redistribute ospf 109
You can use the master indexes or search online to find documentation of related commands.
redistribute
To allow the use of external, internal, and local administrative distances that could be a better route to a node, use the distance bgp router configuration command. To return to the default values, use the no form of this command.
distance bgp external-distance internal-distance local-distance
external-distance | Administrative distance for BGP external routes. External routes are routes for which the best path is learned from a neighbor external to the autonomous system. Acceptable values are from 1 to 255. The default is 20. Routes with a distance of 255 are not installed in the routing table. |
internal-distance | Administrative distance for BGP internal routes. Internal routes are those routes that are learned from another BGP entity within the same autonomous system. Acceptable values are from 1 to 255. The default is 200. Routes with a distance of 255 are not installed in the routing table. |
local-distance | Administrative distance for BGP local routes. Local routes are those networks listed with a network router configuration command, often as back doors, for that router or for networks that are being redistributed from another process. Acceptable values are from 1 to 255. The default is 200. Routes with a distance of 255 are not installed in the routing table. |
external-distance: 20
internal-distance: 200
local-distance: 200
Router configuration
This command first appeared in Cisco IOS Release 10.0.
An administrative distance is a rating of the trustworthiness of a routing information source, such as an individual router or a group of routers. Numerically, an administrative distance is an integer between 0 and 255. In general, the higher the value, the lower the trust rating. An administrative distance of 255 means the routing information source cannot be trusted at all and should be ignored.
Use this command if another protocol is known to be able to provide a better route to a node than was actually learned via external BGP, or if some internal routes should really be preferred by BGP.
In the following example, internal routes are known to be preferable to those learned through the IGP, so the administrative distance values are set accordingly:
router bgp 109
network 131.108.0.0
neighbor 129.140.6.6 remote-as 123
neighbor 128.125.1.1 remote-as 47
distance bgp 20 20 200
To define a BGP-related access list, use the ip as-path access-list global configuration command. To disable use of the access list, use the no form of this command.
ip as-path access-list access-list-number {permit | deny} as-regular-expression
access-list-number | Integer from 1 to 199 that indicates the regular expression access list number. |
permit | Permits access for matching conditions. |
deny | Denies access to matching conditions. |
as-regular-expression | Autonomous system in the access list using a regular expression. See the "Regular Expressions" appendix in the Dial Solutions Command Reference for information about forming regular expressions. |
No access lists are defined.
Global configuration
This command first appeared in Cisco IOS Release 10.0.
You can specify an access list filter on both inbound and outbound BGP routes. In addition, you can assign weights based on a set of filters. Each filter is an access list based on regular expressions. If the regular expression matches the representation of the autonomous system path of the route as an ASCII string, then the permit or deny condition applies. The autonomous system path does not contain the local autonomous system number. Use the ip as-path access-list global configuration command to define an BGP access list, and the neighbor router configuration command to apply a specific access list.
The following example specifies that the BGP neighbor with IP address 128.125.1.1 is not sent advertisements about any path through or from the adjacent autonomous system 123:
ip as-path access-list 1 deny _123_
ip as-path access-list 1 deny ^123$
router bgp 109
network 131.108.0.0
neighbor 129.140.6.6 remote-as 123
neighbor 128.125.1.1 remote-as 47
neighbor 128.125.1.1 filter-list 1 out
You can use the master indexes or search online to find documentation of related commands.
neighbor distribute-list
neighbor filter-list
To create a community list for BGP and control access to it, use the ip community-list global configuration command. To delete the community list, use the no form of this command.
ip community-list community-list-number {permit | deny} community-number
community-list-number | Integer from 1 to 99 that identifies one or more permit or deny groups of communities. |
permit | Permits access for a matching condition. |
deny | Denies access for a matching condition. |
community-number | Community number configured by a set community command. Valid value is one of the following: ♦ A number from 1 to 4294967200. You can specify a single number or multiple numbers separated by a space. ♦ internetThe Internet community. ♦ no-exportDo not advertise this route to an EBGP peer. ♦ no-advertiseDo not advertise this route to any peer (internal or external). |
Once you permit a value for the community number, the community list defaults to an implicit deny for everything else.
Global configuration
This command first appeared in Cisco IOS Release 10.3.
In the following example, the Cisco IOS software permits all routes except the routes with the communities 5 and 10 or 10 and 15:
ip community-list 1 deny 5 10
ip community-list 1 deny 10 15
ip community-list 1 permit internet
You can use the master indexes or search online to find documentation of related commands.
To match a BGP autonomous system path access list, use the match as-path route-map configuration command. To remove a path list entry, use the no form of this command.
match as-path path-list-number
path-list-number | Autonomous system path access list. An integer from 1 to 199. |
No path lists are defined.
Route-map configuration
This command first appeared in Cisco IOS Release 10.0.
The values set by the match and set commands override global values. For example, the weights assigned with the match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
A route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.
The implemented weight is based on the first matched autonomous system path.
In the following example, the autonomous system path is set to match BGP autonomous system path access list 20:
route-map igp2bgp
match as-path 20
You can use the master indexes or search online to find documentation of related commands.
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weight
To match a BGP community, use the match community-list route-map configuration command. To remove the community list entry, use the no form of this command.
match community-list community-list-number [exact]
community-list-number | Community list number in the range 1 to 99. |
exact | (Optional) Indicates an exact match is required. All of the communities and only those communities in the community list must be present. |
No community list is defined.
Route-map configuration
This command first appeared in Cisco IOS Release 10.3.
A route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.
Matching based on community list is one of the types of match clauses applicable to BGP.
In the following example, the routes that match community list 1 will have the weight set to 100. Any route that has community 109 will have the weight set to 100.
ip community-list 1 permit 109
!
route-map set_weight
match community-list 1
set weight 100
In the following example, the routes that match community list 1 will have the weight set to 200. Any route that has community 109 alone will have the weight set to 200.
ip community-list 1 permit 109
!
route-map set_weight
match community-list 1 exact
set weight 200
You can use the master indexes or search online to find documentation of related commands.
route-map
set weight
To set the minimum interval between the sending of BGP routing updates, use the neighbor advertisement-interval router configuration command. To remove an entry, use the no form of this command.
neighbor {ip-address | peer-group-name} advertisement-interval seconds
ip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
seconds | Time in seconds. Integer from 0 to 600. |
30 seconds for external peers and 5 seconds for internal peers.
Router configuration
This command first appeared in Cisco IOS Release 10.0.
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 example, the minimum time between sending BGP routing updates is set to 10 seconds:
router bgp 5
neighbor 4.4.4.4 advertisement-interval 10
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To allow a BGP speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as a default route, use the neighbor default-originate router configuration command. To remove the default route, use the no form of this command.
neighbor {ip-address | peer-group-name} default-originate [route-map map-name]
ip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
route-map map-name | (Optional) Name of the route map. The route map allows route 0.0.0.0 to be injected conditionally. |
No default route is sent to the neighbor.
Router configuration
This command first appeared in Cisco IOS Release 11.0.
This command does not require the presence of 0.0.0.0 in the local router. When used with a route map, the default route 0.0.0.0 is injected if the route map contains a match ip address clause and there is a route that matches the IP access list exactly. The route map can contain other match clauses also.
In the following example, the local router injects route 0.0.0.0 to the neighbor 160.89.2.3 unconditionally:
router bgp 109
network 160.89.0.0
neighbor 160.89.2.3 remote-as 200
neighbor 160.89.2.3 default-originate
In the following example, the local router injects route 0.0.0.0 to the neighbor 160.89.2.3 only if there is a route to 198.92.68.0:
router bgp 109
network 160.89.0.0
neighbor 160.89.2.3 remote-as 200
neighbor 160.89.2.3 default-originate route-map default-map
!
route-map default-map 10 permit
match ip address 1
!
access-list 1 permit 198.92.68.0
To associate a description with a neighbor, use the neighbor description router configuration command. To remove the description, use the no form of this command.
neighbor {ip-address | peer-group-name} description text
text | Text (up to 80 characters) that describes the neighbor. |
There is no description of the neighbor.
Router configuration
This command first appeared in Cisco IOS Release 11.3.
In the following example, the description of the neighbor is "peer with abc.com":
router bgp 109
network 160.89.0.0
neighbor 160.89.2.3 description peer with abc.com
To distribute BGP neighbor information as specified in an access list, use the neighbor distribute-list router configuration command. To remove an entry, use the no form of this command.
neighbor {ip-address | peer-group-name} distribute-list {access-list-number | name} {in | out}
ip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
access-list-number | name | Number or name of a standard or extended access list. It can be an integer from 1 to 199. |
in | Access list is applied to incoming advertisements to that neighbor. |
out | Access list is applied to outgoing advertisements from that neighbor. |
No BGP neighbor is specified.
Router configuration
This command first appeared in Cisco IOS Release 10.0. The peer-group-name argument first appeared in Cisco IOS Release 11.0. The access-list-name argument first appeared in Cisco IOS Release 11.2.
Using distribute 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.
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.
The following example applies list 39 to incoming advertisements to neighbor 120.23.4.1:
router bgp 109
network 131.108.0.0
neighbor 120.23.4.1 distribute-list 39 in
You can use the master indexes or search online to find documentation of related commands.
ip as-path access-list
neighbor filter-list
neighbor peer-group (creating)
To accept and attempt BGP connections to external peers residing on networks that are not directly connected, use the neighbor ebgp-multihop router configuration command. To return to the default, use the no form of this command.
neighbor {ip-address | peer-group-name} ebgp-multihop [ttl]
ip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
ttl | (Optional) Time-to-live in the range 1 to 255 hops. |
Only directly connected neighbors are allowed.
Router configuration
This command first appeared in Cisco IOS Release 10.0. The peer-group-name argument first appeared in Cisco IOS Release 11.0.
This feature should only be used under the guidance of technical support staff.
If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.
The following example allows connections to or from neighbor 131.108.1.1, which resides on a network that is not directly connected:
router bgp 109
neighbor 131.108.1.1 ebgp-multihop
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To set up a BGP filter, use the neighbor filter-list router configuration command. To disable this function, use the no form of this command.
neighbor {ip-address | peer-group-name} filter-list access-list-number {in | out |
ip-address | IP address of the neighbor. |
peer-group-name | Name of a BGP peer group. |
access-list-number | Number of an autonomous system path access list. You define this access list with the ip as-path access-list command. |
in | Access list to incoming routes. |
out | Access list to outgoing routes. |
weight weight | Assigns a relative importance to incoming routes matching autonomous system paths. Acceptable values are 0 to 65535. |
Disabled
Router configuration
This command first appeared in Cisco IOS Release 10.0.
This command establishes filters on both inbound and outbound BGP routes. Any number of weight filters are allowed on a per-neighbor basis, but only one in or out filter is allowed. The weight of a route affects BGP's route-selection rules.
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 match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
See the "Regular Expressions" appendix in the Dial Solutions Command Reference for information on forming regular expressions.
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.
In the following example, the BGP neighbor with IP address 128.125.1.1 is not sent advertisements about any path through or from the adjacent autonomous system 123:
ip as-path access-list 1 deny _123_
ip as-path access-list 1 deny ^123$
router bgp 109
network 131.108.0.0
neighbor 129.140.6.6 remote-as 123
neighbor 128.125.1.1 remote-as 47
neighbor 128.125.1.1 filter-list 1 out
You can use the master indexes or search online to find documentation of related commands.
ip as-path access-list
neighbor distribute-list
neighbor peer-group (creating)
neighbor weight
To control how many prefixes can be received from a neighbor, use the neighbor maximum-prefix router configuration command. To disable this function, use the no form of this command.
neighbor {ip-address | peer-group-name} maximum-prefix maximum [threshold]
ip-address | IP address of the neighbor. |
peer-group-name | Name of a BGP peer group. |
maximum | Maximum number of prefixes allowed from this neighbor. |
threshold | (Optional) Integer specifying at what percentage of maximum the router starts to generate a warning message. The range 1 to 100; the default is 75 (percent). |
warning-only | (Optional) Allows the router to generate log message when the maximum is exceeded, instead of terminating the peering. |
Disabled; there is no limit on the number of prefixes.
Router configuration
This command first appeared in Cisco IOS Release 11.3.
This command allows you to configure a maximum number of prefixes a BGP router is allowed to receive from a peer. It adds another mechanism (in addition to distribute lists, filter lists, and route maps) to control prefixes received from a peer.
When the number of received prefixes exceeds the maximum number configured, the router terminates the peering (by default). However, if the keyword warning-only is configured, the router instead only sends a log message, but continues peering with the sender. If the peer is terminated, the peer stays down until the clear ip bgp command is issued.
In the following example, the maximum number of prefixes allowed from the neighbor at 129.140.6.6 is set to 1000:
router bgp 109
network 131.108.0.0
neighbor 129.140.6.6 maximum-prefix 1000
You can use the master indexes or search online to find documentation of related commands.
To disable next-hop processing of BGP updates on the router, use the neighbor next-hop-self router configuration command. To disable this feature, use the no form of this command.
neighbor {ip-address | peer-group-name} next-hop-self
ip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
Disabled
Router configuration
This command first appeared in Cisco IOS Release 10.0. The peer-group-name argument first appeared in Cisco IOS Release 11.0.
This command is useful in nonmeshed networks (such as Frame Relay or X.25) where BGP neighbors may not have direct access to all other neighbors on the same IP subnet.
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.
The following example forces all updates destined for 131.108.1.1 to advertise this router as the next hop:
router bgp 109
neighbor 131.108.1.1 next-hop-self
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To enable MD5 authentication on a TCP connection between two BGP peers, use the neighbor password router configuration command. To disable this feature, use the no form of this command.
neighbor {ip-address | peer-group-name} password string
ip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
string | Case-sensitive password of up to 80 characters. The first character cannot be a number. The string can contain any alphanumeric characters, including spaces. You cannot specify a password in the format number-space-anything. The space after the number causes problems. |
Disabled
Router configuration
This command first appeared in Cisco IOS Release 11.0.
You can invoke authentication between two BGP peers, causing each segment sent on the TCP connection between them to be verified. This feature must be configured with the same password on both BGP peers; otherwise, the connection between them will not be made. The authentication feature uses the MD5 algorithm. Specifying this command causes the generation and checking of the MD5 digest on every segment sent on the TCP connection.
Configuring a password for a neighbor will cause an existing session to be torn down and a new one established.
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.
If a router has a password configured for a neighbor, but the neighbor router does not, a message such as the following will appear on the console while the routers attempt to establish a BGP session between them:
%TCP-6-BADAUTH: No MD5 digest from [peer's IP address]:11003 to [local router's
IP address]:179
Similarly, if the two routers have different passwords configured, a message such as the following will appear on the console:
%TCP-6-BADAUTH: Invalid MD5 digest from [peer's IP address]:11004 to [local router's
IP address]:179
The following example enables the authentication feature between this router and the BGP neighbor at 131.102.1.1. The password that must also be configured for the neighbor is bla4u00=2nkq.
router bgp 109
neighbor 131.108.1.1 password bla4u00=2nkq
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To configure a BGP neighbor to be a member of a peer group, use the neighbor peer-group router configuration command. To remove the neighbor from the peer group, use the no form of this command.
neighbor ip-address peer-group peer-group-name
ip-address | IP address of the BGP neighbor who belongs to the peer group specified by the tag. |
peer-group-name | Name of the BGP peer group to which this neighbor belongs. |
There are no BGP neighbors in a peer group.
Router configuration
This command first appeared in Cisco IOS Release 11.0.
The neighbor at the IP address indicated inherits all the configured options of the peer group.
In the following example, three neighbors are assigned to the peer group called internal.
router bgp 100
neighbor internal peer-group
neighbor internal remote-as 100
neighbor internal update-source loopback 0
neighbor internal route-map set-med out
neighbor internal filter-list 1 out
neighbor internal filter-list 2 in
neighbor 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
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To create a BGP peer group, use the neighbor peer-group router configuration command. To remove the peer group and all of its members, use the no form of this command.
neighbor peer-group-name peer-group
peer-group-name | Name of the BGP peer group. |
There is no BGP peer group.
Router configuration
This command first appeared in Cisco IOS Release 11.0.
Often in a BGP speaker, there are many neighbors 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.
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 can also 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, 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 EBGP neighbors.
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, AS 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
In the following example, the peer group external-peers is defined without the neighbor remote-as command. This is what makes it an EBGP peer group. Each individual member of the peer group is configured with its respective AS-number separately. Thus the peer group consists of members from autonomous systems 200, 300, and 400. All the peer group members have 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
You can use the master indexes or search online to find documentation of related commands.
clear ip bgp peer-group
neighbor peer-group (assigning members)
show ip bgp peer-group
To add an entry to the BGP neighbor table, use the neighbor remote-as router configuration command. To remove an entry from the table, use the no form of this command.
neighbor {ip-address | peer-group-name} remote-as number
ip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
number | Autonomous system to which the neighbor belongs. |
There are no BGP neighbor peers.
Router configuration
This command first appeared in Cisco IOS Release 10.0. The peer-group-name argument first appeared in Cisco IOS Release 11.0.
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.
The following example specifies that a router at the address 131.108.1.2 is a neighbor in autonomous system number 109:
router bgp 110
network 131.108.0.0
neighbor 131.108.1.2 remote-as 109
In the following example, a BGP router is assigned 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 131.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 command illustrates specification of an internal neighbor (with the same autonomous system number) at address 131.108.234.2; and the last neighbor command specifies a neighbor on a different network.
router bgp 109
network 131.108.0.0
network 192.31.7.0
neighbor 131.108.200.1 remote-as 167
neighbor 131.108.234.2 remote-as 109
neighbor 150.136.64.19 remote-as 99
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To remove private autonomous system numbers from the AS-path, a list of autonomous system numbers that a route passes through to reach a BGP peer, in outbound routing updates, use the neighbor remove-private-as router configuration command. To disable this function, use the no form of this command.
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. |
Disabled
Router configuration
This command first appeared in Cisco IOS Release 10.3. The peer-group-name argument first appeared in Cisco IOS Release 11.0.
This feature is available for external BGP (EBGP) neighbors only.
When an update is passed to the external neighbor, if the AS-path includes private autonomous system numbers, the software will drop the private autonomous system numbers.
If the AS-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 AS-path contains the autonomous system number of the EBGP neighbor, the private autonomous system numbers will not be removed.
If this feature is used with confederation, it will work as long as the private autonomous system numbers follow the confederation portion of the AS-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 160.89.2.33. The result is that the AS_path for the paths advertised by 131.108.1.1 through autonomous system 100 will just contain "100" (as seen by autonomous system 2051):
router bgp 100
network 131.108.1.1 description peer with private-as
neighbor 131.108.1.1 remote-as 65001
neighbor 160.89.2.33 description eBGP peer
neighbor 160.89.2.33 remote-as 2051
neighbor 160.89.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:
160.89.2.33
65001
131.108.1.1 from 131.108.1.1
Origin IGP, metric 0, localpref 100, valid, external, best
router-in-AS2051# 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
160.89.2.32 from 160.89.2.32
Origin IGP, metric 0, localpref 100, valid, external, best
You can use the master indexes or search online to find documentation of related commands.
To apply a route map to incoming or outgoing routes, use the neighbor route-map router configuration command. To remove a route map, use the no form of this command.
neighbor {ip-address | peer-group-name} route-map map-name {in | out}
ip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
map-name | Name of route map. |
in | Apply to incoming routes. |
out | Apply to outgoing routes. |
No route maps are applied to a peer.
Router configuration
This command first appeared in Cisco IOS Release 10.0.
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 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.
In the following example, route map internal-map is applied to incoming route from 198.92.70.24:
router bgp 5
neighbor 198.92.70.24 route-map internal-map in
!
route-map internal-map
match as-path 1
set local-preference 100
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To configure the router as a BGP route reflector and configure the specified neighbor as its client, use the neighbor route-reflector-client router configuration command. To indicate that the neighbor is not a client, use the no form of this command. When all the clients are disabled, the local router is no longer a route reflector.
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.
Router configuration
This command first appeared in Cisco IOS Release 11.1.
By default, all 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.
If you use route reflectors, all IBGP speakers need not be fully meshed. In the route reflector model, an internal 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.
If client-to-client reflection is enabled (by default it is enabled), clients of a route reflector cannot be members of a peer group. The bgp client-to-client reflection command controls client-to-client reflection.
In the following example, the local router is a route reflector. It passes learned IBGP routes to the neighbor at 198.92.70.24.
router bgp 5
neighbor 198.92.70.24 route-reflector-client
You can use the master indexes or search online to find documentation of related commands.
bgp client-to-client reflection
bgp cluster-id
show ip bgp
To specify that a COMMUNITIES attribute should be sent to a BGP neighbor, use the neighbor send-community router configuration command. To remove the entry, use the no form of this command.
neighbor {ip-address | peer-group-name} send-community
ip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
No COMMUNITIES attribute is sent to any neighbor.
Router configuration
This command first appeared in Cisco IOS Release 10.3. The peer-group-name argument first appeared in Cisco IOS Release 11.0.
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 example, the router belongs to autonomous system 109 and is configured to send the COMMUNITIES attribute to its neighbor at IP address 198.92.70.23:
router bgp 109
neighbor 198.92.70.23 send-community
You can use the master indexes or search online to find documentation of related commands.
match community-list
neighbor peer-group (creating)
set community
To configure the Cisco IOS software to start storing received updates, use the neighbor soft-reconfiguration inbound router configuration command. To not store received updates, use the no form of this command.
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. |
None
Router configuration
This command first appeared in Cisco IOS Release 11.2.
Entering this command starts the storage of received updates. This is required to do inbound soft reconfiguration. Outbound BGP soft reconfiguration does not require inbound soft reconfiguration to be enabled.
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 example, inbound soft-reconfiguration is enabled for the neighbor 131.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 131.108.1.1 remote-as 200
neighbor 131.108.1.1 soft-reconfiguration inbound
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To set the timers for a specific BGP peer or peer group, use the neighbor timers router configuration command. 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
ip-address | (Optional) A BGP peer or peer group IP address. |
peer-group-name | (Optional) Name of the BGP peer group. |
keepalive | Frequency, in seconds, with which the Cisco IOS software sends keepalive messages to its peer. The default is 60 seconds. |
holdtime | Interval, in seconds, after not receiving a keepalive message that the software declares a peer dead. The default is 180 seconds. |
keepalive: 60 seconds
holdtime: 180 seconds
Router configuration
This command first appeared in Cisco IOS Release 12.0
The timers configured for a specific neighbor or peer group override the timers configured for all BGP neighbors using the command timers bgp.
The following example changes the keepalive timer to 70 seconds and the holdtime timer to 210 seconds for the BGP peer 192.98.47.0:
router bgp 109
neighbor 192.98.47.0 timers 70 210
You can use the master indexes or search online to find documentation of related commands.
clear ip bgp peer-group
router bgp
show ip bgp
timers bgp
To have the Cisco IOS software allow internal BGP sessions to use any operational interface for TCP connections, use the neighbor update-source router configuration command. 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
ip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
interface | Loopback interface. |
Best local address
Router configuration
This command first appeared in Cisco IOS Release 10.0.
This feature works in conjunction with the loopback interface feature described in the "Configuring Serial Interfaces" chapter of the Configuration Fundamentals 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.
In the following example, BGP TCP connections for the specified neighbor will be sourced with loopback interface's IP address rather than the best local address:
router bgp 110
network 160.89.0.0
neighbor 160.89.2.3 remote-as 110
neighbor 160.89.2.3 update-source Loopback0
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To configure the Cisco IOS software to accept only a particular BGP version, use the neighbor version router configuration command. To use the default version level of a neighbor, use the no form of this command.
neighbor {ip-address | peer-group-name} version value
ip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
value | BGP version number. The version can be set to 2 to force the software to only use Version 2 with the specified neighbor. The default is to use Version 4 and dynamically negotiate down to Version 2 if requested. |
BGP Version 4
Router configuration
This command first appeared in Cisco IOS Release 10.0.
Entering this command disables dynamic version negotiation.
Our implementation of BGP supports BGP Versions 2, 3, and 4. If the neighbor does not accept default Version 4, dynamic version negotiation is implemented to negotiate 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
You can use the master indexes or search online to find documentation of related commands.
neighbor peer-group (creating)
To assign a weight to a neighbor connection, use the neighbor weight router configuration command. To remove a weight assignment, use the no form of this command.
neighbor {ip-address | peer-group-name} weight weight
ip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
weight | Weight to assign. Acceptable values are 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.
Router configuration
This command first appeared in Cisco IOS Release 10.0.
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 match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
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 sets the weight of all routes learned via 151.23.12.1 to 50:
router bgp 109
neighbor 151.23.12.1 weight 50
You can use the master indexes or search online to find documentation of related commands.
neighbor distribute-list
neighbor filter-list
neighbor peer-group (creating)
To specify the list of networks for the BGP routing process, use this form of the network router configuration command. To remove an entry, use the no form of this command.
network network-number [mask network-mask]
network-number | Network that BGP will advertise. |
mask | Network or subnetwork mask. |
network-mask | (Optional) Network mask address. |
No networks are specified.
Router configuration
This command first appeared in Cisco IOS Release 10.0.
These types of networks can be learned from connected routes, dynamic routing, and from static route sources.
A maximum of 200 network commands may be specified for a single BGP process.
The following example sets up network 131.108.0.0 to be included in the BGP updates:
router bgp 120
network 131.108.0.0
You can use the master indexes or search online to find documentation of related commands.
network backdoor
network mask
network weight
router bgp
To specify a backdoor route to a BGP border router that will provide better information about the network, use the network backdoor router configuration command. To remove an address from the list, use the no form of this command.
network address backdoor
address | IP address of the network to which you want a backdoor route. |
No network is advertised.
Router configuration
This command first appeared in Cisco IOS Release 10.0.
A backdoor network is treated as a local network, except that it is not advertised.
The following example configures network 131.108.0.0 as a local network and network 192.31.7.0 as a backdoor network:
router bgp 109
network 131.108.0.0
network 192.31.7.0 backdoor
To assign an absolute weight to a BGP network, use the network weight router configuration command. To delete an entry, use the no form of the command.
network address mask weight weight [route-map map-name]
address | IP address of the network. |
mask | Network mask of the network. |
weight | Absolute weight, or importance. It can be an integer from 0 to 65535. |
route-map map-name | (Optional) Name of route-map. |
Weight is unmodified. Weight is zero if the original default weight has not been modified by other router configuration commands.
Router configuration
This command first appeared in Cisco IOS Release 10.0.
The weight specified by this command overrides a weight assigned by the redistribute command.
In the following example, the BGP network has a weight of 100:
router bgp 5
network 193.0.0.0 255.0.0.0 weight 100
To configure the Border Gateway Protocol (BGP) routing process, use the router bgp global configuration command. To remove a routing process, use the no form of this command.
router bgp autonomous-system
autonomous-system | 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
This command first appeared in Cisco IOS Release 10.0.
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
You can use the master indexes or search online to find documentation of related commands.
To modify an autonomous system path for BGP routes, use the set as-path route map configuration command. To not modify the autonomous system path, use the no form of this command.
set as-path {tag | prepend as-path-string}
tag | Converts the tag of a route into an autonomous system path. Applies only when redistributing routes into BGP. |
prepend as-path-string | Appends the string following the keyword prepend to the as-path of the route that is matched by the route map. Applies to inbound and outbound BGP route maps. |
Autonomous system path is not modified.
Route map configuration
This command first appeared in Cisco IOS Release 11.0.
The only global BGP metric available to influence the best path selection is the AS-PATH length. By varying the length of the AS-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. This increases 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
match as-path 2
set as-path prepend 100 100 100
!
router bgp 100
redistribute ospf 109 route-map se t-as-path-from-tag
The following example prepends 100 100 100 to all the routes advertised to 131.108.1.1:
route-map set-as-path
match as-path 1
set as-path prepend 100 100 100
!
router bgp 100
neighbor 131.108.1.1 route-map set-as-path out
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weight
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
community-number | Valid values are 1 to 4294967200, no-export, or no-advertise. |
additive | (Optional) Adds the community to the already existing communities. |
none | Removes the COMMUNITY attribute from the prefixes that pass the route-map. |
No BGP COMMUNITIES attributes exist.
Route-map configuration
This command first appeared in Cisco IOS Release 10.3.
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 criteriathe conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actionsthe 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 a route map's match criteria 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 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
You can use the master indexes or search online to find documentation of related commands.
match community-list
route-map
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
half-life | Time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. The range of the half-life period is 1 to 45 minutes. The default is 15 minutes. |
reuse | If the penalty for a flapping route decreases enough to fall below this value, the route is unsuppressed. The process of unsuppressing routes occurs at 10-second increments. The range of the reuse value is 1 to 20000; the default is 750. |
suppress | A route is suppressed when its penalty exceeds this limit. The range is 1 to 20000; the default is 2000. |
max-suppress-time | Maximum time (in minutes) a route can be suppressed. The range is 1 to 20000; the default is 4 times the half-life. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes. |
Disabled
Route-map configuration
This command first appeared in Cisco IOS Release 11.0.
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 criteriathe conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actionsthe 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 a route map's match criteria are met. When all match criteria are met, all set actions are performed.
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
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weight
show route-map
To set the MED value on prefixes advertised to EBGP neighbors to match the IGP metric of the next hop, use the set metric internal route-map configuration command. To return to the default, use the no form of this command.
set metric-type internalThis command has not arguments or keywords.
Disabled
Route-map configuration
This command first appeared in Cisco IOS Release 10.3.
This command will cause BGP to advertise a MED that corresponds to the IGP metric associated with the NEXT HOP of the route. This command applies to generated, iBGP-, and eBGP-derived routes.
If this command is used, multiple BGP speakers in a common AS can advertise different MEDs for a particular prefix. Also, note that if the IGP metric changes, BGP will not readvertise the route.
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 criteriathe conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actionsthe 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 a route map's match criteria are met. When all match criteria are met, all set actions are performed.
In the following example, the MED for all the advertised routes to neighbor 160.89.2.3 is set to the corresponding IGP metric of the nexthop:
router bgp 109
network 160.89.0.0
neighbor 160.89.2.3 remote-as 200
neighbor 160.89.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 .*
You can use the master indexes or search online to find documentation of related commands.
route-map
To set the BGP origin code, use the set origin route-map configuration command. To delete an entry, use the no form of this command.
set origin {igp | egp autonomous-system | incomplete}
igp | Remote IGP. |
egp | Local EGP. |
autonomous-system | Remote autonomous system. This is an integer from 0 to 65535. |
incomplete | Unknown heritage. |
Default origin, based on route in main IP routing table.
Route-map configuration
This command first appeared in Cisco IOS Release 10.0.
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 with 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 criteriathe conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actionsthe 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 a route map's match criteria are met. When all match criteria are met, all set actions are performed.
In the following example, routes that pass the route map have the origin set to IGP:
route-map set_origin
match as-path 10
set origin igp
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set tag
set weight
To specify the BGP weight for the routing table, use the set weight route-map configuration command. To delete an entry, use the no form of this command.
set weight weight
weight | Weight value. It can be an integer from 0 to 65535. |
The weight is not changed by the specified route map.
Route-map configuration
This command first appeared in Cisco IOS Release 10.0.
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
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 match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
In the following example, the BGP weight for the routes matching the autonomous system path access list is set to 200:
route-map set-weight
match as-path 10
set weight 200
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
To display entries in the BGP routing table, use the show ip bgp EXEC command.
show ip bgp [network] [network-mask] [longer-prefixes]
network | (Optional) Network number, entered to display a particular network in the BGP routing table. |
network-mask | (Optional) Displays all BGP routes matching the address/mask pair. |
longer-prefixes | (Optional) Displays route and more specific routes. |
EXEC
This command first appeared in Cisco IOS Release 10.0.
The following is sample output from the show ip bgp command:
Router# show ip bgp
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 ?
* 198.92.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 ?
* 198.92.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 ?
* 198.92.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
* 198.92.72.24 0 1878 704 701 i
Table 48 describes significant fields shown in the display.
The following is sample output from the show ip bgp command when you specify longer-prefixes:
Router# show ip bgp 198.92.0.0 255.255.0.0 longer-prefixes
BGP table version is 1738, local router ID is 198.92.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 198.92.0.0 198.92.72.30 8896 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.1.0 198.92.72.30 8796 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.11.0 198.92.72.30 42482 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.14.0 198.92.72.30 8796 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.15.0 198.92.72.30 8696 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.16.0 198.92.72.30 1400 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.17.0 198.92.72.30 1400 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.18.0 198.92.72.30 8876 32768 ?
* 198.92.72.30 0 109 108 ?
*> 198.92.19.0 198.92.72.30 8876 32768 ?
* 198.92.72.30 0 109 108 ?
To display routes with nonnatural network masks (that is, classless interdomain routing, or CIDR), use the show ip bgp cidr-only privileged EXEC command.
show ip bgp cidr-onlyThis command has no arguments or keywords.
Privileged EXEC
This command first appeared in Cisco IOS Release 10.0.
The following is sample output from the show ip bgp cidr-only command:
Router# show ip bgp cidr-only
BGP table version is 220, local router ID is 198.92.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.0.0.0/8 198.92.72.24 0 1878 ?
*> 198.92.0.0/16 198.92.72.30 0 108 ?
Table 49 describes significant fields shown in the display.
To display routes that belong to specified BGP communities, use the show ip bgp community EXEC command.
show ip bgp community community-number [exact]
community-number | Valid value is community number in the range 1 to 4294967200, internet, no-export, or no-advertise. You must enter the numerical communities before the well-known communities. For example, the following does not work: router#sh ip b community internet 111:12345 Use the following instead: router#sh ip b community 111:12345 internet |
exact | (Optional) Displays only routes that have exactly the same specified communities. |
EXEC
This command first appeared in Cisco IOS Release 10.3.
The following is sample output from the show ip bgp community command:
router#
show ip bgp community 111:12345 internet
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
*> 2.2.2.2/32 158.43.222.2 0 0 222 ?
*> 111.0.0.0 158.43.222.2 0 0 222 ?
*> 158.43.0.0 158.43.222.2 0 0 222 ?
*> 158.43.44.44/32 158.43.222.2 0 0 222 ?
* 158.43.222.0/24 158.43.222.2 0 0 222 i
*> 172.17.240.0/21 158.43.222.2 0 0 222 ?
*> 192.168.212.0 158.43.222.2 0 0 222 i
*> 203.9.1.0 158.43.222.2 0 0 222 ?
Table 50 describes significant fields shown in the display.
To display routes that are permitted by the BGP community list, use the show ip bgp community-list EXEC command.
show ip bgp community-list community-list-number [exact]
community-list-number | Community list number in the range 1 to 99. |
exact | (Optional) Displays only routes that have an exact match. |
EXEC
This command first appeared in Cisco IOS Release 10.3.
The following is sample output of the show ip bgp community-list command:
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 ?
* 198.92.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 ?
* 198.92.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 ?
* 198.92.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
* 198.92.72.24 0 1878 704 701 i
Table 51 describes significant fields shown in the display.
To display BGP dampened routes, use the show ip bgp dampened-paths EXEC command.
show ip bgp dampened-pathsThis command has no arguments or keywords.
EXEC
This command first appeared in Cisco IOS Release 11.0.
The following is sample output from the show ip bgp dampened-paths command:
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 52 describes the fields in the display.
You can use the master indexes or search online to find documentation of related commands.
bgp dampening
clear ip bgp dampening
To display routes that conform to a specified filter list, use the show ip bgp filter-list privileged EXEC command.
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. |
Privileged EXEC
This command first appeared in Cisco IOS Release 10.0.
The following is sample output from the show ip bgp filter-list command:
Router# show ip bgp filter-list 2
BGP table version is 1738, local router ID is 198.92.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 198.92.0.0 198.92.72.30 0 109 108 ?
* 198.92.1.0 198.92.72.30 0 109 108 ?
* 198.92.11.0 198.92.72.30 0 109 108 ?
* 198.92.14.0 198.92.72.30 0 109 108 ?
* 198.92.15.0 198.92.72.30 0 109 108 ?
* 198.92.16.0 198.92.72.30 0 109 108 ?
* 198.92.17.0 198.92.72.30 0 109 108 ?
* 198.92.18.0 198.92.72.30 0 109 108 ?
* 198.92.19.0 198.92.72.30 0 109 108 ?
* 198.92.24.0 198.92.72.30 0 109 108 ?
* 198.92.29.0 198.92.72.30 0 109 108 ?
* 198.92.30.0 198.92.72.30 0 109 108 ?
* 198.92.33.0 198.92.72.30 0 109 108 ?
* 198.92.35.0 198.92.72.30 0 109 108 ?
* 198.92.36.0 198.92.72.30 0 109 108 ?
* 198.92.37.0 198.92.72.30 0 109 108 ?
* 198.92.38.0 198.92.72.30 0 109 108 ?
* 198.92.39.0 198.92.72.30 0 109 108 ?
Table 53 describes significant fields shown in the display.
To display BGP flap statistics, use the show ip bgp flap-statistics EXEC command.
show ip bgp flap-statistics [{regexp regexp} | {filter-list list} | {address mask [longer-prefix]}]
regexp regexp | (Optional) Clears flap statistics for all the paths that match the regular expression. |
filter-list list | (Optional) Clears flap statistics for all the paths that pass the access list. |
address | (Optional) Clears flap statistics for a single entry at this IP address. |
mask | (Optional) Network mask applied to the address. |
longer-prefix | (Optional) Displays flap statistics for more specific entries. |
EXEC
This command first appeared in Cisco IOS Release 11.0.
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:
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 54 describes the significant fields in the display.
You can use the master indexes or search online to find documentation of related commands.
bgp dampening
clear ip bgp flap-statistics
To display routes with inconsistent originating autonomous systems, use the show ip bgp inconsistent-as privileged EXEC command.
show ip bgp inconsistent-asThis command has no arguments or keywords.
Privileged EXEC
This command first appeared in Cisco IOS Release 11.0.
The following is sample output from the show ip bgp inconsistent-as command:
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 information about the TCP and BGP connections to neighbors, use the show ip bgp neighbors EXEC command.
show ip bgp neighbors [address] [received-routes | routes | advertised-routes | {paths
address | (Optional) Address of the neighbor whose routes you have learned from. If you omit this argument, all neighbors are displayed. |
received-routes | (Optional) Displays all received routes (both accepted and rejected) from the specified neighbor. |
routes | (Optional) Displays all routes that are received and accepted. This is a subset of the output from the received-routes keyword. |
advertised-routes | (Optional) Displays all the routes the router has advertised to the neighbor. |
paths regular-expression | (Optional) Regular expression that is used to match the paths received. |
dampened-routes | (Optional) Displays the dampened routes to the neighbor at the IP address specified. |
EXEC
This command first appeared in Cisco IOS Release 10.0. The received-routes keyword first appeared in Cisco IOS Release 11.2.
The following is sample output from the show ip bgp neighbors command:
Router# show ip bgp neighbors 171.69.232.178
BGP neighbor is 171.69.232.178, remote AS 10, external link
Index 1, Offset 0, Mask 0x2
Inbound soft reconfiguration allowed
BGP version 4, remote router ID 171.69.232.178
BGP state = Established, table version = 27, up for 00:06:12
Last read 00:00:12, hold time is 180, keepalive interval is 60 seconds
Minimum time between advertisement runs is 30 seconds
Received 19 messages, 0 notifications, 0 in queue
Sent 17 messages, 0 notifications, 0 in queue
Inbound path policy configured
Route map for incoming advertisements is testing
Connections established 2; dropped 1
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 171.69.232.181, Local port: 11002
Foreign host: 171.69.232.178, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0, saved: 0
Event Timers (current time is 0x530C294):
Timer Starts Wakeups Next
Retrans 12 0 0x0
TimeWait 0 0 0x0
AckHold 12 10 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
iss: 133981889 snduna: 133982166 sndnxt: 133982166 sndwnd: 16108
irs: 3317025518 rcvnxt: 3317025810 rcvwnd: 16093 delrcvwnd: 291
SRTT: 441 ms, RTTO: 2784 ms, RTV: 951 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 300 ms
Flags: higher precedence, nagle
Datagrams (max data segment is 1460 bytes):
Rcvd: 15 (out of order: 0), with data: 12, total data bytes: 291
Sent: 23 (retransmit: 0), with data: 11, total data bytes: 276
Table 55 describes the fields shown in the display.
The following is sample output from the show ip bgp neighbors command with advertised-routes:
Router# show ip bgp neighbors 171.69.232.178 advertised-routes
BGP table version is 27, local router ID is 171.69.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 171.69.232.179 0 100 0 ?
*> 200.2.2.0 0.0.0.0 0 32768 i
The following is sample output from the show ip bgp neighbors command with routes:
Router# show ip bgp neighbors 171.69.232.178 routes
BGP table version is 27, local router ID is 171.69.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
*> 10.0.0.0 171.69.232.178 40 0 10 ?
*> 20.0.0.0 171.69.232.178 40 0 10 ?
Table 56 describes the fields shown in the display.
The following is sample output from the show ip bgp neighbors command with paths:
Router# show ip bgp neighbors 171.69.232.178 paths ^10
Address Refcount Metric Path
0x60E577B0 2 40 10 ?
To display all the BGP paths in the database, use the show ip bgp paths EXEC command.
show ip bgp pathsThis command has no arguments or keywords.
EXEC
This command first appeared in Cisco IOS Release 10.0.
The following is sample output from the show ip bgp paths command:
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 57 describes significant fields shown in the display.
To display information about BGP peer groups, use the show ip bgp peer-group EXEC command.
show ip bgp peer-group [tag] [summary]
tag | (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
This command first appeared in Cisco IOS Release 11.0.
The following is sample output from the show ip bgp peer-group command:
Router# show ip bgp peer-group0 internal
BGP neighbor is internal, peer-group leader
BGP version 4
Minimum time between advertisement runs is 5 seconds
Incoming update AS path filter list is 2
Outgoing update AS path filter list is 1
Route map for outgoing advertisements is set-med
To display routes matching the regular expression, use the show ip bgp regexp privileged EXEC command.
show ip bgp regexp regular-expression
regular-expression | Regular expression to match the BGP autonomous system paths. |
Privileged EXEC
This command first appeared in Cisco IOS Release 10.0.
Router# show ip bgp regexp 108$
BGP table version is 1738, local router ID is 198.92.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 198.92.0.0 198.92.72.30 0 109 108 ?
* 198.92.1.0 198.92.72.30 0 109 108 ?
* 198.92.11.0 198.92.72.30 0 109 108 ?
* 198.92.14.0 198.92.72.30 0 109 108 ?
* 198.92.15.0 198.92.72.30 0 109 108 ?
* 198.92.16.0 198.92.72.30 0 109 108 ?
* 198.92.17.0 198.92.72.30 0 109 108 ?
* 198.92.18.0 198.92.72.30 0 109 108 ?
* 198.92.19.0 198.92.72.30 0 109 108 ?
* 198.92.24.0 198.92.72.30 0 109 108 ?
* 198.92.29.0 198.92.72.30 0 109 108 ?
* 198.92.30.0 198.92.72.30 0 109 108 ?
* 198.92.33.0 198.92.72.30 0 109 108 ?
* 198.92.35.0 198.92.72.30 0 109 108 ?
* 198.92.36.0 198.92.72.30 0 109 108 ?
* 198.92.37.0 198.92.72.30 0 109 108 ?
* 198.92.38.0 198.92.72.30 0 109 108 ?
* 198.92.39.0 198.92.72.30 0 109 108 ?
To display the status of all BGP connections, use the show ip bgp summary EXEC command.
show ip bgp summaryThis command has no arguments or keywords.
EXEC
This command first appeared in Cisco IOS Release 10.0.
The following is sample output from the show ip bgp summary command:
Router# show ip bgp summary
BGP table version is 717029, main routing table version 717029
19073 network entries (37544 paths) using 3542756 bytes of memory
691 BGP path attribute entries using 57200 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State
193.0.16.1 4 1755 32642 2973 717029 0 0 1:27:11
193.0.17.1 4 1755 4790 2973 717029 0 0 1:27:51
193.0.18.1 4 1755 7722 3024 717029 0 0 1:28:13
193.0.19.1 4 1755 0 0 0 0 0 2d02 Active
193.0.20.1 4 1755 3673 3049 717029 0 0 2:50:10
193.0.21.1 4 1755 3741 3048 717029 0 0 12:24:43
193.0.22.1 4 1755 33129 3051 717029 0 0 12:24:48
193.0.23.1 4 1755 0 0 0 0 0 2d02 Active
193.0.24.1 4 1755 0 0 0 0 0 2d02 Active
193.0.25.1 4 1755 0 0 0 0 0 2d02 Active
193.0.26.1 4 1755 0 0 0 0 0 2d02 Active
193.0.27.1 4 1755 4269 3049 717029 0 0 12:39:33
193.0.28.1 4 1755 3037 3050 717029 0 0 2:08:15
198.92.72.24 4 1878 11635 13300 717028 0 0 0:50:39
Table 58 describes significant fields shown in the display.
To enable the synchronization between BGP and your IGP, use the synchronization router configuration command. To enable the Cisco IOS software to advertise a network route without waiting for the IGP, use the no form of this command.
synchronizationThis command has no arguments or keywords.
Enabled
Router configuration
This command first appeared in Cisco IOS Release 10.0.
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 synchronization if there are routers in the autonomous system that do not speak BGP.
The following example enables a router to advertise a network route without waiting for the IGP:
router bgp 120
no synchronization
To modify metric and tag values when the IP routing table is updated with BGP learned routes, use the table-map router configuration command. To disable this function, use the no form of the command.
table-map route-map-name
route-map-name | Route-map name, from the route-map command. |
Disabled
Router configuration
This command first appeared in Cisco IOS Release 10.0.
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 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
You can use the master indexes or search online to find documentation of related commands.
match as-path
match ip address
match ip next-hop
route-map
To adjust BGP network timers, use the timers bgp router configuration command. To reset the BGP timing defaults, use the no form of this command.
timers bgp keepalive holdtime
keepalive | Frequency, in seconds, with which the Cisco IOS software sends keepalive messages to its peer. The default is 60 seconds. |
holdtime | Interval, in seconds, after not receiving a keepalive message that the software declares a peer dead. The default is 180 seconds. |
keepalive: 60 seconds
holdtime: 180 seconds
Router configuration
This command first appeared in Cisco IOS Release 10.0.
The following example changes the keepalive timer to 70 seconds and the holdtime timer to 210 seconds:
timers bgp 70 210
You can use the master indexes or search online to find documentation of related commands.
clear ip bgp peer-group
router bgp
show ip bgp
Posted: Fri Dec 20 14:17:41 PST 2002
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.