Home > Redistribute EIGRP and OSPF – GNS3 Lab

Redistribute EIGRP and OSPF – GNS3 Lab

January 18th, 2012 in Basic Labs Go to comments

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:


First we assign IP addresses to all interfaces on the routers. Notice the 4th octet of the IP address of each router has the same value of the name of that router (for example R2 has 2 interfaces &; R3 has 2 interfaces &…)

Assign IP addresses to interfaces:

R1(config)#interface f0/0
R1(config-if)#ip address
R1(config-if)#no shutdown
R4(config-if)#interface s1/0
R4(config-if)#ip address
R4(config-if)#no shutdown
R4(config)#interface f0/0
R4(config-if)#ip address
R4(config-if)#no shutdown
R2(config)#interface f0/1
R2(config-if)#ip address
R2(config-if)#no shutdown
R2(config-if)#interface f0/0
R2(config-if)#ip address
R2(config-if)#no shutdown
R5(config)#interface f0/0
R5(config-if)#ip address
R5(config-if)#no shutdown
R5(config-if)#interface f0/1
R5(config-if)#ip address
R5(config-if)#no shutdown
R3(config)#interface f0/0
R3(config-if)#ip address
R3(config-if)#no shutdown
R3(config-if)#interface s1/0
R3(config-if)#ip address
R3(config-if)#no shutdown
R6(config)#interface f0/0
R5(config-if)#ip address
R5(config-if)#no shutdown

Turn on EIGRP on R1, R2, R3, R4 and turn on OSPF on R4, R5, R6:

R1(config)#router eigrp 1
R4(config)#router eigrp 1
R4(config-router)#no auto-summary
R4(config)#router ospf 1
R4(config-router)#network area 0
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R5(config)#router ospf 1
R5(config-router)#network area 0
R5(config-router)#network area 0
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R6(config)#router ospf 1
R6(config-router)#network area 0

We should check the routing table of R4 (the border router) to make sure all the routes are learned:


Redistribute EIGRP into OSPF

The routing table of R4 contains all the routes in the topology so now we will redistribute EIGRP into OSPF with the command:

R4(config)#router ospf 1
R4(config-router)#redistribute eigrp 1

After entering these commands we will see a warning from R4

% Only classful networks will be redistributed

Ok, maybe our EIGRP routes have been redistributed so we should check the routing table of R5:


What? We don’t see anything we expect in the output of R5. No redistributed routes here. All are only directly connected routes!

Wait a minute! We have been warned that “only classful networks will be redistributed”. We wish to see networks, & redistributed into OSPF but they are subnets, not “classful” networks. Please notice that a “classful” network here means network with the default major subnet mask (for example:;;…). To prove this, we will create loopback0 interface on R2 with the IP address

R2(config)#interface loopback0
R2(config-if)#ip address
//Advertise this network
R2(config)#router eigrp 1

Now we check the routing table of R5 again, the network has been redistributed successfully with a O E2 (by default, a route redistributed into OSPF will have type E2 with a default metric of 20):


It is not necessary but we can check the OSPF database of R5, notice that we only see a redistributed route (Type-5) of


Therefore if we want to redistribute all subnets into OSPF, use the command:

R4(config)#router ospf 1
R4(config-router)#redistribute eigrp 1 subnets

(The keyword subnets is only used when we redistribute from another routing protocol into OSPF)

Now all the routes appear in the routing table of R5


Ok, R5 got all the routes in EIGRP domain so we may want to ping them to test the connection. So we ping from R5 to R1:


Now the ping is not successful. We can check where the packets have been dropped with the traceroute command:


The last good router is R4, which is the border router for redistribution. Therefore we can realize that the ping is not successful because OSPF knows how to route packets but EIGRP routers don’t know where to send reply to -> We need to redistribute OSPF to EIGRP.

Redistribute OSPF into EIGRP

Unlike OSPF, we must specify five metrics when redistributing into EIGRP: bandwidth, delay, reliability, load, and MTU, respectively. Therefore our redistribute command will be like this:

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

Now R1 has all the OSPF routes and they are marked with D EX:


Now all routers can ping each other.

In conclusion, from this lab we learned:
+ We should use the keyword “subnets” when redistributing into OSPF; otherwise only classful networks will be redistributed.
+ The ping will not work if we only redistribute “one-way” because the reply packets can not be sent.
+ Redistribution into EIGRP requires the metrics to be defined. The only exception is when redistributing between IGRP & EIGRP, we don’t need to assign the metrics because the metrics of these 2 routing protocols are the same.

  1. Toxkalcan
    February 8th, 2017

    Why did we use metrics of fastethernet 0/0 while redistributing ospf to eigrp ?

    I believe we should have checked the metrics of serial 1/0 of R4???
    I redistributed as 1544, 2000,255,1,1500 ???

  2. Confuse guy
    February 14th, 2018

    Toxkalcan you need to use the metric of the interface sitting in OSPF domain.

    The objective is to convert the metric of OSPF into the EIGRP domain

  3. Anonymous
    April 15th, 2021

    Tox …. thats right … you redistribute using the metrics of the last ospf interface

  1. No trackbacks yet.