Tuesday, November 13, 2012

The mysterious 127.0.0.2

Q. Lately, I have noticed several cases of machines having two loopback addresses configured: not only 127.0.0.1 (standard), but also 127.0.0.2 - why is this second local address being configured?

A. The first thing to realize is that all 127.0.0.0/8 addresses are local by definition. Traffic sent to these addresses can never go out onto the network, whether LAN or WAN.

Over at linuxquestions.org, catkin had this to say:

127.x.x.x addresses are all local. Rarely is there any need to use more than one 
and 127.0.0.1 is conventional. Netsearching showed others used/created:

1.  By Yast.
2.  For starting MySQL when no DNS system available
3.  a loopback device for a second NIC
4.  When using two DNS services on one system
5.  To give multiple names to the local system (not clear why they are not all 
given 127.0.0.1 -- maybe it's a Novell/SUSE thing)
6.  To resolve DHCP initialisation problems (?)

So, it appears a second local address definition in /etc/hosts could be useful for several reasons.

No comments:

Post a Comment