Cisco IOS XR Routing Command Reference, Release 3.5
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

allocate-label

allowas-in

as-override

bgp as-path-loopcheck

bgp attribute-download

bgp auto-policy-soft-reset disable

bgp bestpath as-path ignore

bgp bestpath compare-routerid

bgp bestpath cost-community ignore

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

capability suppress 4-byte-as

clear bgp

clear bgp current-mode

clear bgp dampening

clear bgp external

clear bgp flap-statistics

clear bgp nexthop performance-statistics

clear bgp nexthop registration

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

distributed speaker

dmz-link-bandwidth

dscp (BGP)

ebgp-multihop

export route-policy

export route-target

import route-policy

import route-target

keychain

keychain-disable

label-allocation-mode

local-as

maximum-paths (BGP)

maximum-prefix (BGP)

neighbor (BGP)

neighbor-group

network (BGP)

network backdoor

next-hop-self

next-hop-unchanged

nexthop route-policy

nexthop trigger-delay

orf

password (BGP)

password-disable

precedence

rd

receive-buffer-size

redistribute (BGP)

remote-as (BGP)

remove-private-as

retain route-target

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 dampened-paths

show bgp flap-statistics

show bgp inconsistent-as

show bgp labels

show bgp neighbor-group

show bgp neighbors

show bgp nexthops

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 bgp vrf imported-routes

show protocols (BGP)

shutdown (BGP)

site-of-origin (BGP)

socket receive-buffer-size

socket send-buffer-size

soft-reconfiguration inbound

speaker-id

table-policy

timers (BGP)

timers bgp

ttl-security

update-source

use

vrf (BGP)

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), IP Version 6 (IPv6), and Virtual Private Network Version 4 (VPNv4), VPN Version 6 (VPNv6), and multicast distribution tree (MDT) (MVPN) routing sessions.

For detailed information about BGP concepts, configuration tasks, and examples, see Implementing BGP on Cisco IOS XR Software in Cisco IOS XR Routing 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 | ipv4 labeled-unicast | ipv4 tunnel | ipv4 mdt | ipv6 unicast | ipv6 multicast | ipv6 labeled-unicast | vpnv4 unicast | vpnv6 unicast}

no address-family {ipv4 unicast | ipv4 multicast | ipv4 labeled-unicast | ipv4 tunnel | ipv4 mdt | ipv6 unicast | ipv6 multicast | ipv6 labeled-unicast | vpnv4 unicast | vpnv6 unicast}

Syntax Description

ipv4 unicast

Specifies IP Version 4 (IPv4) unicast address prefixes.

ipv4 multicast

Specifies IPv4 multicast address prefixes.

ipv4 labeled-unicast

Specifies IPv4 labeled-unicast address prefixes. This option is available in IPv4 neighbor configuration mode and VRF neighbor configuration mode.

ipv4 tunnel

Specifies IPv4 tunnel address prefixes.

ipv4 mdt

Specifies IPv4 multicast distribution tree (MDT) address prefixes. This option is available in router configuration mode and IPv4 neighbor configuration mode.

ipv6 unicast

Specifies IP Version 6 (IPv6) unicast address prefixes.

ipv6 multicast

Specifies IPv6 multicast address prefixes.

ipv6 labeled-unicast

Specifies IPv6 labeled-unicast address prefixes. This option is available in IPv6 neighbor configuration mode.

vpnv4 unicast

Specifies VPN Version 4 (VPNv4) unicast address prefixes. This option is not available in VRF or VRF neighbor configuration mode.

vpnv6 unicast

Specifies VPN Version 6 (VPNv6) unicast address prefixes. This option is not available in VRF or VRF neighbor configuration mode.


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
VRF configuration
VRF neighbor configuration (IPv4 address families)

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.

Release 3.3.0

This command was supported in VRF and VRF neighbor configuration modes.

The vpnv4 unicast and labeled-unicast keywords were added.

Release 3.4.0

The labeled-unicast keyword was supported on Cisco XR 12000 Series Routers.

Release 3.5.0

The following keywords were added:

vpnv6 unicast

ipv4 tunnel

ipv4 mdt

ipv6 labeled-unicast


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.

The IPv4 unicast address family must be configured in router configuration mode before configuring the IPv4 labeled-unicast address family for a neighbor in neighbor configuration mode. The IPv6 unicast address family must be configured in router configuration mode before configuring the IPv6 labeled-unicast address family for a neighbor in neighbor 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.

IPv4 neighbor sessions support IPv4 unicast, multicast, labeled-unicast, and VPNv4 unicast address families. IPv6 neighbor sessions support IPv6 unicast and multicast address families.


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.


Task ID

Task ID
Operations

bgp

read, write


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-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)# address-family ipv4 multicast 
RP/0/RP0/CPU0:router(config-bgp-af)# exit 
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)# 

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 12
RP/0/RP0/CPU0:router(config-bgp)# address-family ipv4 tunnel
RP/0/RP0/CPU0:router(config-bgp-af)#


advertisement-interval

To set the minimum interval between the sending of Border Gateway Protocol (BGP) routing updates, use the advertisement-interval command in an 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 [seconds]

Syntax Description

seconds

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


Defaults

Default minimum interval:
For internal BGP (iBGP) peers is 0 seconds
For external BGP (eBGP) peers is 30 seconds
For customer edge (CE) peers is 0 seconds

Command Modes

Neighbor configuration
Neighbor group configuration
Session group configuration
VRF neighbor 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.

Release 3.3.0

This command was supported in VRF neighbor configuration mode.

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.

Task ID

Task ID
Operations

bgp

read, write


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 | ipv4 labeled-unicast | ipv4 tunnel | ipv4 mdt | ipv6 unicast | ipv6 multicast | ipv6 labeled-unicast | vpnv4 unicast | vpnv6 unicast}

no af-group af-group-name address-family {ipv4 unicast | ipv4 multicast | ipv4 labeled-unicast | ipv4 tunnel | ipv4 mdt | ipv6 unicast | ipv6 multicast | ipv6 labeled-unicast | vpnv4 unicast | vpnv6 unicast}

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.

ipv4 labeled-unicast

Specifies IPv4 labeled unicast address prefixes.

ipv4 tunnel

Specifies IPv4 tunnel address prefixes.

ipv4 mdt

Specifies IPv4 multicast distribution tree (MDT) address prefixes.

ipv6 unicast

Specifies IP Version 6 (IPv6) unicast address prefixes.

ipv6 multicast

Specifies IPv6 multicast address prefixes.

ipv6 labeled-unicast

Specifies IPv6 labeled unicast address prefixes.

vpnv4 unicast

Specifies VPN Version 4 (VPNv4) unicast address prefixes.

vpnv6 unicast

Specifies VPN Version 6 (VPNv6) unicast 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.

Release 3.3.0

The vpnv4 unicast and labeled-unicast keywords were added.

Release 3.4.0

The labeled-unicast keyword was supported on Cisco XR 12000 Series Routers.

Release 3.5.0

The vpnv6 unicast, ipv6 labeled-unicast, ipv4 tunnel, and ipv4 mdt 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.

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.

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

Task ID

Task ID
Operations

bgp

read, write


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 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 an appropriate 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 [as-set] [as-confed-set] [summary-only] [route-policy route-policy-name]

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

IPv4 address family configuration
IPv6 address family configuration
VRF IPv4 address family configuration
VRF IPv6 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.

Release 3.3.0

This command was supported in VRF IPv4 address family configuration mode.

Release 3.4.0

No modification.

Release 3.5.0

This command was supported in VRF IPv6 address family configuration mode.


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.

Task ID

Task ID
Operations

bgp

read, write


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.


allocate-label

To allocate Multiprotocol Label Switching (MPLS) labels for specific IPv4 unicast or VPN routing and forwarding (VRF) IPv4 unicast routes so that the BGP router can send labels with BGP routes to a neighboring router configured for labeled-unicast sessions, use the allocate-label command in the appropriate configuration mode. To restore the system to its default condition, use the no form of this command.

allocate-label {route-policy route-policy-name | all}

no allocate-label {route-policy route-policy-name | all}

Syntax Description

route-policy-name

Name of the route policy.

all

Specifies all route policies.


Defaults

No default behavior or values

Command Modes

IPv4 address family configuration
IPv6 address family configuration
VRF IPv4 address family configuration
VRF IPv6 address family configuration

Command History

Release
Modification

Release 3.3.0

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

Release 3.4.0

This command was supported on the Cisco CRS-1.

The all keyword was added.

The command was supported in VRF IPv4 address family configuration mode.

Release 3.5.0

This command was supported in IPv6 address family configuration mode and VRF IPv6 address family configuration mode.


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 allocate-label command with a route policy to trigger BGP to allocate labels for all or a filtered set of global IPv4 routes (as dictated by the route policy). The command enables autonomous system border routers (ASBRs) that have labeled IPv4 unicast sessions to exchange Multiprotocol Label Switching (MPLS) labels with the IPv4 routes to the other autonomous system (AS) in Layer 3 Virtual Private Network (L3VPN) inter-AS deployments.


Note The allocate-label all command is functionally equivalent to the allocate-label route-policy route-policy-name command when the route policy is a pass-all policy.


See Cisco IOS XR Multiprotocol Label Switching Configuration Guide for information on using the allocate-label command for L3VPN inter-AS deployments and carrier-supporting-carrier IPv4 BGP label distribution.

Task ID

Task ID
Operations

bgp

read, write


Examples

The following example shows how to enable allocating labels for IPv4 routes:

RP/0/0/CPU0:router(config)# router bgp 6
RP/0/0/CPU0:router(config-bgp)# address family ipv4 unicast
RP/0/0/CPU0:router(config-bgp-af)# allocate-label route-policy policy_A 

allowas-in

To allow an AS path with the provider edge (PE) autonomous system number (ASN) a specified number of times, use the allowas-in command in an appropriate configuration mode. To restore the system to its default condition, use the no form of this command.

allowas-in [as-occurrence-number]

no allowas-in [as-occurrence-number]

Syntax Description

as-occurrence-number

(Optional) Number of times a PE ASN is allowed. Range is 1 to 10.


Defaults

No default behavior or values

Command Modes

Address family group configuration
Neighbor address family configuration

Command History

Release
Modification

Release 3.3.0

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

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.

Hub and spoke VPN networks require looping back of routing information to the hub PE through the hub customer edge (CE). See Cisco IOS XR Multiprotocol Label Switching Configuration Guide for information on hub and spoke VPN networks. This looping back, in addition to the presence of the PE ASN, causes the looped-back information to be dropped by the hub PE.

The allowas-in command prevents the looped-back information from being dropped by replacing the neighbor autonomous system number (ASN) with the PE ASN in the AS path. This allows the VPN customer to see a specified number of occurrences of the PE ASN in the AS path.

Task ID

Task ID
Operations

bgp

read, write


Examples

The following example shows how to allow five occurrences of the PE ASN:

RP/0/RP0/CPU0:router(config)# router bgp 6
RP/0/RP0/CPU0:router(config-bgp)# af-group group_1 address-family vpnv4 unicast
RP/0/RP0/CPU0:router(config-bgp-afgrp)# allowas-in 5

as-override

To configure a provider edge (PE) router to override the autonomous system number (ASN) of a site with the ASN of a provider, use the as-override command in VRF neighbor address family configuration mode. To restore the system to its default condition, use the no form of this command.

as-override [disable]

no as-override [disable]

Syntax Description

disable

(Optional) Prevents the as-override command from being inherited from a parent group.


Defaults

Automatic override of the ASN is disabled.

Command Modes

VRF neighbor address family configuration

Command History

Release
Modification

Release 3.3.0

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

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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 as-override command in conjunction with the site-of-origin (SoO) feature, identifying the site where a route originated, and preventing routing loops between routers within a VPN.

Task ID

Task ID
Operations

bgp

read, write


Examples

The following example shows how to configure an ASN override:

RP/0/RP0/CPU0:router(config)# router bgp 6
RP/0/RP0/CPU0:router(config-bgp)# vrf vrf_A 
RP/0/RP0/CPU0:router(config-bgp-vrf)# neighbor 192.168.70.24 
RP/0/RP0/CPU0:router(config-bgp-vrf-nbr)# remote-as 10 
RP/0/RP0/CPU0:router(config-bgp-vrf-nbr)# address-family ipv4 unicast 
RP/0/RP0/CPU0:router(config-bgp-vrf-nbr-af)# as-override 

Related Commands

Command
Description

site-of-origin (BGP)

Configures the site of origin filtering.


bgp as-path-loopcheck

To enable loop checking in the autonomous system path of the prefixes advertised by internal Border Gateway Protocol (iBGP) peers, use the bgp as-path-loopcheck command in an appropriate 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.

Release 3.3.0

This command was supported in VRF configuration mode.

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.

Task ID

Task ID
Operations

bgp

read, write


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 an appropriate 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

IPv4 unicast 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.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.

Use the bgp attribute-download command to enable the Netflow BGP data export function. When attribute download is enabled, BGP downloads the attribute information for prefixes (community, extended community, and as-path) to the Routing Information Base (RIB) and Forwarding Information Base (FIB). This enables FIB to associate the prefixes with attributes and send the Netflow statistics along with the associated attributes.

Task ID

Task ID
Operations

bgp

read, write


Examples

The following example shows the BGP routes before and after BGP attribute download is enabled and shows how to enable BGP attribute download on BGP router 50:

RP/0/RP0/CPU0:router# show route bgp 

B    100.0.1.0/24 [200/0] via 10.0.101.1, 00:00:37
B    100.0.2.0/24 [200/0] via 10.0.101.1, 00:00:37
B    100.0.3.0/24 [200/0] via 10.0.101.1, 00:00:37
B    100.0.4.0/24 [200/0] via 10.0.101.1, 00:00:37
B    100.0.5.0/24 [200/0] via 10.0.101.1, 00:00:37

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
!
!
!
RP/0/RP0/CPU0:router# show route bgp 

B    100.0.1.0/24 [200/0] via 10.0.101.1, 00:00:01
      Attribute ID 0x2
B    100.0.2.0/24 [200/0] via 10.0.101.1, 00:00:01
      Attribute ID 0x2
B    100.0.3.0/24 [200/0] via 10.0.101.1, 00:00:01
      Attribute ID 0x2
B    100.0.4.0/24 [200/0] via 10.0.101.1, 00:00:01
      Attribute ID 0x2
B    100.0.5.0/24 [200/0] via 10.0.101.1, 00:00:01
      Attribute ID 0x2

bgp auto-policy-soft-reset disable

To disable an automatic soft reset of Border Gateway Protocol (BGP) peers when their configured route policy is modified, use the bgp auto-policy-soft-reset disable command in an appropriate 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
VRF 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.

Release 3.3.0

This command was supported in VRF configuration mode.

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.


Task ID

Task ID
Operations

bgp

read, write


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 an appropriate 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
VRF 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.

Release 3.3.0

This command was supported in VRF configuration mode.

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.

Task ID

Task ID
Operations

bgp

read, write


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 an appropriate 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
VRF 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.

Release 3.3.0

This command was supported in VRF configuration mode.

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.

Task ID

Task ID
Operations

bgp

read, write


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 cost-community ignore

To configure a router that is running the Border Gateway Protocol (BGP) to not evaluate the cost community attribute during the best-path selection process, use the bgp bestpath cost-community ignore command in an appropriate configuration mode. To restore the system to its default condition, use the no form of this command.

bgp bestpath cost-community ignore

no bgp bestpath cost-community ignore

Syntax Description

This command has no arguments or keywords.

Defaults

The behavior of this command is enabled by default until the cost community attribute is manually configured.

Command Modes

Router configuration
VRF configuration

Command History

Release
Modification

Release 3.3.0

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

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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 cost-community ignore command to disable the evaluation of the cost community attribute to help isolate problems and troubleshoot issues that relate to BGP path selection. This command can also be used to delay the activation of cost community attribute evaluation so that cost community filtering can be deployed in a large network at the same time.

Task ID

Task ID
Operations

bgp

read, write


Examples

The following example shows how to configure a router to not evaluate the cost community attribute during the best-path selection process:

RP/0/RP0/CPU0:router(config)# router bgp 500
RP/0/RP0/CPU0:router(config-bgp)# bgp bestpath cost-community ignore 

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 an appropriate 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 from neighbors in different autonomous systems.

Command Modes

Router configuration
VRF 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.

Release 3.3.0

This command was supported in VRF configuration mode.

Release 3.4.0

No modification.

Release 3.5.0

No modification.


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.

When the bgp bestpath med always command is not enabled and distributed BGP is configured, speakers calculate partial best paths only (executes the best-path steps up to the MED comparison) and send them to BGP Routing Information Base (bRIB). bRIB calculates the final best path (executes all the steps in the best-path calculation). When the bgp bestpath med always command is enabled and distributed BGP is configured, speakers can compare the MED across all ASs, allowing the speaker to calculate a single best path to send it to bRIB. bRIB is the ultimate process that calculates the final best path, but when the bgp bestpath med always command is enabled, the speakers send a single best path instead of pote