redistribution

Answered Question
Jan 31st, 2008

I have 2 routers in an OSFP area. I need to do redistribution into EIGRP, and my EIGRP routes need to redistribute into OSPF i.e. 2 way redistribution. This could cause a routing loop. Could I "tag" the routes redistributed in to a given protocol on one router then use a route-map to filter routes based on that tag, or is that not possible?

I have this problem too.
0 votes
Correct Answer by Edison Ortiz about 8 years 10 months ago

> Could I "tag" the routes redistributed in to a given protocol on one router

> then use a route-map to filter routes based on that tag

You sure can.

__

Edison.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
Edison Ortiz Thu, 01/31/2008 - 12:20

> Could I "tag" the routes redistributed in to a given protocol on one router

> then use a route-map to filter routes based on that tag

You sure can.

__

Edison.

Istvan_Rabai Thu, 01/31/2008 - 12:49

Hi Jeff,

There are several ways to do this.

One way is to manipulate the admin distance of routes coming back to the router redistributed by another router in the same routing domain.

If you want more specifics on this, please tell me.

Cheers:

Istvan

jcarrabine Fri, 02/01/2008 - 04:27

Istvan,

Are you saying to make the AD on one router a bit lower so it will be the preferred path in a direction, and higher on the other router to prevent routes from using that path?

Would that be the "metric" command in the router configuration mode?

Istvan_Rabai Fri, 02/01/2008 - 22:33

Hi Jeff,

Yes, you can play with the admin distances like you say. It's quite interesting how the routing table process selects routes as you want it to select.

In case of EIGRP/OSPF 2-way/2-path redistribution a very intesresting situation appears:

If you don't change the admin distances, there will not be a routing loop anyway, because of the cute selection of admin distance of EIGRP external paths: 170.

Let's say we have the below config on both routers R1 and R2.

router eigrp 1

redistribute ospf 1 metric 100000 10 255 1 1500

network 10.1.0.0 0.0.255.255

no auto-summary

!

router ospf 1

log-adjacency-changes

redistribute eigrp 1 metric-type 1 subnets

network 172.31.1.0 0.0.0.255 area 0

The following happens with the OSPF routes:

1. R1 redistributes OSPF routes into EIGRP as external routes with admin distance 170.

2. These routes propagate to R2 within the EIGRP domain and appear in the EIGRP topology table

3. They are not selected into the routing table, because the same prefixes are in the routing table from the OSPF process on R2 with admin distance 110.

4. This is why these routes are not redistributed back into the OSPF domain by the "redistribute eigrp 1" command.

The following happens with the EIGRP routes:

1. Router R1 redistributes EIGRP routes into OSPF as external E1 routes with admin distance 110.

2. These routes propagate to R2 within the OSPF domain and appear in the OSPF database on R2.

3. They are not selected into the routing table, because the same prefixes are in the routing table from the EIGRP process on R2 with admin distance 90.

4. This is why these routes are not redistributed back into the EIGRP domain by the "redistribute ospf 1" command.

Make a drawing for yourself or build up a config in you have the possibility, and you will see this happening.

It is a different situation for 2-way/2-path redistribution betwen OSPF and RIPv2 for example.

Here, you will have to use the "distance" command under the OSPF process to set the admin distance of external (originally RIP) routes to 125 (RIP default is 120)to prevent them to be selected into the routing table.

I hope I'm explaning clearly:)

Best regards:

Istvan

jcarrabine Mon, 02/04/2008 - 05:45

Thanks for the information and taking the time to do that example Istvan. That was excellent. I see the use of metric-type 1. Have you ever used type 2? Just curious. It seems most have used 1.

In your example you provide an interesting way of looking at modifying the AD to get desired route selection. I have copied your example for future reference.

Thanks Again

Jeff

Istvan_Rabai Tue, 02/05/2008 - 12:37

Hi Jeff,

Generally it is better to use E1 metrics because it contains more routing information than the E2 metric: its value is incremented by the relevant path costs as the OSPF process calculates the metric value to the given destination.

An E2 metric is a constant value, independent of the depth of the routing domain.

An example of use of the E2 metric if there is only one default route to an external destination. In this case the value of the metric may not matter. The router will select this path to the external destinations independently of the value of the metric.

If you have more than one ASBR injecting default routes into a routing domain, then it is better to choose E1 metrics, as it will contain the information about the cost of each path within the routing domain itself.

Thank you for the excellent rating!

Cheers:

Istvan

jvalin__s Sun, 02/10/2008 - 23:56

hi all,

I surely agree with istvan configurations.

I have tried this in my lab and both the ways work.

1) with route-map also by tagging

2) changing the AD also.

Actions

This Discussion