Sunday, August 16, 2015

bgp always-compare-med and bgp deterministic-med



bgp always-compare-med 

R8

ip prefix-list routefromr1 seq 5 permit 11.11.11.11/32

route-map routefromr1 permit 10
 match ip address prefix-list routefromr1
 set metric 100
!
route-map routefromr1 permit 20

router bgp 201
 bgp asnotation dot
 neighbor 98.0.0.9 remote-as 401
 neighbor 98.0.0.9 route-map routefromr1 out

R6

ip prefix-list routefromr1 seq 5 permit 11.11.11.11/32

route-map routefromr1 permit 10
 match ip address prefix-list routefromr1
 set metric 50
!
route-map routefromr1 permit 20

router bgp 1.301
 bgp asnotation dot
 neighbor 96.0.0.9 remote-as 401
 neighbor 96.0.0.9 route-map routefromr1 out

R9

We can see there is no effect of metric in route selection as prefixes are from different AS.
We can change this behavior   by below command

R9(config)#router bgp 401
R9(config-router)#bgp always-compare-med



bgp deterministic-med

 *>i 9.9.9.9/32       16.0.0.6                50    100      0 1.301 401 i
 *                    56.0.0.6               100             0 1.301 401 i

 * i                  28.0.0.8                25    100      0 201 401 i




No comments:

Post a Comment