Setting up IPv6 radvd and dibbler to work together on Ubuntu 10.04

Credit to Mr.Dickson.

Unfortunately a lot of devices don’t pass on RDNS information from radvd  even though it’s included in the RFC. The best it can do is a default gateway and an IPv6 address. You are supposed to be able to pass RDNS information, but I’ve found that the devices that I’ve tried (Windows 7 and Android Gingerbread, still don’t support that part of the Request for Comment) hence the use of DHCPv6.

The host that I use to allocate IPv6 addresses has its firewall set to deny all as default, so I had to open the following port to allow DHCPv6 to work. You can probably ignore the step below, (it’s just a reminder to me to check these things) :-D

1
sudo ufw allow proto udp from fe80::/64 to any port 547

SLAAC (Stateless Address Auto Configuration) with stateless DHCPv6

We will use SLAAC to assign our client PCs a valid IPv6 address and assign a valid IPv6 gateway and use a stateless configuration of DHCPv6 to assign our DNS (RDNSS) servers.

You may or may not want to read RFC 4862 which defines SLAAC and RFC 5175 which defines RA (router adverts) so you understand the whole process better. Specifically you need to understand how the Managed address configuration flag and Other configuration flag effect your RADVd configuration and your DCHPv6 configuration.

  • The Managed address configuration flag expressed as AdvManagedFlag on/off in your /etc/radvd.conf file controls rather the host will use DHCPv6 to obtain its IPv6 address and IPv6 gateway settings. In the ON setting we are saying we want to use statefull DHCPv6 where the DHCP daemon provides all IPv6 addressing information. We can still use RA (radvd daemon) to assign the default gateway(s) for the broadcast domain.
  • The Other configuration flag expressed as AdvOtherConfigFlag on/off in your /etc/radvd.conf file controls rather the host will use DHCPv6 to get additional information like the address of DNS (RDNSS) server(s). In the OFF state the host will NOT use DHCPv6 to get DNS server information, ON will have the host use DHCP for DNS server assignment.

So, for this configuration to work, we will need to set the AdvManagedFlag off and AdvOtherConfigFlag on in our /etc/radvd.conf file. First though, we’ll install radvd on our system.

Install radvd.

1
sudo apt-get install radvd

Now, we’ll rename the original /etc/radvd.conf file to /etc/radvd.conf.old.

1
sudo mv /etc/radvd.conf /etc/radvd.conf.old

We’ll now create a radvd file with the appropriate settings.

1
sudo nano /etc/radvd.conf

Add the following settings.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
interface eth0
 {
     # We are sending advertisments (route)
     AdvSendAdvert on;
 
     # When set, host use the administered (stateful) protocol
     # for address autoconfiguration. The use of this flag is
     # described in RFC 4862
     AdvManagedFlag off;
 
     # When set, host use the administered (stateful) protocol
     # for address autoconfiguration. For other (non-address)
     # information.
     # The use of this flag is described in RFC 4862
     AdvOtherConfigFlag on;
 
     # Suggested Maximum Transmission setting for using the
     # Hurricane Electric Tunnel Broker.
     AdvLinkMTU 1480;
 
     # Netmask length must be "/64"
     # (see RFC 2462, sect 5.5.3, page 18)
     prefix 2001:DB8::/64
     {
          # Says to hosts:
          # "Everything sharing this prefix is on the
          # same link as you."
          AdvOnLink on;
 
          # Says to hosts:
          # "Use the prefix to autoconfigure your address"
          AdvAutonomous on;
     };
};

Now we need to start radvd to ensure everything is working, use the following command.

1
sudo /etc/init.d/radvd start

To check that radvd is working correctly, type the following.

1
rdisk6 eth0

If you get the following message (apart from the prefix) then everything is working as expected.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
rdisc6 eth0
Soliciting ff02::2 (ff02::2) on eth0...
 
Hop limit                 :           64 (      0x40)
Stateful address conf.    :           No
Stateful other conf.      :          Yes
Router preference         :       medium
Router lifetime           :         1800 (0x00000708) seconds
Reachable time            :  unspecified (0x00000000)
Retransmit time           :  unspecified (0x00000000)
 Prefix                   : 2001:XXX:XXXX:XXXX::/64
  Valid time              :        86400 (0x00015180) seconds
  Pref. time              :        14400 (0x00003840) seconds
 MTU                      :         1480 bytes (valid)

Install dibbler.

1
sudo apt-get install dibbler-server

Select No when prompted to start dibbler when the system starts.
(See screen shot)

Change directory to the dibbler configuration directory

1
cd /etc/dibbler/

Move the default server.conf to server.conf.old

1
sudo mv server.conf server.conf.old

Create a new server.conf and add the following.

1
sudo nano server.conf

Add the following to the server.conf file remembering to change the IPv6 prefix and CIDR to your own network address allocation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# William Dickson 24/02/12
# Adapted to support stateless autoconfiguration
# using radvd and dibbler in a home/office environment.
# You may want to point the dns-server option to googles
# public IPv6 servers, this is setup to use Hurricane
# Electrics IPv6 RDNS server.
#    Google's public IPv6 RDNS Servers.
#    2001:4860:4860::8888
#    2001:4860:4860::8844
# Logging level range: 1(Emergency)-8(Debug)
#
log-level 8
log-mode full
stateless
iface eth0
    {
    option dns-server 2001:470:81e5::1
    }

To start dibbler at the command prompt type.

1
sudo /etc/init.d/dibbler-server start

To check and see if dibbler is running, you can type the following.

1
sudo /etc/init.d/dibbler-server status

You should see the following:

1
2
3
4
5
6
7
8
Status DHCPv6 server: dibbler-server
| Dibbler - a portable DHCPv6, version 0.7.3 (SERVER, Linux port)
| Authors : Tomasz Mrugalski,Marek Senderski
| Licence : GNU GPL v2 only. Developed at Gdansk University of Technology.
| Homepage: http://klub.com.pl/dhcpv6/
Dibbler server: RUNNING, pid=1388
Dibbler client: NOT RUNNING.
Dibbler relay : NOT RUNNING.

Final step, now need to set up dibbler to start automatically when the server is rebooted. To do this, we need to add the daemon to the the default runlevels by using the following command.

1
sudo update-rc.d dibbler-server defaults 99 20

All done, now whenever the server is rebooted it should automatically start dibbler. RADVd should start automatically, as the installer add’s the default runlevels.

Advertisements
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

ABOUT AUTHOR
Rodel Sales is a freelance I.T Professional . Start blogging on May 2013 to share my technical skills to other I.T professionals, and collect imperative guide from the internet world.
Blog Archieve
June 2013
M T W T F S S
« May   Jul »
 12
3456789
10111213141516
17181920212223
24252627282930
%d bloggers like this: