Table Of Contents
bgp always-compare-med
bgp bestpath as-path ignore
bgp bestpath compare-routerid
bgp bestpath cost-community ignore
bgp bestpath med confed
bgp bestpath med missing-as-worst
bgp client-to-client reflection
bgp cluster-id
bgp confederation identifier
bgp confederation peers
bgp dampening
bgp default ipv4-unicast
bgp default local-preference
bgp deterministic-med
bgp enforce-first-as
bgp fast-external-fallover
bgp graceful-restart
bgp inject-map
bgp log-neighbor-changes
bgp maxas-limit
bgp next-hop
bgp nexthop trigger enable
bgp nexthop trigger delay
bgp redistribute-internal
bgp regexp deterministic
bgp router-id
bgp rr-group
bgp soft-reconfig-backup
bgp suppress-inactive
bgp update-delay
bgp upgrade-cli
bgp-policy
bgp always-compare-med
To enable the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems, use the bgp always-compare-med command in router configuration mode. To disallow the comparison, use the no form of this command.
bgp always-compare-med
no bgp always-compare-med
Syntax Description
This command has no arguments or keywords.
Defaults
Cisco IOS software does not compare the MED for paths from neighbors in different autonomous systems if this command is not enabled or if the no form of this command is entered. The MED is compared only if the AS path for the compared routes is identical.
Command Modes
Router configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
The MED, as stated in RFC 1771, is an optional non-transitive attribute that is a four octet non-negative integer. The value of this attribute may be used by the BGP best path selection process to discriminate among multiple exit points to a neighboring autonomous system.
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. During the best-path selection process, MED comparison is done only among paths from the same autonomous system. The bgp always-compare-med command is used to change this behavior by enforcing MED comparison between all paths, regardless of the autonomous system from which the paths are received.
The bgp deterministic-med command can be configured to enforce deterministic comparison of the MED value between all paths received from within the same autonomous system.
Examples
In the following example, the local BGP routing process is configured to compare the MED from alternative paths, regardless of the autonomous system from which the paths are received:
Router(config)# router bgp 500000
Router(config-router)# bgp always-compare-med
Related Commands
Command
|
Description
|
bgp deterministic-med
|
Enforces deterministic comparison of the MED value between all paths received from within the same autonomous system
|
bgp bestpath as-path ignore
To configure Border Gateway Protocol (BGP) to not consider the autonomous system (AS) path during best path route selection, use the bgp bestpath as-path ignore command in router configuration mode. To restore default behavior and configure BGP to consider the AS path during route selection, use the no form of this command.
bgp bestpath as-path ignore
no bgp bestpath as-path ignore
Syntax Description
This command has no arguments or keywords.
Defaults
The AS path is considered during BGP best path selection.
Command Modes
Router configuration
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
Examples
In the following example, the BGP routing process is configured to not consider the AS path during best path selection:
Router(config)# router bgp 40000
Router(config-router)# bgp bestpath as-path ignore
Related Commands
Command
|
Description
|
show ip bgp ipv4
|
Displays information about the TCP and BGP connections to neighbors.
|
bgp bestpath compare-routerid
To configure a Border Gateway Protocol (BGP) routing process to compare identical routes received from different external peers during the best path selection process and to select the route with the lowest router ID as the best path, use the bgp bestpath compare-routerid command in router configuration mode. To return the BGP routing process to the default operation, use the no form of this command.
bgp bestpath compare-routerid
no bgp bestpath compare-routerid
Syntax Description
This command has no arguments or keywords.
Defaults
The behavior of this command is disabled by default; BGP selects the route that was received first when two routes with identical attributes are received.
Command Modes
Router configuration
Command History
Release
|
Modification
|
12.1(3)
|
This command was introduced.
|
12.0(11)S
|
This command was integrated into Cisco IOS Release 12.0(11)S.
|
12.1(3a)E
|
This command was integrated into Cisco IOS Release 12.1(3a)E.
|
12.1(3)T
|
This command was integrated into Cisco IOS Release 12.1(3)T.
|
Usage Guidelines
The bgp bestpath compare-routerid command is used to configure a BGP routing process to use the router ID as the tie breaker for best path selection when two identical routes are received from two different peers (all the attributes are the same except for the router ID). When this command is enabled, the lowest router ID will be selected as the best path when all other attributes are equal.
Examples
In the following example, the BGP routing process is configured to compare and use the router ID as a tie breaker for best path selection when identical paths are received from different peers:
Router(config)# router bgp 50000
Router(config-router)# bgp bestpath compare-routerid
Related Commands
Command
|
Description
|
show ip bgp
|
Displays entries in the BGP routing table.
|
bgp bestpath cost-community ignore
To configure a router that is running the Border Gateway Protocol (BGP) to not evaluate the cost community attribute during the best path selection process, use the bgp bestpath cost-community ignore command in router configuration mode. To return the router to default operation, use the no form of this command.
bgp bestpath cost-community ignore
no bgp bestpath cost-community ignore
Syntax Description
This command has no keywords or arguments.
Defaults
The behavior of this command is enabled by default until the cost community attribute is manually configured.
Command Modes
Address-family configuration
Router configuration
Command History
Release
|
Modification
|
12.0(24)S
|
This command was introduced.
|
12.3(2)T
|
This command was integrated into Cisco IOS Release 12.3(2)T.
|
12.2(18)S
|
This command was integrated into Cisco IOS Release 12.2(18)S.
|
Usage Guidelines
The bgp bestpath cost-community ignore command is used to disable the evaluation of the cost community attribute to help isolate problems and troubleshoot issues that relate to BGP path selection. This command can also be used to delay the activation of cost community attribute evaluation so that cost community filtering can be deployed in a large network at the same time.
Examples
In the following example, a router that is configured to not evaluate the cost community attribute during the best path selection process:
Router(config)# router bgp 50000
Router(config-router)# address-family ipv4 unicast
Router(config-router-af)# bgp bestpath cost-community ignore
Related Commands
Command
|
Description
|
set extcommunity cost
|
Creates a set clause to apply the cost community attribute to routes that pass through a route map.
|
show ip bgp
|
Displays entries in the BGP routing table.
|
bgp bestpath med confed
To configure a Border Gateway Protocol (BGP) routing process to compare the Multi Exit Discriminator (MED) between paths learned from confederation peers, use the bgp bestpath med confed command in router configuration mode. To disable MED comparison of paths received from confederation peers, use the no form of this command.
bgp bestpath med confed [missing-as-worst]
no bgp bestpath med confed [missing-as-worst]
Syntax Description
missing-as-worst
|
(Optional) Assigns the value of infinity to received routes that do not carry the MED attribute, making these routes the least desirable.
|
Defaults
Cisco IOS software does not consider the MED attribute when choosing among paths learned from confederation peers if this command is not enabled or if the no form of this command is entered.
Command Modes
Router configuration
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
Usage Guidelines
The MED comparison between confederation peers occurs only if no external autonomous systems are in the path (an external autonomous system is an autonomous system that is not within the confederation). If an external autonomous system in the path, then the external MED is passed transparently through the confederation, and the comparison is does not occur.
For example, assume that autonomous system 65000, 65001, 65002, and 65004 are part of the confederation; autonomous system 1 is not; and we are comparing route A with four paths. If the bgp bestpath med confed command is enabled, path 1 would be chosen. The fourth path has a lower MED, but it is not involved in the MED comparison because there is an external autonomous system in this path. The following list displays the MED for each autonomous system.
path = 65000 65004, med = 2
path = 65001 65004, med = 3
path = 65002 65004, med = 4
path = 65003 1, med = 1
Examples
In the following example, the BGP routing process is configured to compare MED values for paths learned from confederation peers:
Router(config)# router bgp 50000
Router(config-router)# bgp bestpath med confed
Related Commands
Command
|
Description
|
show ip bgp
|
Displays entries in the BGP routing table.
|
show ip bgp ipv4
|
Displays information about the TCP and BGP connections to neighbors.
|
bgp bestpath med missing-as-worst
To configure a Border Gateway Protocol (BGP) routing process to assign a value of infinity to routes that are missing the Multi Exit Discriminator (MED) attribute (making the path without a MED value the least desirable path), use the bgp bestpath med missing-as-worst command in router configuration mode. To return the router to the default behavior (assign a value of 0 to the missing MED), use the no form of this command.
bgp bestpath med missing-as-worst
no bgp bestpath med missing-as-worst
Syntax Description
This command has no arguments or keywords.
Defaults
Cisco IOS software assigns a value of 0 to routes the are missing the MED attribute, causing the route with the missing MED attribute to be considered the best path.
Command Modes
Router configuration
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
Examples
In the following example, the BGP router process is configured to consider a route with a missing MED attribute as having a value of infinity (4294967294), making this path the least desirable path:
Router(config)# router bgp 50000
Router(config-router)# bgp bestpath med missing-as-worst
Related Commands
Command
|
Description
|
show ip bgp
|
Displays entries in the BGP routing table.
|
show ip bgp ipv4
|
Displays information about the TCP and BGP connections to neighbors.
|
bgp client-to-client reflection
To enable or restore route reflection from a BGP route reflector to clients, use the bgp client-to-client reflection command in router configuration mode. To disable client-to-client route reflection, use the no form of this command.
bgp client-to-client reflection
no bgp client-to-client reflection
Syntax Description
This command has no arguments or keywords.
Defaults
Client-to-client route reflection is enabled by default; when a route reflector is configured, the route reflector reflects routes from a client to other clients.
Command Modes
Router configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
12.0(7)T
|
Address family configuration mode support was added.
|
Usage Guidelines
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. In this case, use the no bgp client-to-client reflection command to disable client-to-client reflection.
Examples
In the following example, the local router is a route reflector, and the three neighbors are fully meshed. Because the neighbors are fully meshed, client-to-client reflection is disabled with the no bgp client-to-client reflection command.
Router(config)# router bgp 50000
Router(config-router)# neighbor 10.24.95.22 route-reflector-client
Router(config-router)# neighbor 10.24.95.23 route-reflector-client
Router(config-router)# neighbor 10.24.95.24 route-reflector-client
Router(config-router)# no bgp client-to-client reflection
Router(config-router)# end
Related Commands
Command
|
Description
|
address-family ipv4 (BGP)
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.
|
address-family vpnv4
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.
|
bgp cluster-id
|
Configures the cluster ID if the BGP cluster has more than one route reflector.
|
neighbor route-reflector-client
|
Configures the router as a BGP route reflector and configures the specified neighbor as its client.
|
show ip bgp
|
Displays entries in the BGP routing table.
|
bgp cluster-id
To set the cluster ID on a route reflector in a route reflector cluster, use the bgp cluster-id command in router configuration mode. To remove the cluster ID, use the no form of this command.
bgp cluster-id cluster-id
no bgp cluster-id cluster-id
Syntax Description
cluster-id
|
Cluster ID of this router acting as a route reflector; maximum of 4 bytes. The ID can be specified in dotted or decimal format.
|
Defaults
The local router ID of the route reflector is used as the cluster ID when no ID is specified or when the no form of this command is entered.
Command Modes
Router configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
Together, a route reflector and its clients form a cluster. When a single route reflector is deployed in a cluster, the cluster is identified by the router ID of the route reflector.
The bgp cluster-id command is used to assign a cluster ID to a route reflector when the cluster has one or more route reflectors. Multiple route reflectors are deployed in a cluster to increase redundancy and avoid a single point of failure. When multiple route reflectors are configured in a cluster, the same cluster ID is assigned to all route reflectors. This allows all route reflectors in the cluster to recognize updates from peers in the same cluster and reduces the number of updates that need to be stored in BGP routing tables.
Note
All route reflectors must maintain stable sessions between all peers in the cluster. If stable sessions cannot be maintained, then overlay route reflector clusters should be used instead (route reflectors with different cluster IDs).
Examples
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(config)# router bgp 50000
Router(config-router)# neighbor 192.168.70.24 route-reflector-client
Router(config-router)# bgp cluster-id 10.0.1.2
Related Commands
Command
|
Description
|
bgp client-to-client reflection
|
Enables or restores route reflection from a BGP route reflector to clients.
|
neighbor route-reflector-client
|
Configures the router as a BGP route reflector and configures the specified neighbor as its client.
|
show ip bgp
|
Displays entries in the BGP routing table.
|
bgp confederation identifier
To specify a BGP confederation identifier, use the bgp confederation identifier command in router configuration mode. To remove the confederation identifier, use the no form of this command.
bgp confederation identifier as-number
no bgp confederation identifier as-number
Syntax Description
as-number
|
Autonomous system number to be configured to internally include multiple autonomous systems.
|
Defaults
No default behavior or values
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.3
|
This command was introduced.
|
Usage Guidelines
The bgp confederation identifier command is used to configure a single autonomous system number to identify a group of smaller autonomous systems as a single confederation.
A confederation can be used to reduce the internal BGP (iBGP) mesh by dividing a large single autonomous system into multiple subautonomous systems and then grouping them into a single confederation. The subautonomous systems within the confederation exchange routing information like iBGP peers. External peers interact with the confederation as if it is a single autonomous system.
Each subautonomous system is fully meshed within itself and has a few connections to other autonomous systems within the confederation. Next hop, Multi Exit Discriminator (MED), and local preference information is preserved throughout the confederation, allowing you enables to you to retain a single Interior Gateway Protocol (IGP) for all the autonomous systems.
Examples
In the following example, the routing domain is divided into autonomous systems 50001, 50002, 50003, 50004, 50005, and 50006 and identified by the confederation identifier 50000. Neighbor 10.2.3.4 is a peer inside of the routing domain confederation. Neighbor 10.4.5.6 is a peer outside of the routing domain confederation. To external peers and routing domains, the confederation appears as a single autonomous system with the number 50000.
Router(config)# router bgp 50000
Router(config-router)# bgp confederation identifier 50000
Router(config-router)# bgp confederation peers 50001 50002 50003 50004 50005 50006
Router(config-router)# neighbor 10.2.3.4 remote-as 50001
Router(config-router)# neighbor 10.4.5.6 remote-as 40000
Router(config-router)# end
Related Commands
Command
|
Description
|
bgp confederation peers
|
Configures subautonomous systems to belong to a single confederation
|
bgp confederation peers
To configure subautonomous systems to belong to a single confederation, use the bgp confederation peers command in router configuration mode. To remove an autonomous system from the confederation, use the no form of this command.
bgp confederation peers as-number [... as-number]
no bgp confederation peers as-number [... as-number]
Syntax Description
as-number
|
Autonomous system numbers for BGP peers that will belong to the confederation.
|
Defaults
No default behavior or values
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.3
|
This command was introduced.
|
Usage Guidelines
The bgp confederation peers command is used to configure multiple autonomous systems as a single confederation. The ellipsis (...) in the command syntax indicates that your command input can include multiple values for the as-number argument.
The autonomous systems specified in this command are visible internally to the confederation. Each autonomous system is fully meshed within itself. The bgp confederation identifier command specifies the confederation to which the autonomous systems belong.
Examples
In the following example, autonomous systems 50001, 50002, 50003, 50004, and 50005 are configured to belong to a single confederation under the identifier 50000:
Router(config)# router bgp 50000
Router(config-router)# bgp confederation identifier 50000
Router(config-router)# bgp confederation peers 50001 50002 50003 50004 50005
Related Commands
Command
|
Description
|
bgp confederation identifier
|
Specifies a BGP confederation identifier.
|
bgp dampening
To enable BGP route dampening or change BGP route dampening parameters, use the bgp dampening command in address family or router configuration mode. To disable BGP dampening, use the no form of this command.
bgp dampening [half-life reuse suppress max-suppress-time] | [route-map map-name]
no bgp dampening [half-life reuse suppress max-suppress-time] | [route-map map-name]
Syntax Description
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) Reuse values based on accumulated penalties. 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 from 1 to 20000; the default is 750.
|
suppress
|
(Optional) A route is suppressed when its penalty exceeds this limit. The range is from 1 to 20000; the default is 2000.
|
max-suppress-time
|
(Optional) Maximum time (in minutes) a route can be suppressed. The range is from 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. When the max-suppress-time is configured, the maximum penalty will never be exceeded, regardless of the number of times that the prefix dampens. The maximum penalty is computed with the following formula:
Max penalty = reuse-limit *2^(maximum suppress time/half time)
|
route-map map-name
|
(Optional) Name of route map that controls where BGP route dampening is enabled.
|
Defaults
BGP dampening is disabled by default. The following values are used when this command is enabled without configuring any optional arguments:
half-life: 15 minutes
reuse: 750
suppress: 2000
max-suppress-time: 4 times half-life
Command Modes
Address family configuration
Router configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
12.0(7)T
|
Address family configuration mode support was added.
|
Usage Guidelines
The bgp dampening command is used to enable BGP route dampening. This command can be entered without any arguments or keywords. The half-life, reuse, suppress, and max-suppress-time arguments are position-dependent; meaning that if any of these arguments are entered, then all optional arguments must be entered.
When BGP dampening is configured and a prefix is withdrawn, BGP considers the withdrawn prefix as a flap and increases the penalty by a 1000. If BGP receives an attribute change, BGP increases the penalty by 500. If then the prefix has been withdrawn, BGP keeps the prefix in the BGP table as a history entry. If the prefix has not been withdrawn by the neighbor and BGP is not using this prefix, the prefix is marked as dampened. Dampened prefixes are not used in the BGP decision process and not installed to the routing table.
Examples
In the following example, the BGP dampening values are set to 30 minutes for the half life, 1500 for the reuse value, 10000 for the suppress value, and 120 minutes for the maximum suppress time:
Router(config)# router bgp 5
Router(config-router)# address-family ipv4 unicast
Router(config-router-af)# bgp dampening 30 1500 10000 120
Router(config-router-af)# end
In the following example, BGP dampening is applied to prefixes filtered through the route-map named BLUE:
Router(config)# ip prefix-list RED permit 10.0.0.0/8
Router(config)# route-map BLUE
Router(config-route-map)# match ip address ip prefix-list RED
Router(config-route-map)# exit
Router(config)# router bgp 50000
Router(config-router)# address-family ipv4
Router(config-router-af)# bgp dampening route-map BLUE
Router(config-router-af)# end
Related Commands
Command
|
Description
|
clear ip bgp dampening
|
Clears BGP route dampening information and unsuppresses the suppressed routes.
|
clear bgp nsap flap-statistics
|
Clears BGP flap statistics.
|
set dampening
|
Applies BGP dampening to prefixes filtered through a route map.
|
show ip bgp dampened-paths
|
Displays BGP dampened routes.
|
show ip bgp flap-statistics
|
Displays BGP flap statistics.
|
bgp default ipv4-unicast
To set the IP version 4 (IPv4) unicast address family as default for BGP peering session establishment, use the bgp default ipv4-unicast command in router configuration mode. To disable default IPv4 unicast address family for peering session establishment, use the no form of this command.
bgp default ipv4-unicast
no bgp default ipv4-unicast
Syntax Description
This command has no arguments or keywords.
Defaults
IPv4 address family routing information is advertised by default for each BGP routing session configured with the neighbor remote-as command, unless you first configure the no bgp default ipv4-unicast command before configuring the neighbor remote-as command.
Command Modes
Router configuration
Command History
Release
|
Modification
|
12.0(5)T
|
This command was introduced.
|
Usage Guidelines
The bgp default ipv4-unicast command is used to enable the automatic exchange of IPv4 address family prefixes. The neighbor activate address family configuration command must be entered in each IPv4 address family session before prefix exchange will occur.
Examples
In the following example, the automatic exchange of IP version 4 unicast address family routing information is disabled:
Router(config)# router bgp 50000
Router(config-router)# no bgp default ipv4-unicast
Related Commands
Command
|
Description
|
neighbor activate
|
Enables the exchange of information with a neighboring router.
|
bgp default local-preference
To change the default local preference value, use the bgp default local-preference command in router configuration mode. To return the local preference value to the default setting, use the no form of this command.
bgp default local-preference number
no bgp default local-preference number
Syntax Description
number
|
Local preference value from 0 to 4294967295.
|
Defaults
Cisco IOS software applies a local preference value of 100 if this command is not enabled or if the no form of this command is entered.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
The local preference attribute is a discretionary attribute that is used to apply the degree of preference to a route during the BGP best path selection process. This attribute is exchanged only between iBGP peers and is used to determine local policy. The route with the highest local preference is preferred.
Examples
In the following example, the local preference value is set to 200:
Router(config)# router bgp 50000
Router(config-router)# bgp default local-preference 200
Related Commands
Command
|
Description
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
bgp deterministic-med
To enforce the deterministic comparison of the Multi Exit Discriminator (MED) value between all paths received from within the same autonomous system, use the bgp deterministic-med command in router configuration mode. To disable the required MED comparison, use the no form of this command.
bgp deterministic-med
no bgp deterministic-med
Syntax Description
This command has no arguments or keywords.
Defaults
Cisco IOS software does not enforce the deterministic comparison of the MED variable between all paths received from the same autonomous system when this command is not enabled or when the no form of this command is entered.
Command Modes
Router configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
The bgp always-compare-med command is used to enable the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems. After the bgp always-compare-med command is configured, all paths for the same prefix that are received from different neighbors, which are in the same autonomous system, will be grouped together and sorted by the ascending MED value (received-only paths are ignored and not grouped or sorted). The best path selection algorithm will then pick the best paths using the existing rules; the comparison is made on a per neighbor autonomous system basis and then global basis. The grouping and sorting of paths occurs immediately after this command is entered. For correct results, all routers in the local autonomous system must have this command enabled (or disabled).
Examples
In the following example, BGP is configured to compare the MED during path selection for routes advertised by the same subautonomous system within a confederation:
Router(config)# router bgp 50000
Router(config-router)# bgp deterministic-med
The following example show ip bgp command output shows how route selection is affected by the configuration of the bgp deterministic-med command. The order in which routes are received affects how routes are selected for best path selection when the bgp deterministic-med command is not enabled.
The following sample output from the show ip bgp command shows three paths that are received for the same prefix (10.100.0.0), and the bgp deterministic-med command is not enabled:
Router# show ip bgp 10.100.0.0
BGP routing table entry for 10.100.0.0/16, version 40
Paths: (3 available, best #3, advertised over IBGP, EBGP)
192.168.43.10 from 192.168.43.10 (192.168.43.1)
Origin IGP, metric 0, localpref 100, valid, internal
192.168.43.22 from 192.168.43.22 (192.168.43.2)
Origin IGP, metric 20, localpref 100, valid, internal
192.168.43.3 from 192.168.43.3 (10.4.1.1)
Origin IGP, metric 30, valid, external, best
If the bgp deterministic-med feature is not enabled on the router, the route selection can be affected by the order in which the routes are received. Consider the following scenario in which a router received three paths for the same prefix:
The clear ip bgp * command is entered to clear all routes in the local routing table.
The show ip bgp command is issued again after the routing table has been repopulated. Note that the order of the paths changed after clearing the BGP session. The results of the selection algorithm also changed because the order in which the paths were received was different for the second session.
Router# show ip bgp 10.100.0.0
BGP routing table entry for 10.100.0.0/16, version 2
Paths: (3 available, best #3, advertised over EBGP)
109 192.168.43.10 from 192.168.43.10 (192.168.43.1)
Origin IGP, metric 0, localpref 100, valid, internal
192.168.43.3 from 192.168.43.3 (10.4.1.1)
Origin IGP, metric 30, valid, external
192.168.43.22 from 192.168.43.22 (192.168.43.2)
Origin IGP, metric 20, localpref 100, valid, internal, best
If the bgp deterministic-med command is enabled, then the result of the selection algorithm will always be the same, regardless of the order in which the paths are received by the local router. The following output is always generated when the bgp deterministic-med command is entered on the local router in this scenario:
Router# show ip bgp 10.100.0.0
BGP routing table entry for 10.100.0.0/16, version 15
Paths: (3 available, best #1, advertised over EBGP)
192.168.43.10 from 192.168.43.10 (192.168.43.1)
Origin IGP, metric 0, localpref 100, valid, internal, best 3
192.168.43.22 from 192.168.43.22 (192.168.43.2)
Origin IGP, metric 20, localpref 100, valid, internal 3
192.168.43.3 from 192.168.43.3 (10.4.1.1)
Origin IGP, metric 30, valid, external
Related Commands
Command
|
Description
|
bgp always-compare-med
|
Enables the comparison of the MED for paths from neighbors in different autonomous systems.
|
clear ip bgp
|
Resets a BGP connection or session.
|
show ip bgp
|
Displays entries in the BGP routing table.
|
show ip bgp neighbors
|
Displays information about the TCP and BGP connections to neighbors.
|
bgp enforce-first-as
To configure a router to deny an update received from an external BGP (eBGP) peer that does not list its autonomous system (AS) number at the beginning of the AS_PATH in the incoming update, use the bgp enforce-first-as command in router configuration mode. To disable this behavior, use the no form of this command.
bgp enforce-first-as
no bgp enforce-first-as
Syntax Description
This command has no arguments or keywords.
Defaults
The behavior of this command is enabled by default.
Command Modes
Router configuration
Command History
Release
|
Modification
|
12.0(3)S
|
This command was introduced.
|
12.0(26)S
|
The default behavior for this command was changed to enabled in Cisco IOS Release 12.0(26)S.
|
12.2(18)S
|
This command was integrated into Cisco IOS Release 12.2(18)S.
|
12.3(2)
|
This command was integrated into Cisco IOS Release 12.3(2).
|
12.3(2)T
|
This command was integrated into Cisco IOS Release 12.3(2)T.
|
Usage Guidelines
The bgp enforce-first-as command is used to deny incoming updates received from eBGP peers that do not list their AS number as the first segment in the AS_PATH attribute. Enabling this command prevents a misconfigured or unauthorized peer from misdirecting traffic (spoofing the local router) by advertising a route as if it was sourced from another autonomous system.
Examples
In the following example, all incoming updates from eBGP peers are examined to ensure that the first AS number in the AS_PATH is the local AS number of the transmitting peer. In the example below, updates from the 10.100.0.1 peer will be discarded if the first AS number is not 65001.
Router(config)# router bgp 50000
Router(config-router)# bgp enforce-first-as
Router(config-router)# address-family ipv4
Router(config-router-af)# neighbor 10.100.0.1 remote-as 65001
Router(config-router-af)# end
bgp fast-external-fallover
To configure a Border Gateway Protocol (BGP) routing process to immediately reset external BGP peering sessions if the link used to reach these peers goes down, use the bgp fast-external-fallover command in router configuration mode. To disable BGP fast external fallover, use the no form of this command.
bgp fast-external-fallover
no bgp fast-external-fallover
Syntax Description
This command has no arguments or keywords.
Defaults
BGP fast external fallover is enabled by default in Cisco IOS software.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
12.0(7)T
|
Address family configuration mode support was added.
|
Usage Guidelines
The bgp fast-external-fallover command is used to disable or enable fast external fallover for BGP peering sessions with directly connected external peers. The session is immediately reset if link goes down. Only directly connected peering sessions are supported.
If BGP fast external fallover is disabled, the BGP routing process will wait until the default hold timer expires (3 keepalives) to reset the peering session. BGP fast external fallover can also be configured on a per-interface basis using the ip bgp fast-external-fallover interface configuration command.
Examples
In the following example, the BGP fast external fallover feature is disabled. If the link through which this session is carried flaps, the connection will not be reset.
Router(config)# router bgp 50000
Router(config-router)# no bgp fast-external-fallover
Related Commands
Command
|
Description
|
address-family ipv4 (BGP)
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.
|
ip bgp fast-external-fallover
|
Configures per-interface BGP fast external fallover.
|
bgp graceful-restart
To enable the Border Gateway Protocol (BGP) graceful restart capability, use the bgp graceful-restart command in router configuration mode. To disable the BGP graceful restart capability, use the no form of this command.
bgp graceful-restart [restart-time seconds | stalepath-time seconds]
no bgp graceful-restart [restart-time seconds | stalepath-time seconds]
Syntax Description
restart-time seconds
|
(Optional) Sets the maximum time period that the local router will wait for a graceful-restart-capable neighbor to return to normal operation after a restart event occurs. The default value for this argument is 120 seconds. The configurable range of values is from 1 to 3600 seconds.
|
stalepath-time seconds
|
(Optional) Sets the maximum time period that the local router will hold stale paths for a restarting peer. All stale paths are deleted after this timer expires. The default value for this argument is 360 seconds. The configurable range of values is from 1 to 3600 seconds
|
Defaults
The following default values are used when this command is entered without any keywords or arguments:
restart-time: 120 seconds
stalepath-time: 360 seconds
Note
Changing the restart and stalepath timer values s is not required to enable the BGP graceful restart capability. The default values are optimal for most network deployments, and these values should be adjusted only by an experienced network operator.
Command Modes
Router configuration
Command History
Release
|
Modification
|
12.0(22)S
|
This command was introduced.
|
12.2(15)T
|
This command was integrated into Cisco IOS Release 12.2(15)T.
|
Usage Guidelines
The bgp graceful-restart command is used to configure or disable the graceful restart capability on a router in a BGP network. The graceful restart capability is negotiated between NSF-capable and NSF-aware peers in OPEN messages during session establishment. If the graceful restart capability is enabled after a BGP session has been established, the session will need to be restarted with a soft or hard reset.
The graceful restart capability supported by NSF capable and NSF aware routers. A router that is NSF-capable can perform a Stateful Switchover (SSO) operation (graceful restart) and can assist restarting peers by holding routing table information during the SSO operation. A router that is NSF-aware functions like a router that is NSF-capable but cannot perform an SSO operation.
The BGP graceful restart capability is enabled by default when a supporting version of Cisco IOS Software is installed. The default timer values for this feature are optimal for most network deployments. We recommend that they are adjusted only by experienced network operators. When adjusting the timer values, the restart timer should not be set to a value greater than the hold time that is carried in the OPEN message. If consecutive restart operations occur, routes (from a restarting router) that were previously marked as stale will be deleted.
Examples
In the following example, the BGP graceful restart capability is enabled:
Router# configure terminal
Router(config)# router bgp 101
Router(config-router)# bgp graceful-restart
In the following example, the restart timer is set to 240 seconds:
router# configure terminal
router(config)# router bgp 101
router(config-router)# bgp graceful-restart restart-time 130
In the following example, the stalepath timer is set to 240 seconds:
router# configure terminal
router(config)# router bgp 101
router(config-router)# bgp graceful-restart stalepath-time 350
Related Commands
Command
|
Description
|
show ip bgp
|
Displays entries in the BGP routing table.
|
show ip bgp neighbors
|
Displays information about the TCP and BGP connections to neighbors.
|
bgp inject-map
To configure conditional route injection to inject more specific routes into a Border Gateway Protocol (BGP) routing table, use the bgp inject-map command in address family or router configuration mode. To disable a conditional route injection configuration, use the no form of this command.
bgp inject-map inject-map exist-map exist-map [copy-attributes]
no bgp inject-map inject-map exist-map exist-map [copy-attributes]
Syntax Description
inject-map
|
Specifies the prefix to install to the local BGP routing table.
|
exist-map
|
Specifies the prefix that the BGP speaker will track.
|
copy-attributes
|
(Optional) Configures the injected route to inherit attributes of the aggregate route.
|
Defaults
No default behavior or values
Command Modes
Address family configuration
Router configuration
Command History
Release
|
Modification
|
12.0(14)ST
|
This command was introduced.
|
12.2(4)T
|
This command was integrated into Cisco IOS Release 12.2(4)T.
|
Usage Guidelines
The