Friday, September 23, 2011

LAB: BGP Bestpath Selection - MED

- Using MED configure AS 100 so that traffic from AS 200 going to AS 54 enters via the link between R4 and R5.


  
Configuration:

R1:
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 155.1.13.3 remote-as 200
 neighbor 155.1.13.3 route-map TO_R3 out
 neighbor 155.1.146.4 remote-as 100
 neighbor 155.1.146.4 route-reflector-client
 neighbor 155.1.146.6 remote-as 100
 neighbor 155.1.146.6 route-reflector-client
 no auto-summary
!
ip as-path access-list 1 permit _54$
!
!
route-map TO_R3 permit 10
 match as-path 1
 set metric 1000
!
route-map TO_R3 permit 100


R4:
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 155.1.45.5 remote-as 200
 neighbor 155.1.45.5 route-map TO_R5 out
 neighbor 155.1.146.1 remote-as 100
 neighbor 204.12.1.254 remote-as 54
 no auto-summary
!
!        
no ip http server
no ip http secure-server
!
!
route-map TO_R5 permit 10
 match as-path 1
 set metric 100
!
route-map TO_R5 permit 100

verification:

Rack1R2#show ip bgp regexp _54$
BGP table version is 39, local router ID is 150.1.2.2
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.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i
*>i28.119.17.0/24   155.1.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i
*>i114.0.0.0        155.1.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i
*>i115.0.0.0        155.1.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i
*>i116.0.0.0        155.1.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i
*>i117.0.0.0        155.1.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i
*>i118.0.0.0        155.1.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i
*>i119.0.0.0        155.1.45.4             100    100      0 100 54 i
* i                 155.1.45.4             100    100      0 100 54 i

Rack1R5#show ip bgp regexp _54$
BGP table version is 23, 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
*> 28.119.16.0/24   155.1.45.4             100             0 100 54 i
*> 28.119.17.0/24   155.1.45.4             100             0 100 54 i
*> 114.0.0.0        155.1.45.4             100             0 100 54 i
*> 115.0.0.0        155.1.45.4             100             0 100 54 i
*> 116.0.0.0        155.1.45.4             100             0 100 54 i
*> 117.0.0.0        155.1.45.4             100             0 100 54 i
*> 118.0.0.0        155.1.45.4             100             0 100 54 i
*> 119.0.0.0        155.1.45.4             100             0 100 54 i


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

No comments:

Post a Comment