SOURCECODEBD.NET

Live Experience

10. MED ATTRIBUTE

HOW TO MED ATTRIBUTE CONFIGURATION
 
Interface IP Address Configuration 
 
R1 
 
Interface  IP Address   Subnet Mask 
S 0            1.1.1.1          255.0.0.0 
S 1            3.3.3.1          255.0.0.0 
E 0          10.1.1.1         255.0.0.0 
 
R2 
 
Interface  IP Address   Subnet Mask 
S 0            1.1.1.2          255.0.0.0 
S 1            2.2.2.1          255.0.0.0 
E 0            20.1.1.1        255.0.0.0 
  
R3 
 
Interface  IP Address   Subnet Mask 
S 0            2.2.2.2          255.0.0.0 
S 1            3.3.3.2          255.0.0.0 
E 0           30.1.1.1        255.0.0.0
 
Task 1: 
 
All ingress (incoming) traffic to AS 200 should use the path through R3 using the MED 
attribute. Configure the MED on R1 to 100 and Configure the MED on R3 to 50. Lower 
MED will be preferred. 
 
R1 
 
Access-list 1 permit 10.0.0.0 
0.255.255.255 
 
Route-map list 1 permit 10 
Match ip add 1 
Set metric 200 
 
Route-map list 1 permit 20 
Set metric 100 
 
Router bgp 100 
Neighbor 1.1.1.2 route-map list 1 out
 
R3 
 
Access-list 1 permit 30.0.0.0 
0.255.255.255 
 
Route-map list 1 permit 10 
Match ip add 1 
Set metric 50 
 
Route-map list 1 permit 20 
Set metric 100 
 
Router bgp 100 
Neighbor 2.2.2.1 route-map list 1 out 
 
Verification: 
 
R2#show ip route
 
The output displays that network 10.0.0.0 & 30.0.0.0 are learnt via 2.2.2.2 because of the 
lowest MED value set to this path. 
 
R2#show ip bgp 10.0.0.0 
 
R2#show ip bgp 30.0.0.0
 
The output displays best path 2.2.2.2 with a metric 50 lower than other path.
You are here: Home / BGP / HOW TO MED ATTRIBUTE CONFIGURATION