Rad /

Router Advertisement Daemon

Instead of having clients configure their own static IPv6 networking, it's possible for connected machines to use dynamically generated IPv6 addresses. OpenBSD's router advertisement daemon (rad(8)) can help.

rad(8) sends IPv6 router advertisement messages with prefix and default router information. When a client sends router solicitation messages, rad will also reply.

Suppose on our interface if0, we want to provide IPv6 networking for clients on the network 2001:db8:1234:5678::/64. We can use the following configuration for rad.conf(5):

# cat /etc/rad.conf
interface if0 {
        no auto prefix
        prefix 2001:db8:1234:5678::/64
        dns {
                nameserver 2001:db8:1234:5678::1
        }
}

We declare our block with interface if0, then we specify @@no auto prefix@@. By default, rad discovers prefixes by inspecting the IPv6 addresses configured on the interface, but we want to disable this. We then specify our prefix manually with 2001:db8:1234:5678::/64. Finally, we tell clients to use our dns nameserver on 2001:db8:1234:5678::1.

We then enable and start rad(8):

# rcctl enable rad
# rcctl start rad

For OpenBSD clients to use rad, they can use autoconf for networking. OpenBSD's slaacd? will handle the rest.

Troubleshooting

To debug, first stop all instances of rad that may be running:

# rcctl stop rad
# pkill -TERM rad

Then run rad in the foreground with increased verbosity:

# rad -dv
startup
new interface if0
adding interface if0
add static prefixes for if0
adding 2001:db8:1234:5678::/64 prefix
IMSG_OPEN_ICMP6SOCK
open_icmp6sock: 0
joining multicast group on if0
iface_timeout new timeout in 422
send RA on if0

Check to ensure that all values are correct.

RA or RS with hop limit of 255 from fe80::ea8b:27ff:fe7b:7a02 on if0
got RS from fe80::ea8b:27ff:fe7b:7a02%if0 on if0
got RS with source linkaddr option
send RA on if0

During normal operation, clients should send RS (router solicitation), and rad will send RA (router advertisements).

On a client machine, if you are running OpenBSD with slaacd?, you can run slaacd in the foreground with increased verbosity.