How to tell a nerd how to behave during the Corona cisis?!
The MIT CSAIL has tweeted a two-liner that resulted in quite a number of reactions - it is related to Covid-19 AND networking. Stay safe!
So this was tweeted by MIT CSAIL not long ago:
Stay at 127.0.0.1— MIT CSAIL (@MIT_CSAIL) October 2, 2020
Wear a 255.0.0.0
Stay at 127.0.0.1 ?? Wear a 255.0.0.0 ??????
Words of wisdom? Profanities? Gibberish?
If we have a look at the IANA address space registry, then 127/8 is reserved for loopback addresses. Also the IANA special-purpose address registry lists this address block. It was assigned in September 1981! Also RFC 1122 is referenced and it has the following to say about this prefix:
Internal host loopback address. Addresses of this form MUST NOT appear outside a host.
So addresses from this address block are to be used locally only. Packets going on the network must not use an address out of this prefix. But the Twitter post did not refer to the whole prefix but to
127.0.0.1 alone. This is where RFC 5735 can help out with the following text:
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 loops back inside the host. This is ordinarily implemented using only 127.0.0.1/32 for loopback. As described in [RFC1122], Section 220.127.116.11, addresses within the entire 127.0.0.0/8 block do not legitimately appear on any network anywhere.
So typically, out of the whole /8, with its over 16 million addresses, only 127.0.0.1 is typically used… That seems wasteful. But this particular address has also a particular name. Let’s try what
dig has to say about this. Let’s do a reverse DNS lookup of that address:
dig -x 127.0.0.1 ; <<>> DiG 9.10.6 <<>> -x 127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9500 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1444 ;; QUESTION SECTION: ;18.104.22.168.in-addr.arpa. IN PTR ;; ANSWER SECTION: 22.214.171.124.in-addr.arpa. 10800 IN PTR localhost. ;; Query time: 5 msec ;; SERVER: 192.168.178.1#53(192.168.178.1) ;; WHEN: Thu Dec 10 18:57:30 CET 2020 ;; MSG SIZE rcvd: 74
So this IP address is referred to
localhost! And indeed it is used in various nerd merchandise. You can e.g. buy doormats that read:
There is no place like 127.0.0.1
There is no place like
home. So the first line of the Tweet reads:
Stay at home. That’s good solid Covid-19 advice! But what about the second line here:
Wear a 255.0.0.0?
The IANA address space registry has 255/8 registered for future use. You cannot really
wear the future. But when you look at the special address
127.0.0.1 and when you realize that this special address comes out of a special /8, then you might remember a different way to write down how many bits belong to the network prefix. That’s right, the subnet
mask, a bitmask that, if you logically AND it with an address gives you the network prefix! So the subnet mask corresponding to a /8 would be 255.0.0.0.
So please wear a
mask! And if you follow both pieces of advice, you’ll hopefully stay healthy during the Covid-19 pandemic.
Of course the target audience did not leave it at that. E.g. it was noted that really IPv6 should have been used as an example. After all this is 2020. The loopback address in IPv6 is really just an address. There is no prefix for local use. The address is
::1/128. This wouldn’t really work out though, as the subnet mask notation is not used in IPv6 (thankfully). Others have noted that with that subnet mask, there would really be too many people allowed to share the same home. Suggestions to use a prefix that allows less hosts were therefore made. And it went on and on and on… Well, what did the folks at MIT expect would happen.
Stay healthy everyone!