|Linux 11 March 2014 -|
Even though IPv6 might not be that important within your local network it might be good to get yourself into shape, and be able to provide some details of your infrastructure automatically to your network clients.
This is the second article in a series on IPv6 configuration:
Piece of advice: This is based on my findings on the internet while reading other people's helpful articles and going through a couple of man-pages on my local system.
IPv6 addresses for everyone (in your network)
Okay, after setting up the configuration of your local system, it might be interesting to enable all your machines in your network to use IPv6. There are two options to solve this kind of requirement... Either you're busy like a bee and you go around to configure each and every system manually, or you're more the lazy and effective type of network administrator and you prefer to work with Dynamic Host Configuration Protocol (DHCP). Obviously, I'm of the second type.
Enabling dynamic IPv6 address assignments can be done with a new or an existing instance of a DHCPd. In case of Ubuntu-based installation this might be isc-dhcp-server. The isc-dhcp-server allows address pooling for IP and IPv6 within the same package, you just have to run to independent daemons for each protocol version. First, check whether isc-dhcp-server is already installed and maybe running your machine like so:
In case, that the service is unknown, you have to install it like so:
Please bear in mind that there is no designated installation package for IPv6.
Okay, next you have to create a separate configuration file for IPv6 address pooling and network parameters called /etc/dhcp/dhcpd6.conf. This file is not automatically provided by the package, compared to IPv4. Again, use your favourite editor and put the following lines:
Next, save the file and start the daemon as a foreground process to see whether it is going to listen to requests or not, like so:
The parameters are explained quickly as -6 we want to run as a DHCPv6 server, -d we are sending log messages to the standard error descriptor (so you should monitor your /var/log/syslog file, too), and we explicitely want to use our newly created configuration file (-cf). You might also use the command switch -t to test the configuration file prior to running the server.
In my case, I ended up with a couple of complaints by the server, especially reporting that the necessary lease file wouldn't exist. So, ensure that the lease file for your IPv6 address assignments is present:
Now, you should be good to go. Stop your foreground process and try to run the DHCPv6 server as a service on your system:
Check your log file /var/log/syslog for any kind of problems. Refer to the man-pages of isc-dhcp-server and you might check out Chapter 22.6 of Peter Bieringer's IPv6 Howto. The instructions regarding DHCPv6 on the Ubuntu Wiki are not as complete as expected and it might not be as helpful as this article or Peter's HOWTO. But see for yourself.
Does the client get an IPv6 address?
Running a DHCPv6 server on your local network surely comes in handy but it has to work properly. The following paragraphs describe briefly how to check the IPv6 configuration of your clients,
Linux - ifconfig or ip command
First, you have enable IPv6 on your Linux by specifying the necessary directives in the /etc/network/interfaces file, like so:
Note: Your network device might be eth0 - please don't just copy my configuration lines.
Then, either restart your network subsystem, or enable the device manually using the dhclient command with IPv6 switch, like so:
You would either use the ifconfig or (if installed) the ip command to check the configuration of your network device like so:
Looks good, the client has an IPv6 assignment. Now, let's see whether DNS information has been provided, too.
Windows - netsh
Per description on TechNet the netsh is defined as following:
And even though TechNet states that it applies to Windows Server (only), it is also available on Windows client operating systems, like Vista, Windows 7 and Windows 8.
In order to get or even set information related to IPv6 protocol, we have to switch the netsh interface context prior to our queries. Open a command prompt in Windows and run the following statements:
Select the device index from the Idx column to get more details about the IPv6 address and DNS server information (here: I'm going to use my WiFi device with device index 11), like so:
Okay, address information has been provided. Now, let's check the details about DNS and resolving host names:
Okay, that looks good already. Our Windows client has a valid IPv6 address lease with lifetime information and details about the configured DNS servers.
Talking about DNS server...