01-31-2007 04:49 AM - edited 03-03-2019 03:34 PM
Why are loopbacks advertised as /32 host routes in OSPF?
thanks!!!
01-31-2007 04:53 AM
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
01-31-2007 07:58 AM
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
01-31-2007 08:30 AM
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
09-12-2018 10:07 AM
Hi Team,
Can any one give some graphical representation this...I still hv a doubt
Pl help me
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide