cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6708
Views
15
Helpful
4
Replies

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

henre2005
Level 1
Level 1

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

thanks!!!

4 Replies 4

mheusinger
Level 10
Level 10

Hi,

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 10.1.1.1 255.255.255.0

ip ospf network point-to-point

router ospf1

network 10.1.1.1 0.0.0.0 area 0

Regards, Martin

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.

HTH

Rick

HTH

Rick

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:

Loopback

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

Hi Team,

 

Can any one give some graphical representation this...I still hv a doubt

 

 

Pl help me 

Review Cisco Networking products for a $25 gift card