I have been thinking about the transition to IPv6 wrong. For some time I have seen IPv6-only as the natural progression from Dual-Stack. But that strategy doesn’t accommodate all the IPv4-only devices (such as IoT) which will be with us for years.
With the standardization of RFC 8925 IPv6-Only Preferred Option for DHCPv4, I see another phase in the transition to IPv6-only. The phase of mostly IPv6-only.
Mostly IPv6-only means that for a given subnet, most of the devices are capable of IPv6, and will use it. But the remaining small number of devices, such as badge readers, HVAC, and the like can still operate using just IPv4.
Signaling an IPv6-only option in IPv4 DHCP
Initially, this sounds counter-intuitive. After all, if a device is capable of IPv6-only, it won’t even need to make a DHCPv4 request, and therefore would not see the IPv6-only option.
However, that is looking at it from the IPv6 side. Looking at it from the IPv4 side, there are advantages to letting devices know that the IPv6-only mechanisms (Native/DNS64/NAT64) are in place. And therefore for those devices which are capable of IPv6-only, there is no need to use IPv4,
Reintroducing DHCPv4 Option 108
Back in the heyday of DHCP, there were many options being allocated for all sorts of useful things, such as: * Multicast Assignment through DHCP (was option 100) * IPX Compatibility (was option 110)
Option 108 was initially reserved for Swap Path, but was never standardized in a RFC.
How does DHCPv4 Option 108 work?
If the network supports IPv6-only, then the DHCPv4 server can be configured to include Option 108 in the DHCP offer to the client.
Dynamic Host Configuration Protocol (Offer) Message type: Boot Reply (2) Hardware type: Ethernet (0x01) Hardware address length: 6 Hops: 0 Transaction ID: 0xf0c7a14c ... Option: (3) Router Length: 4 Router: 192.168.156.1 Option: (6) Domain Name Server Length: 4 Domain Name Server: 192.168.156.1 Option: (15) Domain Name Length: 3 Domain Name: lan Option: (108) Removed/Unassigned Length: 4 Value: 00000000 Option: (255) End Option End: 255
As you can see
wireshark) have not been updated for option 108 support yet.
Once the client, which supports Option 108 sees the option, it will stop the request process for an IPv4 address, and the device will become IPv6-only on your Mostly IPv6-only network. The DHCPv4 server will not allocate an IPv4 address, and there will be no lease for an address.
If the device does not support Option 108, it will ignore it, and continue to request an IPv4 address, and operate using IPv4 in your Mostly IPv6-only network.
Advantage of using Option 108
In addition to signaling to the devices which can run IPv6-only, the use of Option 108 reduces the burden for IPv4 addresses.
In a Dual-Stack network, all devices will have an IPv4 address. In a Mostly IPv6-only network, only the devices which can not operate in an IPv6-only environment will consume an IPv4 address.
As device software is upgraded, and perhaps will support IPv6-only, the usage of IPv4 addresses should decline.
Support for Option 108 in use today
There are operating systems which support Option 108 today, quite possibly in your network.
- iOS 15 (iPhones)
- MacOS 12.0.1 (Macs)
- Windows (Not yet)
Sadly, Linux long used as the test bed for the internet does not support Option 108 (as of
systemd v251. A feature request has been submitted.
Setting up Option 108 in your network using OpenWrt
Before setting up Option 108, ensure you have DNS64/NAT64 setup to support IPv6-only operation, as nodes responding to the option will become IPv6-only. See this post for info on how to configure OpenWrt for DNS64/NAT64 (ipv6hawaii.org)
Although OpenWrt does not directly support Option 108, it is possible to configure it from the web interface (LuCI).
After logging into the web interface, go to Network->Interfaces->LAN (Edit)->DHCP Server->Advanced Settings:
In the DHCP Options enter the string 108,0000i. The letter i is required to make option 108 a 4 byte value (which the RFC requires). Click Save and then Save & Apply
Or, if you prefer, you can edit the dhcp config file
/etc/config/dhcp and add the line in the lan stanza:
config dhcp 'lan' option interface 'lan' ... list dhcp_option '108,0000i'
And restart networking:
Mostly IPv6-only is a good thing
RFC 8925 provides a mechanism that brings us one step closer to an IPv6-only world, while still providing connectivity to the devices which do not yet support IPv6.
While I see this extending the long tail of IPv4, and I would like to see everything IPv6-only, the real goal should be connectivity for all devices on your network. Option 108 helps us get there.
- Thanks to the Dnsmasq author for his quick response in how to force a 4 byte value for Option 108.