Locations of visitors to this page Perfect dream will never let you sleep in peace...untill you make it real: BGP MED Multi Exit Discriminator

Saturday, April 30, 2011

BGP MED Multi Exit Discriminator

    ----->R3----->
R4                             R1
    ----->R2----->

R1 is company router is AS 100 and other routers are ISP routers with AS 200

In this scenario, lets say R1 is advertising 2 networks. 10.1.0.0 and 10.2.0.0. With all defaults, R4 would choose R2  (2.2.2.2 is specified as router ID of R2 and 3.3.3.3 for R3) to reach both networks.  check the below link for best path selection.

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

Now with MED you can let
R4 to choose R3 to reach R1 for 10.1.0.0
&
R4 to choose R2 to reach R1 for 10.2.0.0

on router R1


router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 10.1.0.0 mask 255.255.0.0
 network 10.2.0.0 mask 255.255.0.0
 neighbor 192.168.20.2 remote-as 200
 neighbor 192.168.20.2 route-map sMEDR2 out
 neighbor 192.168.30.2 remote-as 200
 neighbor 192.168.30.2 route-map sMEDR3 out
 no auto-summary
!
access-list 2 permit 10.2.0.0 0.0.255.255
<create access list for 10.1.0.0>
!
route-map sMEDR2 permit 10
 match ip address 2
 set metric 100
!
route-map sMEDR2 permit 20
 match ip address 1
 set metric 200
!
<create further route maps and set metric as 100>




No comments:

Post a Comment