Core Issue
The only global Border Gateway Protocol (BGP) metric available to influence the best path selection is the Autonomous System (AS) path length.
Resolution
To prepend an arbitrary AS path string to BGP routes, issue the set as-path prepend command.
This example prepends 100 100 100
to all the routes advertised to 10.108.1.1
:
route-map set-as-path
match as-path 1
set as-path prepend 100 100 100
!
router bgp 100
neighbor 10.108.1.1 route-map set-as-path out
For more information, refer to the set as-path section of BGP Commands.