IPv6 Dual Stack
What is it?
IPv6 is the newer Internet Protocol. Many mobile and corporate networks now hand out IPv6 addresses first, and some offer nothing else, so an operating system without it cannot reach those networks. This roadmap adds IPv6 beside the existing IPv4 stack: the IPv6 header and send and receive, Neighbor Discovery, automatic address configuration, a DHCPv6 client, AAAA name lookups, IPv6 sockets and ifconfig output. Impossible OS has no IPv6 code today; an IPv6 frame arriving at the network card is dropped. All ten sections are unstarted.
How does it work?
Today. net_rx() in ethernet.c switches on the EtherType of each received frame and handles only ARP (0x0806) and IPv4 (0x0800) (net.h). IPv6 frames (0x86DD) fall through to the default case and are discarded. There is no IPv6 constant, header structure or address field anywhere in the kernel, and the single interface configuration net_cfg holds IPv4 addresses only.
Planned design. IPv6 is added as a parallel path rather than a rewrite of IPv4:
- The IPv6 header structure, the
0x86DDcase innet_rx(), and a hop limit of 64. ipv6_send()andipv6_receive()in a newip6.c, with next-header dispatch to ICMPv6, UDP and TCP.- ICMPv6 Neighbor Discovery in a new
icmp6.c: neighbour solicitation and advertisement (message types 135 and 136) take the place of ARP, and router solicitation and advertisement (133 and 134) find the local router. - A link-local
fe80::address built from the card's MAC address (EUI-64), with a one-second duplicate address check. - A 128-entry neighbour cache with the standard INCOMPLETE, REACHABLE, STALE, PROBE and FAILED states and a 30-second reachability time.
- SLAAC: a global address built from the router's advertised prefix, plus DNS servers from the RDNSS option.
- A DHCPv6 client on UDP ports 546 and 547 for networks that assign addresses centrally.
- Turning on the AAAA query that DNS Resolver and Sockets leaves as a stub, with a dual lookup that prefers IPv6.
AF_INET6sockets, IPv4-mapped addresses andIPV6_V6ONLY.ifconfigshowing link-local and global addresses, and anndpcommand for the neighbour cache.
flowchart LR
RX[net_rx] -->|0x0800| V4[ipv4_handle]
RX -->|0x0806| ARP[arp_handle]
RX -. 0x86DD, planned .-> V6[ipv6_receive]
V6 --> ND[ICMPv6: NDP, RS/RA]
V6 --> U[UDP: DHCPv6]
V6 --> T[TCP]
ND --> NC[neighbour cache]
ND --> SL[SLAAC address]
Two prerequisites from the base stack matter here. The roadmap stores IPv6 addresses in the planned struct net_interface from TCP and Network Infrastructure, which does not exist yet. And DHCPv6 needs a way to receive on its own UDP port, but udp_handle() in udp.c delivers only DHCP's port 68 today.
What are its interfaces?
None yet. The planned kernel functions are ipv6_send(), ipv6_receive(), the neighbour cache lookup, dhcp6_* and dns_resolve_dual(). For programs, the planned surface is AF_INET6 (value 10) sockets with struct sockaddr_in6 and the IPV6_V6ONLY option through the socket API.
How do I use it?
It cannot be used yet. ifconfig in user/cmd.c shows only IPv4 fields. QEMU's user networking can offer IPv6 to a guest, which is the planned first test environment once the receive path exists.
What is not implemented yet?
Everything in the roadmap:
- Packets: IPv6 Header + Ethertype Routing and IPv6 Send / Receive.
- Neighbours and addresses: ICMPv6 Neighbor Discovery, Link-Local EUI-64 Autoconfiguration, NDP Neighbor Cache, SLAAC and DHCPv6 Client.
- Applications: DNS AAAA Activation, Dual-Stack Socket API and
ifconfigIPv6 Display. - Not planned here: privacy (temporary) addresses, multicast listener discovery beyond what Neighbor Discovery needs, and IPv6 firewall rules, which belong to the Network Firewall.
How does it compare with Windows 11 and Linux?
Both have had dual-stack IPv6 on by default for over a decade. Windows 11 implements it in tcpip.sys and shows it in ipconfig /all and netsh; Linux implements it in net/ipv6/ and shows it in ip -6 addr and ip neigh. Linux leaves DHCPv6 to a user-space client, while this roadmap puts a small DHCPv6 client in the kernel beside SLAAC so an address is configured before any service starts.