IPv6 – Why /128 Address Assigned via DHCPv6 in Ubuntu

dhcpv6ipv6ubuntu-14.04

I am testing the implementation of IPv6 in Ubuntu. My Ubuntu linux client correctly gets RA from server and configures an address in the advertised prefix. Next it gets another address via DHCP which has a /128 mask.

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether f8:a9:63:0c:3c:cb brd ff:ff:ff:ff:ff:ff
    inet6 2001:xxxx:1f15:yyyy::9/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 2001:xxxx:1f15:yyyy:faa9:63ff:fe0c:3ccb/64 scope global dynamic 
       valid_lft 82162sec preferred_lft 10162sec
    inet6 fe80::faa9:63ff:fe0c:3ccb/64 scope link 
       valid_lft forever preferred_lft forever

I am intrigued by the /128 mask for this address, which implies a point-to-point link. Why is the mask /128 and not, say /64?

Is this the normal behavior of DHCPv6 or some thing to do with the configuration of my DHCP server?

Best Answer

Yes, this is the normal behaviour. DHCPv6 servers give out addresses (with the IA_NA option) but don't tell the client anything about the subnet. The client therefore just configures the separate address on the interface. Any routes to the subnet are provided by RA. If the RA would announce the prefix without the auto-configure option then the client wouldn't configure an address automatically, but it would add the route for the local subnet.

This separation of responsibilities is intentional. DHCPv6 servers have the authority to assign addresses (amongst other things) but don't have the authority to speak about the network status. Often DHCPv6 servers are not even on the local subnet and communicate with the client via relays. The devices that the client does talk directly to are the routers. Therefore in IPv6 the routers tell clients about the status of the network (prefix, default gateway, routes etc) using RA. Extra configuration options and optionally address assignments are done form the DHCP server.

That way the client can respond quickly to changes in the network, while still receiving more long-lived information from DHCPv6.