The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Cisco NX-OS Border Gateway Protocol (BGP) commands that begin with S.
To send the Border Gateway Protocol (BGP) community attribute to a peer, use the send-community command. To revert to the defaults, use the no form of this command.
send-community [extended]
no send-community [extended]
extended |
(Optional) Specifies the BGP extended community. |
No community attributes are sent to the peer.
BGP neighbor address-family configuration mode
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Before you use this command, you must configure BGP communities using the set community command.
This command requires the LAN Enterprise Services license.
This example shows how to configure the router to send the community attribute to the neighbor 192.168.1.3:
switch# configure terminal
switch(config)# router bgp 102
switch(config-router)# neighbor 192.168.1.3 remote-as 64497
switch(config-router-neighbor)# address-family ipv4 multicast
switch(config-router-neighbor-af)# send-community
switch(config-router-neighbor-af)#
|
|
---|---|
set community |
Defines the BGP community attributes. |
show ip bgp |
Displays the BGP configuration information. |
To modify an autonomous system path (as-path) for BGP routes, use the set as-path command. To not modify the autonomous system (AS) path, use the no form of this command.
set as-path {tag | {prepend as-num[...as-num] | last-as num}}
no as-path {tag | {prepend as-num[...as-num] | last-as num}}
Autonomous system path is not modified.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Once you enter route-map configuration mode, you can enter the set command.
The only global BGP metric available to influence the best path selection is the autonomous system path length. By varying the length of the autonomous system path, a BGP speaker can influence the best-path selection by a peer further away.
By allowing you to convert the tag into an autonomous system path, the set as-path tag variation of this command modifies the autonomous system length. The set as-path prepend variation allows you to prepend an arbitrary autonomous system path string to BGP routes. Usually, the local autonomous system number is prepended multiple times, increasing the autonomous system path length.
This example shows how to convert the tag of a redistributed route into an autonomous system path:
switch(config
)# route-map test1
switch(config
-route-map)# set as-path tag
This example shows how to prepend 100 to all the routes advertised to 10.108.1.1:
switch(config
)# route-map test1
switch(config
-route-map)# match as-path 1
switch(config
-route-map)# set as-path prepend 100
switch(config
)# router bgp 64496
switch(config
-router)# neighbor 10.108.1.1 remote-as 64497
switch(config
-router-neighbor)# address-family ipv4 unicast
switch(config
-router-neighbor-af)# route-map set-as-path test1 out
To remove communities from the community attribute of an inbound or outbound update, use the set comm-list delete command. To remove a previous set comm-list delete command, use the no form of this command.
set comm-list community-list-name delete
no set comm-list
community-list-name |
Standard or expanded community list name. The name is any alphanumeric string up to 63 characters. |
No communities are removed.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
This set route-map configuration command removes communities from the community attribute of an inbound or outbound update using a route map to filter and determine the communities to be deleted. Depending upon whether the route map is applied to the inbound or outbound update for a neighbor, each community that passes the route map permit clause and matches the given community list is removed from the community attribute being received from or sent to the Border Gateway Protocol (BGP) neighbor.
Each entry of a standard community list should list only one community when used with the set comm-list delete command. For example, in order to be able to delete communities 10:10 and 10:20, you must use the following format to create the entries:
switch(config)# ip community-list 500 permit 10:10
switch(config)# ip community-list 500 permit 10:20
The following format for a community list entry, while acceptable otherwise, does not work with the set comm-list delete command:
switch(config)# ip community-list 500 permit 10:10 10:20
When both the set community community-number and set comm-list delete commands are configured in the same sequence of a route map attribute, the deletion operation (set comm-list delete) is performed before the set operation (set community community-number).
This example shows how to remove communities from the community attribute of an inbound or outbound update:
switch(config
)# route-map test1
switch(config
-route-map)# match as-path 1
switch(config
-route-map)# set comm-list list1 delete
To set the Border Gateway Protocol (BGP) communities attribute, use the set community command. To delete the entry, use the no form of this command.
set community {none | {aa:nn [...aa:nn] | additive | local-as | no-advertise | no-export}}
no set community {none | {aa:nn | additive | local-as | no-advertise | no-export}}
No BGP communities attributes exist.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
Use the route-map global configuration command and the match and set route map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route map configuration commands specify the redistribution set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
This example shows how to configure the routes that pass the autonomous system path access list 1 to have the community set to 109:02 and 33:40. Routes that pass the autonomous system path access list 2 have the community set to no-export (these routes are not advertised to any external BGP [eBGP] peers).
switch(config)#
route-map test1 10 permit
switch(config
-route-map)# match as-path 1
switch(config
-route-map)# set community 109:02 33:40
switch(config
-route-map)# exit
switch(config)#
route-map test1 20 permit
switch(config
-route-map)# match as-path 2
switch(config
-route-map)# set community no-export
This example shows how to configure the routes that pass the autonomous system path access list 1 to have the community set to 109:30. Routes that pass the autonomous system path access list 2 have the community set to local-as (the router does not advertise this route to peers outside the local autonomous system.
switch(config)#
route-map test1 10 permit
switch(config
-route-map)# match as-path 1
switch(config
-route-map)# set community 109:30 additive
switch(config
-route-map)# exit
switch(config)#
route-map test1 20 permit
switch(config
-route-map)# match as-path 2
switch(config
-route-map)# set community local-as
To set the Border Gateway Protocol (BGP) route dampening factors, use the set dampening command. To disable this function, use the no form of this command.
set dampening half-life reuse suppress max-suppress-time
no set dampening
Disabled
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the route-map global configuration command and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
When a BGP peer is reset, the route is withdrawn and the flap statistics cleared. In this instance, the withdrawal does not incur a penalty even though route flap dampening is enabled.
This example sets the half life to 30 minutes, the reuse value to 1500, the suppress value to 10000, and the maximum suppress time to 120 minutes:
switch(config)#
route-map test1 10 permit
switch(config
-route-map)# set dampening 30 1500 10000 120
To set the Border Gateway Protocol (BGP) extended communities attribute, use the set extcommunity command. To delete the entry, use the no form of this command.
set extcommunity {none | {generic {transitive | nontransitive} aa4:nn [...aa4:nn] } | additive}
no set extcommunity {none | {generic {transitive | nontransitive} aa4:nn [...aa4:nn] } | additive}
No BGP communities attributes exist.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the set extcommunity command in a route map to set the extended community attribute in a BGP route.
You must have a match clause in a route map (even if it points to a "permit everything" list) if you want to use set commands.
The set commands specify the set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
This example shows how to configure a route map that sets the extended community to 1.5:
switch(config)#
route-map test1 10 permit
switch(config
-route-map)# match as-path 1
switch(config
-route-map)# set extcommunity generic transitive 1.5
switch(config
-route-map)# exit
To remove extended communities from the extended community attribute of an inbound or outbound Border Gateway Protocol (BGP) update, use the set extcomm-list delete command. To remove a previous set extcomm-list delete command, use the no form of this command.
set extcomm-list community-list-name delete
no set extcomm-list
community-list-name |
Standard or expanded extended community list name. The name is any alphanumeric string up to 63 characters. |
No communities are removed.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the set extcomm-list delete command in a route map to delete the extended community attribute in a BGP route.
You must have a match clause in a route map (even if it points to a "permit everything" list) if you want to use set commands.
The set commands specify the set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
When you configure both the set extcommunity community-number and set ext comm-list delete commands in the same sequence of a route map attribute, the deletion operation (set extcomm-list delete) is performed before the set operation (set extcommunity community-number).
This example shows how to remove extended communities from the extended community attribute of an inbound or outbound update:
switch#
configure terminal
switch(config
)# route-map test1
switch(config
-route-map)# match as-path 1
switch(config
-route-map)# set extcomm-list list1 delete
switch(config
-route-map)#
To specify a preference value for the autonomous system path, use the set local-preference command. To delete an entry, use the no form of this command.
set local-preference number-value
no set local-preference number-value
number-value |
Preference value. Range: 0 to 4294967295. Default: 100. |
Preference value of 100 by default.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
The preference is sent only to all routers in the local autonomous system.
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
Use the route-map global configuration command and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
You can change the default preference value with the bgp default local-preference command.
This example shows how to set the local preference to 100 for all routes that are included in access list 1:
switch# configure terminal
switch(config)# route-map test1
switch(config-router)# route-map map-preference
switch(config-route-map)# match as-path 1
switch(config-route-map)# set local-preference 100
switch(config-route-map)#
To set the metric value for a routing protocol, use the set metric command. To return to the default metric value, use the no form of this command.
set metric [+ | -] bandwidth-metric
set metric bandwidth-metric [delay-metric reliability-metric load-metric mtu]
no set metric
None
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the set metric command to modify the IGRP metric values.
Note We recommend that you consult your Cisco technical support representative before changing the default value.
When you confiture the reliability-metric and the load-metric arguments, 255 means 100 percent reliability.
Use the + or - keywords to modify the existing delay metric value. You can modify only the delay metric with these keywords.
Use the route-map global configuration command and the match and set route-map configuration command to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
This example shows how to set the bandwith metric value for the routing protocol to 100:
switch# configure terminal
switch(config)# route-map set-metric
switch(config-route-map)# set metric 100
switch(config-route-map)#
This example shows how to increase the bandwith metric value for the routing protocol by 100:
switch# configure terminal
switch(config)# route-map set-metric
switch(config-route-map)# set metric +100
switch(config-route-map)#
|
|
---|---|
route-map |
Defines the conditions for redistributing routes from one routing protocol into another. |
show route-map |
Displays information about a route map. |
To set the metric type for the destination routing protocol, use the set metric-type command. To return to the default, use the no form of this command.
set metric-type {internal | type-1 | type-2}
no set metric-type {internal | type-1 | type-2}
This command is disabled by default.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the route-map global configuration command with match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
Note This command is not supported for redistributing routes into Border Gateway Protocol (BGP).
This example shows how to set the metric type of the destination protocol to OSPF external Type 1:
switch# configure terminal
switch(config)# route-map map-type
switch(config-route-map)# set metric-type type-1
switch(config-route-map)#
To set the Border Gateway Protocol (BGP) origin code, use the set origin command. To delete the entry, use the no form of this command.
set origin {egp as-num [:as-num] | igp | incomplete}
no set origin
Default origin, based on route in main IP routing table.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
This example shows how to set the origin of routes that pass the route map to IGP:
switch# configure terminal
switch(config)# route-map set_origin
switch(config-route-map)# match as-path 10
switch(config-route-map)# set origin igp
switch(config-route-map)#
To set a tag value of the destination routing protocol, use the set tag command. To delete the entry, use the no form of this command.
set tag tag-value
no set tag tag-value
tag-value |
Name for the tag. The value is an integer from 0 to 4294967295. |
If not specified, the default action is to forward the tag in the source routing protocol onto the new destination protocol.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the route-map global configuration command and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
This example shows how to set the tag value of the destination routing protocol to 5:
switch(config)# route-map test
switch(config-route-map)# set tag 5
To specify the Border Gateway Protocol (BGP) weight for the routing table, use the set weight command. To delete an entry, use the no form of this command.
set weight number
no set weight [number]
number |
Weight value. Range: 0 to 65535. |
The weight is not changed by the specified route map.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
The implemented weight is based on the first matched autonomous system path. Weights indicated when an autonomous system path is matched override the weights assigned by global neighbor commands.
This example shows how to set the BGP weight for the routes that match the autonomous system path access list to 200:
switch# configure terminal
switch(config)# route-map set-weight
switch(config-route-map)# match as-path 10
switch(config-route-map)# set weight 200
switch(config-route-map)#
To shut down an instance of the Border Gateway Protocol (BGP), use the shutdown command. To disable this function, use the no form of this command.
shutdown
no shutdown
This command has no arguments or keywords.
Enabled
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the shutdown command to disable an instance of BGP without removing the configuration.
This command requires the LAN Enterprise Services license.
This example shows how to disable BGP 64496:
switch# configure terminal
switch(config)# router bgp 64496
switch(config-router)# shutdown
switch(config-router)#
|
|
---|---|
show bgp |
Displays BGP routes. |
To configure the switch software to start storing Border Gateway Protocol (BGP) peer updates, use the soft-reconfiguration command. To not store received updates, use the no form of this command.
soft-reconfiguration inbound
no soft-reconfiguration inbound
This command has no arguments or keywords.
Disabled
Neighbor address-family configuration mode
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Entering this command starts the storage of updates, which is required to do inbound soft reconfiguration.
To use soft reconfiguration, or soft reset, without preconfiguration, both BGP peers must support the soft route refresh capability.
This example shows how to configure the soft reconfiguration on the neighbor at 192.168.0.1:
switch# configure terminal
switch(config)# router bgp 102
switch(config-router)# neighbor 192.168.0.1 remote-as 201
switch(config-router-neighbor)# address-family ipv4 unicast
switch(config-router-neighbor-af)# soft-reconfiguration inbound
switch(config-router-neighbor-af)#
To advertise the active routes to a Border Gateway Protocol (BGP) peer only, use the suppress-inactive command. To remove the restriction, use the no form of this command. To return to the default setting, use the default form of this command.
suppress-inactive
no default suppress-inactive
This command has no arguments or keywords.
BGP advertises routes to a peer as soon as they are installed in the local routing table, even if the routes are not the active routes in the table.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the suppress-inactive command to advertise only active routes to a BGP peer.
This command requires the LAN Enterprise Services license.
This example shows how to create a summary address. The path advertised for this route is an autonomous system set consisting of all elements contained in all paths that are being summarized.
switch# configure terminal
switch(config)# router bgp 64496
switch(config-router)# neighbor 192.0.2.1/8 remote-as 64497
switch(config-router-neighbor)# address-family ipv4 unicast
switch(config-router-neighbor af)#
suppress-inactive
switch(config-router-neighbor af)#
|
|
---|---|
route-map |
Creates a route map. |