# Networking – Why does the “Internet of Things” enforce the need for IPv6 addresses

internetipv4ipv6localhostnetworking

If you have multiple devices in one network, the amount of IPv4 addresses will not increase linearly to accomodate the number of devices. There is just one IPv4 address per Network/Router that is connected to the Internet. How does the “Internet of Things” (IoT) justify the need for IPv6 addresses?

I definitely think I understood something wrong. But it doesn’t make sense to me at the moment. I know that IPv6 will be needed in the future, but I don’t know which role IoT plays on this topic.

The Internet of Things does not absolutely mandate IPv6, but for IoT to be useful or usable IPv6 is very much preferred.

IPv4, due to the limited number of addresses available means that not every device can have a public IP. For a cluster of devices to share an Internet connection then they have to share the IP via NAT technologies. If the devices want to host servers then they have to punch a hole through the device hosting an Internet connection using port forwarding or UPNP or related technologies. This can get complicated, especially if multiple devices want the same port for their servers. An alternative method is to have a central management server that both the home and remote devices dial in to in order to exchange data.

IPv6 does away with the need for NAT, port forwarding and the lot and allows every device to have its own public IP and associated ports. It removes complicated port forwarding rules and methods for punching holes in firewalls. It removes all the network co-existance problems that plague current devices. You can connect to devices without needing to configure firewalls or set up accounts on third party services that allow you to connect to your device.

Quite simply it allows the Internet to function in the way it used to before we realised we didn't have enough addresses to let every machine have its own public IP address.

To give a slightly more visual idea of how IPv6 and IPv4 allow the IoT to work imagine you have a fully automated home, with every device hosting a server where you can turn it on.

With IPv4 your network is complicated to set up (you will spend an age on your router setting up each individual port forward rule) and the best you get is a list of port numbers you have to write down in a text file:

• myhomenetwork.com:80 (this is my router)
• myhomenetwork.com:81 (this is my computer)
• myhomenetwork.com:82 (this is my coffee machine)
• myhomenetwork.com:83 (is this my TiVo?)
• myhomenetwork.com:84 (could be a lightbulb, not sure)
• myhomenetwork.com:85 (fish tank heater?)

It also means that unless you take the time to set up multiple ports for each device then they only have one port available and so can probably only present a webpage to the internet. For devices that want to show a http (web) server or ftp or SSH server this can get painful and annoying pretty quickly as you'll spend time opening up more ports and writing down what port you gave to what device.

IPv6 due to having publicly available IP addresses for every device means your network configuration time drops immediately and you can get a more sensibly named network and each device can easily host whatever services it likes:

• myrouter.myhomenetwork.com
• mycomputer.myhomenetwork.com
• mytoaster.myhomenetwork.com:80 (http server, webpage showing a push-to-toast button)
• mytoaster.myhomenetwork.com:21 (ftp server, so you can upload perfect toast settings)
• mytoaster.myhomenetwork.com:22 (SSH server, for securely talking to your toaster)
• myfrontroomlightbulb.myhomenetwork.com

And so on.

The IoT can work on IPv4 and be just fine, but IPv6 can make it work right.