|
This chapter describes the function and displays the syntax for Border Gateway Protocol (BGP) commands. For more information about defaults and usage guidelines, see the corresponding chapter of the Network Protocols Command Reference, 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. |
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-summaryTo 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-medTo 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 reflectionTo 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-idcluster-id | Cluster ID of this router acting as a route reflector; maximum of 4 bytes. |
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-systemautonomous-system | Autonomous system number that internally includes multiple autonomous systems. |
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. |
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. |
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 valuevalue | Local preference value from 0 to 4294967295. Higher is more preferred. |
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-falloverTo 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. |
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. |
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. |
To remove all the members of a BGP peer group, use the clear ip bgp peer-group EXEC command.
clear ip bgp peer-group tagtag | Name of the BGP peer group to clear. |
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 originateTo 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 numbernumber | Default metric value appropriate for the specified routing protocol. |
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-distanceexternal-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. |
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-expressionaccess-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. |
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-numbercommunity-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. · internet--The Internet community. · no-export--Do not advertise this route to an EBGP peer. · no-advertise--Do not advertise this route to any peer (internal or external). |
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-numberpath-list-number | Autonomous system path access list. An integer from 1 to 199. |
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. |
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 secondsip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
seconds | Time in seconds. Integer from 0 to 600. |
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. |
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 texttext | Text (up to 80 characters) that describes the neighbor. |
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. |
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. |
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. |
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. |
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-selfip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
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 stringip-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. |
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-nameip-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. |
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-grouppeer-group-name | Name of the 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 numberip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
number | Autonomous system to which the neighbor belongs. |
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. |
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-clientip-address | IP address of the BGP neighbor being identified as a client. |
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-communityip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
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 inboundip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
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 interfaceip-address | IP address of the BGP-speaking neighbor. |
peer-group-name | Name of a BGP peer group. |
interface | Loopback interface. |
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 valueip-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. |
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 weightip-address | Neighbor's IP address. |
peer-group-name | Name of a BGP peer group. |
weight | Weight to assign. Acceptable values are 0 to 65535. |
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. |
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 backdooraddress | IP address of the network to which you want a backdoor route. |
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. |
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-systemautonomous-system | Number of an autonomous system that identifies the router to other BGP routers and tags the routing information passed along. |
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. |
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. |
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-timehalf-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. |
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 internalTo 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. |
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 weightweight | Weight value. It can be an integer from 0 to 65535. |
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. |
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-onlyTo 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. |
exact | (Optional) Displays only routes that have exactly the same specified communities. |
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. |
To display BGP dampened routes, use the show ip bgp dampened-paths EXEC command.
show ip bgp dampened-pathsTo 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-numberaccess-list-number | Number of an autonomous system path access list. It can be a number from 1 to 199. |
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. |
To display routes with inconsistent originating autonomous systems, use the show ip bgp inconsistent-as privileged EXEC command.
show ip bgp inconsistent-asTo 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 | {pathsaddress | (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. |
To display all the BGP paths in the database, use the show ip bgp paths EXEC command.
show ip bgp pathsTo 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. |
To display routes matching the regular expression, use the show ip bgp regexp privileged EXEC command.
show ip bgp regexp regular-expressionregular-expression | Regular expression to match the BGP autonomous system paths. |
To display the status of all BGP connections, use the show ip bgp summary EXEC command.
show ip bgp summaryTo 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.
synchronizationTo 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-nameroute-map-name | Route-map name, from the route-map command. |
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 holdtimekeepalive | 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. |
|