Cisco IOS XR Routing Command Reference, Release 3.2
BGP Commands on Cisco IOS XR Software

Table Of Contents

BGP Commands on Cisco IOS XR Software

address-family (BGP)

advertisement-interval

af-group

aggregate-address

bgp as-path-loopcheck

bgp attribute-download

bgp auto-policy-soft-reset disable

bgp bestpath as-path ignore

bgp bestpath compare-routerid

bgp bestpath med always

bgp bestpath med confed

bgp bestpath med missing-as-worst

bgp client-to-client reflection disable

bgp cluster-id

bgp confederation identifier

bgp confederation peers

bgp dampening

bgp default local-preference

bgp enforce-first-as disable

bgp fast-external-fallover disable

bgp graceful-restart

bgp graceful-restart graceful-reset

bgp graceful-restart purge-time

bgp graceful-restart restart-time

bgp graceful-restart stalepath-time

bgp log neighbor changes disable

bgp maximum neighbor

bgp redistribute-internal

bgp router-id

bgp scan-time

bgp update-delay

bgp write-limit

capability orf prefix-list

clear bgp

clear bgp dampening

clear bgp flap-statistics

clear bgp peer-drops

clear bgp performance-statistics

clear bgp self-originated

clear bgp shutdown

clear bgp soft

default-information originate (BGP)

default-metric (BGP)

default-originate

description (BGP)

distance bgp

dmz-link-bandwidth

ebgp-multihop

local-as

maximum-paths (BGP)

maximum-prefix

neighbor (BGP)

neighbor-group

network (BGP)

network backdoor

next-hop-self

password

password-disable

prefix-list (BGP)

receive-buffer-size

redistribute (BGP)

remote-as (BGP)

remove-private-as

route-policy (BGP)

route-reflector-client

router bgp

send-buffer-size

send-community-ebgp

send-extended-community-ebgp

session-group

session-open-mode

show bgp

show bgp advertised

show bgp af-group

show bgp attribute-key

show bgp cidr-only

show bgp community

show bgp convergence

show bgp count-only

show bgp dampened-paths

show bgp flap-statistics

show bgp inconsistent-as

show bgp neighbor-group

show bgp neighbors

show bgp paths

show bgp policy

show bgp process

show bgp regexp

show bgp route-policy

show bgp session-group

show bgp summary

show bgp truncated-communities

show bgp update-group

show protocols (BGP)

shutdown (BGP)

socket receive-buffer-size

socket send-buffer-size

soft-reconfiguration inbound

table-policy

timers (BGP)

timers bgp

ttl-security

update-source

use

weight


BGP Commands on Cisco IOS XR Software


This chapter describes the commands used to configure and monitor Border Gateway Protocol (BGP) for IP Version 4 (IPv4) and IP Version 6 (IPv6) routing sessions.

For detailed information about BGP concepts, configuration tasks, and examples, see the Implementing BGP on Cisco IOS XR Software configuration guide.

address-family (BGP)

To enter various address family configuration modes while configuring Border Gateway Protocol (BGP), use the address-family command in an appropriate configuration mode. To disable support for an address family, use the no form of this command.

address-family {ipv4 unicast | ipv4 multicast | ipv6 unicast | ipv6 multicast}

no address-family {ipv4 unicast | ipv4 multicast | ipv6 unicast | ipv6 multicast}

Syntax Description

ipv4 unicast

Specifies IP Version 4 (IPv4) unicast address prefixes.

ipv4 multicast

Specifies IPv4 multicast address prefixes.

ipv6 unicast

Specifies IP Version 6 (IPv6) unicast address prefixes.

ipv6 multicast

Specifies IPv6 multicast address prefixes.


Defaults

An address family must be explicitly configured in the router configuration mode for the address family to be active in BGP. Similarly, an address family must be configured under the neighbor for the BGP session to be established for that address family. An address family must be configured in router configuration mode before it can be configured under a neighbor.

Command Modes

Router configuration
Neighbor configuration
Neighbor group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the address-family command to enter various address family configuration modes while configuring BGP routing sessions. When you enter the address-family command from router configuration mode, you enable the address family and enter global address family configuration mode.

When you enter the address-family command from neighbor configuration mode, you activate the address family on the neighbor and enter neighbor address family configuration mode.

For IPv4 neighbors, the default address family is IPv4 unicast.


Note It is not necessary to have an address family configured in router configuration mode for either an IPv4 or IPv6 neighbor to be configured. However, to be able to configure an address family under a neighbor, the same address family must be configured in router configuration mode. It is not possible to bring up a session for a neighbor under a specific address family unless the address family is configured for the neighbor.


Examples

The following example shows how to place the router in global address family configuration mode for the IPv4 address family:

RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router bgp 100
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)#

The following example shows how to activate IPv4 multicast for neighbor 10.0.0.1 and place the router in neighbor address family configuration mode for the IPv4 multicast address family:

RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# 

advertisement-interval

To set the minimum interval between the sending of Border Gateway Protocol (BGP) routing updates, use the advertisement-interval command in the appropriate configuration mode. To remove the advertisement-interval command from the configuration file and restore the system to its default interval values, use the no form of this command.

advertisement-interval seconds

no advertisement-interval

Syntax Description

seconds

Minimum interval between sending BGP routing updates (in seconds). Range is 0 to 600.


Defaults

30 seconds for external peers and 5 seconds for internal peers.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

If this command configures a neighbor group or session group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows how to set the minimum time between sending BGP routing updates to 10 seconds:

RP/0/RP0/CPU0:router(config)# router bgp 5
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.1.1.1 
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 100
RP/0/RP0/CPU0:router(config-bgp-nbr)# advertisement-interval 10

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

session-group

Creates a session group and enters session group configuration mode.


af-group

To create an address family group for Border Gateway Protocol (BGP) neighbors and enter address family group configuration mode, use the af-group command in router configuration mode. To remove an address family group, use the no form of this command.

af-group af-group-name address-family {ipv4 unicast | ipv4 multicast | ipv6 unicast | ipv6 multicast}

no af-group af-group-name address-family {ipv4 unicast | ipv4 multicast | ipv6 unicast | ipv6 multicast}

Syntax Description

af-group-name

Address family group name.

address-family

Enters address family configuration mode.

ipv4 unicast

Specifies IP Version 4 (IPv4) unicast address prefixes.

ipv4 multicast

Specifies IPv4 multicast address prefixes.

ipv6 unicast

Specifies IP Version 6 (IPv6) unicast address prefixes.

ipv6 multicast

Specifies IPv6 multicast address prefixes.


Defaults

No BGP address family group is configured.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the af-group command to group address family-specific neighbor commands within an IPv4 or IPv6 address family. Neighbors that have address family configuration are able to use the address family group. Further, neighbors inherit the configuration parameters of the entire address family group. This feature replaces part of the functionality of peer groups found in previous Cisco IOS XR software releases.

You cannot define two address family groups with the same name in different address families.

Examples

The following example shows how to create address family group group1 and enter address family group configuration mode for IPv4 unicast. Group1 contains the next-hop-self feature, which is inherited by neighbors that want to use address family group1.

RP/0/RP0/CPU0:router(config)# router bgp 100
RP/0/RP0/CPU0:router(config-bgp)# af-group group1 address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-afgrp)# next-hop-self

Related Commands

Command
Description

neighbor (BGP)

Enters neighbor configuration mode for configuring BGP routing sessions.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

session-group

Creates a session group and enters session group configuration mode.

use

Inherits configuration from a neighbor group, session group, or address family group.


aggregate-address

To create an aggregate entry in a Border Gateway Protocol (BGP) routing table, use the aggregate-address command in global address family configuration mode. To remove the aggregate-address command from the configuration file and restore the system to its default condition, use the no form of this command.

aggregate-address address/mask-length [as-set] [as-confed-set] [summary-only] [route-policy route-policy-name]

no aggregate-address address/mask-length

Syntax Description

address

Aggregate address.

/mask-length

Aggregate address mask length.

as-set

(Optional) Generates autonomous system set path information and community information from contributing paths.

as-confed-set

(Optional) Generates autonomous system confederation set path information from contributing paths.

summary-only

(Optional) Filters all more-specific routes from updates.

route-policy route-policy-name

(Optional) Specifies the name of a route policy used to set the attributes of the aggregate route.


Defaults

When you do not specify this command, no aggregate entry is created in the BGP routing table.

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The policy keyword was changed to route-policy.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

You can implement aggregate routing in BGP either by redistributing an aggregate route into BGP using the network command or the aggregate-address command.

Use the aggregate-address command without optional arguments to create an aggregate entry in the BGP routing table if any more-specific BGP routes are available that fall in the specified range. The aggregate route is 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.)

Use of the as-set keyword creates an aggregate entry using the same rules that the command follows without this keyword. However, the advertised path for this route is an AS_SET, a set of all autonomous systems contained in all paths that are being summarized.

Do not use this form of the aggregate-address command when aggregating many paths because this route must be continually withdrawn and updated as autonomous system path reachability information for the summarized routes changes.

Use the as-confed-set keyword to create an AS_CONFED_SET in the autonomous system path of the aggregate from any confederation segments in the paths being summarized. This keyword takes effect only if the as-set keyword is also specified.

Use of the summary-only keyword creates an aggregate entry (for example, 10.0.0.0/8) but suppresses advertisements of more-specific routes to all neighbors. If you want to suppress only advertisements to certain neighbors, use the route-policy (BGP) command in neighbor address family configuration mode with caution. If a more-specific route leaks out, all BGP speakers (the local router) prefer that route over the less-specific aggregate you generate (using longest-match routing).

Use the route-policy keyword to specify a routing policy for the aggregate entry. The route-policy keyword is used to select which more-specific information to base the aggregate entry on and which more-specific information to suppress. You can also use the keyword to modify the attributes of the aggregate entry.

Examples

The following example shows how to create an aggregate address. The path advertised for this route is an autonomous system set consisting of all elements contained in all paths that are being summarized.

RP/0/RP0/CPU0:router(config)# router bgp 100
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# aggregate-address 10.0.0.0/8 as-set

Related Commands

Command
Description

network (BGP)

Specifies the list of networks for the BGP routing process.

route-policy (BGP)

Applies a routing policy to updates advertised to or received from a BGP neighbor

route-policy (RPL)

Defines a route policy and enters route-policy configuration mode.

update-source

Selectively advertises routes previously suppressed by the aggregate-address command.


bgp as-path-loopcheck

To enable an autonomous system path for loop checking internal Border Gateway Protocol (iBGP) peers, use the bgp as-path-loopcheck command in router configuration mode. To restore the system to its default condition, use the no form of this command.

bgp as-path-loopcheck

no bgp as-path-loopcheck

Syntax Description

This command has no arguments or keywords.

Defaults

When you do not specify this command, loop checking is performed only for external peers.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Examples

The following example shows how to configure an autonomous system path for loop checking iBGP peers:

RP/0/RP0/CPU0:router(config)# router bgp 6
RP/0/RP0/CPU0:router(config-bgp)# bgp as-path-loopcheck

bgp attribute-download

To enable Border Gateway Protocol (BGP) attribute download, use the bgp attribute-download command in address family configuration mode. To disable BGP attribute download, use the no form of this command.

bgp attribute-download

no bgp attribute-download

Syntax Description

This command has no arguments or keywords.

Defaults

BGP attribute download is not enabled.

Command Modes

Address family configuration

Command History

Release
Modification

Release 3.2

This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

When BGP attribute download is enabled using the bgp attribute-download command, BGP reinstalls all routes whose attributes are not currently in the RIB. Likewise, if the user disables BGP attribute download using the no form of the command, BGP reinstalls previously installed routes with a null key, and removes the attributes from the RIB.

Examples

The following example shows how to enable BGP attribute download on BGP router 50:

RP/0/RP0/CPU0:router(config)# router bgp 50
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# bgp attribute-download

bgp auto-policy-soft-reset disable

To disable an automatic reset of Border Gateway Protocol (BGP) peers when their configured route policy is modified, use the bgp auto-policy-soft-reset disable command in router configuration mode. To re-enable automatic soft reset of BGP peers, use the no form of this command.

bgp auto-policy-soft-reset disable

no bgp auto-policy-soft-reset disable

Syntax Description

This command has no arguments or keywords.

Defaults

Automatic soft reset of peers is enabled.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was first introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The disable keyword was changed from optional to mandatory.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.


Note If the inbound policy changes, it is not always possible to perform a soft reset. This is the case if the neighbor does not support route refresh and soft-reconfiguration inbound is not configured for the neighbor. In such instances, a message is logged in the system log indicating that a manual hard reset is needed.


Examples

The following example shows how to disable an automatic soft reset of BGP peers when their configured route policy is modified:

RP/0/RP0/CPU0:router(config)# router bgp 6

RP/0/RP0/CPU0:router(config-bgp)# bgp auto-policy-soft-reset disable

bgp bestpath as-path ignore

To ignore the autonomous system path length when calculating preferred paths, use the bgp bestpath as-path ignore command in router configuration mode. To return the software to the default state in which it considers the autonomous system path length when calculating preferred paths, 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 autonomous system path length is used (not ignored) when a best path is selected.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the bgp bestpath as-path ignore command to ignore the length of autonomous system paths when the software selects a preferred path. When the best path is selected, if this command is specified, all steps are performed as usual except comparison of the autonomous path length between candidate paths.

Examples

The following example shows how to configure the software to ignore the autonomous system length when performing best path selection:

RP/0/RP0/CPU0:router(config)# router bgp 65000
RP/0/RP0/CPU0:router(config-bgp)# bgp bestpath as-path ignore

Related Commands

Command
Description

bgp bestpath compare-routerid

Compares identical routes received from eBGP peers during the best path selection process and selects the route with the lowest router ID.

bgp bestpath med always

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

bgp bestpath med confed

Enables MED comparison among paths learned from confederation peers.

bgp bestpath med missing-as-worst

Enables the software to consider a missing MED attribute in a path as having a value of infinity.


bgp bestpath compare-routerid

To compare identical routes received from external BGP (eBGP) peers during the best path selection process and select the route with the lowest router ID, use the bgp bestpath compare-routerid command in router configuration mode. To disable comparing identical routes received from eBGP peers during best path selection, 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 software does not select a new best path if it is the same as the current best path (according to the BGP selection algorithm) except for the router ID.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the bgp bestpath compare-routerid command to affect how the software selects the best path, in the case where there are two paths of equal cost according to the BGP selection algorithm. This command is used to force the software to select the path with the lower router ID as the best path. If this command is not used, the software continues to use whichever path is currently the best path, regardless of which has the lower router ID.

Examples

The following example shows how to configure the BGP speaker in autonomous system 500 to compare the router IDs of similar paths:

RP/0/RP0/CPU0:router(config)# router bgp 500
RP/0/RP0/CPU0:router(config-bgp)# bgp bestpath compare-routerid

Related Commands

Command
Description

show bgp

Displays entries in the BGP routing table.


bgp bestpath med always

To allow the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems, use the bgp bestpath med always command in router configuration mode. To disable considering the MED attribute in comparing paths, use the no form of this command.

bgp bestpath med always

no bgp bestpath med always

Syntax Description

This command has no arguments or keywords.

Defaults

The software does not compare MEDs for paths between neighbors in different autonomous systems.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The MED is one of the parameters that is considered by the software when selecting the best path among many alternative paths. The software chooses the path with the lowest MED.

By default, during the best path selection process, the software makes a MED comparison only among paths from the same autonomous system. This command changes the default behavior of the software by allowing comparison of MEDs, among paths regardless of the autonomous system from which the paths are received.

Examples

The following example shows how to configure the Border Gateway Protocol (BGP) speaker in autonomous system 100 to compare MEDs among alternative paths, regardless of the autonomous system from which the paths are received:

RP/0/RP0/CPU0:router(config)# router bgp 100
RP/0/RP0/CPU0:router(config-bgp)# bgp bestpath med always

Related Commands

Command
Description

bgp bestpath med confed

Enables MED comparison among paths learned from confederation peers.

bgp bestpath med missing-as-worst

Specifies that the software consider a missing MED attribute in a path as having a value of infinity, making the path without a MED value the least desirable path.

show bgp

Displays entries in the BGP routing table.


bgp bestpath med confed

To enable Multi Exit Discriminator (MED) comparison among paths learned from confederation peers, use the bgp bestpath med confed command in router configuration mode. To disable the software from considering the MED attribute in comparing paths, use the no form of this command.

bgp bestpath med confed

no bgp bestpath med confed

Syntax Description

This command has no arguments or keywords.

Defaults

The software does not compare the MED of paths containing only confederation segments, or paths containing confederation segments followed by an AS_SET, with the MED of any other paths.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

By default, the MED of the following paths is not compared with the MED of any other path:

Paths with an empty autonomous system path

Paths beginning with an AS_SET

Paths containing only confederation segments

Paths containing confederation segments followed by an AS_SET

Use the bgp bestpath med confed command to affect how the following types of paths are treated in the BGP best path algorithm:

Paths containing only confederation segments

Paths containing confederation segments followed by an AS_SET

The MED for paths that start with an AS_SEQUENCE or that start with confederation segments followed by an AS_SEQUENCE only is compared with the MED of other paths that share the same first autonomous system number in the autonomous system sequence (the neighbor autonomous system number). This behavior is not affected by the bgp bestpath med confed command.

As an example, suppose that autonomous systems 65000, 65001, 65002, and 65004 are part of a confederation, but autonomous system 1 is not. Suppose that for a particular route, the following paths exist:

Path 1: 65000 65004, med = 2, IGP metric = 20

Path 2: 65001 65004, med = 3, IGP metric = 10

Path 3: 65002 1, med = 1, IGP metric = 30

If the bgp bestpath med confed command is enabled, the software selects path 1 as the best path because it:

Has a lower MED than path 2

Has a lower IGP metric than path 3

The MED is not compared with path 3 because it has an external autonomous system number (that is, an AS_SEQUENCE) in the path. If the bgp bestpath med confed command is not enabled, then MED is not compared between any of these paths. Consequently, the software selects path 2 as the best path because it has the lowest IGP metric.

Examples

The following command shows how to enable Border Gateway Protocol (BGP) software to compare MED values for paths learned from confederation peers:

RP/0/RP0/CPU0:router(config)# router bgp 210
RP/0/RP0/CPU0:router(config-bgp)# bgp bestpath med confed

Related Commands

Command
Description

bgp bestpath med always

Enables MED comparison among paths from neighbors in different autonomous systems.

bgp bestpath med missing-as-worst

Specifies that the software consider a missing MED attribute in a path as having a value of infinity, making the path without a MED value the least desirable path.

show bgp

Displays entries in the BGP routing table.


bgp bestpath med missing-as-worst

To have the software consider a missing Multi Exit Discriminator (MED) attribute in a path as having a value of infinity, 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 disable considering the MED attribute in comparing paths, 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

The software assigns a value of 0 to the missing MED, causing the path with the missing MED attribute to be considered as the best possible MED.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Examples

The following example shows how to direct the Border Gateway Protocol (BGP) software to consider a missing MED attribute in a path as having a value of infinity, making this path the least desirable path:

RP/0/RP0/CPU0:router(config)# router bgp 210
RP/0/RP0/CPU0:router(config-bgp)# bgp bestpath med missing-as-worst

Related Commands

Command
Description

bgp bestpath med always

Enables MED comparison among paths from neighbors in different autonomous systems.

bgp bestpath med confed

Enables MED comparison among paths learned from confederation peers.

show bgp

Displays entries in the BGP routing table.


bgp client-to-client reflection disable

To disable reflection of routes between route-reflection clients using a Border Gateway Protocol (BGP) route reflector, use the bgp client-to-client reflection disable command in address family configuration mode. To re-enable client-to-client reflection, use the no form of this command.

bgp client-to-client reflection disable

no bgp client-to-client reflection disable

Syntax Description

This command has no arguments or keywords.

Defaults

Client-to-client reflection is enabled.

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was first introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The disable keyword was changed from optional to mandatory.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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.

Examples

In this example, the three neighbors are fully meshed, so client-to-client reflection is disabled:

RP/0/RP0/CPU0:router(config)# router bgp 65534
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast 
RP/0/RP0/CPU0:router(config-bgp-af)# bgp client-to-client reflection disable 
RP/0/RP0/CPU0:router(config-bgp-af)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor-group rrclients
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# remote-as 65534
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# address-family ipv4 unicast 
RP/0/RP0/CPU0:router(config-bgp-nbrgrp-af)# route-reflector-client 
RP/0/RP0/CPU0:router(config-bgp-nbrgrp-af)# exit
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 192.168.253.21 use neighbor-group rrclients
RP/0/RP0/CPU0:router(config-bgp)# neighbor 192.168.253.22 use neighbor-group rrclients

Related Commands

Command
Description

bgp cluster-id

Configures the cluster ID if the BGP cluster has more than one route reflector.

route-reflector-client

Configures the router as a BGP route reflector and configures the specified neighbor as its client.

show bgp

Displays entries in the BGP routing table.


bgp cluster-id

To configure the cluster ID if the Border Gateway Protocol (BGP) cluster has more than one route reflector, 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

Syntax Description

cluster-id

Cluster ID of this router acting as a route reflector; maximum of 4 bytes. Cluster ID can be entered either as an IP address or value. Range is 1 to 429496729.


Defaults

A cluster ID is not configured.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Together, a route reflector and its clients form a cluster. A cluster of clients usually has a single route reflector. In such instances, the cluster is identified by the software as the router ID of the route reflector. To increase redundancy and avoid a single point of failure in the network, a cluster might have more than one route reflector. If it does, all route reflectors in the cluster must be configured with the same 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 the bgp cluster-id command to configure the cluster ID.

Examples

The following example shows how to configure the local router as one of the route reflectors serving the cluster. It is configured with the cluster ID to identify the cluster.

RP/0/RP0/CPU0:router(config)# router bgp 65534
RP/0/RP0/CPU0:router(config-bgp)# bgp cluster-id 192.168.70.1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 192.168.70.24
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 65534
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast 
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# route-reflector-client 

Related Commands

Command
Description

bgp cluster-id

Restores route reflection from a BGP route reflector to clients.

route-reflector-client

Configures the router as a BGP route reflector and configures the specified neighbor as its client.

show bgp

Displays entries in the BGP routing table.


bgp confederation identifier

To specify a Border Gateway Protocol (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 autonomous-system-number

no bgp confederation identifier

Syntax Description

autonomous-system-number

Autonomous system number that internally includes multiple autonomous systems.


Defaults

No confederation identifier is configured.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

One way to reduce the internal BGP (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. Although the peers in different autonomous systems have external BGP (eBGP) sessions, they exchange routing information as if they are iBGP peers. Specifically, the confederation maintains the next hop and local preference information, and that allows you to retain a single Interior Gateway Protocol (IGP) for all autonomous systems. To the outside world, the confederation looks like a single autonomous system.

Use the bgp confederation identifier command to specify the autonomous system number for the confederation. This autonomous system number is used when BGP sessions are established with external peers in autonomous systems that are not part of the confederation.

Examples

The following example shows how to divide the autonomous system into autonomous systems 4001, 4002, 4003, 4004, 4005, 4006, and 4007 with the confederation identifier 5. Neighbor 10.2.3.4 is a router inside the confederation. Neighbor 172.20.16.6 is outside the routing domain confederation. To the outside world, there appears to be a single autonomous system with the number 5.

RP/0/RP0/CPU0:router(config)# router bgp 4001
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation identifier 5
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 4002
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 4003
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 4004
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 4005
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 4006
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 4007
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.2.3.4
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 4002
RP/0/RP0/CPU0:router(config-bgp-nbr)# exit
RP/0/RP0/CPU0:router(config-bgp)# exit
RP/0/RP0/CPU0:router(config-bgp-nbr)# neighbor 172.20.16.6 
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 4009

Related Commands

Command
Description

bgp confederation peers

Configures the autonomous systems that belong to the confederation.


bgp confederation peers

To configure the autonomous systems that belong to the confederation, use the bgp confederation peers command in router configuration mode. To remove the autonomous system from the confederation, use the no form of this command.

bgp confederation peers autonomous-system-number

no bgp confederation peers autonomous-system-number

Syntax Description

autonomous-system-number

Autonomous system numbers for Border Gateway Protocol (BGP) peers that belong to the confederation. Enter one autonomous system number for each command line.


Defaults

No BGP peers are identified as belonging to the confederation.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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.

Examples

The following example shows that autonomous systems 1090, 1091, 1092, and 1093 belong to a single confederation:

RP/0/RP0/CPU0:router(config)# router bgp 1090
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 1091
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 1092
RP/0/RP0/CPU0:router(config-bgp)# bgp confederation peers 1093

Related Commands

Command
Description

bgp confederation identifier

Specifies a BGP confederation identifier.


bgp dampening

To enable Border Gateway Protocol (BGP) route dampening or change various BGP route dampening factors, use the bgp dampening command in address family configuration mode. To disable route dampening and reset default values, use the no form of this command.

bgp dampening [half-life [reuse suppress max-suppress-time] | route-policy route-policy-name]

no bgp dampening

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). Penalty reduction happens every 5 seconds. Range of the half-life period is from 1 to 45 minutes.

reuse

(Optional) Value for route reuse if the flapping route penalty decreases and falls below the reuse value. When this happens, the route is unsuppressed. The process of unsuppressing routes occurs at 10-second increments. Range is 1 to 20000.

suppress

(Optional) Maximum penalty value. Suppress a route when its penalty exceeds the value specified. When this happens, the route is suppressed. Range is 1 to 20000.

max-suppress-time

(Optional) Maximum time (in minutes) a route can be suppressed. Range is 1 to 20000. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes.

route-policy route-policy-name

(Optional) Specifies the route policy to use to set dampening parameters.


Defaults

Route dampening is disabled.
half-life: 15 minutes
reuse: 750
suppress: 2000
max-suppress-time: four times half-life value

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The policy keyword was changed to route-policy.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the bgp dampening command without arguments to enable BGP route dampening with the default parameters. The parameters can be changed by setting them on the command line or specifying them with a routing policy.

Examples

The following example shows how to set the half-life value to 30 minutes, the reuse value to 1500, the suppress value to 10000, and the max-suppress-time to 120 minutes:

RP/0/RP0/CPU0:router(config)# router bgp 50
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# bgp dampening 30 1500 10000 120

Related Commands

Command
Description

clear bgp dampening

Clears BGP route dampening information and unsuppresses the suppressed routes.

clear bgp flap-statistics

Clears BGP flap statistics.

route-policy (RPL)

Defines a route policy and enters route-policy configuration mode.

show bgp dampened-paths

Displays BGP dampened routes.

show bgp flap-statistics

Displays BGP flap statistics.

show bgp neighbors

Displays information about BGP connections to neighbors.


bgp default local-preference

To change the default local preference value, use the bgp default local-preference command in router configuration mode. To reset the local preference value to the default of 100, use the no form of this command.

bgp default local-preference value

no bgp default local-preference

Syntax Description

value

Local preference value. Range is 0 to 429496725. Higher values are preferable.


Defaults

Enabled with a value of 100.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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 networking devices in the local autonomous system.

Examples

The following example shows how to raise the default local preference value from the default of 100 to 200:

RP/0/RP0/CPU0:router(config)# router bgp 200
RP/0/RP0/CPU0:router(config-bgp)# bgp default local-preference 200

bgp enforce-first-as disable

To disable the software from enforcing the first autonomous system path (known as the AS path) of a route received from an external Border Gateway Protocol (eBGP) peer to be the same as the configured remote autonomous system, use the bgp enforce-first-as disable command in router configuration mode. To re-enable enforcing the first AS path of a received route from an eBGP peer to be the same as the remote autonomous system, use the no form of this command.

bgp enforce-first-as disable

no bgp enforce-first-as disable

Syntax Description

This command has no arguments or keywords.

Defaults

By default, the software requires the first autonomous system (in the AS path) of a route received from an eBGP peer to be the same as the remote autonomous system configured.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was first introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The disable keyword was changed from optional to mandatory.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

By default, the software ignores any update received from an eBGP neighbor that does not have the autonomous system configured for that neighbor at the beginning of the AS path. When configured, the command applies to all eBGP peers of the router.

Examples

The following example shows a configuration in which incoming updates from eBGP neighbors are not checked to ensure the first AS number in the AS path is the same as the configured AS number for the neighbor:

RP/0/RP0/CPU0:router(config)# router bgp 100
RP/0/RP0/CPU0:router(config-bgp)# bgp enforce-first-as disable

Related Commands

Command
Description

show bgp

Displays entries in the BGP routing table.


bgp fast-external-fallover disable

To disable immediately resetting the Border Gateway Protocol (BGP) sessions of any directly adjacent external peers if the link used to reach them goes down, use the bgp fast-external-fallover disable command in router configuration mode. To disable this function and perform an immediate reset of BGP sessions when a link between peers is lost, use the no form of this command.

bgp fast-external-fallover disable

no bgp fast-external-fallover disable

Syntax Description

disable

Disables BGP fast external failover.


Defaults

BGP sessions of any directly adjacent external peers are immediately reset if the link used to reach them goes down.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was first introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The disable keyword was changed from optional to mandatory.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

By default, BGP sessions of any directly adjacent external peers are immediately reset, which allows the network to recover faster when links go down between BGP peers..

Examples

The following example shows how to disable the automatic resetting of BGP sessions:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# bgp fast-external-fallover disable

bgp graceful-restart

To enable graceful restart support, use the bgp graceful-restart command in router configuration mode. To disable this function, use the no form of this command.

bgp graceful-restart

no bgp graceful-restart

Syntax Description

This command has no arguments or keywords.

Defaults

Graceful restart support is not enabled.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the bgp graceful-restart command to enable graceful restart functionality on the router, and also to advertise graceful restart to neighboring routers.


Note The bgp graceful-restart command with no options must be used to enable graceful restart before using the bgp graceful-restart purge-time, bgp graceful-restart restart-time, bgp graceful-restart stalepath-time, or bgp graceful-restart graceful-reset commands.


When graceful restart is enabled, the BGP graceful restart capability is negotiated with neighbors in the BGP OPEN message when the session is established. If the neighbor also advertises support for graceful restart, then graceful restart is activated for that neighbor session. If the neighbor does not advertise support for graceful restart, then graceful restart is not activated for that neighbor session even though it is enabled locally.

If you enter the bgp graceful-restart command after some BGP sessions are established, you must restart those sessions before graceful restart takes effect. Use the clear bgp command to restart sessions.

Examples

The following example shows how to enable graceful restart:

RP/0/RP0/CPU0:router(config)# router bgp 3
RP/0/RP0/CPU0:router(config-bgp)# bgp graceful-restart

Related Commands

Command
Description

bgp graceful-restart graceful-reset

Enables a graceful reset if configuration changes force a peer reset.

bgp graceful-restart purge-time

Defines the maximum time before stale routes are purged.

bgp graceful-restart restart-time

Defines the maximum time advertised to neighbors

bgp graceful-restart stalepath-time

Defines the maximum time to wait for the End-of-RIB message from a neighbor that has been restarted before deleting learned routes.

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about BGP connections to neighbors.

show bgp process

Displays BGP process information.


bgp graceful-restart graceful-reset

To invoke a graceful restart when configuration changes force a peer reset, use the bgp graceful-restart graceful-reset command in router configuration mode. To disable this function, use the no form of this command.

bgp graceful-restart graceful-reset

no bgp graceful-restart graceful-reset

Syntax Description

This command has no arguments or keywords.

Defaults

Graceful restart is not invoked when a configuration change forces a peer reset.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

BGP graceful restart must be enabled using the bgp graceful-restart command before enabling graceful reset using the bgp graceful-restart graceful-reset command.

Examples

The following example shows how to enable graceful reset:

RP/0/RP0/CPU0:router(config)# router bgp 3
RP/0/RP0/CPU0:router(config-bgp)# bgp graceful-restart graceful-reset

Related Commands

Command
Description

bgp graceful-restart

Enables a graceful restart.

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about BGP connections to neighbors.

show bgp process

Displays BGP process information.


bgp graceful-restart purge-time

To specify the maximum time before stale routes are purged from the routing information base (RIB) when the local BGP process restarts, use the bgp graceful-restart purge-time command in router configuration mode. To set the purge timer time to its default value, use the no form of this command.

bgp graceful-restart purge-time seconds

no bgp graceful-restart purge-time seconds

Syntax Description

seconds

Maximum time before stale routes are purged. Time in seconds. Range is 1 to 4096.


Defaults

seconds: 600

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

BGP graceful restart must be enabled using the bgp graceful-restart command before setting the purge time using the bgp graceful-restart purge-time command.

Examples

The following example shows how to change the BGP purge time to 800 seconds:

RP/0/RP0/CPU0:router(config)# router bgp 3
RP/0/RP0/CPU0:router(config-bgp)# bgp graceful-restart purge-time 800

Related Commands

Command
Description

bgp graceful-restart

Enables a graceful restart.

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about BGP connections to neighbors.

show bgp process

Displays BGP process information.


bgp graceful-restart restart-time

To specify a user-predicted local BGP process maximum restart time, which is advertised to neighbors during session establishment, use the bgp graceful-restart restart-time command in router configuration mode. To set this restart time to its default value, use the no form of this command.

bgp graceful-restart restart-time seconds

no bgp graceful-restart restart-time seconds

Syntax Description

seconds

Maximum time advertised to neighbors. Time in seconds. Range is 1 to 4095.


Defaults

seconds: 120

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

BGP graceful restart must be enabled using the bgp graceful-restart command before enabling graceful reset using the bgp graceful-restart purge-time command.

Examples

The following example shows how to change the BGP graceful restart time to 400 seconds:

RP/0/RP0/CPU0:router(config)# router bgp 3
RP/0/RP0/CPU0:router(config-bgp)# bgp graceful-restart restart-time 400

Related Commands

Command
Description

bgp graceful-restart

Enables a graceful restart.

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about BGP connections to neighbors.

show bgp process

Displays BGP process information.


bgp graceful-restart stalepath-time

To specify the maximum time to wait for an End-of-RIB message after a neighbor restarts, use the bgp graceful-restart stalepath-time command in router configuration mode. To set the stalepath timer time to its default value, use the no form of this command.

bgp graceful-restart stalepath-time seconds

no bgp graceful-restart stalepath-time seconds

Syntax Description

seconds

Maximum wait time. Time in seconds. Range is 1 to 4095.


Defaults

seconds: 360

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

BGP graceful restart must be enabled using the bgp graceful-restart command before setting the stalepath time using the bgp graceful-restart stalepath-time command.

If the stalepath time is exceeded before an End-of-RIB message is received from a neighbor, paths learned from the neighbor are purged from the BGP routing table.

Examples

The following example shows how to change the stalepath time to 750 seconds:

RP/0/RP0/CPU0:router(config)# router bgp 3
RP/0/RP0/CPU0:router(config-bgp)# bgp graceful-restart stalepath-time 750

Related Commands

Command
Description

bgp graceful-restart

Enables a graceful restart.

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about BGP connections to neighbors.

show bgp process

Displays BGP process information.


bgp log neighbor changes disable

To disable logging of Border Gateway Protocol (BGP) neighbor resets, use the bgp log neighbor changes disable command in router configuration mode. To re-enable logging of BGP neighbor resets, use the no form of this command.

bgp log neighbor changes disable

no bgp log neighbor changes disable

Syntax Description

This command has no arguments or keywords.

Defaults

BGP neighbor changes are logged.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was first introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The disable keyword was changed from optional to mandatory.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Logging of BGP neighbor status changes (up or down) and resets is used for troubleshooting network connectivity problems and measuring network stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network, and should be investigated.

Status change message logging does not substantially affect performance, unlike, for example, enabling per-BGP update debugging. If the UNIX syslog facility is enabled, messages are sent by the software to the UNIX host running the syslog daemon so that the messages can be stored and archived on disk. If the UNIX syslog facility is not enabled, the status change messages are kept in the internal buffer of the router, and are not stored to disk. You can set the size of this buffer, which is dependent upon the available RAM, using the logging buffered command.

The neighbor status change messages are not tracked if the bgp log neighbor changes disabled command is disabled, except for the last reset reason, which is always available as output of the show bgp neighbors command.

Up and down messages for BGP neighbors are logged by the software by default. Use the bgp log neighbor changes disable command to stop logging BGP neighbor changes.

Use the show logging command to display the log for the BGP neighbor changes.

Examples

The following example shows how to prevent the logging of neighbor changes for BGP:

RP/0/RP0/CPU0:router(config)# router bgp 65530
RP/0/RP0/CPU0:router(config-bgp)# bgp log neighbor change disable

Related Commands

Command
Description

logging buffered

Logs messages to an internal buffer.

show bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

show logging

Displays the state of logging (syslog).


bgp maximum neighbor

To control the maximum number of neighbors that can be configured on the router, use the bgp maximum neighbor command in router configuration mode. To set the neighbor limit to the default value, use the no form of this command.

bgp maximum neighbor limit

no maximum log neighbor limit

Syntax Description

limit

Maximum number of neighbors. Range is 1 to 1500.


Defaults

Default limit is 1024

Command Modes

Router configuration

Command History

Release
Modification

Release 3.2

This command was first supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Any attempt to configure the neighbor limit below 1 or above 1500 will fail. Similarly, attempt to configure the limit below the number of neighbor that is already configured will also fail.

Examples

The following example shows how to change the default maximum neighbor limit and set it to 1200:

RP/0/RP0/CPU0:router(config)# router bgp 65530
RP/0/RP0/CPU0:router(config-bgp)# bgp maximum neighbor 1200

bgp redistribute-internal

To allow the redistribution of internal Border Gateway Protocol (iBGP) routes into an Interior Gateway Protocol (IGP), such as Intermediate System-to-Intermediate System (IS-IS) or Open Shortest Path First (OSPF), use the bgp redistribute-internal command in router configuration mode. To disable the redistribution of iBGP routes into IGPs, use the no form of this command.

bgp redistribute-internal

no bgp redistribute-internal

Syntax Description

This command has no arguments or keywords.

Defaults

By default, iBGP routes are not redistributed into IGPs.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use of the bgp redistribute-internal command requires the clear route * command to be issued to reinstall all BGP routes into the IP routing table.


Caution Redistributing iBGP routes into IGPs may cause routing loops to form within an autonomous system. Use this command with caution.

Examples

The following example shows how to redistribute iBGP routes into OSPF:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# bgp redistribute-internal 
RP/0/RP0/CPU0:router(config-bgp)# exit
RP/0/RP0/CPU0:router(config)# router ospf area1
RP/0/RP0/CPU0:router(config-router)# redistribute bgp 1
RP/0/RP0/CPU0:router(config-router)# commit

Related Commands

Command
Description

clear bgp *

Resets all BGP neighbors.

clear route *

Resets all routes.


bgp router-id

To configure a fixed router ID for a Border Gateway Protocol (BGP)-speaking router, use the bgp router-id command in router configuration mode. To disable a fixed route ID, use the no form of this command.

bgp router-id {ip-address | interface-type interface-instance}

no bgp router-id

Syntax Description

ip-address

IP Version 4 (IPv4) address to use as the router ID. Normally, this should be an IPv4 address assigned to the router.

interface-type

Interface type. For more information, use the question mark (?) online help function.

interface-instance

Either a physical interface instance or a virtual interface instance:

Physical interface instance. Naming notation is rack/slot/module/port and a slash mark between values is required as part of the notation.

rack: Chassis number of the rack.

slot: Physical slot number of the line card.

module: Module number. A physical layer interface module (PLIM) is always 0.

port: Physical port number of the interface.

Virtual interface instance. Number range varies depending on interface type.

For more information about the syntax for the router, use the question mark (?) online help function.


Defaults

If no router ID is configured in BGP, BGP attempts to use the global router ID if one is configured and available. Otherwise, BGP uses the highest IP address configured on a loopback interface.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

If you do not use the bgp router-id command to configure a router ID, and an IP address is not configured on any loopback interface or no global router ID is configured, BGP neighbors remain down.

We recommend that an IP address instead of an interface be used to configure the router ID. If you choose to specify an interface instead of an IP address, BGP is not able to obtain a router ID and a session is not established if the interface does not exist, is down, or has no IPv4 address assigned to it.

For more details on router IDs, see the Cisco IOX XR Routing Configuration Guide.

Examples

The following example shows how to configure the local router with the router ID of 192.168.70.24:

RP/0/RP0/CPU0:router(config)# router bgp 100
RP/0/RP0/CPU0:router(config-bgp)# bgp router-id 192.168.70.24

Related Commands

Command
Description

show bgp

Displays entries in the BGP routing table.


bgp scan-time

To configure scanning intervals of Border Gateway Protocol (BGP)-speaking networking devices, use the bgp scan-time command in router configuration mode and address family configuration mode. To restore the scanning interval to its default value, use the no form of this command.

bgp scan-time seconds

no bgp scan-time

Syntax Description

seconds

Scanning interval (in seconds) of BGP routing information. Range is 5 to 3600 seconds.


Defaults

The default scanning interval is 60 seconds.

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the bgp scan-time command to change how frequently the software processes scanner tasks, such as conditional advertisement, dynamic MED changes, and periodic maintenance tasks.

Examples

The following example shows how to set the scanning interval for IPv4 unicast to 20 seconds:

RP/0/RP0/CPU0:router(config)# router bgp 64500
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# bgp scan-time 20

Related Commands

Command
Description

show bgp

Displays entries in the BGP routing table.


bgp update-delay

To set the maximum initial delay for a Border Gateway Protocol (BGP)-speaking router to send the first updates, use the bgp update-delay command in router configuration mode. To restore the initial delay to its default value, use the no form of this command.

bgp update-delay seconds [always]

no bgp update-delay

Syntax Description

seconds

Delay in seconds for the router to send the first updates. Range is 0 to 3600.

always

(Optional) Specifies that the router always wait for the update delay time, even if all neighbors have finished sending their initial updates sooner.


Defaults

120 seconds

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

When BGP is started, it waits a specified period of time for its neighbors to establish peering sessions and to complete sending their initial updates. After all neighbors complete their initial updates, or after the update delay timer expires, the best path is calculated for each route, and the software starts sending advertisements out to its peers. This behavior improves convergence time. If the software were to advertise a route as soon as it learned it, it would have to readvertise the route each time it learned a new path that was preferred over all previously learned paths.

Use the bgp update-delay command to tune the maximum time the software waits after the first neighbor is established until it starts calculating best paths and sending out advertisements.

Examples

The following example shows how to set the maximum initial delay to 240 seconds:

RP/0/RP0/CPU0:router(config)# router bgp 64530
RP/0/RP0/CPU0:router(config-bgp)# bgp update-delay 240

bgp write-limit

To modify the upper bounds on update message queue lengths or to enable desynchronization, use the bgp write-limit command in router configuration mode. To return the bounds to their default values and to disable desynchronization, use the no form of this command.

bgp write-limit group-limit global-limit [desynchronize]

no bgp write-limit group-limit global-limit [desynchronize]

Syntax Description

group-limit

Per-update group limit on the number of update messages the software queues. Range is 500 to 100000000. Group limit cannot be greater than the global limit.

global-limit

Global limit on the number of update messages the software queues. Range is 500 to 100000000.

desynchronize

(Optional) Enables desynchronization.


Defaults

group-limit: 5000
global-limit: 25000
Desynchronization is off.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the bgp write-limit command to configure both a per-update group and a global limit on the number of messages the software queues when updating peers. Increasing these limits can result in faster Border Gateway Protocol (BGP) convergence, but also may result in higher memory use during convergence. In addition, this command can be used to enable desynchronization. Desynchronization can decrease memory use and speed up convergence for the fastest neighbors if one or more neighbors in an update group process updates significantly slower than other neighbors in the same group. However, enabling desynchronization can cause a significant degradation in overall convergence time, especially if the router is experiencing high CPU utilization. For this reason, enabling desynchronization is discouraged.

Examples

The following example shows how to configure BGP to operate with a per-update group limit of 9,000 messages and a global limit of 27,000 messages:

RP/0/RP0/CPU0:router(config)# router bgp 65000
RP/0/RP0/CPU0:router(config-bgp)# bgp write-limit 9000 27000

capability orf prefix-list

To advertise prefix list-based Outbound Route Filter (ORF) capability to the Border Gateway Protocol (BGP) peer, use the capability orf prefix-list command in the appropriate configuration mode. To remove the capability orf prefix-list command from the configuration file and restore the system to its default condition in which the software does not advertise the capability, use the no form of this command.

capability orf prefix-list {receive | send | both | none}

no capability orf prefix-list

Syntax Description

receive

Sets the capability to receive the ORF from a specified neighbor.

send

Sets the capability to send the ORF to a specified neighbor.

both

Sets the capability to receive and send the ORF from or to a specified neighbor.

none

Sets the capability to no for ORF receive or send from or to a specified neighbor.


Defaults

The routing device does not receive or send route prefix filter lists.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The advertisement of the prefix list ORF capability by a BGP speaker indicates whether the speaker can send prefix lists to the specified neighbor and whether it accepts prefix lists from the neighbor. The speaker sends a prefix list if it indicated the ability to send them, and if the neighbor indicated it was willing to accept them. Similarly, the neighbor sends a prefix list to the speaker if it indicated the ability to send them and the speaker indicated the willingness to accept them.


Note The capability orf and prefix list filter lists must be explicitly configured.


If the neighbor sends a prefix list and the speaker accepts it, the speaker applies the received prefix list, plus any locally configured outbound filters, to limit its outbound routing updates to the neighbor. Increased filtering prevents unwanted routing updates between neighbors and reduces resource requirements for routing update generation and processing.

Use the capability orf prefix-list command to set whether to advertise send and receive capabilities to the specified neighbor.


Note Sending a receive capability can adversely affect performance because updates sent to that neighbor cannot be replicated for any other neighbors.


If this command is configured for a neighbor group or neighbor address family group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.


Note The prefix list to send can be specified using the prefix-list prefix-listname in command.


Examples

The following example shows the local BGP speaker advertising that the speaker is willing to accept an ORF prefix list from its neighbor:

RP/0/RP0/CPU0:# configure
RP/0/RP0/CPU0:(config)# router bgp 65530
RP/0/RP0/CPU0:(config-bgp)# neighbor 10.0.101.1
RP/0/RP0/CPU0:(config-bgp-nbr)# remote-as 65534
RP/0/RP0/CPU0:(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:(config-bgp-nbr-af)# capability orf prefix-list receive

The following example shows how to configure neighbor group orf to advertise ORF send capabilities:

RP/0/RP0/CPU0:# configure 
RP/0/RP0/CPU0:(config)# router bgp 65530
RP/0/RP0/CPU0:(config-bgp)# neighbor-group orf
RP/0/RP0/CPU0:(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:(config-bgp-nbr-af)# capability orf prefix-list send

The following example shows how to configure af-group orf to advertise ORF send and receive capabilities:

RP/0/RP0/CPU0:# configure
RP/0/RP0/CPU0:(config)# router bgp 65000
RP/0/RP0/CPU0:(config-bgp)# af-group orf address-family ipv4 unicast
RP/0/RP0/CPU0:(config-bgp-afgrp)# capability orf prefix-list both

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

prefix-list (BGP)

Filters updates advertised to or received from a neighbor.

show bgp neighbors

Displays information about BGP neighbors.


clear bgp

To reset a group of Border Gateway Protocol (BGP) neighbors, use the clear bgp command in EXEC mode.

clear bgp {* | ip-address | as-number | external} [graceful]

Syntax Description

*

Resets all BGP neighbors.

ip-address

IP address of the neighbor to be reset.

as-number

Autonomous system number of neighbors to be reset. Range is 1 to 65535.

external

Specifies clearing of all external peers.

graceful

(Optional) Specifies clearing with a hard reset and a graceful restart.


Defaults

No default behavior or value

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the clear bgp command to reset the sessions of the specified group of neighbors (hard reset); it removes the TCP connection to the neighbor, removes all routes received from the neighbor from the BGP table, and then re-establishes the session with the neighbor.

If the graceful keyword is specified, the routes from the neighbor are not removed from the BGP table immediately, but are marked as stale. After the session is re-established, any stale route that has not been received again from the neighbor is removed.

Examples

The following example shows how to hard reset neighbor 10.0.0.1:

RP/0/RP0/CPU0:router# clear bgp 10.0.0.1

The following example shows how to hard reset all neighbors with a graceful restart:

RP/0/RP0/CPU0:router# clear bgp * graceful

Related Commands

Command
Description

bgp bestpath as-path ignore

Enables an automatic soft reset of BGP peers when their configured route policy is modified.

clear bgp self-originated

Clears self-originated routes.

clear bgp soft

Soft resets a group of BGP neighbors.

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about the TCP and BGP connections to neighbors.


clear bgp dampening

To clear Border Gateway Protocol (BGP) route dampening information and unsuppress the suppressed routes, use the clear bgp dampening command in EXEC mode.

clear bgp {ipv4 {unicast | multicast | all} | ipv6 {unicast | all} | all {unicast | multicast | all}} dampening [ip-address/mask-length]

Syntax Description

ipv4

Specifies IP Version 4 address prefixes.

unicast

Specifies unicast address prefixes.

multicast

Specifies multicast address prefixes.

all

For subaddress families, specifies prefixes for all subaddress families.

ipv6

Specifies IP Version 6 address prefixes.

all

For address family, specifies prefixes for all address families.

ip-address

(Optional) IP address of the network about which to clear dampening information.

/mask-length

(Optional) Network mask applied to the IP address.


Defaults

If no IP address is specified, dampening information for all routes is cleared.

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Examples

The following example shows how to clear the route dampening information for all 172.20.0.0/16 IPv4 multicast paths:

RP/0/RP0/CPU0:router# clear bgp ipv4 multicast dampening 172.20.0.0/16

Related Commands

Command
Description

bgp dampening

Enables BGP route dampening or changes various BGP route dampening factors.

show bgp dampened-paths

Displays BGP dampened routes.


clear bgp flap-statistics

To clear Border Gateway Protocol (BGP) flap counts for a specified group of routes, use the clear bgp flap-statistics command in EXEC mode.

clear bgp {ipv4 {unicast | multicast | all} | ipv6 {unicast | all} | all {unicast | multicast | all}} flap-statistics [regexp regexp | route-policy route-policy-name | network/mask-length | ip-address]

Syntax Description

ipv4

Specifies IP Version 4 address prefixes.

unicast

Specifies unicast address prefixes.

multicast

Specifies multicast address prefixes.

all

For subaddress families, specifies prefixes for all subaddress families.

ipv6

Specifies IP Version 6 address prefixes.

all

For address family, specifies prefixes for all address families.

regexp regexp

(Optional) Clears flap statistics for routes whose AS paths match the regular expression.

route-policy route-policy-name

(Optional) Clears flap statistics for the specific route policy.

network

(Optional) Network for which flap counts are to be cleared.

/mask-length

(Optional) Network mask of the network for which flap counts are to be cleared.

ip-address

(Optional) Neighbor address. Clears only flap statistics for routes received from this neighbor.


Defaults

No default behavior or value

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The filter-list access-list keyword and argument were changed to route-policy route-policy-name.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Examples

The following example shows how to clear the flap count for all routes (in all address families) originating in autonomous system 1:

RP/0/RP0/CPU0:router# clear bgp all all flap-statistics regexp _1$

The following example shows how to clear the flap count for all IPv4 unicast routes received from neighbor 172.20.1.1:

RP/0/RP0/CPU0:router# clear bgp ipv4 unicast flap-statistics 172.20.1.1

clear bgp peer-drops

To clear the connection-dropped counter, use the clear bgp peer-drops command in EXEC mode.

clear bgp peer-drops {* | ip-address}

Syntax Description

*

Specifies all BGP neighbors.

ip-address

IP address of a specific network neighbor.


Defaults

No default behavior or value

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Examples

The following example shows how to clear the connection-dropped counter for all BGP neighbors:

RP/0/RP0/CPU0:router# clear bgp peer-drops *

Related Commands

Command
Description

show bgp neighbors

Displays information about BGP connections to neighbors.


clear bgp performance-statistics

To clear the performance statistics for all address families, use the clear bgp performance-statistics command.

clear bgp performance-statistics

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or value

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Examples

The following example shows how to clear the performance statistics for all address families:

RP/0/RP0/CPU0:router# clear bgp performance-statistics

clear bgp self-originated

To clear Border Gateway Protocol (BGP) routes that are self-originated, use the clear bgp self-originated command in EXEC mode.

clear bgp {ipv4 {unicast | multicast | all} | ipv6 {unicast | all} | all {unicast | multicast | all}} self-originated

Syntax Description

ipv4

Specifies IP Version 4 address prefixes.

unicast

Specifies unicast address prefixes.

multicast

Specifies multicast address prefixes.

all

For subaddress families, specifies prefixes for all subaddress families.

ipv6

Specifies IP Version 6 address prefixes.

all

For address family, specifies prefixes for all address families.


Defaults

No default behavior or value

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Self-originated routes are routes locally originated by the network command, redistribute command, or aggregate-address command.

Examples

The following example shows how to clear self-originated IPv4 routes:

RP/0/RP0/CPU0:router# clear bgp ipv4 unicast self-originated

Related Commands

Command
Description

aggregate-address

Creates an aggregate entry in a BGP routing table.

network (BGP)

Specifies a local network that the BGP routing process should originate and advertise to its neighbors.

redistribute (BGP)

Redistributes routes from another routing protocol into BGP.


clear bgp shutdown

To clear all Border Gateway Protocol (BGP) neighbors that shut down due to low memory, use the clear bgp command in EXEC mode.

clear bgp shutdown

Syntax Description

This command has no arguments or keywords

Defaults

No default behavior or value

Command Modes

EXEC

Command History

Release
Modification

Release 3.2

This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Examples

The following example shows how to clear all shut-down BGP neighbors:

RP/0/RP0/CPU0:router# clear bgp shutdown

Related Commands

Command
Description

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about the TCP and BGP connections to neighbors.


clear bgp soft

To soft reset a group of Border Gateway Protocol (BGP) neighbors, use the clear bgp soft command in EXEC mode.

clear bgp {ipv4 {unicast | multicast | all} | ipv6 {unicast | all} | all {unicast | multicast | all}} {* | ip-address | as-number | external} soft [in [prefix-filter] | out]

Syntax Description

ipv4

Specifies IP Version 4 address prefixes.

unicast

Specifies unicast address prefixes.

multicast

Specifies multicast address prefixes.

all

For subaddress families, specifies prefixes for all subaddress families.

ipv6

Specifies IP Version 6 address prefixes.

all

For address family, specifies prefixes for all address families.

*

Resets all BGP neighbors.

ip-address

IP address of the neighbor to be reset.

as-number

Autonomous system number for all neighbors to be reset. Range is 1 to 65535.

external

Specifies clearing of all external peers.

in

(Optional) Triggers an inbound soft reset. If the in or out keyword is not specified, both inbound and outbound soft resets are triggered.

prefix-filter

(Optional) Specifies to send a new Outbound Route Filter (ORF) to the neighbor. Neighbor installs the new ORF and resend its routes.

out

(Optional) Triggers an outbound soft reset. If the in or out keyword is not specified, both inbound and outbound soft resets are triggered.


Defaults

No default behavior or value

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the clear bgp soft command to trigger a soft reset of the specified address families for the specified group of neighbors. This command is useful if you change the inbound or outbound policy for the neighbors, or any other configuration that affects the sending or receiving of routing updates.

If an outbound soft reset is triggered, BGP resends all routes for the address family to the given neighbors.

If an inbound soft reset is triggered, BGP by default sends a REFRESH request to the neighbor, if the neighbor has advertised the ROUTE_REFRESH capability. To determine whether the neighbor has advertised the ROUTE_REFRESH capability, use the show bgp neighbors command, and look for the following line of output:

Received route refresh capability from peer.

If the neighbor does not support route refresh, but the soft-reconfiguration inbound command is configured for the neighbor, then BGP uses the routes cached as a result of the soft-reconfiguration inbound command to perform the soft reset.

If you want BGP to use the cached routes even if the neighbor supports route refresh, you can use the always keyword when configuring the soft-reconfiguration inbound command.

If the neighbor does not support route refresh and the soft-reconfiguration inbound command is not configured, then inbound soft reset is not possible. In this case, an error is printed.


Note By default, if the configuration for an inbound or outbound route policy is changed, BGP performs an automatic soft reset. Use the bgp auto-policy-soft-reset disable command to disable this behavior.


Examples

The following example shows how to trigger an inbound soft clear for IPv4 unicast routes received from neighbor 10.0.0.1:

RP/0/RP0/CPU0:router# clear bgp ipv4 unicast 10.0.0.1 soft in

Related Commands

Command
Description

bgp bestpath as-path ignore

Enables an automatic soft reset of BGP peers when their configured route policies are modified.

clear bgp

Resets a group of BGP neighbors.

clear bgp self-originated

Clears self-originated routes.

show bgp

Displays entries in the BGP routing table.

show bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

soft-reconfiguration inbound

Configures the software to store updates received from a neighbor.


default-information originate (BGP)

To allow origination of a default route to be redistributed into the Border Gateway Protocol (BGP) from another protocol, use the default-information originate command in router configuration mode. To disable this function, use the no form of this command.

default-information originate

no default-information originate

Syntax Description

This command has no arguments or keywords.

Defaults

BGP does not permit redistribution of a default route into BGP.

Command Modes

Router configuration mode

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the redistribute command to redistribute routes from another protocol into BGP. By default, if these routes include the default route (0.0.0.0/0 for IPv4 or ::/0 for IPv6), the default route is ignored. Use the default-information originate command to change this behavior so that the default route is not ignored and is redistributed into BGP along with the other routes for the protocol being redistributed.

Examples

The following example shows how to configure BGP to redistribute the default route into BGP:

RP/0/RP0/CPU0:router(config)# router bgp 164
RP/0/RP0/CPU0:router(config-bgp)# default-information originate

Related Commands

Command
Description

redistribute (BGP)

Redistributes the default route into BGP.


default-metric (BGP)

To set default metric values for the Border Gateway Protocol (BGP), use the default-metric command in router configuration mode. To disable metric values, use the no form of this command.

default-metric value

no default-metric

Syntax Description

value

Default metric value appropriate for the specified routing protocol. Range is 1 to 429496729.


Defaults

A metric is not sent.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the default-metric command to set the Multi Exit Discriminator (MED) to advertise to peers for routes that do not already have a metric set (routes that were received with no MED attribute).

Examples

The following example shows how to set the BGP default metric:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# default-metric 10

default-originate

To cause a Border Gateway Protocol (BGP) speaker (the local router) to send the default route 0.0.0.0/0 to a neighbor for use as a default route, use the default-originate command in neighbor address family configuration mode. To disable this function, use the no form of this command.

default-originate [disable | route-policy route-policy-name]

no default-originate

Syntax Description

disable

(Optional) Prevents the default-originate command characteristics from being inherited from a parent group.

route-policy route-policy-name

(Optional) Specifies the name of a route policy. The route policy allows route 0.0.0.0 to be injected conditionally. IPv6 address family is supported.


Defaults

The default route is not advertised to BGP neighbors.

Command Modes

Neighbor address family configuration
Neighbor group address family configuration
Address family group

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The policy keyword was changed to route-policy.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The default-originate command does not require the presence of the default route (0.0.0.0/0 for IPv4 or ::/0 for IPv6) in the local router. When the default-originate command is used with a route policy, the default route is advertised if any route in the BGP table matches the policy.

Examples

The following example shows how to unconditionally advertise the route 0.0.0.0/0 to the neighbor 172.20.2.3:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.2.3 
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 200
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# default-originate

The following example shows how to advertise the route 0.0.0.0/0 to the neighbor 172.20.2.3 only if a route exists in the BGP table that matches the route policy called default-default-policy:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.2.3
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 200
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# default-originate route-policy 
default-default-policy

Related Commands

Command
Description

default-information originate (BGP)

Allows the default route to be redistributed into BGP by another routing protocol.

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.


description (BGP)

To annotate a neighbor, neighbor group, or session group, use the description command in neighbor configuration, neighbor group configuration, or session group configuration mode. To remove the annotation, use the no form of this command.

description text

no description

Syntax Description

text

Meaningful description or comment.


Defaults

No comment or description exists.

Command Modes

Neighbor group configuration
Neighbor configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported On the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the description command to provide a description of a neighbor, neighbor group, or session group. The description is used to save user comments and does not affect software function.

Examples

The following example shows how to configure the description "Our best customer" on the neighbor 192.168.13.4:

RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router bgp 65000
RP/0/RP0/CPU0:router(config-bgp)# neighbor 192.168.13.4 
RP/0/RP0/CPU0:router(config-bgp-nbr)# description Our best customer
RP/0/RP0/CPU0:router# show running-config router bgp 65000

router bgp 65000
 neighbor 192.168.13.4
  remote-as 65001
  description Our best customer

distance bgp

To allow the use of external, internal, and local administrative distances that could be used to prefer one class of routes over another, use the distance bgp command in address family configuration mode. To disable the use of administrative distances, use the no form of this command.

distance bgp external-distance internal-distance local-distance

no distance bgp

Syntax Description

external-distance

Administrative distance for Border Gateway Protocol (BGP) external routes. External routes are routes for which the best path is learned from a neighbor external to the autonomous system. Range is 1 to 255. 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. Range is 1 to 255. Routes with a distance of 255 are not installed in the routing table.

local-distance

Administrative distance for BGP local routes. The local-distance argument applies to locally generated aggregate routes (such as the routes generated by the aggregate-address command) and backdoor routes installed in the routing table. Range is 1 to 255. Routes with a distance of 255 are not installed in the routing table.


Defaults

external-distance: 20
internal-distance: 200
local-distance: 200

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the distance bgp command if another protocol is known to be able to provide a better route to a node than was actually learned using external BGP, or if some internal routes should be preferred by BGP.


Caution Changing the administrative distance of BGP internal routes is considered risky and is not recommended. One problem that can arise is the accumulation of routing table inconsistencies, which can interfere with routing.

An administrative distance is a rating of the trustworthiness of a routing information source. Numerically, an administrative distance is an integer from 1 to 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.

Examples

The following example shows that iBGP routes are preferable to locally generated routes, so the administrative distance values are set accordingly:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# distance bgp 20 20 200

Related Commands

Command
Description

distance (IS-IS)

Defines the administrative distance assigned to routes discovered by the IS-IS protocol.

distance ospf

Defines OSPF route administrative distances based on route type.


dmz-link-bandwidth

To originate a demilitarized zone (DMZ) link bandwidth extended community for the link to an eBGP neighbor, use the dmz-link-bw command in the appropriate configuration mode. To cease origination of the DMZ link bandwidth extended community, use the no form of this command.

dmz-link-bandwidth [disable]

no dmz-link-bandwidth

Syntax Description

disable

(Optional) Prevents the dmz-link-bandwidth command from being inherited from a parent group.


Defaults

BGP does not originate the DMZ link bandwidth extended community.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The dmzlink-bw command was replaced with the dmz-link-bandwidth command.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the dmz-link-bandwidth command to advertise the bandwidth of links that are used to exit an autonomous system.

If this command is configured for a neighbor group or session group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows how to advertise the bandwidth of links on router bgp 1:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 45.67.89.01
RP/0/RP0/CPU0:router(config-bgp-nbr)# dmz-link-bandwidth

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

session-group

Creates a session group and enters session group configuration mode.


ebgp-multihop

To accept and attempt Border Gateway Protocol (BGP) connections to external peers residing on networks that are not directly connected, use the ebgp-multihop command in the appropriate configuration mode. To disable connections to external peers and allow only direct connections between neighbors, use the no form of this command.

ebgp-multihop [ttl-value]

no ebgp-multihop

Syntax Description

ttl-value

(Optional) Time-to-live (TTL) value. Range is 1 to 255 hops.


Defaults

The external BGP (eBGP) multihop TTL default value is 1 if the ebgp-multihop command is not specified. If the command is specified but a TTL value is not given, the default is 255.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the ebgp-multihop command to enable multihop peerings with external BGP neighbors. The BGP protocol states that external neighbors must be directly connected (one hop away). The software enforces this by default; however, the ebgp-multihop command can be used to override this behavior.

If this command is configured for a neighbor group or session group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows how to allow a BGP connection to neighbor 172.20.16.6 of up to 255 hops away:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.16.6
RP/0/RP0/CPU0:router(config-bgp-nbr)# ebgp-multihop

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

session-group

Creates a session group and enters session group configuration mode.


local-as

To allow customization of the autonomous system number for external Border Gateway Protocol (eBGP) neighbor peerings, use the local-as command in the appropriate configuration mode. To disable customization of local autonomous system values for eBGP neighbor peerings, use the no form of this command.

local-as {autonomous-system-number [no-prepend] | disable}

no local-as [autonomous-system-number [no-prepend] | disable]

Syntax Description

autonomous-system-number

Valid autonomous system number. Range is 1 to 65535. Cannot be the autonomous system number to which the neighbor belongs.

no-prepend

(Optional) Specifies that local autonomous system values are not prepended to announcements from the neighbor.

disable

Disables the functionality of the command.


Defaults

The BGP autonomous system number specified in the router bgp command is used, except when confederations are in use. The confederation autonomous system is used for external neighbors in an autonomous system that is not part of the confederation.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The no-prepend and disable keywords were added.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

You can specify the autonomous system number the local BGP uses to peer with each neighbor. The autonomous system number specified with this command cannot be the local BGP autonomous system number (specified with the router bgp command) or the autonomous system number of the neighbor (specified with the remote-as command). This command cannot be specified for internal neighbors or for external neighbors in an autonomous system that is part of a confederation.

If this command is configured for a neighbor group or session group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows BGP using autonomous system 30 for the purpose of peering with neighbor 172.20.1.1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 300
RP/0/RP0/CPU0:router(config-bgp-nbr)# local-as 30

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

session-group

Creates a session group and enters session group configuration mode.


maximum-paths (BGP)

To control the maximum number of parallel routes that Border Gateway Protocol (BGP) installs in the routing table, use the maximum-paths command in address family configuration mode. To set the maximum number of parallel routes the software installs to the default value, use the no form of this command.

maximum-paths {ebgp | ibgp} maximum

no maximum-paths {ebgp | ibgp} maximum

Syntax Description

ebgp

Specifies external BGP multipath peers.

ibgp

Specifies internal BGP multipath peers.

maximum

Maximum number of parallel routes that BGP installs in the routing table. Range is 2 to 8


Defaults

One path

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The ebgp and ibgp keywords were added and the maximum range was changed from 1-8 to 2-8.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the maximum-paths command to allow the BGP protocol to install multiple paths into the routing table for each prefix. Multiple paths are installed for external peers that are from the same autonomous system and are equal cost (according to the BGP best path algorithm). Similarly, multiple paths are installed for internal peers that are equal cost (based on the BGP best path algorithm).

Examples

The following example shows how to allow a maximum of four paths to a destination installed into the IPv4 unicast routing table:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# maximum-paths ebgp 4

maximum-prefix

To control how many prefixes can be received from a neighbor, use the maximum-prefix command in the appropriate configuration mode. To set the prefix limits to the default values, use the no form of this command.

maximum-prefix maximum [threshold] [warning-only]

no maximum-prefix

Syntax Description

maximum

Maximum number of prefixes allowed from this neighbor. Range is 1 to 4294967295.

threshold

(Optional) Integer specifying at what percentage of the maximum argument value the software starts to generate a warning message. Range is 1 to 100.

warning-only

(Optional) Instructs the software to generate a log message only when the maximum argument value is exceeded, and not terminate the peering.


Defaults

When this command is not specified, the following defaults apply:
IPv4 unicast: 524,288 prefixes
IPv4 multicast: 131,072 prefixes
IPv6 unicast: 131,072 prefixes
The default threshold when a warning message is generated is 75 percent.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the maximum-prefix command to configure a maximum number of prefixes that a BGP router is allowed to receive from a neighbor. It adds another mechanism (besides routing policy) to control prefixes received from a peer.

When the number of received prefixes exceeds the maximum number configured, the software terminates the peering, by default, after sending a cease notification to the neighbor. However, if the warning-only keyword is configured, the software writes only a log message, but continues peering with the sender. If the peer is terminated, the peer stays down until the clear bgp command is issued.

This command takes effect immediately if configured on an established neighbor unless the number of prefixes received from the neighbor already exceeds the configured limits.

If this command is configured for a neighbor group or neighbor address family group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows the maximum number of IP Version 4 (IPv4) unicast prefixes allowed from the neighbor at 192.168.40.24 set to 1000:

RP/0/RP0/CPU0:router(config-bgp)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# neighbor 192.168.40.24
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# maximum-prefix 1000

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

clear bgp

Resets a BGP connection using BGP hard or soft reconfiguration.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.


neighbor (BGP)

To enter neighbor configuration mode for configuring Border Gateway Protocol (BGP) routing sessions, use the neighbor command in router configuration mode. To delete all configuration for a neighbor and terminate peering sessions with the neighbor, use the no form of this command.

neighbor ip-address

no neighbor ip-address

Syntax Description

ip-address

IPv4 or IPv6 IP address of the BGP-speaking neighbor.


Defaults

Neighbor mode is not specified.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

From router configuration mode, you can use this command to enter neighbor configuration mode.

From neighbor configuration mode, you can enter address family configuration for the neighbor by using the address-family command, which allows you to configure routing sessions for IP Version 4 and IP Version 6 address prefixes.

The neighbor command does not cause the neighbor to be configured and does not result in a peering to be established with the neighbor. To create the neighbor, you configure a remote autonomous system number by entering the remote-as command, or the neighbor can inherit a remote autonomous system from a neighbor group or session group if the use command is applied.

Unlike IPv4, IPv6 must be enabled before any IPv6 neighbors can be defined. Enable IPv6 in router configuration mode using the address-family command.


Note Configuration for the neighbor cannot occur until the neighbor is given a remote autonomous system.


The no form of this command causes the peering with the neighbor to be terminated and all configuration that relates to the neighbor to be removed.

Examples

The following example shows how to place the router in neighbor configuration mode for BGP routing process 1 and configure the neighbor IP address 172.168.40.24 as a BGP peer:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.168.40.24
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 65000

The following example shows how to enable IPv6 for BGP, then place the router in neighbor configuration mode for an IPv6 neighbor, 3000::1, and configure neighbor 3000::1 as a BGP peer:


RP/0/RP0/CPU0:router(config)# router bgp 100 
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv6 unicast 
RP/0/RP0/CPU0:router(config-bgp-af)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 3000::1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 2002 

Related Commands

Command
Description

address-family (BGP)

Enters address family configuration mode for configuring BGP routing sessions.

remote-as (BGP)

Adds an entry to the BGP neighbor table.

use

Inherits characteristics from a neighbor group, session group, or address family group.


neighbor-group

To create a neighbor group and enter neighbor group configuration mode, use the neighbor-group command in router configuration mode. To remove a neighbor group and delete all configuration associated with the group, use the no form of this command.

neighbor-group name

no neighbor-group name

Syntax Description

name

Neighbor group name.


Defaults

No neighbor group mode is specified.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The neighbor-group command puts the router in neighbor group configuration mode and creates a neighbor group.

A neighbor group helps you apply the same configuration to one or more neighbors. After a neighbor group is configured, each neighbor can inherit the configuration through the use command. If a neighbor is configured to use a neighbor group, the neighbor, by default, inherits the entire configuration of the neighbor group, which includes the address family-independent and address family-specific configurations. The inherited configuration can be overridden if you directly configure commands for the neighbor or if you configure session groups or address family groups with the use command.

From neighbor group configuration mode, you can configure address family-independent parameters for the neighbor group. To enter address family-specific configuration for the neighbor group, use the address-family command when in the neighbor group configuration mode.


Note If an address family is configured for a neighbor group, neighbors that use the neighbor group attempt to exchange routes in that address family.


The no form of this command ordinarily causes all configuration for the neighbor group to be removed. If using the no form would result in a neighbor losing its remote autonomous system number, the configuration is rejected. In this scenario, the neighbor configuration must be either removed or configured with a remote autonomous system number before the neighbor group configuration can be removed.


Note Neighbor groups should not be configured with a mixture of IPv4 and IPv6 address families, because such a neighbor group is not usable by any neighbor. Note that within the Cisco IOS XR system configuration architecture, it is possible to create such a neighbor group; however, any attempt to use it is rejected.


Examples

The following example shows how to create a neighbor group called group1 that has IP Version 4 (IPv4) unicast and IPv4 multicast activated along with various configuration features. The neighbor group is used by neighbor 10.0.0.1 and neighbor 10.0.0.2, which allows them to inherit the entire group1 configuration.

RP/0/RP0/CPU0:router(config)# router bgp 65530
RP/0/RP0/CPU0:router(config-bgp)# neighbor-group group1
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# remote-as 65535
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# advertisement-interval 2
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbrgrp-af)# send-community-ebgp
RP/0/RP0/CPU0:router(config-bgp-nbrgrp-af)# exit
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-nbrgrp-af)# next-hop-self
RP/0/RP0/CPU0:router(config-bgp-nbrgrp-af)# exit
RP/0/RP0/CPU0:router(config-bgp-nbrgrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# use neighbor-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.2
RP/0/RP0/CPU0:router(config-bgp-nbr)# use neighbor-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr)# exit

Related Commands

Command
Description

address-family (BGP)

Enters various address family configuration modes for configuring BGP routing sessions.

neighbor (BGP)

Enters neighbor configuration mode for configuring BGP routing sessions.

use

Inherits characteristics from a neighbor group, a session group, or an address family group.


network (BGP)

To specify that the Border Gateway Protocol (BGP) routing process should originate and advertise a local network to its neighbors, use the network command in address family configuration mode. To disable originating or advertising the network to neighbors, use the no form of this command.

network {ip-address/prefix-length | ip-address mask} [route-policy route-policy-name]

no network {ip-address/prefix-length | ip-address mask}

Syntax Description

ip-address

Network that BGP advertises.

/prefix-length

Length of the IP address prefix. A decimal value that indicates how many of the high-order contiguous bits of the address compose the prefix (the network portion of the address). A slash (/) must precede the decimal value.

ip-address mask

Network mask applied to the ip-address argument.

route-policy route-policy-name

(Optional) Specifies a route policy to use to modify the attributes of the network.


Defaults

No networks are specified.

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The policy keyword was changed to route-policy.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Although most Interior Gateway Protocols (IGPs) use the network command to indicate the interfaces on which the routing protocol runs, the network command in BGP determines which local networks are originated by this router. A network specified with this command is originated and advertised to neighbors only if there exists an IGP route for the network in the routing table. That is, there must be a route learned using local or connected networks, static routing, or a dynamic IGP such as IS-IS or OSPF.

Other than the available system resources on the router, no limit exists on the number of network commands that can be configured.

Examples

The following example shows how to configure the local router to originate the IPv4 unicast network 172.20.0.0/16:

RP/0/RP0/CPU0:router(config)# router bgp 120
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# network 172.20.0.0/16

Related Commands

Command
Description

network backdoor

Specifies a backdoor route to a BGP border router that provides better information about the network.

redistribute (BGP)

Redistributes routes from one routing domain into another routing domain.


network backdoor

To set the administrative distance on an external Border Gateway Protocol (eBGP) route to that of a locally sourced BGP route, causing it to be less preferred than an Interior Gateway Protocol (IGP) route, use the network backdoor command in address family configuration mode. To disable setting the administrative distance to the value for locally sourced BGP routes, use to no form of this command.

network {ip-address/prefix-length | ip-address mask} backdoor

no network {ip-address/prefix-length | ip-address mask} backdoor

Syntax Description

ip-address

Network that provides a backdoor route.

/prefix-length

Length of the IP address prefix. A decimal value that indicates how many of the high-order contiguous bits of the address compose the prefix (the network portion of the address). A slash (/) must precede the decimal value.

mask

Network mask applied to the ip-address argument.


Defaults

No backdoor routes are installed.

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Configuring the network backdoor command does not cause BGP to originate a network, even if an IGP route for the network exists. Ordinarily, the backdoor network would be learned through both an eBGP and IGP. The BGP best path selection algorithm does not change when a network is configured as a backdoor network.

Examples

The following example shows IP Version 4 (IPv4) unicast network 192.168.40.0/24 configured as a backdoor network:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# network 192.168.40.0/24 backdoor

Related Commands

Command
Description

network (BGP)

Specifies a local network that the BGP routing process should originate and advertise to its neighbors.


next-hop-self

To disable next-hop calculation and insert your own address in the next-hop field of Border Gateway Protocol (BGP) updates, use the next-hop-self command in the appropriate configuration mode. To enable next-hop calculation, use the no form of this command.

next-hop-self [disable]

no next-hop-self

Syntax Description

disable

(Optional) Allows next hop calculation override when this feature may be inherited from a neighbor group or address family group.


Defaults

When this command is not specified, the software calculates the next hop for BGP updates accepted by the router.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the next-hop-self command to set the BGP next hop attribute of routes being advertised over a peering session to the local source address of the session.

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 this command is configured for a neighbor group or address family group, a neighbor using the group inherits the configuration. Configuring the command specifically for a neighbor overrides any inherited value.

Examples

The following example shows how to set the next hop of the update field for all IP Version 4 (IPv4) unicast routes advertised to neighbor 172.20.1.1 to an address of the local router:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# next-hop-self

The following example shows how to disable the next-hop-self command for neighbor 172.20.1.1. If not overridden, the next hop would be inherited from address family group group1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# af-group group1 address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-afgrp)# next-hop-self
RP/0/RP0/CPU0:router(config-bgp-afgrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# use af-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# next-hop-self disable

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

use

Inherits characteristics from a neighbor group, session group, or address family group.


password

To enable Message Digest 5 (MD5) authentication on a TCP connection between two Border Gateway Protocol (BGP) neighbors, use the password command in the appropriate configuration mode. To disable MD5 authentication, use the no form of this command.

password {clear | encrypted} password

no password [clear password | encrypted password]

Syntax Descriptionr

clear

Specifies that an unencrypted password follows. The password must be a case-sensitive, clear-text unencrypted password.

encrypted

Specifies that an encrypted password follows. The password must be a case-sensitive, encrypted password.

password

Password of up to 80 characters. The password can contain any alphanumeric characters. However, if the first character is a number or the password contains a space, the password must be enclosed in double quotation marks; for example, "2 password."


Defaults

When this command is not specified in the appropriate configuration mode, MD5 authentication is not enabled on a TCP connection between two BGP neighbors.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The 0 and 7 keywords were replaced with the clear and encrypted keywords and the accept keyword was removed.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Configure a password to enable authentication between two BGP peers. Use the password command to verify each segment sent on the TCP connection between the peers. The same password must be configured on both networking devices, otherwise a connection cannot be made. The authentication feature uses the MD5 algorithm. Specifying this command causes the software to generate and check the MD5 digest on every segment sent on the TCP connection.

Configuring a neighbor password does not cause the existing session for a neighbor to end. However, until the new password is configured on the remote router, the local BGP process does not receive keepalive messages from the remote device. If the password is not updated on the remote device by the end of the hold time, the session ends. The hold time can be changed using the timers command or the timers bgp command.

If this command is configured for a neighbor group or neighbor address family group, a neighbor using the group inherits the configuration. Values of commands configured specifically for a neighbor overrides inherited values.

Examples

The following example shows how to configure neighbor 172.20.1.1 to use MD5 authentication with the password password1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# password clear password1

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

password-disable

Overrides any inherited password configuration from a neighbor group or session group for BGP neighbors.

session-group

Creates a session group and enters session group configuration mode.

timers (BGP)

Set the timers for a specific BGP neighbor.


password-disable

To override any inherited password configuration from a neighbor group or session group for Border Gateway Protocol (BGP) neighbors, use the password-disable command in the appropriate configuration mode. To disable overriding any inherited password command, use the no form of this command.

password-disable

no password-disable

Syntax Description

This command has no arguments or keywords.

Defaults

Configured passwords for neighbor and session groups are inherited.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

If you specify a password on a neighbor group or session group, all users of the group inherit the password. Specifying a different password command specifically on a neighbor that uses the group overrides the inherited value. Specifying password-disable on a neighbor that uses the group disables password authentication for the neighbor.

Examples

The following example shows how to disable MD5 authentication for neighbor 172.20.1.1, preventing it from inheriting the password password1 from session group group1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# session-group group1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# password clear password1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 2
RP/0/RP0/CPU0:router(config-bgp-nbr)# use session-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr)# password-disable

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

password

Enables MD5 authentication on a TCP connection between two BGP neighbors.

session-group

Creates a session group and enters session group configuration mode.

use

Inherits characteristics from a neighbor group, a session group, or an address family group.


prefix-list (BGP)

To use a prefix list to filter updates received from a neighbor, use the prefix-list command in the appropriate configuration mode. To disable filtering updates, use the no form of this command.

prefix-list prefix-listname in

no prefix-list prefix-listname in

Syntax Description

prefix-listname

Name of a prefix list.

in

Applies the prefix list to incoming advertisements to that neighbor.


Defaults

No BGP neighbor is used.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The out keyword was removed.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The use of prefix lists is one of two ways to filter Border Gateway Protocol (BGP) advertisements. The other way is to use routing policies by using the route-policy (BGP) command. It is not possible to configure both a routing policy and a prefix list on a neighbor in the same direction.

If Outbound Route Filter (ORF) capabilities have been exchanged with the neighbor, the inbound prefix list is sent to the neighbor using the ORF mechanism. See the capability prefix-list orf command for more information.

The prefix-list command configures a neighbor group or neighbor address family group. All neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows the prefix list named myRoutes applied to inbound IPv4 multicast routes advertised to neighbor 172.20.1.1:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# prefix-list myRoutes in

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

capability orf prefix-list

Advertises prefix list-based ORF capability to the BGP peer.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

route-policy (BGP)

Applies a routing policy to updates advertised to or received from a BGP neighbor.


receive-buffer-size

To set the size of the receive buffers for a Border Gateway Protocol (BGP) neighbor, use the receive-buffer-size command in the appropriate configuration mode. To remove the receive-buffer-size command from the configuration file and restore the system to its default condition in which the software uses the default size, use the no form of this command.

receive-buffer-size socket-size [bgp-size]

no receive-buffer-size

Syntax Description

socket-size

Size, in bytes, of the receive-side socket buffer. Range is 512 to 131072.

bgp-size

(Optional) Size, in bytes, of the receive buffer in BGP. Range is 512 to 131072.


Defaults

socket-size: 32,768 bytes
bgp-size: 4,032 bytes

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the receive-buffer-size command to increase the buffer size when receiving updates from a neighbor. Using larger buffers can improve convergence time because it allows the software to process a larger number of packets simultaneously. However, allocating larger buffers consumes more memory on the router.


Note Increasing the socket buffer size uses more memory only when more messages are waiting to be processed by the software. In contrast, increasing the BGP buffer size uses extra memory indefinitely.


If this command is configured for a neighbor group or session group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows how to set the receive buffer sizes for neighbor 172.20.1.1 to be 65,536 bytes for the socket buffer and 8192 bytes for the BGP buffer:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# receive-buffer-size 65536 8192

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

send-buffer-size

Sets the size of the send buffers for a BGP neighbor.

session-group

Creates a session group and enters session group configuration mode.

socket receive-buffer-size

Sets the size of the receive buffers for all BGP neighbors.


redistribute (BGP)

To redistribute routes from one routing domain into Border Gateway Protocol (BGP), use the redistribute command in address family configuration mode. To disable route redistribution, use the no form of this command.

Connected

redistribute connected [metric metric-value] [route-policy route-policy-name]

no redistribute connected [metric metric-value] [route-policy route-policy-name]

Intermediate System-to-Intermediate System

redistribute isis process-id [level {1 | 1-inter-area | 2}] [metric metric-value] [route-policy route-policy-name]

no redistribute isis process-id [level {1 | 1-inter-area | 2}] [metric metric-value] [route-policy route-policy-name]

Open Shortest Path First (OSPF)

redistribute ospf process-id [match {external [1 | 2] | internal | nssa-external [1 | 2]]} [metric metric-value] [route-policy route-policy-name]

no redistribute ospf process-id [match {external [1 | 2] | internal | nssa-external [1 | 2]]} [metric metric-value] [route-policy route-policy-name]

OSPFv3

redistribute ospfv3 process-id [match {external [1 | 2] | internal | nssa-external [1 | 2]]} [metric metric-value] [route-policy route-policy-name]

no redistribute ospfv3 process-id [match {external [1 | 2] | internal | nssa-external [1 | 2]]} [metric metric-value] [route-policy route-policy-name]

Static

redistribute static [metric metric-value] [route-policy route-policy-name]

no redistribute static [metric metric-value] [route-policy route-policy-name]

Syntax Description

connected

Redistributes connected routes. Connected routes are established automatically when IP is enabled on an interface.

metric metric-value

(Optional) Specifies the metric used for the redistributed route. Range is 0 to 4294967295. Use a value consistent with the destination protocol.

route-policy route-policy-name

(Optional) Specifies a configured routing policy to filter redistributed routes. A route policy is used to filter the importation of routes from this source routing protocol to BGP.

isis

Specifies that routes are distributed from the IS-IS protocol.

process-id

For the isis keyword, an IS-IS instance name from which routes are to be redistributed.

For the ospf keyword, an OSPF instance name from which routes are to be redistributed.

The process-id value takes the form of a string. A decimal number can be entered, but it is stored internally as a string.

level {1 | 1-inter-area | 2}

(Optional) Specifies the IS-IS level from which routes are redistributed. It can be one of the following:

1—Routes are redistributed from Level 1 routes.

1-inter-area—Routes are redistributed from Level 1 interarea routes.

2—Routes are redistributed from Level 2 routes.

ospf

Specifies that routes are distributed from the OSPF protocol. You must be in IPv4 unicast or multicast address family configuration mode.

match {internal | external [1 | 2] | nssa-external [1 | 2]}

(Optional) Specifies the criteria by which OSPF routes are redistributed into other routing domains. It can be one or more of the following:

internal—Routes that are internal to a specific autonomous system (intra- and inter-area OSPF routes).

external [1 | 2]—Routes that are external to the autonomous system, but are imported into OSPF as Type 1 or Type 2 external routes.

nssa-external [1 | 2]—Routes that are external to the autonomous system, but are imported into OSPF as Type 1 or Type 2 not-so-stubby area (NSSA) external routes.

For the external and nssa-external options, if a type is not specified, then both Type 1 and Type 2 are assumed.

ospfv3

Specifies that routes are distributed from the OSPFv3 protocol. You must be in IPv6 unicast or multicast address family configuration mode

static

Redistributes IP static routes.


Defaults

Route redistribution is disabled.
For IS-IS, the default is to redistribute Level 1 and Level 2 routes.
For OSPF, the default is to redistribute internal, external, and NSSA external routes of Type 1 and Type 2.
For OSPFv3, the default is to redistribute internal, external, and NSSA external routes of Type 1 and Type 2
By default, the Interior Gateway Protocol (IGP) metric is assigned to the route. For connected and static routes the default metric is 0.
metric metric-value: 0
match {internal | external [1 | 2] | nssa-external [1 | 2]}: If no match is specified, the default is to match all routes.

Command Modes

Address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The policy keyword was changed to route-policy. The 1-inter-area and opsfv3 keywords were added.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.


Note For OSPF you must be in IPv4 unicast or multicast address family configuration mode. For OSPFv3 you must be in IPv6 unicast or multicast address family configuration mode.


Each instance of a protocol may be redistributed independently of the others. Changing or removing redistribution for a particular instance does not affect the redistribution capability of other protocols or other instances of the same protocol.

Networks specified using the network command are not affected by the redistribute command; that is, the routing policy specified in the network command takes precedence over the policy specified through the redistribute command.

Examples

The following example shows how to redistribute IP Version 4 (IPv4) unicast OSPF routes from OSPF instance 110 into BGP:

RP/0/RP0/CPU0:router(config)# router bgp 109
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-af)# redistribute ospf 110

Related Commands

Command
Description

network (BGP)

Specifies a local network that the BGP routing process should originate and advertise to its neighbors.


remote-as (BGP)

To create a Border Gateway Protocol (BGP) neighbor and begin the exchange of routing information, use the remote-as command in the appropriate configuration mode. To delete the entry for the BGP neighbor, use the no form of this command.

remote-as autonomous-system-number

no remote-as [autonomous-system-number]

Syntax Description

autonomous-system-number

Autonomous system to which the neighbor belongs.


Defaults

No BGP neighbors exist.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the remote-as command to create a neighbor and assign it a remote autonomous system number. A neighbor must have a remote autonomous system number before any other commands can be configured for it. Removing the remote autonomous system from a neighbor causes the neighbor to be deleted. You cannot remove the autonomous system number if the neighbor has other configuration.


Note We recommend that you use the no neighbor command rather than the no remote-as command to delete a neighbor.


A neighbor specified with a remote autonomous system number that matches the autonomous system number specified in the router bgp command identifies the neighbor as internal to the local autonomous system. Otherwise, the neighbor is considered external.

Configuration of the remote-as command for a neighbor group or session group using the neighbor-group command or session-group command causes all neighbors using the group to inherit the characteristics configured with the command. Configuring the command directly for the neighbor overrides the value inherited from the group.

In the neighbor configuration submode, configuring use of a session group or neighbor group for which remote-as is configured creates a neighbor and assigns it an autonomous system number if the neighbor has not already been created.


Note Do not combine remote-as commands and no use neighbor-group commands, or remote-as commands and no use session-group commands in the same configuration commit.


Examples

The following example shows how to assign autonomous system numbers on two neighbors, neighbor 10.0.0.1, (internal) and neighbor 192.168.0.1 (external), setting up a peering session that shares routing information between this router and each of these neighbors:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 192.168.0.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 2

The following example shows how to configure a session group called group2 with an autonomous system number 1. Neighbor 10.0.0.1 is created when it inherits the autonomous system number 1 from session group group2.

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# session-group group2
RP/0/RP0/CPU0:router(config-bgp-sngrp)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# use session-group group2

Related Commands

Command
Description

neighbor (BGP)

Enters neighbor configuration mode for configuring BGP routing sessions.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

router bgp

Configures the BGP routing process.

session-group

Creates a session group and enters session group configuration mode.

use

Inherits characteristics from a neighbor group, session group, or address family group.


remove-private-as

To remove private autonomous system numbers from autonomous system paths when generating updates to external neighbors, use the remove-private-as command in the appropriate configuration mode. To place the router in the default state in which it does not remove private autonomous system numbers, use the no form of this command.

remove-private-as [disable]

no remove-private-as

Syntax Description

disable

(Optional) Permits the feature to be disabled from a neighbor group or address family group instead of being inherited.


Defaults

When this command is not specified in the appropriate configuration mode, private autonomous system numbers are not removed from updates sent to external neighbors.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

This feature is available for external BGP (eBGP) neighbors only.

When an update is passed to the external neighbor, the software drops any leading autonomous system sequence in the autonomous system path if the sequence contains only private autonomous system numbers and does not contain the autonomous system number of the neighbor.

If this command is used in a BGP confederation, the element following the confederation portion of the autonomous system path, if a sequence, is considered the leading sequence.

The private autonomous system values range from 64512 to 65535.

If this command is configured for a neighbor group or address family group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows a configuration that removes the private autonomous system number from the IP Version 4 (IPv4) unicast updates sent to 172.20.1.1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# remote-private-as

The following example shows how to disable the remove private autonomous system number feature for neighbor 172.20.1.1, preventing this feature from being automatically inherited from address family group group1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# af-group group1 address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-afgrp)# remove-private-as
RP/0/RP0/CPU0:router(config-bgp-afgrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr# remote-private-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# use af-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# remove-private-as disable

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

remote-as (BGP)

Allows entries to the BGP neighbor table.


route-policy (BGP)

To apply a routing policy to updates advertised to or received from a Border Gateway Protocol (BGP) neighbor, use the route-policy command in the appropriate configuration mode. To disable applying routing policy to updates, use the no form of this command.

route-policy route-policy-name {in | out}

no route-policy route-policy-name {in | out}

Syntax Description

route-policy-name

Name of route policy.

in

Applies policy to inbound routes.

out

Applies policy to outbound routes.


Defaults

No policy is applied.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router. The policy keyword was changed to route-policy.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the route-policy command to specify a routing policy for an inbound or outbound route. The policy can be used to filter routes or modify route attributes. The route-policy command is used to define a policy.

If the route-policy command is configured for a neighbor group or neighbor address family group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows how to apply the In-Ipv4 policy to inbound IP Version 4 (IPv4) unicast routes from neighbor 172.20.1.1:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# route-policy In-Ipv4 in

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

route-policy (RPL)

Defines a route policy and enters route-policy configuration mode.


route-reflector-client

To configure the router as a Border Gateway Protocol (BGP) route reflector and configure the specified neighbor as its client, use the route-reflector-client command in the appropriate configuration mode. To disable configuring the neighbor as a client, use the no form of this command.

route-reflector-client [disable]

no route-reflector-client

Syntax Description

disable

(Optional) Allows the configuration inherited from a neighbor group or address family group to be overridden.


Defaults

The neighbor is not treated as a route-reflector client.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

This command is restricted to internal BGP (iBGP) neighbors only.

Use the route-reflector-client command to configure the local router as the route reflector and the specified neighbor as one of its clients. All neighbors configured with this command are members of the client group, and the remaining iBGP peers are members of the nonclient group for the local route reflector.

By default, all iBGP speakers in an autonomous system must be fully meshed with each other, and neighbors do not readvertise iBGP learned routes to other iBGP neighbors.

With route reflection, all iBGP speakers need not be fully meshed. An iBGP speaker, the route reflector, passes learned iBGP routes to some number of iBGP client neighbors. Learned iBGP routes eliminate the need for each router running BGP to communicate with every other device running BGP in the autonomous system.

The local router is a route reflector as long as it has at least one route reflector client.

If this command is configured for a neighbor group or neighbor address family group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows neighbor at 172.20.1.1 configured as a route reflector client for IP Version 4 (IPv4) unicast routes:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 140
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# route-reflector-client

The following example disables the route-reflector client for neighbor 172.20.1.1, preventing this feature from being automatically inherited from address family group group1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# af-group group1 address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-afgrp)# route-reflector-client
RP/0/RP0/CPU0:router(config-bgp-afgrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 140
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# use af-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# route-reflector-client disable

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

bgp cluster-id

Configures the cluster ID if the BGP cluster has more than one route reflector.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.


router bgp

To configure the Border Gateway Protocol (BGP) routing process, use the router bgp command in global configuration mode. To remove all BGP configurations and terminate the BGP routing process, use the no form of this command.

router bgp autonomous-system-number

no router bgp

Syntax Description

autonomous-system-number

Number that identifies the autonomous system in which the router resides. Range is 1 to 65535.


Defaults

No BGP routing process is enabled.

Command Modes

Global configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the router bgp command to set up a distributed routing core that automatically guarantees the loop-free exchange of routing information between autonomous systems.

Examples

The following example shows how to configure a BGP process for autonomous system 120:

RP/0/RP0/CPU0:router(config)# router bgp 120

send-buffer-size

To set the size of the send buffers for a Border Gateway Protocol (BGP) neighbor, use the send-buffer-size command in the appropriate configuration mode. To set the size of the send buffers to the default values, use the no form of this command.

send-buffer-size socket-size [bgp-size]

no send-buffer-size

Syntax Description

socket-size

Size, in bytes, of the send-side socket buffer. Range is 4096 to 131072.

bgp-size

(Optional) Size, in bytes, of the BGP process send buffer. Range is 4096 to 131072.


Defaults

socket-size: 4096 bytes
bgp-size: 4096 bytes
Use the socket send-buffer-size command to change the defaults.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the send-buffer-size command to increase the buffer size employed when sending updates to a neighbor. Using larger buffers can improve convergence time because the software can process more packets simultaneously. However, allocating larger buffers uses more memory on the router.


Note Increasing the socket buffer size uses more memory only when more messages are waiting to be processed by the software. In contrast, increasing the BGP buffer size uses more memory indefinitely.


If this command is configured for a neighbor group or session group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows how to set the send buffer sizes for neighbor 172.20.1.1 to be 8192 bytes for both the socket buffer and the BGP buffer:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# send-buffer-size 8192 8192

Related Commands

Command
Description

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

receive-buffer-size

Sets the size of the receive buffers for a BGP neighbor.

session-group

Creates a session group and enters session group configuration mode.

socket send-buffer-size

Sets the size of the send buffers for all BGP neighbors.


send-community-ebgp

To specify that community attributes should be sent to an external Border Gateway Protocol (eBGP) neighbor, use the send-community-ebgp command in the appropriate configuration mode. To disable sending community attributes to an eBGP neighbor, use the no form of this command.

send-community-ebgp [disable]

no send-community-ebgp

Syntax Description

disable

(Optional) Allows configuration inherited from a neighbor group or address family group to be overridden.


Defaults

Community attributes are not sent to eBGP neighbors.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the send-community-ebgp command to control whether community attributes are sent to eBGP neighbors. It cannot be configured for iBGP neighbors. Communities are always sent to iBGP neighbors.

If this command is configured for a neighbor group or address family group, all neighbors using the group inherit the configuration. Configuring the command specifically for a neighbor overrides inherited values.

Examples

The following example shows how to disable the router that sends community attributes to neighbor 172.20.1.1 for IP Version 4 (IPv4) multicast routes:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# send-community-ebgp

The following example shows how to disable the delivery of community attributes to neighbor 172.20.1.1, preventing this feature from being inherited from address family group group1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# af-group group1 address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-afgrp)# send-community-ebgp
RP/0/RP0/CPU0:router(config-bgp-afgrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# use af-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# send-community-ebgp disable

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

send-extended-community-ebgp

Specifies that extended community attributes are sent to eBGP neighbors.


send-extended-community-ebgp

To specify that extended community attributes should be sent to external Border Gateway Protocol (eBGP) neighbors, use the send-extended-community-ebgp command in the appropriate configuration mode. To disable sending extended community attributes to eBGP neighbors, use the no form of this command.

send-extended-community-ebgp [disable]

no send-extended-community-ebgp

Syntax Description

disable

(Optional) Allows configurations inherited from a neighbor group or address family group to be overridden.


Defaults

Extended community attributes are not sent to an eBGP neighbor.

Command Modes

Address family group configuration
Neighbor address family configuration
Neighbor group address family configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the send-extended-community-ebgp command to control whether extended community attributes are sent to eBGP neighbors. It cannot be used for iBGP neighbors. Extended communities are always sent to iBGP neighbors.

If this command is configured for a neighbor group or neighbor address family group, all neighbors using the group inherit the configuration. Values of commands configured specifically for a neighbor override inherited values.

Examples

The following example shows how to configure the router to send extended community attributes to neighbor 172.20.1.1 for IP Version 4 (IPv4) multicast routes:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# send-extended-community-ebgp

The following example shows how to disable the delivery of extended community attributes to neighbor 172.20.1.1, preventing this feature from being automatically inherited from address family group group1:

RP/0/RP0/CPU0:router(config)# router bgp 140
RP/0/RP0/CPU0:router(config-bgp)# af-group group1 address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-afgrp)# send-extended-community-ebgp
RP/0/RP0/CPU0:router(config-bgp-afgrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 172.20.1.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-nbr)# address-family ipv4 multicast
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# use af-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr-af)# send-extended-community-ebgp disable

Related Commands

Command
Description

af-group

Creates an address family group for BGP neighbors and enters address family group configuration mode.

neighbor-group

Creates a neighbor group and enters neighbor group configuration mode.

send-community-ebgp

Specifies that community attributes should be sent to an eBGP neighbor.


session-group

To create a session group and enter session group configuration mode, use the session-group command in router configuration mode. To remove a session group and delete all configurations associated with it, use the no form of this command.

session-group name

no session-group name

Syntax Description

name

Name of the session group.


Defaults

No session groups are created.

Command Modes

Router configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was supported on the Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the session-group command to create a session group from which neighbors can inherit configuration that is address family-independent. That is, session groups cannot have address family-specific configuration. This command enters the session group configuration mode in which configuration for a session group is entered.

Many commands can be configured in both session group configuration mode and neighbor configuration mode.

Use of session groups saves time and reduces the router configuration size. Because the configuration of a session group can be inherited by any number of neighbors, use of the group can eliminate the need to copy long or complex configurations on each of a large number of neighbors. A neighbor can inherit all configuration from a session group simply by configuring the use command. Specific inherited session group configuration commands can be overridden for a specific neighbor by explicitly configuring the command for the specific neighbor.

The no form of this command causes all of the configuration for the session group to be removed. You cannot use the no form of this command if removing the group would leave one or more neighbors without a configured remote autonomous system number.

Examples

The following example shows a session group called group1 that is used by two neighbors, 10.0.0.1 and 10.0.0.2. Because group1 is a session group, it contains only address family-independent configuration. And because group1 is used by neighbors 10.0.0.1 and 10.0.0.2, they inherit the configuration of the group.

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# session-group group1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# advertisement-interval 2
RP/0/RP0/CPU0:router(config-bgp-sngrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# use session-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.2
RP/0/RP0/CPU0:router(config-bgp-nbr)# use session-group group1

The following example shows a session group called group1 used by two neighbors, 10.0.0.1 and 10.0.0.2. Because group1 is a session group, it contains only address family-independent configuration. And because group1 is used by neighbors 10.0.0.1 and 10.0.0.2, they inherit the configuration of the group. However, the password password1 configuration from group1 is overridden for neighbor 10.0.0.2, using the password-disable command in the neighbor 10.0.0.2 configuration submode.

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# session-group group1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# remote-as 1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# advertisement-interval 2
RP/0/RP0/CPU0:router(config-bgp-sngrp)# password password1
RP/0/RP0/CPU0:router(config-bgp-sngrp)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.1
RP/0/RP0/CPU0:router(config-bgp-nbr)# use session-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr)# exit
RP/0/RP0/CPU0:router(config-bgp)# neighbor 10.0.0.2
RP/0/RP0/CPU0:router(config-bgp-nbr)# use session-group group1
RP/0/RP0/CPU0:router(config-bgp-nbr)# password-disable

session-open-mode

To establish a Border Gateway Protocol (BGP) session with a specific TCP open mode, use the session-open-mode command in the appropriate configuration mode. To end the session, use the no form of this command.

session-open-mode {active-only | both | passive-only}

no session-open-mode

Syntax Description

active-only

Ensures that the BGP session can be established only when the request is initiated by the local end (active-open request) and all passive-open requests (from the other end) are rejected by the local BGP.

both

Allows BGP sessions to be established from both incoming or outgoing TCP connection requests, with one being rejected in the event of a request collision.

passive-only

Ensures that the local BGP does not initiate any TCP open requests and the session can be established only when the request comes from the remote end.


Defaults

Session-open-mode is not inherited from the parent.

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration

Command History

Release
Modification

Release 3.2

This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

BGP, by default, tries to initiate an active TCP connection whenever a new neighbor is configured. A remote neighbor may also initiate the TCP connection before the local BGP can initiate the connection. This initiation of a TCP connection by a remote neighbor is considered a passive-open request and it is accepted by the local BGP. This default behavior can be modified using the session-open-mode command.

Use the session-open-mode command when it may be necessary to pre-configure a neighbor that does not exist. Ensure that BGP does not spend any time actively trying to set up a TCP session with the neighbor. A BGP session does not come up between two neighbors, both of which configure the same non default value (active-only or passive-only keyword) for this command.

Examples

The following example shows how to enable a BGP session on router bgp 1:

RP/0/RP0/CPU0:router(config)# router bgp 1
RP/0/RP0/CPU0:router(config-bgp)# neighbor 45.67.89.01
RP/0/RP0/CPU0:router(config-bgp-nbr)# session-open-mode

show bgp

To display entries in the Border Gateway Protocol (BGP) routing table, use the show bgp command in EXEC mode.

show bgp [ipv4 {unicast | multicast | all} | ipv6 {unicast | all} | all {