First, a bit of background.
The current Internet Protocol (IP) you are using now is known as IPv4 (version 4). The addresses look a bit like:
203.105.67.89 (<- That was completely randomly typed. It seems to be owned by some Japanese company)
Now you might be thinking, that’s great! Why the hell do we need a new version of IP? This comic from xkcd will explain it in a simple, comical fashion:

It doesn’t take a genius to work out:
- There isn’t an awful lot of grass left
- The internet is still expanding at a rapid rate
- Expansion means the need for more IP addresses
On the other hand, maybe it does… Anyway, we have a problem. Part of the problem is that IPv4 addresses are too “short”. Remember when telephone numbers in Sydney were 7 digits? No? Neither do I, I wasn’t born then (I think). They had to add an extra digit (existing numbers got 9) because there weren’t enough numbers to go around. A telephone number with 7 digits means that there are one million (1000000) possible numbers (in reality it is less). IPv4 addresses have 4 sections each seperated by a dot (123.123.123.123) and each section is allowed to have a value between 0 and 255. Which means that there are 4 sections of 256 possible values, making a total of 4294967296 (256^4) possible IPv4 addresses. That may sound like a shitload, but it really isn’t, since there is currently estimated to be 6700000000 people in the world, which means there’s an average of less than 1 IPv4 address per person. Not quite enough.
But alas, along comes a solution going by the name of Network Address (and Port) Translation (NA(P)T). What it does is allow a whole heap of private IPv4 addresses to be “hidden” behind one public IPv4 address. Sounds great, but (like every other thing) along comes problems. First problem is that the number of simultaneous TCP connections and UDP “connections” will be highly limited. A NAPT device (usually a router) has to store information on each TCP/UDP connection going through it. What sort of information does the router have to store for each connection:
- Router’s Private IP (32 bits)
- Router’s Public IP (32 bits)
- Local (computer inside the network (or “behind the NAT”)) IP (32 bits)
- Remote (the computer out on the internet being accessed) IP (32 bits)
- The IP Protocol Number (8 bits)
- Private TCP/UDP Port (16 bits)
- Public TCP/UDP Port (16 bits)
- Remote TCP/UDP Port (16 bits)
That’s a total of ~184 bits or 23 bytes for each connection (and you probably don’t realise how much connections each computer uses). There’s also heaps of overheads and data that I missed, so lets round it to a nice 128 bytes. The amount of RAM in your router will limit the number of connections you can have. For example, on my pov ADSL2+ Router (Dynalink RTA1335), which has 6132 kbytes of RAM and 5528 kbytes of that is used for miscellaneous stuff on the router, like keeping the ADSL line up and the mini-http server, etc, leaving 604 kbytes left for NAPT entries, which is enough for 4832 NAT entries. Sure that’s enough for like 1 computer doing normal HTTP web browsing and email, but when multiple computers and Peer-2-Peer comes into the equation, ~4500 connections will become insufficient.
The second, and most noticable, problem is that someone on the internet cannot directly initiate a connection to a computer “behind the NAT”. This causes problems with running servers, hosting Warcraft III games and other games. Sure, Port Forwarding can be used to address that, but what happens when you want to have multiple computers hosting Warcraft III games in your network? Since the Warcraft III port is already “forwarded” to the first computer, no one will be able to join the game hosted on the second computer.
IPv6 has 3.4028236692093846346337460743177e+38 (2^128) addresses available. That’s plenty enough for everything/everyone, without the need for annoyances like NAPT.
Tomorrow’s post will be about how to set up IPv6 for yourself (the practical side).