DGS-6604
m
set as-path
CLI Reference Guide
549
set as-path
Use this command to modify an autonomous system path for BGP routes. To
delete an entry, use the
no
form of this command.
set as-path prepend
AS-NUMBER-LIST
no set as-path prepend
AS-NUMBER-LIST
Default
Disabled
Command Mode
Route-map configuration
Usage Guideline
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 to a peer
further away.
The
set as-path prepend
variation allows an arbitrary autonomous system path
string to be pre-pended to BGP routes. Usually the local autonomous system
number is pre-pended multiple times, increasing the autonomous system path
length.
When as-path is not modified by the route map, by default, the local AS will be
pre-pended in the access list.
Example
This example shows how to set the as-path list 1, 10, 100, 200 with route map
entry myPolicy:
Verify the settings by entering the
show route-map
command.
Syntax Description
AS-NUMBER-LIST
Appends the string following the keyword pre-pended to the autonomous system
path of the route, that is matched by the route map. Applies to inbound and
outbound BGP route maps.
It can specify an AS number or a list of AS number. AS number <1-4294967295>
or <1.0-65535.65535>
Switch(config)# route-map myPolicy permit 1
Switch(config-route-map)#set as-path prepend 1 10 100 200