Why is there more than one loopback IP address?

Solution 1:

127/8 (shorthand for 127.0.0.0/8) is reserved by IANA.

Win95 supported 127.0.0.1 but not other 127/8 addresses. WinXP supported 127/8. Cisco IOS supports no loopback addresses by default, but does support the loopback concept, and addresses can be manually assigned. If a computer has no need for more than one loopback address, or zero of them, there's no reason it has to support all those addresses. But, since IANA has now reserved all of them for that purpose, there is no compelling reason for a TCP/IP stack to not support them.

For the most part, there's no compelling need for multiple addresses; I often use multiple loopback connections, but can do so simply by specifying different TCP ports. (I do it for SSH port forwarding. Other VPN software may also be a frequent user for such things, as Isaac Hanson referred to in his answer.) Whether you use different TCP ports on one address (there are 65,535 of them), or multiple IP addresses, makes little technical difference. (However, having unique addresses might be easier in some cases, like if you had multiple servers that could listen to the same "default" port number.)

totally and completely unconscionable waste of space

Ah, such strong language. Allow me to rile you up further :)

Actually, the much bigger waste of IPv4 addresses is 224/3, which contains 224/4 (minimally used for multicast) and 240/4 (almost entirely wasted, with just one address as the exception). So, don't think that we're almost out of IPv4 addresses. IANA has just been handing out the addresses from the former Class A, Class B, and Class C. But don't think for a minute that every last address has been used in the most effective way possible. To see some others: IETF BCP 153 (currently points to RFC 6890). The older RFC 5735 had much of the same information in a different format, e.g. section 4 on page 6. Poke around those, or some other standards, and I'm pretty sure you can find some other large amounts of addresses that are not being super-efficiently used/allocated.

It was decided that supporting some standards may be more desirable than helping IPv4 to limp along even more. One key reason for this may be that some people really were wanting to help push people towards IPv6 adoption.

Solution 2:

Additional ip addresses in that range can be useful for binding to VPN connections, and for testing services that you don't want bound to localhost.

Solution 3:

Why is there more than one loopback IP address?

The class A network number 127 is assigned the "loopback" function, that is, a datagram sent by a higher level protocol to a network 127 address should loop back inside the host. No datagram "sent" to a network 127 address should ever appear on any network anywhere.

Source: Network Numbers


If it's a whole class A, what is the point of other arbitrary values for the last three octets?

The purpose of the loopback range is testing of the TCP/IP protocol implementation on a host. Since the lower layers are short-circuited, sending to a loopback address allows the higher layers (IP and above) to be effectively tested without the chance of problems at the lower layers manifesting themselves. 127.0.0.1 is the address most commonly used for testing purposes.

Source: IP Reserved, Loopback and Private Addresses

For more information see What is the loopback device and how do I use it? and why is loopback IP address from 127.0.0.1 to 127.255.255.254?.