Setting up stateful DHCPv6 on Linux

7,109

In short: I think the DHCP server listens on the wrong interface.

Long answer: Let's assume you get the prefix 2001:DB8:1234::/48 from your ISP. In addition we assume your router has two network interfaces: eth0 (uplink to ISP) and wlan0 (for clients). If you now configure your DHCPv6 server the following:

subnet6 2001:DB8:1234::/64 {
    range6 2001:DB8:1234::10 2001:DB8:1234::ffff:ffff;
}

then after starting the DHCP server it will look for interfaces on the server which are configures in 2001:DB8:1234::/64 range and listens on these interfaces for DHCP requests.

This means the server interfaces have to be configured

  • eth0 with IP not in 2001:DB8:1234::/64 range (e.g. 2001:DB8:1234:1::2/64)
  • wlan0 with IP in 2001:DB8:1234::/64 range (e.g. 2001:DB8:1234::2/64)

In addition you should start the server with some debugging output to test whether requests are arriving from the client. For ISC dhcpd you can use the "-d -f" options, e.g.

/usr/sbin/dhcpd -6 -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid -f -d
Share:
7,109

Related videos on Youtube

fragwürdig
Author by

fragwürdig

Linux beginner. I try to learn as much as I can from doing it.

Updated on September 18, 2022

Comments

  • fragwürdig
    fragwürdig almost 2 years

    I want to set up a DHCP server on my local network for IPv6 that issues addresses and further information like DNS/NTP and so on. From my ISP I got the IPv6 Prefix which I will refer to as <prefix> in further snippets.

    I use the isc-dhcp-server. Under /etc/dhcpd.conf I have

    option dhcp6.name-servers <prefix>::2;
    option dhcp6.info-refresh-time 21600;
    
    subnet6 <prefix>::/64 {
        range6 <prefix>::1 2<prefix>::ffff:ffff;
    }
    

    The eth0 interface (which is connected to the router) is configured statically in the /etc/networking/interfaces file:

    iface eth0 inet6 static
    address <prefix>::2
    netmask 64
    

    The client has Ubuntu 14.04 LTS with network-manager and is bound to the router via the wlan0 interface (router acts as access point). Under the GUI configuration of the Ubuntu network-manager from the IPv6 tab I choose "Method: automatically, only DHCP" (so I expect stateful DHCPv6 configuration of the client - it should get an ipv6-address out of the above defined range).

    However, that does not happen. ifconfig implies, that the client was configured using the stateless method (the configured ipv6 address has the clients wlan0 HW-Address encoded)

    I suspect the routers has the wrong advertising flags set. But I can't configure the router as it is provided by the ISP. What can I do? Are there any suggestions?