How Redistribute Connected Subnets command works?

Unanswered Question
Feb 27th, 2008

redistribute connected subnets

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
Edison Ortiz Thu, 02/28/2008 - 03:55

Based on the command you just posted, it seems you want to bring connected routes into OSPF.

The command will query the router database for routes are directly connected on this router and announce those routes to OSPF neighbors as External routes (E1 or E2, with E2 being the default). You can find out which routes are connected routes by typing show ip route and see the "C" symbol next to the route.

If you have network statements under OSPF, these interfaces will be announced as regular OSPF routes (O routes) while interfaces missing from the network statement will be announced via the redistribution.

As for the subnets option, if you don't use it, it won't bring connected networks into OSPF that aren't classful.

For instance, if you have

interface s0/0

ip address 10.1.1.1 255.255.255.0

The ip address above is a Class A address but the subnet mask has 24 bits. This interface won't be redistributed into OSPF without the subnets option. Without the subnets option, the subnet mask should be 255.0.0.0 for it to work.

HTH,

__

Edison.

lamav Thu, 02/28/2008 - 06:28

Senor Ortiz:

beautiful post, chico.

One question:

The command will query the router database for routes are directly connected on this router and announce those routes to OSPF neighbors as External routes (E1 or E2, with E2 being the default).

I knew that already, but can you give me a scenario in which you would not advertise a directly connected network the normal way, which is with a network statement under the OSPF process? Why rely on redistributing them, and as an external route, no less?

I appreciate your time in answering this.

Thank you

Victor

Edison Ortiz Thu, 02/28/2008 - 08:56

give me a scenario in which you would not advertise a directly connected network the normal way, which is with a network statement under the OSPF process?

When you use redistribution, you aren't enabling the protocol on the interface. For instance, let's say you are running EIGRP on serial0/0 but you want to advertise s0/0 via OSPF to neighbors via S0/1 - instead of enabling 2 routing protocols on a interface (which is not recommended), just redistribute connected.

HTH,

__

Edison.

lamav Thu, 02/28/2008 - 09:20

So, is this what you're saying?

You have a router with the following config:

interface s0/0

ip addres 10.10.10.1 255.255.255.252

interface s0/1

ip address 172.16.19.1 0.0.0.255

router eigrp 100

network 10.10.10.0 0.0.0.255

router ospf 2004

network 172.16.19.0 0.0.0.255

And you would do this to advertise the EIGRP subnet into OSPF....

router ospf 2004

network 172.16.19.0 0.0.0.255

redistribute connected subnets

Instead of doing this:

router ospf 2004

network 172.16.19.0 0.0.0.255

network 10.10.10.0 0.0.0.255

Do I have it right?

VL

Edison Ortiz Thu, 02/28/2008 - 09:23

> Do I have it right?

Yes. On the first option, you are advertising the network into OSPF without enabling OSPF on the interface. On the 2nd option, you are enabling OSPF on that interface.

lamav Thu, 02/28/2008 - 09:41

Grassy ass...that's Spanish for Thank you. :-)

VL

Joseph W. Doherty Thu, 02/28/2008 - 11:56

Perhaps one other reason, you're really paranoid about revealing anything on the connected subnets concerning your routing. With redistribution of connecteds, you don't have to worry about any type of dynamic routing protocol leakage.

Actions

This Discussion