I recently learned 127.0.1.1 is basically the same as 127.0.0.1. It seemed strange I’d never seen it before. I’m still not sure why you’d prefer one over the other.
LAN addresses are usually 192.168. Other LANs sit on 10. Docker seems to use 172.
So where are all of these written down? Are there others? Perhaps … RFC 1918 will tell me everything. Or RFC 5735 … there seem to be lots of RFCs about them.
Specialized Address Blocks
This is most of them:
-
0/8 — 0.0.0.0–0.255.255.255 (“this” network)
-
10/8 — 10.0.0.0–10.255.255.255 (private network)
-
127/8 — 127.0.0.0–127.255.255.255 (this host)
-
169.254/16 — 169.254.0.0–169.254.255.255 (this local link)
-
172.16/12 — 172.16.0.0–172.31.255.255 (private network)
-
192.0.2/24 — 192.0.2.0–192.0.2.255 (example network, like
example.com) -
192.168/16 — 192.168.0.0–192.168.255.255
-
198.51.100/24 — 198.51.100.0–198.51.100.255 (another example network)
-
203.0.113/24 — 203.0.113.0–203.0.113.255 (yet another example network)
-
224/4 — IPv4 multicast (that’s a big block)
-
240/4 — reserved
-
255.255.255.255 — limited broadcast
More on that last one: (let me just quote RFC 922)
The address 255.255.255.255 denotes a broadcast on a local hardware network that must not be forwarded. This address may be used, for example, by hosts that do not know their network number and are asking some server for it.
Thus, a host on net 36, for example, may:
- broadcast to all of its immediate neighbors by using 255.255.255.255 - broadcast to all of net 36 by using 36.255.255.255without knowing if the net is subnetted; if it is not, then both addresses have the same effect. A robust application might try the former address, and if no response is received, then try the latter. See [1] for a discussion of such “expanding ring search” techniques.
If the use of “all ones” in a field of an IP address means “broadcast”, using “all zeros” could be viewed as meaning “unspecified”. There is probably no reason for such addresses to appear anywhere but as the source address of an ICMP Information Request datagram. However, as a notational convention, we refer to networks (as opposed to hosts) by using addresses with zero fields. For example, 36.0.0.0 means “network number 36” while 36.255.255.255 means “all hosts on network number 36”.
Interesting! Today I learned. There is a lot about IPv4 I don’t even know …
It is strange the 127/8 block is just as large as the 10/8 block, but I guess somebody somewhere is making use of all of those loopback addresses. At least, I hope so.