loopbacks and ospf

Answered Question
Mar 5th, 2008

Hi,I have an OSPF network setup - loopback on 1 router is configured with a /24 mask rather than with /32.This network has been added to the OSPF routing table with a /24 mask even though in the OSPF process on the router I have given it a /32 mask. Any idea how I can force the routing process to inject the route into the routing table with a /32 only. Please note that this is just a lab exercise?



I have this problem too.
0 votes
Correct Answer by rgodden about 8 years 7 months ago

there are 3 ways to sort it out,

summary addresses, redistribution and er look at groupstudy

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
maryodriscoll Wed, 03/05/2008 - 02:16

Yeah, I do have ip ospf network point-to-point configured under the loopback but its still not working and appearing as /24 in the next-hop router

marikakis Wed, 03/05/2008 - 02:20


I meant that you should try to remove this command :-)

Kind Regards,


Correct Answer
rgodden Wed, 03/05/2008 - 02:26

there are 3 ways to sort it out,

summary addresses, redistribution and er look at groupstudy

royalblues Wed, 03/05/2008 - 06:30


OSPF treats a loopback interface as a stub host; i.e whatever (address, mask) pair is configured, the address of the loopback

interface will be advertised as a host route to the neighbors and hence you will not be required to do any summarization

The routing table on the originating router would be shown as a /24 as a connected route



marikakis Wed, 03/05/2008 - 09:22


The "ip ospf network point-to-point" command under your Loopback interface is what causes the network NOT to be advertised as a host route. If this command is missing, then the network will be advertised as a host route to other routers (default behavior). Only the router with the particular loopback will see the route as a connected /24 (the ways to get rid of connected routes are pretty violent and I think this is not what you want). Isn't the /24 in other routers what you are trying to get rid of? If it is, then you could try to remove the "ip ospf network point-to-point" command by preceeding it with a "no" or try to configure some other ospf network type (such as broadcast or multipoint).

Redistribution of connected subnets will not manage to advertise a /32. The external route that will result from redistribution, will be covering the /24 under the Loopback interface.

Kind Regards,


p.s. Those labs are very realistic as always. The simplest thing to do in normal life is to have /32 masks on loopbacks :-)


This Discussion