[Bug 1214385] Re: Stateless DHCPv6 not working in precise

Philipp Kern pkern at google.com
Thu Sep 5 08:47:39 UTC 2013


root at ale:~# apt-cache policy isc-dhcp-client
isc-dhcp-client:
  Installed: 4.1.ESV-R4-0ubuntu5.8
  Candidate: 4.1.ESV-R4-0ubuntu5.8
  Version table:
     4.1.ESV-R4-0ubuntu5.9 0
        400 http://ubuntu-precise.mirror.corp.google.com/ubuntu/ precise-proposed/main amd64 Packages
 *** 4.1.ESV-R4-0ubuntu5.8 0
        600 https://rapture-prod.corp.google.com/ ubuntu-precise-base/main amd64 Packages
        100 /var/lib/dpkg/status
root at ale:~# tail -n 5 /etc/network/interfaces 
auto eth0
iface eth0 inet manual
iface eth0 inet6 auto
 dhcp 1

root at ale:~# ifdown eth0; ifup eth0
ifdown: interface eth0 not configured
net.ipv6.conf.eth0.accept_ra = 1
net.ipv6.conf.eth0.autoconf = 1
root at ale:~# grep nameserver /etc/resolv.conf
nameserver 172.16.xxx.xxx
root at ale:~# apt-get install isc-dhcp-client=4.1.ESV-R4-0ubuntu5.9 isc-dhcp-common=4.1.ESV-R4-0ubuntu5.9
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  resolvconf avahi-autoipd
The following packages will be upgraded:
  isc-dhcp-client isc-dhcp-common
2 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/637 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 225378 files and directories currently installed.)
Preparing to replace isc-dhcp-client 4.1.ESV-R4-0ubuntu5.8 (using .../isc-dhcp-client_4.1.ESV-R4-0ubuntu5.9_amd64.deb) ...
Unpacking replacement isc-dhcp-client ...
Preparing to replace isc-dhcp-common 4.1.ESV-R4-0ubuntu5.8 (using .../isc-dhcp-common_4.1.ESV-R4-0ubuntu5.9_amd64.deb) ...
Unpacking replacement isc-dhcp-common ...
Processing triggers for man-db ...
Setting up isc-dhcp-common (4.1.ESV-R4-0ubuntu5.9) ...
Setting up isc-dhcp-client (4.1.ESV-R4-0ubuntu5.9) ...
root at ale:~# ifdown eth0; ifup eth0
Sleeping for 338 seconds ...
net.ipv6.conf.eth0.accept_ra = 1
net.ipv6.conf.eth0.autoconf = 1
root at ale:~# grep nameserver /etc/resolv.conf
nameserver 2401:xxxx:xxxx::53

(IP addresses edited out.) Works for me.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1214385

Title:
  Stateless DHCPv6 not working in precise

Status in “isc-dhcp” package in Ubuntu:
  Fix Released
Status in “isc-dhcp” source package in Precise:
  Fix Committed

Bug description:
  [Impact]
  isc-dhcp-client in precise does not do stateless DHCPv6 correctly if it's enabled as "dhcp 1" within "iface <IFACE> inet6 auto" within /etc/network/interfaces. The dhclient-script responsible for updating /etc/resolv.conf exists if it doesn't find an IPv6 address in its environment, which is only true for stateful DHCPv6.

  [Test Case]
  * You should have IPv6 on your network segment, make a note of the subnet.
  * Have a stateless DHCPv6 server listen on the network segment:
  ** Minimal dhcpd6.conf:
  authoritative;
  option dhcp6.name-servers 2001:4860:4860::8888, 2001:4860:4860::8844;
  option dhcp6.domain-search "ubuntu.com";
  pid-file-name "/tmp/dhcpd.test.pid";
  subnet6 fd7a:4ac2:1751:0::/64 {}
  ** Adjust the subnet information to the one you're actually using or the DHCP server will refuse to start.
  ** Install isc-dhcp-server on a host on the same network segment.
  ** Disable apparmor (it will yield losts of EPERM for the test file locations).
  ** Start up the server there using: /usr/sbin/dhcpd -cf dhcpd.conf -6 -lf /tmp/leases.test
  * Have network configuration be managed by ifupdown, not network-manager:
  * Add the following configuration to /etc/network/interfaces:
  iface eth0 inet6 auto
   dhcp 1
  * ifdown eth0 && ifup eth0 (alternatively: dhclient -6 -S -v IFACE)
  * Check if /etc/resolv.conf contains:
  search ubuntu.com.
  nameserver 2001:4860:4860::8888
  nameserver 2001:4860:4860::8844
  * If the old version of the package is installed, /etc/resolv.conf content will not change.

  [Regression Potential]
  The suggested change is already present since quantal. The change itself is self-contained

  [Additional Info]
  /sbin/dhclient-script in precise's isc-dhcp-client 4.1.ESV-R4-0ubuntu5.8 contains the following snippet:

      BOUND6|RENEW6|REBIND6)
          if [ -z "${new_ip6_address}" ] || [ -z "${new_ip6_prefixlen}" ]; then
              exit_with_hooks 2
          fi

          # set leased IP
          ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
              dev ${interface} scope global

  This assumes that the result of the DHCPv6 transaction is an address
  with a prefix, which is the case for stateful DHCPv6. For stateless
  DHCPv6, however, we only get additional information that's not
  directly address-related. This is fixed since quantal and reads like
  this:

      BOUND6|RENEW6|REBIND6)
          if [ "${new_ip6_address}" ] && [ "${new_ip6_prefixlen}" ]; then
              # set leased IP
              ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
                  dev ${interface} scope global
          fi

  It looks like the only change from the diff to the current saucy
  version we need for it to work correctly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1214385/+subscriptions



More information about the Ubuntu-sponsors mailing list