Most IP addresses have the “usual” meaning: they refer to an interface to a device on a TCP/IP network. However, some IP addresses do not refer directly to specific hardware devices in this manner. Instead, they are used to refer “indirectly” to one or more devices. To draw an analogy with language, most IP addresses refer to proper nouns, like “John” or “the red table in the corner”. However, some are used more the way we use pronouns such as “this one” or “that group over there”. I call these IP addresses with special meanings.
Special Network ID and Host ID Address Patterns
Special IP addresses are constructed by replacing the normal network
ID or host ID (or both) in an IP address with one of two special patterns.
The two patterns are:
All Zeroes: When the network ID or host ID bits are replaced by a set of all zeroes, the special meaning is the equivalent of the pronoun “this”, referring to whatever was replaced. It can also be interpreted as “the default” or “the current”. So for example, if we replace the network ID with all zeroes but leave the host ID alone, the resulting address means “the device with the host ID given, on this network”. Or alternatively, “the device with the host ID specified, on the default network or the current network”.
All Ones: When the network ID or host ID bits are replaced by a set of all ones, this has the special meaning of “all”. So replacing the host ID with all ones means the IP address refers to all hosts on the network. This is generally used as a broadcast address for sending a message to “everyone”.
LOOPBACK ADDRESS (127.0.0.1)
Normally, when a TCP/IP application wants to send information, that information travels down the protocol layers to IP where it is encapsulated in an IP datagram. That datagram then passes down to the data link layer of the device's physical network for transmission to the next hop, on the way to the IP destination.
However, one special range of addresses is set aside for loopback functionality. This is the range 127.0.0.0 to 127.255.255.255. IP datagrams sent by a host to a 127.x.x.x loopback address are not passed down to the data link layer for transmission. Instead, they “loop back” to the source device at the IP level. In essence, this represents a “short-circuiting” of the normal protocol stack; data is sent by a device's layer three IP implementation and then immediately received by it.
