How to Configure Redistribution Between EIGRP and OSPF

Introduction

Normally, large enterprises run various routing protocols in their organization to meet client requirements. Each client is running a different type of routing protocol. However, a problem of disconnectivity arises when different types of routing protocols operate in the same autonomous system. To solve this problem, we use redistribution, which connects different routing protocols in the same autonomous system. For example, in this blog, we will explore the redistribution between EIGRP and OSPF.

Lab topology for Redistribution Between EIGRP and OSPF

The lab consists of three routers. R1 is running OSPF, while R3 is running EIGRP. However, R2 is running both the routing protocols, EIGRP and OSPF. R2 has two interfaces: Fastethernet 0/0 and Fastethernet 0/1. The Fast Ethernet 0/0 is advertised in OSPF area 0, while Fastehternet 0/1 is advertised in EIGRP.

Redistribution between EIGRP and OSPF

Configure Basic IP configuration and run EIGRP and OSPF

List routing table of R1, R2 and R3

Ping the routers to check the connectivity

R1 is pinging its directly connected and OSPF domain routes, but it failed to ping 2.0.0.0/8 network. Running OSPF on R1 and R2

run ospf on R1 and R2

Running EIGRP on R2 and R3

run EIGRP  on R2 and R3

Show Routing Table of R1, R2 and R3

show ip route of all routers

Finally, ping the remote routers from R1;

 ping from R1

R1 is now pinging the 192.168.21.0 network, but it still doesn’t ping the 2.0.0.0 network.

So, we will configure redistribution on R2 because it has both routing protocols: (i) OSPF and (ii) EIGRP.

First, redistribute EIGRP into OSPF and redistribute OSPF into EIGRP.

Redistribute EIGRP to OSPF

R2(config)#router ospf 1

R2(config-router)#redistribute eigrp 1 metric 111 subnets  

The one or 1 in “redistribute eigrp 1” is an EIGRP autonomous system number. Similarly, “metric 111”, is a metric value of EIGRP routes, when it will enter into OSPF domain. We used “subnets” at the end of the command to advertise all the EIGRP routes. If we don’t use it at last in the command, then all the EIGRP routes will act as a classful network.

Redistribute OSPF to EIGRP

R2(config)#router eigrp 1

R2(config-router)#redistribute ospf 1 metric 1 1 1 1 1

We defined the redistribute ospf 1 to redistribute ospf 1 into EIGRP with the metric values 1 1 1 1 1. The first 1 defines bandwidth. The 2nd ‘1’, represents delay, lower the delay, result will be higher of the metric value. Similarly, the 3rd, 4th, and 5th 1 represent load, reliability, and MTU respectively

show ip route after redistribution

The EIGRP routes successfully reached R1 as OE2, with the metric value 111. 192.168.21.0/24 has been reached to R1 as ‘o’ because this route is inside the OSPF domain. Its metric value is 2. Why 2? Because we know that the Fast Ethernet metric value in the OSPF domain is 1. As it is away from R1, two hops away; its metric value is 2.

Similarly, R2 does not have external routes. Because R2 runs both routing protocols, it accepts no external routes.

On R3, which runs only EIGRP, R3 accepts OSPF routes as DEX. It marks 192.168.22.0/24 as ‘D’ because it is inside the EIGRP autonomous system.

Ping R2 and R3 from R1

 ping from R1

R1 pings each route on R2 and R3, which shows the successful redistribution of OSPF to EIGRP.

Also ping R1 from R3

In the same way, R3 pings R1 routes.

How to change OSPF metric-type

If you want to change the metric type from E2 to E1, as shown in the screenshot below,

 show ip route of R1 for E2

Change the metric-type form E2 to E1 as shown below;

Change E2 to E1

The metric-type has been changed from E2 to E1.

 verify the E1

How to change the OSPF metric value

We have set the metric value of routes as 111 in the previous examples during EIGRP to OSPF redistribution. You can set its value other than 111 as;

change ospf metric value

Verify the result on R1;

show ip route on R1 for metric 50

The value of the metric has been changed from 111 to 50. We have noted that the metric type reversed to its original value, “E2”. Because when we don’t mention E1 in the command, it takes its default value, E2. We will explicitly define E1 in the command as shown below;

change metric-type

Verify the configuration on R1;

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *