325
Cisco Nexus 3548 Switch NX-OS Unicast Routing Command Reference
OL-27852-01
Chapter Unicast Routing Commands
set as-path
set as-path
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}}
Syntax Description
Command Default Autonomous system path is not modified.
Command Modes Route-map configuration mode
Command History
Usage Guidelines 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 command requires the LAN Enterprise Services license.
Examples This example shows how to convert the tag of a redistributed route into an autonomous system path:
switch# configure terminal
switch(config)# route-map test1
switch(config-route-map)# set as-path tag
switch(config-route-map)#
This example shows how to prepend 100 to all the routes advertised to 10.108.1.1:
tag Converts the tag of a route into an autonomous system path. Applies
only when redistributing routes into Border Gateway Protocol (BGP).
prepend as-num Appends the specified AS number to the autonomous system path of
the route that is matched by the route map. Applies to both inbound
and outbound BGP route maps. Range: 1 to 65535. You can configure
more than on AS number.
last-as num Prepends the last AS numbers to the as-path. Range: 1 to 10.
Release Modification
5.0(3)A1(1) This command was introduced.