What is a loop-back address? 127.0.0.1 is a loop-back address, but what does this even mean? Please be very descriptive and give an example, as I'm having a hard-time understanding this.
Networking – What is a Loopback Address (127.0.0.1)?
ipnetworking
Related Solutions
Here is the short answer: sudo ifconfig lo0 alias 127.0.0.* up
Each alias must be added individually (sudo ifconfig lo0 alias 127.0.0.2 up
, sudo ifconfig lo0 alias 127.0.0.3 up
). It can be done manually for testing, or a subset or the complete list of the other 250 available numbers in that subnet can be made into StartupItems script that will do it automagically at boot time.
The long answer: According to RFC3330, 127.0.0.0/8 - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher level protocol to an address anywhere within this block should loop back inside the host. This is ordinarily implemented using only 127.0.0.1/32 for loopback, but no addresses within this block should ever appear on any network anywhere.
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.
Best Answer
The Wikipedia article on loopback puts it better than I could:
In terms of IP addresses this means that any communications to that address effectively never leave or perhaps never actually enter your network interface card so that you always have a "connection".
This allows you to test client/server software (for example) with both parts running on the same machine.