# Binding loopback-address to non-loopback interface

## TheSmallOne

Hi,

recently I've seen a system, on which there were several loopback addresses configured on normal interfaces (like 127.0.0.1/32 on eth0 and 127.0.0.2/32 on eth1).

The first question which comes to mind is: Is this even a legit configuration?

And then I wonder, what exactly can be gained by adding loopback addresses to normal interfaces.

Has anybody seen a similar configuration and has in idea, what exactly this is supposed to do?

----------

## UberLord

 *TheSmallOne wrote:*   

> Hi,
> 
> recently I've seen a system, on which there were several loopback addresses configured on normal interfaces (like 127.0.0.1/32 on eth0 and 127.0.0.2/32 on eth1).
> 
> The first question which comes to mind is: Is this even a legit configuration?
> ...

 

Yes.

Saying that, 127/8 isn't supposed to leave the host regardless, so there should also be a reject route for that subnet to remain RFC compliant.

 *Quote:*   

> And then I wonder, what exactly can be gained by adding loopback addresses to normal interfaces.
> 
> Has anybody seen a similar configuration and has in idea, what exactly this is supposed to do?

 

It could very well be that the lo (lo0 on BSD) interface doesn't actally exist.

It doesn't have to either.

However, you lose a lot moret than you gain because loopback interfaces normally have a very large MTU value so no fragmentation ever occurs whereas it will on the interface even if you're talking to the same address.

This is why modern OS's add a route to each IP address via the loopback interface.

----------

