redistribute static subnet to OSPF

Unanswered Question
Aug 28th, 2009

Hi Friends,

"redistribute static subnet" - what exactly this command will do? will it redistribute the static network with exact mask or not. i would be able to redistribute the /32 IP's in to the OSPF with this?

bwlow is the config -


router ospf 1 area 0

nextwork x.x.x.x

redistribute static subnet


ip route 10.x.x.x

ip route 10.x.x.x

ip route 10.x.x.x

ip route 10.x.x.x




I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Giuseppe Larosa Fri, 08/28/2009 - 04:53

Hello Jacob,

yes the red static subnets will allow you to redistribute subnets including /32 host addresses.

the routes will be injected as O E2 routes in the OSPF domain.

you can check this with

sh ip ospf database external x.x.x.x

where x.x.x.x is the prefix.

without the subnets keyword a major network will be injected in the OSPF domain as a result of a classful summarization

Hope to help


Jacob Samuel Fri, 08/28/2009 - 06:48

Hi Giusee,

the scenario is as below-

Branch 1 (0-63)network


as of now i have some servers of Branch 2 that need to be placed physically in the Branch1 for some application testing but same time needs access from Branch 2 also. These servers are in the subnet (IP, 11,12). so i want to redistribute these few servers,11 & 12 in to the ospf route along with the network of Branch 1.

At Branch 2 i will have a static route this i will redistribute to the ospf using redi stat subnet coomand.

so from branch 2 and 192.168.100.x/32 from branch 1 router, my concern is will it create any issue in the ospf routing? will it take the specifi route and route to Branch 1 for these few servers?



Giuseppe Larosa Fri, 08/28/2009 - 07:01

Hello Jacob,

this is a terrible mess! I'm lost in your proposal.

first of all devices 192.168.100.x require a default gateway to be able to access other ip subnets or they are confined to talk between them in the same vlan and also the netmask should match.

So what you are suggesting should not work as far as I see of it.

I would consider to change the ip addresses of the 4 servers with ip addresses that are good for their current/real location in branch1.

later then they will be moved to branch2 they will get their addresses 192.168.100.x.

Suggest this to server people if you want to avoid pain.

This is not strictly related to OSPF the same troubles would arise with a different routing protocol.

You should use NAT to have the servers with ip addresses 192.168.100.x to be translated in ip addresses of branch1.

But this would make them unable to communicate with other hosts in 192.168.100.x that are at site2.

So another possible solution would be using L2TPv3 to extend the L2 service between the two locations.


vlan based

As you see this is not an easy task and I recommend to have the servers use the natural ip addresses of branch1.

Hope to help


Jacob Samuel Fri, 08/28/2009 - 07:20

Hi Giusee,

Thanks for the quick update. Yes i have updated the same to the server team regarding thei concern. But there are some application installed on this, they are not sure whether it has some dependany over the IP or not. I am waiting for their update also. I was lookig for any work around in this. If no or hard i have to force them to move it to the site2 physically and have the test there

thanks a lot



milan.kulik Fri, 08/28/2009 - 04:54


yes, as far as your /32 static route is present in your routing table, the "redistribute static subnet" OSPF command will redistribute it via OSPF with the full mask.


for explanation ("When routes are redistributed into OSPF, only routes that are not subnetted are redistributed if the subnets keyword is not specified.")




This Discussion