1

I have been reading conflicting sources and seeing different behaviours about how a CPE router should be assigning IPv6 addresses.

RFC3633 seems to imply that each host should get /64, while RFC6204 says that the router should assign a /64 to each of its LAN interfaces (which is still one /64 per host for a simple residential network, right?)

Meanwhile, I have been assigned a /56 (via a tunnel) and I have a router running OpenWRT Barrier Breaker.
SLAAC on my computer only gives me IPs from the first /64; and in an attempt to allocate each computer a complete /64 automatically (rather than through manual assignment), both DHCPv6 servers (odhcpd and dnsmasq) I've tried still only hands out IPs in the first /64.
More specifically with dnsmasq, I've tried dhcp-range=2001:xxxx:e001:c501::,2001:xxxx:e001:c5ff:: but it errors with "inconsistent DHCPv6 range", and dhcp-range=2001:xxxx:e001:c500::,56 gives "prefix length must be at least 64".

So the actual DHCPv6 (and SLAAC) seems to be only using a single /64 for the entire network, but I've only read that each host should get a /64.
So which is right?

Edit:
If a /64 for the entire network is the "correct" assignment for a residential site, why is it a best current practice to allocate a /56 or /48 to each site?
I was under the assumption that it was so that each host would be allocated a /64 by the router.

P.S., The IPs on my router's interfaces look like this:

$ ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 fe80::a2f3:c1ff:fed4:3678/64 scope link 
       valid_lft forever preferred_lft forever
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 
    inet6 2001:xxxx:e001:c500::1/56 scope global 
       valid_lft forever preferred_lft forever
    inet6 fdd0:da3b:f524::1/56 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::a2f3:c1ff:fed4:3678/64 scope link 
       valid_lft forever preferred_lft forever
7: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 
    inet6 fe80::a2f3:c1ff:fed4:3678/64 scope link 
       valid_lft forever preferred_lft forever
8: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 fe80::a2f3:c1ff:fed4:3678/64 scope link 
       valid_lft forever preferred_lft forever
22: sit1: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 
    inet6 2001:xxxx:f000::32af/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::7892:987e/64 scope link 
       valid_lft forever preferred_lft forever
    inet6 fe80::c0a8:101/64 scope link 
       valid_lft forever preferred_lft forever
  • 1
    No, you're meant to assign a /64 to each subnet. – Michael Hampton Apr 8 '15 at 16:12
4

Each broadcast domain gets a /64. If you have your hosts isolated, so that there should only be one per subnet, you can assign a whole /64 for a single host. This is mostly used for servers, where you use static IP assignements anyway. If you see the need for SLAAC or stateful DHCPv6, you probably should assign a /64 for a whole network segment, not a single host.

  • 1
    Then what does RFC6204 mean by "The IPv6 CE router MUST assign a separate /64 from its delegated prefix(es) for each of its LAN interfaces."? Also see edits to the question – 小太郎 Apr 8 '15 at 14:31
  • 1
    See the definition of a LAN interface in the same RFC: "LAN interface: an IPv6 CE router's attachment to a link in the end-user network. Examples are Ethernets (simple or bridged), 802.11 wireless, or other LAN technologies. An IPv6 CE router may have one or more network-layer LAN interfaces." Usually a simple SoHo router will have a single wan and a single LAN interface, but a built-in switch that allows you to attach multiple devices to the LAN interface. – Tibor Apr 8 '15 at 19:21
6

IPv6 usually uses a /64 per subnet. Routers send a Router Advertisement or RA to the LAN. This RA contains the basic settings for the LAN like which prefixes (often a single /64) to use, whether the router can be used as a default gateway, whether hosts are allowed to auto-configure themselves and whether there is a DHCPv6 server on the LAN (and what kind of DHCPv6 server: stateful or stateless). The default DNS resolvers can also be sent in the RA.

Yes, this means that it is no problem at all to run a network without DHCP and have everything work automatically.

If hosts are allowed to auto-configure themselves they will take the /64 announced in the RA and give themselves one or more addresses in that /64. What probably confuses you is that this is shown as e.g. 2001:db8:aa:b::12ab/64. This doesn't mean that the host gets the whole /64, it means that the host is part of that /64 on the LAN with address 2001:db8:aa:b::12ab.

DHCPv6 can work in two ways: stateful and stateless. Stateful is similar to what you are used to in IPv4: the DHCP server assigns addresses to hosts and gives them configuration info like DNS resolves, NTP servers etc. Stateless is simpler: it only provides the configuration info. Which DHCPv6 server type is available on the LAN is communicated in the RA.

The combination of auto-configuration and stateless DHCPv6 is very common.

  • Please see edits to the question – 小太郎 Apr 8 '15 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.