IPv6 addresses weird? It's v4 that's crazy

Tags: networking.
By lucb1e on 2017-01-10 14:15:31 +0100

Dots are often used for hierarchy. Domains are backwards, but still hierarchical. Wireshark you can use tcp.port to filter on TCP ports. In many programming languages you specify an object's property as object.property. Does that property have methods you can use? Try another dot: car.wheels.length(). Dots are also commonly used as decimal separator.

Colons are often separators. In Swedish and Finnish they apparently separate a word from a suffix, like "Jake:s" to write "Jake" possessively (like "Jake's" in English). In MAC addresses they separate hexadecimals to make the whole thing more readable (separating each byte, since grouping by two bytes doesn't make sense if the first 3 and last 3 are separate). They separate drive letters in Windows. They are used in URLs to separate ports from legacy IP addresses.

So legacy IP addresses. They use dots but neither for hierarchy nor for decimals. Then IPv6 was designed, the web took off, and now we're calling IPv6 crazy. In that order.

IPv6 uses colons instead of dots. It might seem weird since we separate ports with colons right? Well, not back when the IPv6 standard was designed in the mid-90s. None of the classic tools that work with IP addresses use a colon to append a port (telnet, ssh, netcat, ftp, whois, irc, ping, traceroute), they all use a space or a flag (like --port). It was HTTP with its URL scheme, which was brand new, that would popularize this format with dots (be it a domain or an IP address) and a colon.

We often forget, due to the shortage, but even legacy IP addresses are composed of a network prefix and your extension. With modern addresses this is much more apparent: my IP prefix is 2001:981:f115 (which I've memorized without noticing), after which I can pick anything. My router uses subnet 1 by default (makes sense) and my servers live on ::3 and ::4 (::1 was decommissioned and ::2 died). The completely random IPv4 address 80.100.131.150 was about as difficult to remember as the full v6 address (and I get only one legacy address but 66000 v6 subnets from my ISP).

Let's look at some other IP addresses.

Facebook: 2a03:2880:f106:83:face:b00c:0:25de

I don't know, but I'm guessing the prefix is similar: 2a03:2880:f106. Subnet 83, face:book, server 0:25de. Harder, but then their network is slightly bigger.

Cisco.com, similar story: 2001:420:1101:1::a. Not much logic, but fairly brief and the hierarchy is apparent (:1::a). It's not like a legacy address is better, being 72.163.4.161.

Microsoft.com doesn't have a v6 address, but their name server does: 2620:0:30::53. The first part, 2620:0:30 is easy enough, and 53 is also the port that DNS traffic runs over.

How often do you type IP addresses anyway? When DNS is down right? Google's DNS is at 2001:4680:4680::8888. The 8888 is recognizable; 2001 you may have noticed being a common prefix (like 2a03); so only 4680 is really left to remember. That's repeated twice and is just 4+2+2+2 on your keyboard.

Notice how those all start with 2-something? Like 2001, 2a01 or 2620? There are a few more, but those are currently used prefixes. If you're used to them, your brain can store it even more efficiently (just like nearby area prefixes in phone numbers are easy). Not like v4's fragmentation.

Similarly, due to the new, unfragmented space of IPv6, we can hand out bigger chunks. My ISP seems to own 2001:980-987 for customers and 2001:888-88f for servers. If you are debugging something, a customer's identification is five hexadecimals (98x:xxxx). That's super easy to remember and find back in logs or type in a command.

In conclusion, it's actually very evident that we are having a shortage, despite (usually) being able to buy extra addresses when you need them: v4 addresses are completely random and all over the place. New v6 addresses also make more logical sense because you can subnet them properly without needing to use NAT. And finally, colon separation is actually slightly less crazy than dot-formatting. The MAC address 0.32.145.0.0.1 looks like semantic versioning gone terribly wrong. Who ever saw something binary dumped as dot-separated decimal numbers?
lucb1e.com
Another post tagged 'networking': FTP PORT command

Look for more posts tagged networking.

Previous post - Next post