Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Attention: The Community will be in read-only mode on 12/14/2017 from 12:00 am pacific to 11:30 am.

During this time you will only be able to see content. Other interactions such as posting, replying to questions, or marking content as helpful will be disabled for few hours.

We apologize for the inconvenience while we perform important updates to the Community.

New Member

Why are loopbacks advertised as /32 host routes in OSPF?

Why are loopbacks advertised as /32 host routes in OSPF?



Re: Why are loopbacks advertised as /32 host routes in OSPF?


it depends on the network type of the Loopback interface. Funny enough you could say. To get f.e. a /24 in OSPF from a Loopback use the following config:

interface Loopback0

ip address

ip ospf network point-to-point

router ospf1

network area 0

Regards, Martin

Hall of Fame Super Silver

Re: Why are loopbacks advertised as /32 host routes in OSPF?

Martin has provided a good answer about how to change what the IOS will advertise in OSPF for a loopback interface. But he did not address the original question of why the IOS implementation of OSPF advertises a loopback as /32 irrespective of the subnet mask configured on the interface. I believe that the reason is that IOS knowing that OSPF needs an accurate understanding of the topology, and knowing that for a loopback interface there will not be any other addresses used in that subnet of the loopback, chose to advertise as a /32 reflecting that the host address is the only real address used in that subnet.

There are sometimes reasons why we want OSPF to advertise the subnet of the loopback, and Martin's post shows how to do that. But for the most accurate understanding of what the topology really is, the loopback is a host address.



Re: Why are loopbacks advertised as /32 host routes in OSPF?

Hi all,

Rick you are right, I just was drawn from the post due to my work. So here comes the rest:

Actually this behaviour is described in RFC 2328 (OSPF) section 9.1:


In this state, the router's interface to the network is looped back. The interface may be looped back in hardware or software. The interface will be unavailable for regular data traffic. However, it may still be desirable to gain information on the quality of this interface, either through sending ICMP pings to the interface or through something like a bit error test. For this reason, IP packets may still be addressed to an interface in Loopback state. To facilitate this, such interfaces are advertised in router-LSAs as single host routes, whose destination is the IP interface address.[4]

Regards, Martin

CreatePlease to create content