# 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 2461 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 fec0:0:0:1::/64
            {
                    AdvOnLink on;
                    AdvAutonomous on;
            };
    };

It says that radvd should advertise (AdvSendAdvert on) the prefix fec0:0: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 2462 (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 hosts 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:    fec0:0:0:1::

       EUI-64 identifier:   a4:c2:b2:32

       Configured address:  fec0:0:0:1:a4:c2:b2:32

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