In this article I will describe how to setup Radvd on Ubuntu. I will only explain the options to setup a stateful setup with DHCPv6 server.
This is a requirement if you want to use DHCPv6. The availability of DHCPv6 is announced by flags in the router advertisement packets. With this tool you send out Router Advertisements (RA’s) which will give your client some options by setting these flags. That can either be IP stateless autoconfiguration via SLAAC, DNS options only, or full DHCP.
Install Radvd
sudo apt update
sudo apt install radvd
Rename radvd.conf to radvd.conf.bak
mv /etc/radvd.conf /etc/radvd.conf.bak
Create a new, empty configfile by using your favorite text editor
sudo nano /etc/radvd.conf
Copy/paste the content below and adjust the italic, underlined options to your own needs.
interface ethx
{
AdvSendAdvert on;
AdvManagedFlag on;
AdvOtherConfigFlag on;
AdvCurHopLimit 64;
AdvDefaultLifetime 1800;
AdvHomeAgentFlag on;
AdvDefaultPreference medium;
AdvSourceLLAddress on;
prefix prefix/64
{
AdvValidLifetime 600;
AdvPreferredLifetime 600;
AdvOnLink on;
AdvAutonomous off;
AdvRouterAddr on;
};
};
Explanation of the options providers above that are a requirement for stateful DHCPv6:
AdvSendAdvert on|off
A flag indicating whether or not the router sends periodic router advertisements and responds to router solicitations.
It needs to be on to enable advertisement on this interface.
AdvManagedFlag on
Hosts will use a stateful DHCPv6 server to get an IP address.
AdvOtherConfigFlag on
Hosts will use a DHCPv6 server to pick up other options, like DNS and domain.
Prefix options:
AdvOnLink on
Indicates that this prefix can be used for on-link determination.
AdvAutonomous off
This disables stateless autoconfiguration via SLAAC.
AdvRouterAddr on|off
Indicates that the network prefix is sent
Save the .conf and restart Radvd
sudo systemctl restart radvd
Leave a Reply
You must be logged in to post a comment.