Monday, December 8, 2008

Internetwork Expert WB VOL 1 - BGP Lab 9

9)BGP Bestpath Selection – MED

Objective: Configure the BGP MED in AS 1 so that traffic from R3’s Ethernet segment going to VLAN 5 is first sent to R1.

Ok, this above objective is slightly tricky! Actually before I give my solution for this problem I would like to throw some quick light on concept of WEIGHT, LOCAL_PREFERENCE and MED.

Now this is what, WEIGHT is used for: When we have two paths/links ending up on a single router, and you want to influence the way your traffic leaves your AS from this router then you can make use of the WEIGHT attribute. Higher the value of WEIGHT, the more likelihood of that path being chosen or in other words higher the WEIGHT better it is.

LOCAL PREFERENCE, is just like WEIGHT ..the only difference here is that in case of WEIGHT its scope was restricted to a router which in case of LOCAL PREFERENCE is restricted to an entire AS! So, when we have multi-homed AS we can change the LOCAL PREFERENCE attribute to influence how traffic leaves our AS. Again higher the value of LOCAL PREFERENCE better it is.

In case of MED, it is an attribute that you use to manipulate how traffic enters your multi-homed AS! Lower value of MED the better it is, and scope is only limited to an AS.

Now, let us carefully read our objective ..What it is asking you is to influence the way traffic leaves AS 2 and you know you need to achieve this by using MED, but what you can’t do is change this value of MED on the routers of AS 2. Hence we change the value of MED on AS 1 routers and then have them send these changes in the outbound updates. This is the config that was done on R5 and R4, actually its really not required on R4 ..but no harm with some extra configuration and getting in lines with the objective.

On R5,

access-list 1 permit 155.1.37.0 0.0.0.255

route-map NEW_MED permit 10
match ip address 1
set metric 100

router bgp 1
neighbor 155.1.0.3 route-map NEW_MED out
end

And on R4,

access-list 1 permit 155.1.37.0 0.0.0.255

route-map NEW_MED permit 10
match ip address 1
set metric 50

router bgp 1
neighbor 155.1.146.1 route-map NEW_MED out
end

Right, now on to the next lab.

No comments: