Cisco Support Community
Community Member

OSPF.redistribute subnets

Text from Book


Parameter subnets specifies that subnetted routes should be redistributed also. Only routes that are not subnetted are redistributed if the subnets keyword is not specifed.


Can any body explain me the phrase subbnetted routes in redistribution?

What does it mean? VSLM?

But OSPF by default VLSM protocol?

Maybe something like network ??

Can you give me the example and explain my confused in this part?


Re: OSPF.redistribute subnets

Please have a look at the ospf design guide that includes relevant information and an example:

"Note that the only external route that has appeared is, because we did not use the subnet keyword. Remember that if the subnet keyword is not used, only routes that are not subnetted will be redistributed. In our case is a class A route that is subnetted and it did not get redistributed."

Note also that the subnets keyword applies to redistribution into OSPF. In the example in the guide above static routes are redistributed into OSPF and subnets keyword has to do with the mask of the static routes. In this example, if static has a "classic" A, B, C class mask it will get into OSPF. If it has any other mask, it won't.

This behavior doesn't have to do with the network command you use to enable OSPF into particular interfaces. The subnets used in the interfaces where OSPF is actually running will be advertised with their corresponding masks as expected (in general).

Super Bronze

Re: OSPF.redistribute subnets

If I remember correctly, although OSPF is classless itself, (Cisco) redistribution into OSPF w/o the subnets parameter seems to assume classful networks.

For instance, under classful rules, 10.x.x.x is class A network (or /8 VLSM)., under classful rules is a subnet of the 10.x.x.x class A address. To have (Cisco) redistribute into OSPF requires the subnets keyword. To have (Cisco) redistribute into OSPF would not.

Usually when working with (Cisco) OSPF, you'll want to use the subnets keyword when doing redistribution into OSPF.


If you wanted to redistribute into OSPF, since, under class rules, it's a class C address, you wouldn't need the subnets parameter. However,, a class C subnet, you would need subnets parameter.

Not sure what happens with "supernets". E.g., I believe subnets parameter would inject properly, but don't know what happens if subnets parameter not present. (Again, when working with VLSM/classless, you'll want to use subnets parameter.)

Community Member

while doing redistribution in

while doing redistribution in OSPF from any other routing protocol, then we need to specify the keyword " subnets" in redistribution command. If we do not do so, it will throw the informational message stating that "Only classful networks will be redistributed". What it means is that if we are redistributing an eigrp subnet in OSPF without  using "subnets" then it wont get in to OSPF. If there is a subnet being redistributed in OSPF then it will enter in OSPF Topology because it is a "classful" subnet .

Therefore to successfully redistribute subnetted networks, we need to use "subnets" keyword. 

This happens only in OSPF I think. Similar details can be found in below link


CreatePlease to create content