cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6030
Views
21
Helpful
2
Replies

loopback interface as /32 for LDP to work

Ibrahim Jamil
Level 6
Level 6

HI Guys

why we need loop back interface  as /32 mask for LDP to work

thanks 

2 Accepted Solutions

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Ibrahim,

LDP can work also with non /32 mask on loopbacks but when the IGP is OSPF under the loopback configuration we need to put

int loop0

ip ospf network point-to-point

 

Only in this way OSPF advertises the true subnet mask of the loopback. By default OSPF recognizes a loopback and advertises only a host route /32.

However, the true reason why we use /32 loopbacks on service provider networks is another and is saving address space.

The only meaning of the loopback address is to represent the single PE /P node in the IGP and in the MPLS network.

For doing so /32 host routes are enough.

Also the using of /32 loopbacks allow to pick them from a specific address block for all the current and future nodes of the network.

In big provider networks MPLS LDP is implemented with label filtering: this means that labels are allocated and advertised only for the loopback addresses (thanks to the fact they are /32 belonging to the same address space).

This is done for scalability, to avoid to allocate MPLS labels to non loopback IP prefixes.

In such provider networks all customer related prefixes either in a form of VPN (L3 or L2) or simply routed over the global routing table are advertised by internal MP BGP.

By recursion the BGP next-hop is resolved over an LSP with a destination = remote PE loopback.

So indeed the ultimate reason for using /32 loopbacks is scalability.

Hope to help

Giuseppe

 

 

 

View solution in original post

Peter Paluch
Cisco Employee
Cisco Employee

Ibrahim, Giuseppe,

Please allow me to join.

Giuseppe's response is spot on, but I would like to broaden the scope a little and add one more reason worthy of consideration.

If using OSPF as an IGP then without additional configuration, OSPF will advertise the loopback address using a /32 netmask, regardless of what netmask is truly configured on the interface. If the loopback's real netmask is different, it will cause a disparity between the information advertised by OSPF and by LDP: While LDP will advertise the true loopback's address/netmask and label mapping, the receiving router will not recognize this label mapping because it does not know the address/netmask in its routing table, as OSPF has advertised the loopback using the /32 netmask. As a result, the label switch path toward this loopback will be broken.

So to prevent this problem from occurring, the loopbacks should either be configured with /32 netmasks (which is the netmask OSPF will advertise anyway), or force OSPF to advertise the true netmask of the interface using the

ip ospf network point-to-point

command.

Best regards,
Peter

View solution in original post

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Ibrahim,

LDP can work also with non /32 mask on loopbacks but when the IGP is OSPF under the loopback configuration we need to put

int loop0

ip ospf network point-to-point

 

Only in this way OSPF advertises the true subnet mask of the loopback. By default OSPF recognizes a loopback and advertises only a host route /32.

However, the true reason why we use /32 loopbacks on service provider networks is another and is saving address space.

The only meaning of the loopback address is to represent the single PE /P node in the IGP and in the MPLS network.

For doing so /32 host routes are enough.

Also the using of /32 loopbacks allow to pick them from a specific address block for all the current and future nodes of the network.

In big provider networks MPLS LDP is implemented with label filtering: this means that labels are allocated and advertised only for the loopback addresses (thanks to the fact they are /32 belonging to the same address space).

This is done for scalability, to avoid to allocate MPLS labels to non loopback IP prefixes.

In such provider networks all customer related prefixes either in a form of VPN (L3 or L2) or simply routed over the global routing table are advertised by internal MP BGP.

By recursion the BGP next-hop is resolved over an LSP with a destination = remote PE loopback.

So indeed the ultimate reason for using /32 loopbacks is scalability.

Hope to help

Giuseppe

 

 

 

Peter Paluch
Cisco Employee
Cisco Employee

Ibrahim, Giuseppe,

Please allow me to join.

Giuseppe's response is spot on, but I would like to broaden the scope a little and add one more reason worthy of consideration.

If using OSPF as an IGP then without additional configuration, OSPF will advertise the loopback address using a /32 netmask, regardless of what netmask is truly configured on the interface. If the loopback's real netmask is different, it will cause a disparity between the information advertised by OSPF and by LDP: While LDP will advertise the true loopback's address/netmask and label mapping, the receiving router will not recognize this label mapping because it does not know the address/netmask in its routing table, as OSPF has advertised the loopback using the /32 netmask. As a result, the label switch path toward this loopback will be broken.

So to prevent this problem from occurring, the loopbacks should either be configured with /32 netmasks (which is the netmask OSPF will advertise anyway), or force OSPF to advertise the true netmask of the interface using the

ip ospf network point-to-point

command.

Best regards,
Peter

Review Cisco Networking for a $25 gift card