Path Manipulation via EIGRP and OSPF Redistribution

img 569bbc6439b7b

On IOSV1 we have two networks that we need to reach from IOSV4.

1.1.1.0/24

1.1.2.0/24

1.1.3.0/24

The link between IOSV2 and IOSV4 is 10.0.3.0/30

The link between IOSV3 and IOSV 4 is 10.0.4.0/30

The situation: Our company runs OSPF, and we just acquire

d another company that runs EIGRP.

We are keeping their topology and merging their network into ours. We put in two border routers

For high availability, however now we risk suboptimal routing due to redistributing networks in two places!

What can we do? We have 4 options:

  1. Redistribute with a higher or lower metric than the default
  2. Redistribute with a different metric type (in our case redistribute as OSPF E1 instead of E2, E2 is more preferred regardless of metric)
  3. Summarize the route at one router (a more exact match is preferred regardless of metric)
  4. Filter what networks we distribute at one router

 

First let’s setup the redistribution points on IOSV2 and IOSV3.

IOSV2#

Router(config-router)#redistribute eigrp 1 subnets

Router(config-router)#redistribute ospf 1 metric 100000 10 255 1 1500

IOSV3:

Router(config-router)#redistribute eigrp 1 subnets

Router(config-router)#redistribute ospf 1 metric 100000 10 255 1 1500

Now let’s check IOSV4 to confirm he can see those three networks.

img 569bbc73cee0d

Note : network 10.0.3.0/30 is the link between IOSV2 and IOSV4

Great, they showed up as OSPF External type 2 routes, they prefer the path of IOSV2.

Let’s manipulate the path 4 different ways, we want these routes to go over the link to IOSV3 instead.

First lets redistribute with a lower metric from IOSV3 to have this path become preferred.

IOSV3#

Router(config-router)#redistribute eigrp 1 subnets metric 10

In the above command I have told OSPF to redistribute EIGRP routes from AS 1 with a metric of 10, which is lower than the OSPF default of 20. Let’s confirm on IOSV4 that he prefers network 10.0.4.0/30

img 569bbc8002cbb

Perfect! Now if the link between IOSV3 & 4 goes down, we still have a redundant path via IOSV2. Let’s check the OPSF database to confirm.

img 569bbc8c77c43

 

We have LSA info for these 3 networks via two paths, great!

 

Now let’s move on to our second option. We will redistribute with a different metric type instead of a different metric.

Since OSPF prefers E1 routes over E2 routes, we can have one redistribution point change its metric type to E1 to prefer them.  Let’s make IOSV2 the preferred path again via this method.

 

IOSV2#

Router(config-router)#redistribute eigrp 1 metric-type 1

 

Now if we check IOSV4 we should see the link via IOSV2 become preferred again…

img 569bbca1800bf

 

Sweet it worked! Even though the routes via IOSV3 have a lower metric, OSPF will prefer the IOSV2 routes due to them being E1 routes (the IOSV3 routes are E2).

 

Let’s move onto our third option. Let’s summarize the routes on IOSV2 so that IOSV3 becomes more preferred again!

 

IOSV2#

Router(config-router)#summary-address 1.1.0.0 255.255.252.0

 

Let’s check IOSV4 and confirm that it now again prefers the path via IOSV3.

 

img 569bbcafd9a4f

 

We haven’t removed any of the first settings that we implemented. The metric values are still changed, and so is the metric type.

Although E1 routes are preferred over E2, more specific routes win overall in the process.

As you can see by my traceroute from IOSV4 to IOSV1

 

img 569bbcb6d30c0

 

Our last option is to filter the routes from one boundary router, this defeats our high availability but I will still be showing it. Let’s filter the routes from IOSV3 so that it prefers the path via IOSV2 again.

 

IOSV3#

Router(config)#

ip prefix-list FILTER seq 5 deny 1.1.0.0/22

ip prefix-list FILTER seq 20 permit 0.0.0.0/0

 

Router(config-router)#

route-map RFILTER permit 10

match ip address prefix-list FILTER

 

Router(config-router)#

redistribute eigrp 1 route-map RFILTER

 

We created a prefix list to deny the 1.1.0.0/22 network, and permit everything else.

The we created a route-map to match on that prefix list.

Finally we redistributed EIGRP into OSPF with the route-map.

 

Now we should see that we only have one path to 1.1.0.0/22 via IOSV2

img 569bbcbf760bf

Success!

Leave a comment