I think all of you have understood that the IPv6 address is both longer and different than the IPv4 address. But how do you enumerate your network? Today, it’s time to understand the basics of IPv6 addressing. 30 minutes will teach you a lot about IPv6 addressing on your devices.
In IPv4, you have many ways of getting an IP address. There’s manual configuration, where you enter the IP address, the network mask and the router address in your system. In addition you can use automatic configuration with DHCP. If there’s no network configuration, the system allocates link-local (Zeroconf) addresses automatically.
Like IPv4, but with multiple addresses on each interface
So what’s different in IPv6? Nothing really. The main difference is that each network interface will have multiple IP addresses and that we have a few different systems for automatic configuration.
- Manual configuration is still possible.
- Automatic configuration is supported by both good old DHCP (now called DHCP6) and stateless automatic configurations
- Link-local addresses exist alongside the other addresses
Example interface configuration
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether e4:ce:8f:00:93:3e inet6 fe80::e6ce:8fff:fe00:953e%en0 prefixlen 64 scopeid 0x4 inet 192.168.0.24 netmask 0xffffff00 broadcast 192.168.0.255 inet6 2001:db8:1f15:d79:e6ce:8fff:fe00:933e prefixlen 64 autoconf inet6 2001:db8:1f15:d79:1511:ed4a:b5bc:4420 prefixlen 64 autoconf temporary media: autoselect status: active
The first IPv6 address that starts with fe80:: is the link-local address that exists on all systems that has IPv6 enabled – regardless if there’s any outside connectivity or not. This system has both an MAC-address based IPv6 address and one “temporary” that hides the network card identifier. Applications should select this address before using the other one. As you see, there’s only one IPv4 address on this interface. The link-local address was replaced by an address managed by DHCP. In IPv6, the computer will keep the link-local address.
- Every computer always has multiple IPv6 addresses
- You can continue to use DHCP and static (manual) addressing as before
- Many devices (heard about the Internet of Things?) will have automatically configured addresses based on the MAC address and the assistance of your router
- You should consider using temporary addresses, not traceable to a specific hardware