SOURCECODEBD.NET

Live Experience

9.  CONFIGURING MED ATTRIBUTE USING DEFAULT-METRIC

HOW TO CONFIGURING MED ATTRIBUTE USING DEFAULT-METRIC
 
Interface IP Address Configuration 
 
R1 
 
Interface  IP Address   Subnet Mask 
S 0            1.1.1.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 
E 0            30.1.1.1       255.0.0.0
 
Task 1: 
 
Configure BGP and OSPF as per the above scenario. Redistribute OSPF into BGP and 
verify the metric values displayed in the output by default. 
 
R1 
 
Router bgp 100 
Neighbor 1.1.1.2 remote-as 100 
Network 1.0.0.0 
Network 10.0.0.0 
No synchronization 
 
R2 
 
Router ospf 1 
Network 2.2.2.1 0.0.0.0 area 0 
Network 20.0.0.0 0.255.255.255 area 0 
 
Router bgp 100 
Neighbor 1.1.1.1 remote-as 100 
Network 1.0.0.0 
No synchronization 
Redistribute ospf 1 
 
R3 
 
Router ospf 1 
Network 2.2.2.1 0.0.0.0 area 0 
Network 30.0.0.0 0.255.255.255 area 0 
 
 
Verification: 
 
R1#show ip route
 
The output displays routes 2.0.0.0 and 20.0.0.0 with a metric of ‘0’ as they are directly 
connected to R2 and when passed to R1 travel with a metric of ‘0’. 
 
Task 2
 
Configure BGP and OSPF as per the above scenario. Redistribute OSPF into BGP using 
a metric value of 5.
 
R2 
 
Router ospf 1 
Network 2.2.2.1 0.0.0.0 area 0 
Network 20.0.0.0 0.255.255.255 area 0 
 
Router bgp 100 
Neighbor 1.1.1.1 remote-as 100 
Network 1.0.0.0 
No synchronization 
Redistribute ospf 1 metric 5 
 
 
Verification: 
 
R1#show ip route
 
The output displays network 30.0.0.0 changed to metric of 5. But observe that network 
2.0.0.0 and 20.0.0.0 still remain with a metric of ‘0’ as they are not displayed as 
redistributed routes instead they are learn’t as connected routes on R2. 
 
Task 3
 
Configure BGP and OSPF as per the above scenario. Redistribute OSPF into BGP using 
a metric value of 5 and also redistribute connected routes with a metric set to 50. 
 
R2 
 
Router ospf 1 
Network 2.2.2.1 0.0.0.0 area 0 
Network 20.0.0.0 0.255.255.255 area 0 
 
Router bgp 100 
Neighbor 1.1.1.1 remote-as 100 
Network 1.0.0.0 
No synchronization 
Redistribute ospf 1 metric 5 
Redistribute connected metric 50
 
Verification: 
 
R1#show ip route
 
Task 4: 
 
Configure BGP and OSPF as per the above scenario. Redistribute OSPF into BGP and 
use the default-metric command to change the metric. 
 
R2 
 
Router ospf 1 
Network 2.2.2.1 0.0.0.0 area 0 
Network 20.0.0.0 0.255.255.255 area 0 
 
Router bgp 100 
Neighbor 1.1.1.1 remote-as 100 
Network 1.0.0.0 
No synchronization 
Redistribute ospf 1  
Default-metric 75
 
Verification: 
 
R1#show ip route 
 
The output displays network 30.0.0.0 with a metric value changed to 75.
You are here: Home / BGP / HOW TO CONFIGURING MED ATTRIBUTE USING DEFAULT-METRIC