AS-PATH Prepending
The objective is to influence the best path selection of
global BGP metrics, in our topology its AS 2 – AS 5. In R5 reaching the AS 21 21.21.21.0 network
is via R3 (AS2) which is only 64 Kbps. Manipulating the AS-PATH attribute in R2
will influence R5 to use the path going to R6.
Current best path without AS path attribute manipulation.
In R5 the best path to reach 21.21.21.0/24 network is via
the next hop R3 (23.23.23.3) only 2 hops away.
Now let’s apply the route-map in R2 to influence R5 and
other AS’s to use R6 as the next hop.
R2
router bgp 1
no synchronization
bgp
log-neighbor-changes
network 21.21.21.0
mask 255.255.255.0
neighbor
21.21.21.1 remote-as 1
neighbor
22.22.22.3 remote-as 2
neighbor 22.22.22.3 route-map
prepend out
!
route-map prepend permit 10
set as-path prepend 1 1
!
Verification:
Now the preferred path is changed to R6 (24.24.24.6) as
the best path earlier is now showing an AS-PATH of 2 1 1 1 with the additional
prepended path 1 1.
No comments:
Post a Comment