Why we always use loopbacks with 255.255.255.255

Unanswered Question
Mar 1st, 2007

Hi All,

I just want to know what is the requirement of using loopbacks with 255.255.255.255 mask only . Can we use it with others masks also? In context of MPLS what is the significance of doing this , except saving of IPs.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
n.nandrekar Thu, 03/01/2007 - 04:52

Hi!

You can use different subnets as loopbacks too. But the main reason I feel is that, using a /32 mask, you can utilize just 1 major subnet to assign the loopbacks to all the routers in your network. If you use a different mask, then the ip addresses from that subnet wont be usable on other routers to assign as loopbacks. So as you have guessed the main reason is saving ip addresses in the network and to make things more managable. imajin the number of subnets that you will be utilizing in huge ISPs if you plan to use subnets for loopbacks.

The second thing is that some of the network devices are optimised for this practice. I have seen some devices ( Riverstone routers to name one) which assign labels only to /32 networks by default. Since in a MPLS core, it is sufficient to have labels only for the loopbacks ( which are used for bgp connections) and not other subnets in the core , to have complete LSPs for vpn services, these devices donot assign labels for other networks.

Do you know about any other reasons?

ashutosh_pateriya Thu, 03/01/2007 - 05:20

Hi Mr. Nandrekar ,

Now I suppose I got the answer of my query , actually this was mainly in context to MPLS . So as u told that some devices are optimized for this practice it seems quite logical to use these addresses only ..

Anyway thanks a lot MR. Nandrekar

dknov Wed, 03/07/2007 - 20:21

Hi,

One correction. The labels in MPLS Core should be assigned not only to Loopback IP addresses, but to all of the transit segments/subnets as well, otherwise you cannot achieve LSP (P=Path).

In context of MPLS, you can indeed really use subnets of any size for your Loopback IPs, however you should watch out for sneaky things such as OSPF behavior. OSPF classifies Loopback interfaces as Stub network and automatically assigns a /32 subnet in its Linkstate Database, regardless of the actual subnet configured on the interface.

LDP, on the other hand, does not have this behavior that sees Loopback IP address subnet just as it is. Having this discrepancy will prevent LSP from being formed, since LSRs install FECs in LFIB only if they have corresponding entry in a routing table.

Obviously, this will not be the case since LDP will advertise non-/32 subnet and OSPF will advertise /32 subnet, i.e. LSP will not exist.

This situation is easily avoidable by defining "ip ospf network point-to-point" under Loopback interface which causes OSPF to use the subnet configured on the Loopback interface and not automatically assume /32.

This is a workaround and obviously using /32 subnet for Loopback to begin with will have dual purpose of not potentially running into this issue as well as simply conserving IP addresses as was previously mentioned.

HTH.

David

n.nandrekar Thu, 03/08/2007 - 09:42

Hi David!

I donot fully agree with your correction. I have experemented that and have seen the behaviour. If just the loopbacks are advertised by LDP, it is fine and L3-VPN will work when you have all the BGP sessions established using the loopbacks ( which is the recomended practice).

Now consider a loopback on one of the PE. it is advertised in ospf and is present on all the routers in the core. So when you form an mpbgp session with the loopback, or even targetter ldp session for l2-vpn, the LSP (tunnel) exists for the address. Since all the core routers have the loopback address in their routing table, the labels are exchanged and the LSP is established.

Further since all the VPN routes will have the next hoip of the loopback of other PE, it is fine.

For the LSP to be formed you just need that network reachable from all routers. As the loopback is reachable, the PE-to-PE LSPs will be formed.

I have seen the behaviour on Riverstone Metro series routers (now acquired by Lucent) and they have the default behaviour of assigning ldp labels to just /32 networks.

I am very sure about the Behaviour that I just explained. You can try that out. Please revert if I am mis-interpreting what you are saying.

Regards,

Niranjan

shivlu jain Thu, 03/08/2007 - 06:14

We prefer loopback with /32 becasue it gives us the only one highest ip in that network.Another thing when we use it in ospf then the loopback will be published by /32 ip address.But if you want to see the actual mask of your router id then you can use the command ip ospf point-to-point.After that you can see your subnetted router id.

Danilo Dy Thu, 03/08/2007 - 20:07

Yes you can use any netmask. This doesn't affect routing whatsoever because its still threats as /32 but it does affects your documentation if you have one.

Actions

This Discussion