Home > OSPF EIGRP Redistribute Lab

OSPF EIGRP Redistribute Lab

In this GNS3 lab we will learn how to redistribute from EIGRP into OSPF and vice versa. Below is the topology used in this lab:

OSPF_EIGRP_Redistribute_topology.jpg

The purposes of this sim are:
+ Redistribute from EIGRP to OSPF and vice versa.
+ Traffic from R1 to R4 must go through the best path (after redistribution, traffic from R1 will go R1 -> R2 -> R4; this is not the most optimal path as it must go through 2 serial links. The best path is R1 -> R2 -> R3 -> R4 and we have to configure the routers to complete this task.)

You can download the initial configuration of this lab here: http://www.digitaltut.com/download/EIGRP_OSPF_Redistribute_initial_configs.zip.

Initial Configurations (which have not had the redistribute command yet):

R1(config)#interface s0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#router eigrp 100
R1(config-router)#network 192.168.1.0
R2(config)#interface s0/1
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#interface f1/0
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#interface s0/0
R2(config-if)#ip address 192.168.3.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#network 192.168.1.0
R2(config-router)#network 192.168.2.0
R2(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#network 192.168.3.0 0.0.0.255 area 24
R3(config)#interface f0/0
R3(config-if)#ip address 192.168.2.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#interface f1/0
R3(config-if)#ip address 192.168.4.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#router eigrp 100
R3(config-router)#network 192.168.2.0
R3(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#network 192.168.4.0 0.0.0.255 area 34

R4(config)#interface s0/0
R4(config-if)#ip address 192.168.3.4 255.255.255.0
R3(config-if)#interface f1/0
R3(config-if)#ip address 192.168.4.4 255.255.255.0
R4(config-if)#no shut
R3(config-if)#interface loopback0
R3(config-if)#ip address 172.16.100.1 255.255.255.0
R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#network 192.168.3.0 0.0.0.255 area 24
R4(config-router)#network 192.168.4.0 0.0.0.255 area 34
R4(config-router)#network 172.16.100.0 0.0.0.255 area 0

After finishing the initial commands above, the routing tables of each router are shown below:

R1:
OSPF_EIGRP_Redistribute_init_R1_show_ip_route.jpg

R2:
OSPF_EIGRP_Redistribute_init_R2_show_ip_route.jpg

R3:
OSPF_EIGRP_Redistribute_init_R3_show_ip_route.jpg

R4:
OSPF_EIGRP_Redistribute_init_R4_show_ip_route.jpg

First on R2 we will redistribute routes from EIGRP to OSPF:

R2(config)#router ospf 1
R2(config-router)#redistribute eigrp 100 metric-type 1 subnets

OSPF_EIGRP_Redistribute_EIGRP_to_OSPF_R4_show_ip_route.jpg

We can see two “O E1” routes that are being redistributed into OSPF. Now we will redistribute OSPF to EIGRP on R2:

R2(config)#router eigrp 100
R2(config-router)#redistribute ospf 1 metric 1544 2000 255 1 1500

The routing table of R1 is now learned routes to networks 172.16.100.0/24, 192.168.4.0/24 & 192.168.3.0/24 which are advertised by OSPF:

OSPF_EIGRP_Redistribute_OSPF_to_EIGRP_R1_show_ip_route.jpg

Note: The routing table of R3 is still the same because R3 had all routes advertised by OSPF. Also, R1 can now ping 172.16.100.1 successfully.

Let’s do redistribution on R3:

Redistribute EIGRP to OSPF on R3:

R3(config)#router ospf 1
R3(config-router)#redistribute eigrp 100 metric-type 1 subnets

Now the routing table of R4 changes a bit:

OSPF_EIGRP_Redistribute_EIGRP_to_OSPF_on_R3_R4_show_ip_route.jpg

As you can see, now the external routes 192.168.1.0 & 192.168.2.0 are learned via 192.168.4.3, not 192.168.3.2.

The last thing we do is to redistribute OSPF to EIGRP on R3:

R3(config)#router eigrp 100
R3(config-router)#redistribute ospf 1 metric 10000 100 255 1 1500

Now R2 (and R1) will use which route to go to 172.16.100.1? Let’s check the routing table of R2:

OSPF_EIGRP_Redistribute_OSPF_to_EIGRP_R2_show_ip_route.jpg

So R2 still sends traffic to 172.16.100.1 via the serial link between R4 & R2. This link is less optimal than the Ethernet link between R2 and R3. If we wish R2 to send traffic via the Ethernet link between R2 and R3, use this command:

R2(config-router)#distance eigrp 90 105

This command sets the Administrative Distance of EIGRP external route to 105, which is smaller than an OSPF route (110) so the Ethernet link between R2 and R3 will be preferred to the link between R2 & R4.

After that, the route to 172.16.100.1 is re-learned via 192.168.2.3 as an EIGRP external route.

OSPF_EIGRP_Redistribute_R2_distance_eigrp_show_ip_route.jpg

A traceroute command on R1 also confirms this:

OSPF_EIGRP_Redistribute_R1_traceroute.jpg

You can download the final configuration of this lab here: http://www.digitaltut.com/download/EIGRP_OSPF_Redistribute_final_configs.zip.

Comments
  1. No comments yet.
  1. No trackbacks yet.