BGP Commands

address-family ipv4 (BGP)

To enter address family or router scope address family configuration mode to configure a routing session using standard IP Version 4 (IPv4) address prefixes, use the address-family ipv4 command in router configuration or router scope configuration mode. To exit address family configuration mode and remove the IPv4 address family configuration from the running configuration, use the no form of this command.

address-family ipv4 [ unicast ] [ vrf vrf-name ]

no address-family ipv4 [ unicast ] [ vrf vrf-name ]

Syntax Description

unicast

(Optional) Specifies IPv4 unicast address prefixes. This is the default.

vrf vrf-name

(Optional) Specifies the name of the VPN routing and forwarding (VRF) instance to associate with subsequent IPv4 address family configuration mode commands.

Command Default

IPv4 address prefixes are not enabled.

Command Modes

Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE address-family ipv4 (BGP) command.

The following example places the device in address family configuration mode for the IPv4 address family:

router bgp 50000
 address-family ipv4

The following example places the device in address family configuration mode, specifies unicast address prefixes for the IPv4 address family, and specifies 1 as the VRF instance to associate with subsequent address family configuration mode commands:

router bgp 64496 
 address-family ipv4 unicast vrf 1 

address-family ipv6

To enter address family configuration mode for configuring routing sessions, such as BGP, that use standard IPv6 address prefixes, use the address-family ipv6 command in router configuration mode. To disable address family configuration mode, use the no form of this command.

address-family ipv6 [ vrf vrf-name ] [ unicast ]

no address-family ipv6 [ unicast ] [ vrf vrf-name ]

Syntax Description

unicast

(Optional) Specifies IPv4 unicast address prefixes. This is the default.

vrf vrf-name

(Optional) Specifies the name of the VPN routing and forwarding (VRF) instance to associate with subsequent IPv4 address family configuration mode commands.

Command Default

IPv6 address prefixes are not enabled. Unicast address prefixes are the default when IPv6 address prefixes are configured.


Note


Routing information for address family IPv4 is advertised by default for each BGP routing session configured with the neighbor remote-as command unless you configure the no bgp default ipv4-unicast command before configuring the neighbor remote-as command.


Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE address-family ipv6 command.

The following example places the router in address family configuration mode and specifies unicast address prefixes for the IPv6 address family:


Router(config)# router bgp 100
Router(config-router)# address-family ipv6 unicast
Router(config-router-af)#

aggregate-address

To create an aggregate entry in a Border Gateway Protocol (BGP) database, use the aggregate-address command in address family or router configuration mode. To disable this function, use the no form of this command.

aggregate-address address mask [as-set] [summary-only]

no aggregate-address address mask [as-set] [summary-only]

Syntax Description

address

Aggregate address.

mask

Aggregate mask.

as-set

(Optional) Generates autonomous system set path information.

summary-only

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

Command Default

The atomic aggregate attribute is set automatically when an aggregate route is created with this command unless the as-set keyword is specified.

Command Modes

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE aggregate-address command.

In the following example, an aggregate BGP address is created in router configuration mode. The path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized. Because the summary-only keyword is configured, more-specific routes are filtered from updates.


router bgp 50000 
 aggregate-address 192.168.51.0 255.255.255.0 as-set summary-only 

bandwidth (policy-map class)

To specify or modify the bandwidth allocated for a class belonging to a policy map, or to enable ATM overhead accounting, use the bandwidth command in QoS policy-map class configuration mode. To remove the bandwidth specified for a class or disable ATM overhead accounting, use the no form of this command.

bandwidth [ remaining ] percent percentage

no bandwidth

Syntax Description

remaining

(Optional) Specifies that the percentage of guaranteed bandwidth is based on a relative percent of available bandwidth.

percent percentage

Specifies the percentage of guaranteed bandwidth based on an absolute percent of available bandwidth to be set aside for the priority class or on a relative percent of available bandwidth. The valid range is 1 to 100.

Command Default

No bandwidth is specified.

Command Modes


QoS p olicy-map class configuration (config-pmap-c)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

For usage guidelines, see the Cisco IOS XE bandwidth (policy-map class) command.

The following example shows how to create two policy maps called “PMap” and "generic-cos" and configure two class policies in each policy map.


policy-map PMap  
 class PMap-super-fast  
  priority level 1  
  police percent 5  
 !
 class PMap-fast  
  priority level 2  
  police percent 5 
 !
!
policy-map generic-cos
 class cos-map-generic
  bandwidth remaining percent 5  
  queue-limit 108 packets  
 !
 class class-default  
  bandwidth remaining percent 95  
  queue-limit 2028 packets 
 !
!

bgp always-compare-med

To enable the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems, use the bgp always-compare-med command in router configuration mode. To disallow the comparison, use the no form of this command.

bgp always-compare-med

no bgp always-compare-med

Syntax Description

This command has no arguments or keywords.

Command Default

The software does not compare the MED for paths from neighbors in different autonomous systems if this command is not enabled or if the no form of this command is entered. The MED is compared only if the autonomous system path for the compared routes is identical.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE bgp always-compare-med command.

In the following example, the local BGP routing process is configured to compare the MED from alternative paths, regardless of the autonomous system from which the paths are received:

router bgp 1
 bgp always-compare-med

bgp bestpath as-path multipath-relax

To configure a Border Gateway Protocol (BGP) routing process to consider the different autonomous system (AS) paths and load balance multiple paths during best path route selection, use the bgp bestpath as-path multipath-relax command in router BGP configuration mode. To return the BGP routing process to the default operation, use the no form of this command.

bgp bestpath as-path multipath-relax

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Router BGP configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Qualified for use in Cisco vManage CLI templates.

Usage Guidelines

When BGP multi-pathing is enabled, BGP load-balances user traffic within a single autonomous system (AS). The criteria are that all attributes must match (weight, AS path, etc). However, when a device is multi-homed to multiple autonomous systems, BGP cannot load balance traffic between them by default.

In order to enable load-balancing of traffic among the multi-homed autonomous systems, the bgp bestpath as-path multipath-relax command needs to be enabled. The criteria required for this is that the AS-path length should be equal.

Before you use this command, ensure that BGP is enabled.

This command can be used to configure a Border Gateway Protocol (BGP) routing process to consider the different autonomous system (AS) paths and load balance multiple paths during best path route selection.

Example

The following example shows how to configure Border Gateway Protocol (BGP) routing process 65001 to consider the different autonomous system (AS) paths and load balance multiple paths during best path route selection.

Router(config)# router bgp 65001 
Router(config-router)# bgp bestpath as-path multipath-relax 

bgp bestpath compare-routerid

To configure a Border Gateway Protocol (BGP) routing process to compare identical routes received from different external peers during the best path selection process and to select the route with the lowest router ID as the best path, use the bgp bestpath compare-routerid command in router configuration mode. To return the BGP routing process to the default operation, use the no form of this command.

bgp bestpath compare-routerid

no bgp bestpath compare-routerid

Syntax Description

This command has no arguments or keywords.

Command Default

The behavior of this command is disabled by default; BGP selects the route that was received first when two routes with identical attributes are received.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

The bgp bestpath compare-routerid command is used to configure a BGP routing process to use the router ID as the tie breaker for best path selection when two identical routes are received from two different peers (all the attributes are the same except for the router ID). When this command is enabled, the lowest router ID will be selected as the best path when all other attributes are equal.

In the following example, the BGP routing process is configured to compare and use the router ID as a tie breaker for best path selection when identical paths are received from different peers:

router bgp 50000
 bgp bestpath compare-routerid

bgp bestpath med missing-as-worst

To configure a Border Gateway Protocol (BGP) routing process to assign a value of infinity to routes that are missing the Multi Exit Discriminator (MED) attribute (making the path without a MED value the least desirable path), use the bgp bestpath med missing-as-worst command in router configuration mode. To return the router to the default behavior (assign a value of 0 to the missing MED), use the no form of this command.

bgp bestpath med missing-as-worst

no bgp bestpath med missing-as-worst

Syntax Description

This command has no arguments or keywords.

Command Default

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

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

In the following example, the BGP router process is configured to consider a route with a missing MED attribute as having a value of infinity (4294967294), making this path the least desirable path:

router bgp 50000
 bgp bestpath med missing-as-worst

bgp deterministic-med

To enforce the deterministic comparison of the Multi Exit Discriminator (MED) value between all paths received from within the same autonomous system, use the bgp deterministic-med command in router configuration mode. To disable the required MED comparison, use the no form of this command.

bgp deterministic-med

no bgp deterministic-med

Syntax Description

This command has no arguments or keywords.

Command Default

The software does not enforce the deterministic comparison of the MED variable between all paths received from the same autonomous system.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

In the following example, BGP is configured to compare the MED during path selection for routes advertised by the same subautonomous system within a confederation:

outer bgp 50000 
 bgp deterministic-med

bgp graceful-restart

To enable the Border Gateway Protocol (BGP) graceful restart capability globally for all BGP neighbors, use the bgp graceful-restart command in address family or in router configuration mode. To disable the BGP graceful restart capability globally for all BGP neighbors, use the no form of this command.

bgp graceful-restart

no bgp graceful-restart

Command Default

By default, the restart time is set to 120 seconds and the stalepath time to 360 seconds.

Command Modes

Address-family configuration (config-router-af)

Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE bgp graceful-restart command.

In the following example, the BGP graceful restart capability is enabled for AS number 64496 and disabled for the neighbor:

router bgp 64496 
 neighbor 10.0.0.1 remote-as 64496
 bgp graceful-restart 
 neighbor 10.0.0.1 ha-mode graceful-restart disable

bgp log-neighbor-changes

To enable logging of BGP neighbor resets, use the bgp log-neighbor-changes command in router configuration mode. To disable the logging of changes in BGP neighbor adjacencies, use the no form of this command.

bgp log-neighbor-changes

no bgp log-neighbor-changes

Syntax Description

This command has no arguments or keywords.

Command Default

Logging of BGP neighbor resets is not enabled.

Command Modes

Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE bgp log-neighbor-changes command.

The following example logs neighbor changes for BGP in router configuration mode:

bgp router 40000
 bgp log-neighbor-changes

bandwidth remaining ratio

To specify a bandwidth-remaining ratio for class-level or subinterface-level queues to be used during congestion to determine the amount of excess bandwidth (unused by priority traffic) to allocate to nonpriority queues, use the bandwidth remaining ratio command in policy-map class configuration mode. To remove the bandwidth remaining ratio, use the no form of this command.

bandwidth remaining ratio ratio

no bandwidth remaining ratio ratio

Syntax Description

ratio

Relative weight of this subinterface or class queue with respect to other subinterfaces or class queues. Valid values are from 1 to 1000. At the subinterface level, the default value is platform dependent. At the class queue level, the default is 1.

ratio

Relative weight of this subinterface or class queue with respect to other subinterfaces or class queues.

Command Default

The default bandwidth ratio is 1.

Command Modes


Policy-map class (config-pmap-c)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE bandwidth remaining ratio command.

class Queue1
   bandwidth remaining ratio 20
   random-detect precedence-based
  !

class (policy-map)

To specify the name of the class whose policy you want to create or change or to specify the default class (commonly known as the class-default class) before you configure its policy, use the class command in policy-map configuration mode. To remove a class from the policy map, use the no form of this command.

class { class-name | | class-default }

no class { class-name | | class-default }

Syntax Description

class-name

Name of the class to be configured or whose policy is to be modified. The class name is used for both the class map and to configure a policy for the class in the policy map.

class-default

Specifies the default class so that you can configure or modify its policy.

Command Default

No class is specified.

Command Modes


Policy-map configuration (config-pmap)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE class (policy-map) command.

The following example shows how to create two policy maps called “PMap” and "generic-cos" and configure two class policies in each policy map.


policy-map PMap  
 class PMap-super-fast  
  priority level 1  
  police percent 5  
 !
 class PMap-fast  
  priority level 2  
  police percent 5 
 !
!
policy-map generic-cos
 class cos-map-generic
  bandwidth remaining percent 5  
  queue-limit 108 packets  
 !
 class class-default  
  bandwidth remaining percent 95  
  queue-limit 2028 packets 
 !
!

distance bgp

To configure the administrative distance for BGP routes, use the distance bgp command in address family or router configuration mode. To return to the administrative distance to the default value, 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 external BGP routes. Routes are external when learned from an external autonomous system. The range of values for this argument are from 1 to 255.

internal-distance

Administrative distance for internal BGP routes. Routes are internal when learned from peer in the local autonomous system. The range of values for this argument are from 1 to 255.

local-distance

Administrative distance for local BGP routes. Local routes are those networks listed with a network router configuration command, often as back doors, for the router or for the networks that is being redistributed from another process. The range of values for this argument are from 1 to 255.

Command Default

The following values are used if this command is not configured or if the no form is entered:

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

Routes with a distance of 255 are not installed in the routing table.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Cisco IOS XE Catalyst SD-WAN Release 17.4.1a

Starting from this release, this command can be configured in address-family (non-VRF) configuration mode only. It is no longer supported under router configuration mode.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE distance bgp command.

The following example is applicable to releases before Cisco IOS XE Catalyst SD-WAN Release 17.2.1v.

In this example, the external distance is set to 10, the internal distance is set to 50, and the local distance is set to 100:


router bgp 50000 
  distance bgp 10 50 100
  address family ipv4 
   network 10.108.0.0
   neighbor 192.168.6.6 remote-as 123
   neighbor 172.16.1.1 remote-as 47 
    

The following example is applicable to Cisco IOS XE Catalyst SD-WAN Release 17.4.1a and later.


router bgp 50000 
 address family ipv4 
  network 10.108.0.0
  neighbor 192.168.6.6 remote-as 123
  neighbor 172.16.1.1 remote-as 47 
  distance bgp 10 50 100
  

exit-address-family (bgp)

To exit the BGP address family configuration mode, use the exit-address-family command in BGP Address-family configuration mode. There is no no form of this command.

exit-address-family

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Address-family configuration (config-router-af)

Command History

Release Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

Cisco routers can use various IP routing protocols, such as Open Shortest Path First (OSPF), Enhanced Interior Gateway Routing Protocol (EIGRP), or Border Gateway Protocol (BGP) to learn routes dynamically. You can configure these routing protocols on your router by entering the router configuration mode and address family configuration mode. You can use this command to exit the BGP address family configuration mode.

Example

The following example shows exiting from the BGP address family configuration mode.

Router(config)# router bgp 65001 
Router(config-router)# address-family ipv4 
Router(config-router-af)# exit-address-family 

maximum-paths eibgp

To enable multipath load sharing among external Border Gateway Protocol (eBGP) and internal BGP (iBGP) routes, use the maximum-paths eibgp command in address family configuration mode. To disable multipath load sharing for eBGP and iBGP routes, use the no form of this command.

maximum-paths eibgp number-of-paths

no maximum-paths eibgp number-of-paths

Syntax Description

number-of-paths

Number of routes to install into the routing table. See the “Usage Guidelines” section for the number of paths that can be configured with this argument.

Command Default

BGP, by default, will install only one best path in the routing table.

Command Modes


Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE maximum-paths eibgp command.

The following example shows how to configure this command on a non-VRF address family.

Device(config)# router bgp 64498
Device(config-router)# address-family ipv4 unicast
Device(config-router-af)# maximum-paths eibgp 4
 

neighbor advertise-map

To advertise the routes in the BGP table matching the configured route-map, use the neighbor advertise-map command in router configuration mode. To disable route advertisement, use the no form of this command.

neighbor { ipv4-address | ipv6-address } advertise-map map-name { non-exist-map map-name }

no neighbor { ipv4-address | ipv6-address } advertise-map map-name { non-exist-map map-name }

Syntax Description

ip-address

Specifies the IPv4 address of the router that should receive conditional advertisements.

ipv6-address

Specifies the IPv6 address of the router that should receive conditional advertisements.

advertise-map map-name

Specifies the name of the route map that will be advertised if the conditions of the exist map or non-exist map are met.

non-exist-map map-name

Specifies the name of the non-exist-map that is compared with the routes in the BGP table to determine whether the advertise-map route is advertised or not.

Command Default

No default behavior or values.

Command Modes

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor advertise-map command.

The following address family configuration example configures BGP to conditionally advertise a prefix to the 10.1.1.1 neighbor using a non-exist map. If the prefix exists in MAP3 but not MAP4, the condition is met and the prefix is advertised.


router bgp 5
 address-family ipv4 unicast
  neighbor 10.1.1.1 advertise-map MAP3 non-exist-map MAP4

neighbor advertisement-interval

To set the minimum route advertisement interval (MRAI) between the sending of BGP routing updates, use the neighbor advertisement-interval command in address family or router configuration mode. To restore the default value, use the no form of this command.

neighbor ip-address advertisement-interval seconds

no neighbor ip-address advertisement-interval seconds

Syntax Description

ip-address

IP address of the neighbor.

seconds

Time (in seconds) is specified by an integer ranging from 0 to 600.

Command Default

eBGP sessions not in a VRF: 30 seconds

eBGP sessions in a VRF: 0 seconds

iBGP sessions: 0 seconds

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

When the MRAI is equal to 0 seconds, BGP routing updates are sent as soon as the BGP routing table changes.

The following router configuration mode example sets the minimum time between sending BGP routing updates to 600 seconds:


router bgp 5
 neighbor 10.0.0.1 advertisement-interval 600

neighbor description

To associate a description with a neighbor, use the neighbor description command in router configuration mode or address family configuration mode. To remove the description, use the no form of this command.

neighbor ip-address description text

no neighbor ip-address description [text]

Syntax Description

ip-address

IP address of the neighbor.

text

Text (up to 80 characters in length) that describes the neighbor.

Command Default

There is no description of the neighbor.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

This command was introduced.

In the following examples, the description of the neighbor is “peer with example.com”:

router bgp 109
 neighbor 172.16.2.3 description peer with example.com

neighbor ebgp-multihop

To accept and attempt BGP connections to external peers residing on networks that are not directly connected, use the neighbor ebgp-multihop command in router configuration mode. To return to the default, use the no form of this command.

neighbor { ip-address | | ipv6-address } ebgp-multihop [ttl]

no neighbor { ip-address | | ipv6-address } ebgp-multihop

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

ipv6-address

IPv6 address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

ttl

(Optional) Time-to-live in the range from 1 to 255 hops.

For Cisco IOS XE Catalyst SD-WAN Release 17.4.1a and later, the supported range is from 2 to 255. If you have configured the value of 1, you must modify the device CLI template or CLI Add-on feature template with supported values.

Command Default

Only directly connected neighbors are allowed.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

This command was introduced.

Cisco IOS XE Catalyst SD-WAN Release 17.4.1a

This command was modified. The supported time-to-live range for ebgp-multihop is now 2 to 255.

Usage Guidelines

This feature should be used only under the guidance of Cisco technical support staff.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

To prevent the creation of loops through oscillating routes, the multihop will not be established if the only route to the multihop peer is the default route (0.0.0.0).

The following example allows connections to or from neighbor 10.108.1.1, which resides on a network that is not directly connected:


router bgp 109
 neighbor 10.108.1.1 ebgp-multihop 255

neighbor ha-mode graceful-restart

To enable or disable the Border Gateway Protocol (BGP) graceful restart capability for a BGP neighbor or peer group, use the neighbor ha-mode graceful-restart command in router configuration mode. To remove from the configuration the BGP graceful restart capability for a neighbor, use the no form of this command.

neighbor ip-address ha-mode graceful-restart [disable]

no neighbor ip-address ha-mode graceful-restart [disable]

Syntax Description

ip-address

IP address of the neighbor.

disable

(Optional) Disables BGP graceful restart capability for a neighbor.

Command Default

BGP graceful restart capability is disabled.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor ha-mode graceful-restart command.

The following example enables the BGP graceful restart capability for the BGP neighbor, 172.21.1.2:


router bgp 45000
 bgp log-neighbor-changes
 address-family ipv4 unicast
 neighbor 172.21.1.2 remote-as 45000
 neighbor 172.21.1.2 activate
 neighbor 172.21.1.2 ha-mode graceful-restart
 end

The following example enables the BGP graceful restart capability globally for all BGP neighbors and then disables the BGP graceful restart capability for the BGP neighbor 10.0.0.1.


router bgp 64496 
 neighbor 10.0.0.1 remote-as 64496
 bgp graceful-restart 
 neighbor 10.0.0.1 ha-mode graceful-restart disable  

neighbor maximum-prefix (BGP)

To control how many prefixes can be received from a neighbor, use the neighbor maximum-prefix command in router configuration mode. To disable this function, use the no form of this command.

neighbor { ip-address | peer-group-name } maximum-prefix maximum [threshold] [ restart restart-interval ]

no neighbor ip-address maximum-prefix maximum

Syntax Description

ip-address

IP address of the neighbor.

maximum

Maximum number of prefixes allowed from the specified neighbor. The number of prefixes that can be configured is limited only by the available system resources on a router.

threshold

(Optional) Integer specifying at what percentage of the maximum- prefix limit the router starts to generate a warning message. The range is from 1 to 100; the default is 75.

restart

(Optional) Configures the router that is running BGP to automatically reestablish a peering session that has been disabled because the maximum-prefix limit has been exceeded. The restart timer is configured with the restart-interval argument.

restart-interval

(Optional) Time interval (in minutes) that a peering session is reestablished. The range is from 1 to 65535 minutes.

Command Default

This command is disabled by default. Peering sessions are disabled when the maximum number of prefixes is exceeded. If the restart-interval argument is not configured, a disabled session will stay down after the maximum-prefix limit is exceeded.

threshold : 75 percent

Command Modes


Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor maximum-prefix (BGP) command.

In the following example, the maximum number of prefixes that will be accepted from the 192.168.3.3 neighbor is set to 769434. The router is configured to display a warning when 100 percent of the prefixes is reached. The router is also configured to reestablish a disabled peering session after 65535 minutes.

router bgp 40000
 address-family ipv4 unicast
  neighbor 192.168.3.3 maximum-prefix 769434 100 restart 65535

neighbor next-hop-self

To configure a router as the next hop for a BGP-speaking neighbor or peer group, use the neighbor next-hop-self command in router configuration mode. To disable this feature, use the no form of this command.

neighbor ip-address next-hop-self

no neighbor ip-address next-hop-self

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

Command Default

This command is disabled by default.

Command Modes


Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor next-hop-self command.

The following example forces all updates destined for 10.108.1.1 to advertise this router as the next hop:


router bgp 109
 neighbor 10.108.1.1 next-hop-self

neighbor password

To enable message digest5 (MD5) authentication on a TCP connection between two BGP peers, use the neighbor password command in router configuration mode. To disable this function, use the no form of this command.

neighbor ip-address password [type] string

no neighbor ip-address password

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

type

(Optional) The type of password. You can only specify the following:

  • 0: Unencrypted

  • 7: Encrypted with MD5

Even though the CLI accepts other values only these value change the encryption of the password.

string

Case-sensitive password of up to 25 characters in length. The first character cannot be a number. The string can contain any alphanumeric characters, including spaces. You cannot specify a password in the format number-space-anything . The space after the number can cause authentication to fail.

Command Default

MD5 is not authenticated on a TCP connection between two BGP peers.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor password command.

The following example configures MD5 authentication for the peering session with the 10.108.1.1 neighbor. The same password must be configured on the remote peer before the hold-down timer expires.


router bgp 109
 neighbor 10.108.1.1 password 7 00141215174C04140B1E1E 

neighbor remote-as

To add an entry to the BGP or multiprotocol BGP neighbor table, use the neighbor remote-as command in router configuration mode. To remove an entry from the table, use the no form of this command.

neighbor { ip-address | ipv6-address } remote-as autonomous-system-number

no neighbor { ip-address | ipv6-address } remote-as autonomous-system-number

Syntax Description

ip-address

IP address of the neighbor.

ipv6-address

IPv6 address of the neighbor.

autonomous-system-number

Number of an autonomous system to which the neighbor belongs in the range from 1 to 65535.

Command Default

There are no BGP or multiprotocol BGP neighbor peers.

Command Modes


Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor remote-as command.

The following example specifies that a router at the address 10.0.0.1 is an internal BGP (iBGP) neighbor in autonomous system number 64496:


router bgp 64496 
 neighbor 10.0.0.1 remote-as 64496
 bgp graceful-restart 
 neighbor 10.0.0.1 ha-mode graceful-restart disable  

neighbor route-map

To apply a route map to incoming or outgoing routes, use the neighbor route-map command in address family or router configuration mode. To remove a route map, use the no form of this command.

neighbor { ip-address | ipv6-address [ % ] } route-map map-name { in | out }

no neighbor { ip-address | ipv6-address [ % ] } route-map map-name { in | out }

Syntax Description

ip-address

IP address of the neighbor.

ipv6-address

IPv6 address of the neighbor.

%

(Optional) IPv6 link-local address identifier. This keyword needs to be added whenever a link-local IPv6 address is used outside the context of its interface.

map-name

Name of a route map.

in

Applies route map to incoming routes.

out

Applies route map to outgoing routes.

Command Default

No route maps are applied to a peer.

Command Modes

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor route-map command.

The following address family configuration mode example applies a route map named internal-map to a unicast BGP route from 172.16.70.24:


router bgp 5
address-family ipv4 unicast
 neighbor 172.16.70.24 route-map internal-map in

neighbor send-community

To specify that a communities attribute should be sent to a BGP neighbor, use the neighbor send-community command in address family or router configuration mode. To remove the entry, use the no form of this command.

neighbor { ip-address | | ipv6-address } send-community both

no neighbor ip-address ipv6-address send-community

Syntax Description

ip-address

IP address of the neighbor.

ipv6-address

IPv6 address of the neighbor.

both

(Optional) Specifies that both standard and extended communities will be sent.

Command Default

No communities attribute is sent to any neighbor.

Command Modes

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

In the following address family configuration mode example, the router belongs to autonomous system 109 and is configured to send the communities attribute to its neighbor at IP address 172.16.70.23:

router bgp 109
 address-family ipv4 unicast
  neighbor 172.16.70.23 send-community both

neighbor shutdown

To disable a neighbor or peer group or to gracefully shut down a link for maintenance, use the neighbor shutdown command in router configuration mode or address family configuration mode. To reenable the neighbor or peer group, use the no form of this command.

neighbor ip-address shutdown

no neighbor ip-address shutdown

Syntax Description

ip-address

IP address of the neighbor.

Command Default

No change is made to the status of any BGP neighbor or peer group.

Command Modes

Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor shutdown command.

The following example disables any active session for the neighbor 172.16.70.23:


router bgp 123134
 neighbor 172.16.70.23 shutdown

neighbor timers

To set the timers for a specific BGP peer or peer group, use the neighbor timers command in address family or router configuration mode. To clear the timers for a specific BGP peer or peer group, use the no form of this command.

neighbor ip-address timers keepalive holdtime

no neighbor ip-address timers

Syntax Description

ip-address

(Optional) A BGP peer or peer group IP address.

keepalive

Frequency (in seconds) with which the Cisco IOS software sends keepalive messages to its peer. The default is 60 seconds.The range is from 0 to 65535.

holdtime

Interval (in seconds) after not receiving a keepalive message that the software declares a peer dead. The default is 180 seconds. The range is from 0 to 65535.

Command Default

keepalive : 60 secondsholdtime : 180 seconds

Command Modes

Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE neighbor timers command.

The following example changes the keepalive timer to 70 seconds and the hold-time timer to 210 seconds for the BGP peer 192.168.47.0:


router bgp 109
 neighbor 192.168.47.0 timers 70 210

network (BGP and multiprotocol BGP)

To specify the networks to be advertised by the Border Gateway Protocol (BGP) and multiprotocol BGP routing processes, use the network command in address family or router configuration mode. To remove an entry from the routing table, use the no form of this command.

network { network-number [ mask network-mask ] }

no network { network-number [ mask network-mask ] }

Syntax Description

network-number

Network that BGP will advertise.

mask network-mask

(Optional) Network or subnetwork mask with mask address.

Command Default

No networks are specified.

Command Modes

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

BGP networks can be learned from connected routes, from dynamic routing, and from static route sources.

The maximum number of network commands you can use is determined by the resources of the router, such as the configured NVRAM or RAM.

The following example sets up network 192.168.51.0 with mask of 255.255.255.0 to be included in unicast BGP updates:


router bgp 64800
 address-family ipv4 unicast
  network 192.168.51.0 mask 255.255.255.0

police (percent)

To configure traffic policing on the basis of a percentage of bandwidth available on an interface, use the police command in policy-map class configuration mode. To remove traffic policing from the configuration, use the no form of this command.

police rate percent percentage

no police rate percent percentage

Syntax Description

rate

Specifies the information rate.

percent

Specifies that a percentage of bandwidth will be used for calculating the CIR.

percentage

The bandwidth percentage. Valid range is a number from 1 to 100.

Command Default

No traffic policing is configured.

Command Modes


Policy-map class configuration (config-pmap-c)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE police (percent) command.

The following example shows how to configure traffic policing:

Policy-map PMap  
 class PMap-super-fast  
  priority level 1  
  police rate percent 5  
 class PMap-fast  
  priority level 2  
  police rate percent 5 
 !
!
policy-map generic-cos
 class cos-map-generic
  bandwidth remaining percent 5  
  queue-limit 108 packets  
 class class-default  
  bandwidth remaining percent 95  
  queue-limit 2028 packets 

policy-map

To enter policy-map configuration mode and create or modify a policy map that can be attached to one or more interfaces to specify a service policy, use the policy-map command in global configuration mode. To delete a policy map, use the no form of this command.

policy-map [ type inspect ] policy-map-name

no policy-map [ type inspect ] policy-map-name

Syntax Description

type inspect

(Optional) Specifies the policy-map type as inspect.

policy-map-name

Name of the policy map.

Command Default

The policy map is not configured.

Command Modes

Global configuration (config)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Qualified for use in Cisco vManage CLI templates.

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command modified to support type inspect .

Usage Guidelines

For usage guidelines, see the Cisco IOS XE policy-map command.

The following example shows how to create two policy maps called “PMap” and "generic-cos" and configure two class policies in each policy map.


policy-map PMap  
 class PMap-super-fast  
  priority level 1  
  police percent 5  
 !
 class PMap-fast  
  priority level 2  
  police percent 5 
 !
!
policy-map generic-cos
 class cos-map-generic
  bandwidth remaining percent 5  
  queue-limit 108 packets  
 !
 class class-default  
  bandwidth remaining percent 95  
  queue-limit 2028 packets 
 !
!

priority level

To configure multiple priority queues, use the priority level command in policy-map class configuration mode. To remove a previously specified priority level for a class, use the no form of this command.

priority level level

no priority level level

Syntax Description

level

Defines multiple levels of a strict priority service model. When you enable a traffic class with a specific level of priority service, the implication is a single priority queue associated with all traffic that is enabled with the specified level of priority service.

Valid values are from 1 (high priority) to 2 (low priority). Default is 1.

Command Default

The priority level has a default level of 1.

Command Modes


Policy-map class configuration (config-pmap-c)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE priority level command.

The following example shows how to configure multi level priority queues. In the example, the traffic class named PMap-super-fast is given high priority (level 1), and the class named PMap-fast is given level 2 priority. To prevent PMap-fast traffic from becoming starved of bandwidth, PMap-super-fast traffic is policed at 5 percent of the available bandwidth.

Policy-map PMap  
 class PMap-super-fast  
  priority level 1  
  police percent 5  
 class PMap-fast  
  priority level 2  
  police percent 5 
 !
!

redistribute (IP)

To redistribute routes from one routing domain into another routing domain, use the redistribute command in the appropriate configuration mode. To disable all or some part of the redistribution (depending on the protocol), use the no form of this command.

redistribute { omp | | static | | connected | nat-route }

no redistribute { omp | | static | | connected | nat-route }

Syntax Description

omp

The omp keyword specifies OMP as the source protocol from which routes are being redistributed.].

static

The static [ip ] keyword is used to redistribute IP static routes.

connected

The connected keyword refers to routes that are established automatically by virtue of having enabled IP on an interface.

nat-route

The nat-route keyword redistributes NAT66 DIA routes into BGP protocol.

Command Default

Route redistribution is disabled.

Command Modes

Address family configuration (config-af)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Cisco IOS XE Catalyst SD-WAN Release 17.14.x

This command was modified. Added the nat-route keyword to redistribute NAT66 DIA routes into BGP protocol.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE redistribute (IP) command.

The following example redistributes a NAT66 DIA route into BGP:

router bgp 15
bgp bestpath as-path multipath-relax
bgp log-neighbor-changes
bgp router-id 10.1.1.1
address-family ipv4 unicast vrf 1
 neighbor 10.2.2.2 remote-as 2
 neighbor 10.2.2.2 activate
 redistribute nat-route dia
 exit-address-family
!
address-family ipv6 unicast vrf 1
 bgp router-id 10.1.1.1
 neighbor 2001:a14:18::64 remote-as 2
 neighbor 2001:a14:18::64 activate
 redistribute nat-route
 exit-address-family
!

The following example redistributes a NAT66 DIA route into OSPFv3:

interface GigabitEthernet5
ospfv3 1 network point-to-point
ospfv3 1 ipv4 area 0
ospfv3 1 ipv6 area 0
router ospfv3 1
max-lsa 50000
router-id 10.1.1.1
address-family ipv4 unicast vrf 1
 log-adjacency-changes
 redistribute connected
 exit-address-family
!
address-family ipv6 unicast
 log-adjacency-changes
 redistribute connected
 redistribute nat-route
 redistribute maximum-prefix 10240
 exit-address-family
!

The following example redistributes routes for an IPv4 address family:

router bgp 64496 
 address-family ipv4 unicast vrf 1 
  redistribute omp 
  redistribute static 
  redistribute connected
  exit-address-family

The following example redistributes routes for an IPv6 address family:

Device(config)# router eigrp 1
Device(config-router)# address-family ipv6 unicast vrf 1 autonomous-system 3
Device(config-router-af)# topology base
Device(config-router-af-toplogy)# redistribute static route-map route-map1

redistribute omp (bgp)

To enable redistributing omp routes into BGP, use the redistribute omp command in BGP Address-family IP configuration mode. To disable redistributing omp routes into BGP, use the no form of this command.

redistribute omp { route-map string }

no redistribute omp { route-map string }

Syntax Description

None

Enable redistributing omp routes into BGP.

route-mapstring

(Optional) Specifies the route map that should be interrogated to filter the importation of routes from this source routing protocol to the current routing protocol. If not specified, all routes are redistributed.

Command Default

None

Command Modes

BGP Address-family IP configuration (config-router-af)

Release Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

By default, routes from other routing protocols are not redistributed into BGP. It can be useful for BGP to learn OMP routes, because OMP learns routes to destinations throughout the overlay network.

This command can be used to enable redistributing omp routes into BGP.

Example

The following example shows how to enable redistributing omp into BGP process 65001.

Router(config)# router bgp 65001 
Router(config-router)# address-family ipv4 
Router(config-router-af)# redistribute omp

The following example shows how to enable redistributing omp with the route-map named OMP-to-BGP into BGP process 65001.

Router(config)# router bgp 65001 
Router(config-router)# address-family ipv4 
Router(config-router-af)# redistribute omp route-map OMP-to-BGP

router bgp

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

router bgp autonomous-system-number

no router bgp autonomous-system-number

Syntax Description

autonomous-system-number

Number of an autonomous system that identifies the router to other BGP routers and tags the routing information that is passed along. Number in the range from 1 to 65535 for 2-byte non asdot notation.

4-byte autonomous system numbers are supported in the range from 65536 to 4294967295 in asplain notation and in the range from 1.0 to 65535.65535 in asdot notation.

Note

 

When you run this command, the Cisco SD-WAN device does not verify the accuracy of the entered values. However when you commit the CLI, any invalid CLIs, either syntax or functionality, are rejected.

Command Default

No BGP routing process is enabled by default.

Command Modes


Global configuration (config)

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1r

Qualified for use in Cisco vManage CLI templates. with an autonomous-system-number of 64496.

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command modified to include full range of autonomous-system-numbers

Usage Guidelines

For further usage guidelines on this command, see the Cisco IOS XE router bgp command.

Examples:


router bgp 64496 
 neighbor 10.0.0.1 remote-as 64496
 bgp graceful-restart 
 neighbor 10.0.0.1 ha-mode graceful-restart disable  

router bgp 64496 
 address-family ipv4 unicast vrf 1 
 redistribute omp 
 redistribute static 
 redistribute connected  

timers bgp

To adjust BGP network timers, use the timers bgp command in router configuration mode. To reset the BGP timing defaults, use the no form of this command.

timers bgp keepalive holdtime [min-holdtime]

no timers bgp

Syntax Description

keepalive

Frequency (in seconds) with which the Cisco IOS software sends keepalive messages to its peer. The default is 60 seconds. The range is from 0 to 65535.

holdtime

Interval (in seconds) after not receiving a keepalive message that the software declares a peer dead. The default is 180 seconds. The range is from 0 to 65535.

min-holdtime

(Optional) Interval (in seconds) specifying the minimum acceptable hold-time from a BGP neighbor. The minimum acceptable hold-time must be less than, or equal to, the interval specified in the holdtime argument. The range is from 0 to 65535.

Command Default

keepalive : 60 seconds

holdtime : 180 seconds

Command Modes


Router configuration

Command History

Release

Modification

Cisco IOS XE Catalyst SD-WAN Release 17.2.1v

Command qualified for use in Cisco vManage CLI templates.

Usage Guidelines

For usage guidelines, see the Cisco IOS XE timers bgp command.

The following example changes the keepalive timer to 70 seconds, the hold-time timer to 130 seconds, and the minimum acceptable hold-time interval to 100 seconds:


router bgp 45000
 timers bgp 70 130 100