Redistributing question

Answered Question
May 4th, 2009

All,

I'm looking at distribution lists, and I've come across a question. The distribution list out allows for other protocols to be listed. For instance, if I am running EIGRP between two routers, and I have OSPF on only one of the routers and want to redistribute my OSPF routes into EIGRP, I can create a filter list on EIGRP side to filter out what OSPF routes I want to advertise.

The question that I have is that I'm not able to filter OSPF routes that are advertised to EIGRP; it's not working.

What I've done is this: (and I'm sure it's not correct)

router ospf 1

network 192.168.1.0 0.0.0.255 area 0

network 5.5.5.5 0.0.0.0 area 0

network 6.6.6.6 0.0.0.0 area 0

distribute-list 6 out eigrp 100

router eigrp 100

network 192.168.1.0

redistribute ospf 1

access-list 6 permit host 6.6.6.6

The above doesn't work. If I put the list in EIGRP as out, it works correctly. How do I redistribute OSPF into EIGRP but use a distribution list in order to control what routes I want to inject into EIGRP?

Thanks,

John

Correct Answer by Richard Burts about 7 years 9 months ago

John

I thought I was explaining that the distribute list must be placed under router eigrp to control redistribution of routes from OSPF to EIGRP:"You have pretty much answered your own question when you state what works. To redistribute OSPF learned routes into EIGRP and to control the redistributed routes the distribute-list command goes under router eigrp."

I did miss the mark a bit when I was explaining how I remember how the syntax works and did not get the parameters quite right. Try to configure under router eigrp 100:

distribute-list 6 out ospf 1

this should use access list 6 to filter the routes redistributed from OSPF to EIGRP. And this is quite different from just distribute-list 6 out, which as you explain filters what EIGRP advertises to all neighbors.

And the comment about need a default metric is right on the mark.

HTH

Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.7 (3 ratings)
Loading.
Richard Burts Mon, 05/04/2009 - 10:30

John

You have pretty much answered your own question when you state what works. To redistribute OSPF learned routes into EIGRP and to control the redistributed routes the distribute-list command goes under router eigrp.

The way that I think about it to help remember how it works is that it is distribute-list 6 (what is the access list) out (out from OSPF) eigrp (to eigrp)

The thing that confuses many people (and perhaps you) is that you want to think distribute-list in to control what comes into the protocol. That works when distribute list is used on interfaces but not when it is applied to routes from other protocols.

HTH

Rick

John Blakley Mon, 05/04/2009 - 10:34

Rick,

distribute-list 6 out eigrp 100 doesn't work.

It only works when I put it under eigrp:

router eigrp 100

distribute-list 6 out

redistribute ospf 1

But the above config means that eigrp is getting all of the routes that ospf is advertising. The eigrp is only advertising what it can past the filter list. Is there a way to have, say, 5 networks under OSPF, but only advertise 1 into eigrp?

Thanks,

John

Correct Answer
Richard Burts Mon, 05/04/2009 - 10:44

John

I thought I was explaining that the distribute list must be placed under router eigrp to control redistribution of routes from OSPF to EIGRP:"You have pretty much answered your own question when you state what works. To redistribute OSPF learned routes into EIGRP and to control the redistributed routes the distribute-list command goes under router eigrp."

I did miss the mark a bit when I was explaining how I remember how the syntax works and did not get the parameters quite right. Try to configure under router eigrp 100:

distribute-list 6 out ospf 1

this should use access list 6 to filter the routes redistributed from OSPF to EIGRP. And this is quite different from just distribute-list 6 out, which as you explain filters what EIGRP advertises to all neighbors.

And the comment about need a default metric is right on the mark.

HTH

Rick

John Blakley Mon, 05/04/2009 - 10:48

That did it. I was looking at it from the perspective of OSPF send OUT into eigrp, so that's why I was putting it in the ospf process.

Thanks,

John

Richard Burts Mon, 05/04/2009 - 11:11

John

Lots of people look at it that way. And I would agree that in some respects it is the logical way - it would make it more similar to the way distribute list works on interfaces.

But clearly that is not how it really works. And in a sense it makes good sense that you would configure the control on the process that initiates the action to pull the routes in and not on the process from which they are learned. (after all OSPF does not really know whether EIGRP is pulling the OSPF routes or not and so it is difficult for OSPF to control what is learned)

[edit] and if you think about it, OSPF is not sending the routes to EIGRP. OSPF is sending its routes to the IP routing table and EIGRP is looking into the IP routing table for OSPF routes which it wants to learn.

HTH

Rick

thotsaphon Mon, 05/04/2009 - 12:36

John,

You may consider to use "route-map" commands to filter routes when doing redistribution. Distribution-list out for OSPF is nothing. OSPF flooding LSAs after that doing SPF on itself. What you can do is to filter routes from being installed to the routing table.

What happens when you try to redistribute ospf into eigrp. There are 2 things:

- Router will look at the routing table to find ospf routes then redistribute those routes into eigrp

- Router will look at the interfaces running ospf then redistribute those networks into eigrp.

You can now use "route-map" command to filter routes you want.

redistribute ospf 1 metric x x x x x route-map

I'm too late. (grin) I heard that you are preparing to take a tough exam(-).

Good luck!

Toshi

John Blakley Mon, 05/04/2009 - 12:50

LOL! I'm just taking the BSCI. I heard it's the tougher of the four, but I'm hoping that it won't be too bad :) It's going to be a while before I take it, but I'll let everyone know when I'm done.

Thanks Toshi!

John

Actions

This Discussion