3

Trying to enable the ISC DHCP server for just IPv6 on Ubuntu 12.04 LTS.

I have downloaded and installed the DHCP server via the following command:

$ sudo apt-get install isc-dhcp-server

Then I have followed the instructions in the following resources, Ubuntu Wiki DHCPv6, SixXS - Configuring ISC DHCPv6 Server and Linux IPv6 HOWTO - Configuration of the ISC DHCP server for IPv6 .

So from review all those resources it seems like I need to:

  1. set a static IPv6 address for the Interface I want to run the DHCPv6 server from that is part of the IPv6 network subnet outside the DHCP range.

  2. Edit the /etc/dhcp/dhcpd6.conf file to configure the DHCPv6 range etc.

  3. Create the /var/lib/dhcp/dhcpd6.leases

  4. Manually start the DHCPv6 server.

Setting the Static IP for eth0

$ sudo ifconfig eth0 inet6 add 2001:db8:0:1::128/64

My dhcpd6.conf

default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet6 2001:db8:0:1::/64
{
   #Range for clients
   range6 2001:db8:0:1::129 2001:db8:0:1::254;
}

Created the dhcpd6.leases file

As indicated in the dhcpd.leases man page.

$ touch /var/lib/dhcp/dhcpd6.leases  #Tried with sudo as well

Manually starting the DHCPv6 server.

Attempted to start the server using the following command:

$ sudo dhcp -6 -f -cf /etc/dhcp/dhcpd6.conf eth0

The problem, the DHCP will not start, with an append error for the dhcpd6.leases file as indicated below when running the manual start command noted above.

Can't open /var/lib/dhcp/dhcpd6.leases for append.

Any ideas what I might be missing?

Kalle Richter
  • 6,180
  • 21
  • 70
  • 103
MrDaniel
  • 131

3 Answers3

1

Looks like simple access rights for the file '/var/lib/dhcp/dhcpd6.leases'. Check that it is owned by the same user that is running the dhcpd daemon and that that user has write rights to the file.

Anders
  • 1,585
0

I ran into a similar issue and just used touch to create the file, after that it started as expected.

sudo touch /var/lib//dhcp/dhcpd6.leases
-1

I ran the same issue and solved it by:

chmod 0777 /var/lib//dhcp/dhcpd6.leases

Others did not work.

andrew.46
  • 38,003
  • 27
  • 156
  • 232