Tuesday, September 27, 2011

LAB: BGP BestPath Selection - AS Path Ignore

- Ensure that traffic from AS 200 to AS 54 prefixes takes path across AS 300.
- Do not use AS-PATH prepending to accomplish this.

 

configuration:


R2:
router bgp 200
bgp bestpath as-path ignore

R3:
router bgp 200
bgp bestpath as-path ignore

R5:
router bgp 200
bgp bestpath as-path ignore
R1:
ip as-path access-list 1 permit _54$
!
route-map TO_R3 permit 10
match as-path 1
set origin incomplete
!
route-map TO_R3 permit 100
!
router bgp 100
neighbor 155.1.13.3 route-map TO_R3 out

R4:
ip as-path access-list 1 permit _54$
!
route-map TO_R5 permit 10
match as-path 1
set origin incomplete
!
route-map TO_R5 permit 100
!
router bgp 100
neighbor 155.1.45.5 route-map TO_R5 out

SW1:
no ip as-path access-list 1
ip as-path access-list 1 permit _54$
!
route-map TO_R3 permit 10
match as-path 1
set origin igp
!
route-map TO_R3 permit 100
!
router bgp 300
neighbor 155.1.37.3 route-map TO_R3 out

SW2:
router bgp 200
bgp bestpath as-path ignore

SW4:
router bgp 200
bgp bestpath as-path ignore

verification:

Rack1R3#show ip bgp regexp _54$
BGP table version is 36, local router ID is 150.1.3.3
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
*> 28.119.16.0/24   155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
*                   155.1.13.1                             0 100 54 ?
*> 28.119.17.0/24   155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
*                   155.1.13.1                             0 100 54 ?
*> 114.0.0.0        155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
*                   155.1.13.1                             0 100 54 ?
*> 115.0.0.0        155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
*                   155.1.13.1                             0 100 54 ?
*> 116.0.0.0        155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
*                   155.1.13.1                             0 100 54 ?
*> 117.0.0.0        155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
   Network          Next Hop            Metric LocPrf Weight Path
*                   155.1.13.1                             0 100 54 ?
*> 118.0.0.0        155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
*                   155.1.13.1                             0 100 54 ?
*> 119.0.0.0        155.1.37.7                             0 300 100 54 i
* i                 155.1.45.4               0    100      0 100 54 i
*                   155.1.13.1                             0 100 54 ?

BGP table version is 37, local router ID is 150.1.5.5
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
*>i28.119.16.0/24   155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?
*>i28.119.17.0/24   155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?
*>i114.0.0.0        155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?
*>i115.0.0.0        155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?
*>i116.0.0.0        155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?
*>i117.0.0.0        155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?
*>i118.0.0.0        155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?
*>i119.0.0.0        155.1.37.7               0    100      0 300 100 54 i
*                   155.1.45.4                             0 100 54 ?

No comments:

Post a Comment