Thursday, September 22, 2011

LAB: BGP BestPath Selection - AS Path Prepend

- Using AS-Path Prepending, configure AS 200 so that traffic from AS 100 going to AS 254 enters via the link to AS 300.


configuration:

R3
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 neighbor 155.1.0.5 remote-as 200
 neighbor 155.1.13.1 remote-as 100
 neighbor 155.1.13.1 route-map TO_R1 out
 neighbor 155.1.23.2 remote-as 200
 neighbor 155.1.23.2 route-reflector-client
 neighbor 155.1.37.7 remote-as 300
 neighbor 155.1.58.8 remote-as 200
 neighbor 155.1.58.8 route-reflector-client
 neighbor 155.1.108.10 remote-as 200
 neighbor 155.1.108.10 route-reflector-client
 no auto-summary
!
ip as-path access-list 1 permit _254$
!
!
route-map TO_R1 permit 10
 match as-path 1
 set as-path prepend 200 200 200

R5:
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 neighbor 155.1.0.2 remote-as 200
 neighbor 155.1.0.2 route-reflector-client
 neighbor 155.1.23.3 remote-as 200
 neighbor 155.1.45.4 remote-as 100
 neighbor 155.1.45.4 route-map TO_R4 out
 neighbor 155.1.58.8 remote-as 200
 neighbor 155.1.58.8 route-reflector-client
 neighbor 155.1.108.10 remote-as 200
 neighbor 155.1.108.10 route-reflector-client
 no auto-summary
!
ip as-path access-list 1 permit _254$
!
!
route-map TO_R4 permit 10
 match as-path 1
 set as-path prepend 200 200 200


verification

Rack1R6#show ip bgp reg
Rack1R6#show ip bgp regexp _254$
BGP table version is 23, local router ID is 150.1.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 205.90.31.0      155.1.67.7                    200      0 300 200 254 ?
*> 220.20.3.0       155.1.67.7                    200      0 300 200 254 ?
*> 222.22.2.0       155.1.67.7                    200      0 300 200 254 ?

Rack1R4#show ip bgp regexp _254$
BGP table version is 28, local router ID is 150.1.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i205.90.31.0      155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.45.5                             0 200 200 200 200 254 ?
*>i220.20.3.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.45.5                             0 200 200 200 200 254 ?
*>i222.22.2.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.45.5                             0 200 200 200 200 254 ?

Rack1R1#show ip bgp regexp _254$
BGP table version is 29, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i205.90.31.0      155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.13.3                             0 200 200 200 200 254 ?
*>i220.20.3.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.13.3                             0 200 200 200 200 254 ?
*>i222.22.2.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.13.3                             0 200 200 200 200 254 ?

No comments:

Post a Comment