# RADVD Introduction

by Lars Fenneberg et al. Updated 2002-01-12.

IPv6 has a lot more support for autoconfiguration than IPv4. But for this autoconfiguration to work on the hosts of a network, the routers of the local network have to run a program which answers the autoconfiguration requests of the hosts.

On Linux this program is called radvd, which stands for Router ADVertisement Daemon. This daemon listens to Router Solicitations (RS) and answers with Router Advertisement (RA). Furthermore unsolicited RAs are also send from time to time. RFC 4861 defines most functions of radvd.

Router Advertisements contain information, which is used by hosts to configure their interfaces. This information includes address prefixes, the MTU of the link and information about default routers.

Of course the routers can't autoconfigure themselves, so the information on the routers has to be provided by the administrator of the system. This is done by manually configuring the interfaces and routes and by configuring the router advertisement daemon.

A small and simple configuration file for radvd might look like this:

    interface eth0
    {
            AdvSendAdvert on;
            prefix 2001:db8:0:1::/64
            {
                    AdvOnLink on;
                    AdvAutonomous on;
            };
    };

It says that radvd should advertise (AdvSendAdvert on) the prefix 2001:db8:0:1:: which has a lenght of 64 on the interface eth0. Also the prefix is marked as autonomous (AdvAutonomous on) and as on-link (AdvOnLink on). The both currently default to enabled but are included here for introductory purposes; it isn't necessary to define them. All the other options are left on their default values.

Autonomous means that the prefix can be used for automatic address configuration and on-link means that the hosts can assume that all the hosts which use this prefix are reachable via the interface on which the host received this RA.

The prefix must be 64 bits long (apart from very few exceptions), as dictated by RFC 2464 and other standards for different link-layer technologies. For more details, see RFC 4862 (IPv6 Stateless Address Autoconfiguration) and RFC 2464 (Transmission of IPv6 Packets over Ethernet Networks). For more information on configuring radvd please look at the manual pages which are included in the radvd distribution.

So, when an interface on a host is UPed and a RA is received, the host can configure an address on the interface by using the prefix and appending the EUI-64 identifier derived from the hardware address (also called link-layer token). The EUI-64 identifier is simply appended after the prefix. For example:

       Announced prefix:    2001:db8:0:1::

       MAC address:         00:07:E9:7B:02:59

       EUI-64 identifier:   0207:e9ff:fe7b:259

       Configured address:  2001:db8:0:1:207:e9ff:fe7b:259

The host can also choose a default router by examining the RA. The rest works automatically.

So now we've configured radvd, but we still need to configure the interfaces and set the routes (on the router). There's a lot of good material on setting up IPv6, and the reader is encouraged to have a look at it; for example:

- http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/IPv6-HOWTO.html
- http://people.debian.org/~csmall/ipv6/setup.html (for non-Debian too)

Copyright © 1997 Lars Fenneberg