Wednesday, September 7, 2011

LAB: BGP BestPath Selection - Local Preference

Use the local-preference in R6 so that traffic from AS 100 going to AS 254
transits through AS 300.

refer to the network diagram from post.

R6
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 155.1.146.0 mask 255.255.255.0
 aggregate-address 155.1.0.0 255.255.0.0 summary-only
 neighbor 54.1.1.254 remote-as 54
 neighbor 155.1.67.7 remote-as 300
 neighbor 155.1.67.7 route-map FROM_SW1 in
 neighbor 155.1.146.1 remote-as 100
 no auto-summary
!
ip as-path access-list 1 permit _254$
!
ip prefix-list TO_BB1 seq 5 permit 54.1.1.0/24
!
route-map FROM_SW1 permit 10
 match as-path 1
 set local-preference 200
!
route-map FROM_SW1 permit 100
!

verification:


Rack1R6#show ip bgp regexp _254$
BGP table version is 24, 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 ?


Rack1R1#show ip bgp regexp _254$
BGP table version is 21, 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 254 ?
*>i220.20.3.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.13.3                             0 200 254 ?
*>i222.22.2.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.13.3                             0 200 254 ?

Rack1R4#show ip bgp regexp _254$
BGP table version is 20, 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 254 ?
*>i220.20.3.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.45.5                             0 200 254 ?
*>i222.22.2.0       155.1.67.7               0    200      0 300 200 254 ?
*                   155.1.45.5                             0 200 254 ?

No comments:

Post a Comment