A Commands


This chapter describes the Cisco NX-OS Border Gateway Protocol (BGP) commands that begin with A.

address-family ipv6 unicast

To enter IPv6 unicast address family mode, use the address-family ipv6 unicast command.

address-family ipv6 unicast

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Router configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how enter IPv6 unicast address family mode:

switch# configure terminal
switch(config)# router ospfv 1234
switch(config-router)# neighbor 2001:DB8:0:1::55 remote-as 64496
switch(config-router-neighbor)# address-family ipv6 unicast
switch(config-router-af)# next-hop-self

Related Commands

Command
Description

area filter-list (OSPFv3)

Filters prefixes advertised in type 3 link-state advertisements (LSAs) between Open Shortest Path First (OSPF) areas of an Area Border Router (ABR).


address-family (BGP neighbor)

To enter the neighbor address family mode address-family mode and configure submode commands for the Border Gateway Protocol (BGP), use the address-family command. To disable the address family submode for configuring routing protocols, use the no form of this command.

address-family ipv4{multicast | unicast}

no address-family ipv4 {multicast | unicast}

Syntax Description

ipv4

Specifies the IPv4 address family.

multicast

Specifies multicast address support.

unicast

Specifies unicast address support.


Command Default

This command has no default settings.

Command Modes

Neighbor configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

Use the address-family command to enter various address family configuration modes while configuring BGP routing. When you enter the address-family command from neighbor configuration mode, you enable the neighbor address family and enter the neighbor address family configuration mode. The prompt changes to switch(config-router-neighbor-af)#.

You must configure the address families if you are using route redistribution, load balancing, and other advanced features. IPv4 neighbor sessions support IPv4 unicast and multicast address families.

From the neighbor address family configuration mode, the following parameters are available:


Note This applies to IPv4 multicast or unicast


advertise-map—Conditionally advertises selected BGP routes.

default-originate—Configures a BGP routing process to distribute a default route.

exit—Exits from the current command mode.

maximum-prefix—Controls how many prefixes can be received from a neighbor.

no—Negates a command or sets its defaults

route-reflector-client—Configures the router as a BGP route reflector.

soft-reconfiguration inbound—Configures the switch software to start storing BGP peer updates.

suppress-inactive—Advertises only active routes to peer.

This command requires the LAN Enterprise Services license.

Examples

This example shows how to activate IPv4 multicast for neighbor 192.0.2.1 and place the device in neighbor address family configuration mode for the IPv4 multicast address family:

switch(config)# feature bgp
switch(config)# router bgp 64496
switch(config-router)# neighbor 192.0.2.1 remote-as 64496
switch(config-router-neighbor)# address-family ipv4 multicast
switch(config-router-neighbor-af) 
 
   

Related Commands

Command
Description

advertise-map

Configures BGP conditional advertisement.

default-originate (BGP)

Configures a BGP routing process to distribute a default route.

feature bgp

Enables BGP configuration.

maximum-prefix

Controls how many prefixes can be received from a neighbor.

route-reflector-client

Configures the router as a BGP route reflector.

soft-reconfiguration inbound

Configures the switch software to start storing BGP peer updates.

suppress-inactive

Advertises only active routes to peer.


address-family (BGP router)

To enter the address family mode or a virtual routing and forwarding (VRF) address-family mode and configure submode commands for the Border Gateway Protocol (BGP), use the address-family command. To disable the address family submode for configuring routing protocols, use the no form of this command.

address-family ipv4 {multicast | unicast}

no address-family ipv4 {multicast | unicast}

Syntax Description

ipv4

Specifies the IPv4 address family.

multicast

Specifies multicast address support.

unicast

Specifies unicast address support.


Command Default

This command has no default settings.

Command Modes

Router configuration mode

VRF configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

Use the address-family command to enter various address family configuration modes while configuring BGP routing. When you enter the address-family command from router configuration mode, you enable the address family and enter global address family configuration mode. The prompt changes to switch(config-router-af)#.

You must configure the address families if you are using route redistribution, address aggregation, load balancing, and other advanced features. IPv4 neighbor sessions support IPv4 unicast and multicast address families.

From the address family configuration mode, the following parameters are available:


Note This applies to IPv4 multicast or unicast.


aggregate-address—Configures BGP aggregate prefixes. See the aggregate-address command for additional information.

client-to-client reflection—Enables client-to-client route reflection. Route reflection allows a BGP speaker (route reflector) to advertise IBGP learned routes to certain IBGP peers. Use the no form of this command to disable client-to-client route reflection. Default: Enabled.

dampening [half-life | route-map name]—Configures the route flap dampening. Optionally, you can set the time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. The default half-life is 15 minutes. Range: 1 to 45. Default: Disabled.

default-metric metric—Sets the default flap metric of redistributed routes. The default-metric command is used to set the metric value for routes redistributed into BGP with the redistribute command. A default metric can be configured to solve the problem of redistributing routes with incompatible metrics. Assigning the default metric will allow redistribution to occur. This value is the Multi Exit Discriminator (MED) that is evaluated by BGP during the best path selection process. The MED is a non-transitive value that is processed only within the local autonomous system and adjacent autonomous systems. The default metric is not set if the received route has a MED value. Range: 0 to 4294967295.


Note When enabled, the default-metric command applies a metric value of 0 to redistributed connected routes. The default-metric command does not override metric values that are applied with the redistribute command.


distance ebgp-route ibgp-route local-route—Configures a rating of the trustworthiness of a routing information source, such as an individual router or a group of routers. BGP does not use discard routes for next-hop resolution. In general, the higher the value, the lower the trust rating. An administrative distance of 255 means the routing information source cannot be trusted at all and should be ignored. Use this command if another protocol is known to be able to provide a better route to a node than was actually learned via external BGP (eBGP), or if some internal routes should be preferred by BGP. Range: 1 to 255. Default: EBGP20, IBGP—200.


Caution Changing the administrative distance of internal BGP routes is considered dangerous and is not recommended. Improper configuration can introduce routing table inconsistencies and break routing.

exit—Exits from the current command mode.

maximum-paths [ibgp] parallel-paths—Configures the number of parallel paths to forward packets. The maximum-paths ibgp command is used to configure equal-cost or unequal-cost multipath load sharing for iBGP peering sessions. In order for a route to be installed as a multipath in the BGP routing table, the route cannot have a next hop that is the same as another route that is already installed. The BGP routing process will still advertise a best path to iBGP peers when iBGP multipath load sharing is configured. For equal-cost routes, the path from the neighbor with the lowest router ID is advertised as the best path. To configure equal-cost multipath load sharing, all path attributes must be the same. The path attributes include weight, local preference, autonomous system path (entire attribute and not just the length), origin code, Multi Exit Discriminator (MED), and Interior Gateway Protocol (IGP) distance. The optional ibgp keyword allows you to configure multipath for the IBGP paths. To return to the default, use the no form of this command. The range is from 1 to 16.

network—Configures an IP prefix to advertise. See the network command for additional information.

nexthop—Configures next-hop address tracking events for BGP processes.

no—Negates a command or sets its defaults.

redistribute—Enables the redistribution of routes learned by other protocols into BGP. Redistribution is supported for both IPv4 routes. To disable the redistribution of routes learned by other protocols into BGP, use the no form of this command.

direct route-map name—Specifies directly connected routes.

eigrp AS-num route-map name—Specifies Enhanced Interior Gateway Protocol routes. Range: 1 to 65535.

ospf src-protocol route-map name—Specifies Open Shortest Path First (OSPF) routes.

rip src-protocol route-map name—Specifies Routing Information Protocol (RIP) routes.

static route-map name—Specifies static routes.

suppress-inactive—Advertises only active routes to peer. See the suppress-inactive command for additional information.

This command requires the LAN Enterprise Services license.

Examples

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

switch(config)# feature bgp
switch(config)# router bgp 64496
switch(config-router)# address-family ipv4 unicast
switch(config-router-af)#
 
   

Related Commands

Command
Description

aggregate-address

Configures BGP summary addresses.

client-to-client reflection

Configures route reflection.

dampening

Configures route flap dampening.

default-metric (BGP)

Configures the default metric for routes redistributed into BGP.

distance (BGP)

Configures the administrative distance.

feature bgp

Enables BGP configuration.

maximum-paths (BGP)

Configures the maximum number of equal-cost paths.

network

Configures an IP prefix to advertise.

nexthop route-map

Configures route policy filtering for next hops.

nexthop trigger-delay

Configures the BGP delay for triggering next-hop calculations.

redistribute (BGP)

Configures route redistribution for BGP.

suppress-inactive

Advertises active routes to a BGP peer.

timers (BGP)

Configures the BGP timers.


advertise-map (BGP)

To configure Border Gateway Protocol (BGP) conditional advertisement, use the advertise-map command. To remove BGP conditional advertisement, use the no form of this command.

advertise-map adv-map {exist-map exist-rmap | non-exist-map nonexist-rmap}

no advertise-map adv-map {exist-map exist-rmap | non-exist-map nonexist-rmap}

Syntax Description

adv-map

Route map with match statements that the route must pass before BGP passes the route to the next route map. The adv-map is a case-sensitive, alphanumeric string up to 63 characters.

exist-map exist-rmap

Specifies a route map with match statements for a prefix list. A prefix in the BGP table must match a prefix in the prefix list before BGP will advertise the route. The exist-rmap is a case-sensitive, alphanumeric string up to 63 characters.

non-exist-map nonexist-rmap

Specifies a route map with match statements for a prefix list. A prefix in the BGP table must not match a prefix in the prefix list before BGP will advertise the route. The nonexist-rmap is a case-sensitive, alphanumeric string up to 63 characters.


Command Default

None

Command Modes

BGP neighbor address-family configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

Use the advertise-map command to conditionally advertise selected routes. The routes or prefixes that BGP conditionally advertises are defined in two route maps, the adv-map and an exist-map or nonexist-map. The exist-map or nonexist-map specifies the prefix that the BGP tracks. The adv-map specifies the prefix that BGP advertises to the specified neighbor when the condition is met.

This command requires the LAN Enterprise Services license.

Examples

This example shows how to configure BGP conditional advertisement:

switch# configure terminal
switch(config)# router bgp 65536
switch(config-router)# neighbor 192.0.2.2 remote-as 65537
switch(config-router-neighbor)# address-family ipv4 unicast
switch(config-router-neighbor-af)# advertise-map advertise exist-map exist
switch(config-router-neighbor-af)# exit
switch(config-router-neighbor)# exit
switch(config-router)# exit
switch(config)# route-map advertise
switch(config-route-map)# match as-path pathList
switch(config-route-map)# exit
switch(config)# route-map exit
switch(config-route-map)# match ip address prefix-list plist
switch(config-route-map)# exit
switch(config)# ip prefix-list plist permit 209.165.201.0/27
switch(config)#
 
   

Related Commands

Command
Description

feature bgp

Enables BGP.

neighbor

Configures a BGP peer.

show ip bgp

Displays BGP configuration information.


aggregate-address (BGP)

To create a summary address in a Border Gateway Protocol (BGP) routing table, use the aggregate-address command. To remove the summary address, use the no form of this command.

aggregate-address address/length [advertise-map map-name] [as-set] [attribute-map map-name] [summary-only] [suppress-map map-name]

no aggregate-address address/mask-length [advertise-map map-name] [as-set] [attribute-map map-name] [summary-only] [suppress-map map-name]

Syntax Description

address/length

Aggregate IPv4 address and mask length. Valid value for length is 1 to 32.

advertise-map map-name

(Optional) Specifies the name of the route map used to select attribute information from specific routes.

as-set

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

attribute-map map-name

(Optional) Specifies the name of the route map used to set the attribute information for specific routes. The map-name is an alphanumeric string up to 63 characters.

summary-only

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

suppress-map map-name

(Optional) Specifies the name of the route map used to conditionally filter more specific routes. The map-name is an alphanumeric string up to 63 characters.


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 mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

You can implement aggregate routing in BGP either by redistributing an aggregate route into BGP, or by using the conditional aggregate routing feature.

The aggregate-address command without keywords creates an aggregate entry in the BGP routing table if any more-specific BGP routes are available that fall within the specified range. (A longer prefix which matches the aggregate must exist in the RIB.) The aggregate route will be advertised as coming from your autonomous system and will have 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.)

The as-set keyword creates an aggregate entry using the same rules that the command follows without this keyword, but the path advertised for this route will be an AS_SET consisting of all elements 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.

The summary-only keyword not only creates the aggregate route (for example, 192.*.*.*) but also suppresses advertisements of more-specific routes to all neighbors. If you want to suppress only advertisements to certain neighbors, you may use the neighbor distribute-list command, with caution. If a more-specific route leaks out, all BGP routers will prefer that route over the less-specific aggregate you are generating (using longest-match routing).

The suppress-map keyword creates the aggregate route but suppresses advertisement of specified routes. You can use the match clauses of route maps to selectively suppress some more-specific routes of the aggregate and leave others unsuppressed. IP access lists and autonomous system path access lists match clauses are supported.

The advertise-map keyword selects specific routes that will be used to build different components of the aggregate route, such as AS_SET or community. This form of the aggregate-address command is useful when the components of an aggregate are in separate autonomous systems and you want to create an aggregate with AS_SET, and advertise it back to some of the same autonomous systems. You must remember to omit the specific autonomous system numbers from the AS_SET to prevent the aggregate from being dropped by the BGP loop detection mechanism at the receiving router. IP access lists and autonomous system path access lists match clauses are supported.

The attribute-map keyword allows attributes of the aggregate route to be changed. This form of the aggregate-address command is useful when one of the routes forming the AS_SET is configured with an attribute such as the community no-export attribute, which would prevent the aggregate route from being exported. An attribute map route map can be created to change the aggregate attributes.

This command requires the LAN Enterprise Services license.

Examples

AS-Set Example

This example shows how to create an aggregate BGP address 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.

switch(config)# router bgp 64496 
switch(config-router)# aggregate-address 10.0.0.0 255.0.0.0 as-set 

Summary-Only Example

This example shows how to create an aggregate BGP address in address family configuration mode and apply it to the multicast database (SAFI) under the IP Version 4 address family. Because the summary-only keyword is configured, more-specific routes are filtered from updates.

switch(config)# router bgp 64496 
switch(config-router)# address-family ipv4 multicast 
switch(config-router-af)# aggregate-address 10.0.0.0 255.0.0.0 summary-only 

Conditional Aggregation Example

This example shows how to create a route map called MAP-ONE to match on an as-path access list. The path advertised for this route will be an AS_SET consisting of elements contained in paths that are matched in the route map.

switch(config)# ip as-path access-list 1 deny ^1234_ 
switch(config)# ip as-path access-list 1 permit .* 
switch(config)# ! 
switch(config)# route-map MAP-ONE 
switch(config-route-map)# match ip as-path 1 
switch(config-route-map)# exit 
switch(config)# router bgp 64496 
switch(config-router)# address-family ipv4 
switch(config-router-af)# aggregate-address 10.0.0.0 255.0.0.0 as-set advertise-map 
MAP-ONE 
switch(config-router-af)# end 

Related Commands

Command
Description

route-map

Creates a route map.