Friday 1 July 2011

AS-path prepending (BGP)


AS-path prepending is the manipulation of the BGP AS-path attribute beyond the insertion of local AS number on outgoing EBGP updates. Extra AS-numbers are inserted (prepended) at the beginning of AS-path, just after the local AS-number.
Cisco IOS supports inbound and outbound AS-path prepending on EBGP sessions. AS-path prepending does not work on IBGP sessions.
Outbound AS-path prepending can be used as the last-resort mechanism to influence global BGP routing policies in BGP multi-homing scenarios where all other methods (Multi-exit Discriminator or Local preference manipulation through BGP communities) don’t work due to lack of upstream ISP’s support or due to the wide difference in upstream ISP’s connectivity to the internet core.
router bgp 65000
no synchronization
bgp log-neighbor-changes
network 10.7.1.0 mask 255.255.255.0
neighbor 10.0.1.2 remote-as 64800
neighbor 10.0.1.6 remote-as 64800
neighbor 10.0.1.6 route-map prepend out
!
route-map prepend permit 10
 set as-path prepend 65000 65000 65000


router bgp 64800
no synchronization
bgp log-neighbor-changes
neighbor 10.0.1.1 remote-as 65000
neighbor 10.0.1.1 route-map prependIn in
neighbor 10.2.0.2 remote-as 64800
!
route-map prependIn permit 10
set as-path prepend last-as 2

No comments:

Post a Comment