10.6. Configuring the radvd daemon for IPv6 routers

The router advertisement daemon (radvd) sends router advertisement messages which are required for IPv6 stateless autoconfiguration. This allows users to automatically configure their addresses, settings, routes and choose a default router based on these advertisements. To configure the radvd daemon:
  1. Install the radvd daemon:
    ~]# sudo yum install radvd
  2. Set up the /etc/radvd.conf file. For example:
    interface eth0
    {
    AdvSendAdvert on;
    MinRtrAdvInterval 30;
    MaxRtrAdvInterval 100;
    prefix 2001:db8:1:0::/64
    {
    AdvOnLink on;
    AdvAutonomous on;
    AdvRouterAddr off;
    };
    
    };

    Note

    If you want to additionally advertise DNS resolvers along with the router advertisements, add the RDNSS <ip> <ip> <ip> { }; option in the /etc/radvd.conf file. To configure a DHCPv6 service for your subnets, you can set the AdvManagedFlag to on, so the router advertisements allow clients to automatically obtain an IPv6 address when a DHCPv6 service is available. For more details on configuring the DHCPv6 service, see Section 10.5, “DHCP for IPv6 (DHCPv6)”
  3. Enable the radvd daemon:
    ~]# sudo systemctl enable radvd.service
  4. Start the radvd daemon immediately:
    ~]# sudo systemctl start radvd.service
To display the content of router advertisement packages and the configured values sent by the radvd daemon, use the radvdump command:
~]# radvdump
Router advertisement from fe80::280:c8ff:feb9:cef9 (hoplimit 255)
        AdvCurHopLimit: 64
        AdvManagedFlag: off
        AdvOtherConfigFlag: off
        AdvHomeAgentFlag: off
        AdvReachableTime: 0
        AdvRetransTimer: 0
        Prefix 2002:0102:0304:f101::/64
                AdvValidLifetime: 30
                AdvPreferredLifetime: 20
                AdvOnLink: off
                AdvAutonomous: on
                AdvRouterAddr: on
        Prefix 2001:0db8:100:f101::/64
                AdvValidLifetime: 2592000
                AdvPreferredLifetime: 604800
                AdvOnLink: on
                AdvAutonomous: on
                AdvRouterAddr: on
        AdvSourceLLAddress: 00 80 12 34 56 78
For more information on the radvd daemon, see the radvd(8), radvd.conf(5), radvdump(8) man pages.