Saturday, April 2, 2011

Lab 99 - BGP Path Selection using AS-Prepending

Prerequisites: CCNP level skills.

Topology

Note!
All routers are configured as per topology diagram (pic. 1) and loopback advertised into BGP.
Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure BGP in AS 40, so that R2 prefers path through AS 13 towards 172.16.104.0/24.

Lab Solution


Task 1
Configure BGP in AS 40, so that R2 prefers path through AS 13 towards 172.16.104.0/24.

Pic. 2 - R2's BGP Table.

Notice!
R2 prefers shorter path (through AS 40) to longer one (AS 13 and AS 40)

R4 Configuration:
!
ip prefix-list Lo0 seq 5 permit 172.16.104.0/24
!
route-map PREPEND permit 10
 match ip address prefix-list Lo0
 set as-path prepend 40 40 40
!
route-map PREPEND permit 999
!
router bgp 40
 no synchronization
 bgp router-id 172.16.104.4
 bgp log-neighbor-changes
 network 172.16.104.0 mask 255.255.255.0
 network 172.16.144.0 mask 255.255.255.0
 neighbor 10.1.14.1 remote-as 13
 neighbor 10.1.24.2 remote-as 20
 neighbor 10.1.24.2 route-map PREPEND out
 no auto-summary
!

Verification:
Pic. 3 - R2's BGP Table.