Configuring BGP policy globally

Global BGP policy configuration commands

Command syntax Description Default CLI reference

[no] bgp open-on-accept

Delays sending the BGP Open message until an OPEN message is received.   Delaying sending the BGP open message

[no] bgp maximum-prefix max-routes

Specifies the maximum number of routes that BGP will accept for installation into the Routing Information Base (RIB).   Specifying the maximum routes that BGP will accept for installation into the RIB

[no] bgp always-compare-med

Enables the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems.   Enabling comparison of MED for paths from neighbors in different autonomous systems

[no] bgp allowas-in num-loops

Specifies the number of time an Autonomous System number can appear in the AS_PATH.   Enabling comparison of MED for paths from neighbors in different autonomous systems

[no] bgp bestpath as-path-ignore

Configures Border Gateway Protocol (BGP) to not consider the autonomous system (AS)-path during best path route selection. By default, the AS-path is considered during BGP best path selection. Configuring BGP to not consider AS_PATH

[no] bgp bestpath compare-originator-id

Specifies to break ties between routes based the Originator ID value instead of the neighbor’s router ID.   Breaking ties between routes based on originator ID value

[no] bgp bestpath compare-router-id

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.   Comparing identical routes received from different external peers

[no] bgp bestpath med-missing-as-worst

To configure a Border Gateway Protocol (BGP) routing process to assign a value of infinity (max possible) 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.   Assigning value of infinity to routes missing MED attribute

[no] bgp default-metric med-out

Causes a BGP MED to be set on routes when they are advertised to peers.   Setting BGP MED on routes when advertised to peers

[no] distance bgp ext-dist int-dist loc-dist

A route’s preference specifies how active routes that are learned from BGP (compared to other protocols) will be selected.   Specifying a route's preference

[no] bgp client-to-client-reflection

Enables or disables client-to-client route reflection. When acting as a route-reflector, this functionality is enabled by default. Enabling client-to-client route reflection

[no] bgp cluster-id ip-address

Specifies the cluster ID to be used when the BGP router is used as a routereflector. The cluster ID default is the router ID. Specifying cluster ID when BGP router is route-reflector

Delaying sending the BGP open message

Syntax:

[no] bgp open-on-accept

Delays sending the BGP Open message until an OPEN message is received. When this command is specified, an OPEN message will be immediately sent when the TCP connection has completed for configured peers. If the peer is not configured (is matched by an allow clause, but not a peer command), it will continue to wait for the OPEN message from the remote peer before sending its own BGP OPEN message.

Specifying the maximum routes that BGP will accept for installation into the RIB

Syntax:

[no] bgp maximum-prefix max-routes

Specifies the maximum number of routes that BGP will accept for installation into the Routing information Base (RIB). Use the noform of the command to set the parameter to its default value.

Enabling comparison of MED for paths from neighbors in different autonomous systems

Syntax:

[no] bgp always-compare-med

Enables the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems. To disallow the comparison, use the no form of this command.

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.

Specifying the number of times an AS number can appear in AS_PATH

Syntax:

[no] bgp allowas-in num-loops

Specifies the number of times an Autonomous System number can appear in the AS_PATH. Use the no form of the command to set the parameter to its default value of ‘1’.

Configuring BGP to not consider AS_PATH

Syntax:

[no] bgp bestpath as-path-ignore

Configures Border Gateway Protocol (BGP) to not consider the autonomous system (AS)-path during best path route selection. To restore default behavior and configure BGP to consider the AS-path during route selection, use the no form of this command. By default, the AS-path is considered during BGP best path selection.

Breaking ties between routes based on originator ID value

Syntax:

[no] bgp bestpath compare-originator-id

Specifies to break ties between routes based the Originator ID value instead of the neighbor’s router ID. Use the no form of the command to not compare routes based on originator ID.

Comparing identical routes received from different external peers

Syntax:

[no] bgp bestpath compare-router-id

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.

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.

Assigning value of infinity to routes missing MED attribute

Syntax:

[no] bgp bestpath med-missing-as-worst

To configure a Border Gateway Protocol (BGP) routing process to assign a value of infinity (max possible) 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.

Setting BGP MED on routes when advertised to peers

Syntax:

[no] bgp default-metric med-out

Causes a BGP MED to be set on routes when they are advertised to peers. This value applies to all BGP peers. It can be overridden on a per-peer basis. The no form of this command, no default-metric, removes the configured value.

Specifying a route's preference

Syntax:

[no] distance bgp ext-dist int-dist loc-dist

A route’s preference specifies how active routes that are learned from BGP (compared to other protocols) will be selected. When a route has been learned from more than one protocol, the active route will be selected from the protocol with the lowest preference. Each protocol has a default preference in this selection. This preference can be overridden by a preference value specified on the peer.

Enabling client-to-client route reflection

Syntax:

[no] bgp client-to-client-reflection

Enables or disables client-to-client route reflection. When acting as a route-reflector, this functionality is enabled by default.

Specifying cluster ID when BGP router is route-reflector

Syntax:

[no] bgp cluster-id ip-address

Specifies the cluster ID to be used when the BGP router is used as a route-reflector. The cluster ID default is the router ID.