1

I need to create prefix entries on demand to configure a quite large IPv6 net. What I'm doing now is:

stop radvd
write to radvd.conf
restarting radvd

But this is quite painful.

I wonder if there is something like omshell/omapi but for radvd to configure it dynamically. What I want to achieve is to be able to create subnets and adding them to the radvd.conf file.

The reason why I prefer to stop the service is because there is a high chance of reload while an actual writing to the radvd.conf is being performed. So I rather stop the service, perform the writing and then restart.

ssedano
  • 214
  • 4
  • 10

2 Answers2

1

You can send radvd a HUP signal and it reloads the config.

systemctl reload radvd.service

or

service radvd reload

or

killall -HUP radvd

depending on the type (age) of system you are running on.

I would write a config to a temp file, and then use mv to move it into place. Then do the reload. mv usually being an atomic operation if on the same filesystem.

Tim Bray
  • 130
  • 4
  • I have seen some case where `mv` would unlike the target before calling `rename`, so there would be a brief moment where the target did not exist. But still your suggestion is still a much more sensible approach than shutting down `radvd` just to update the configuration. – kasperd Feb 08 '17 at 22:28
0

Another completely different alternative approach.

The quagga routing suite contains a route announcer too.

http://www.nongnu.org/quagga/docs/docs-info.html#Router-Advertisement

You can drive it via telnet (obviously from localhost) or using the vtsh command.

commands would be

configure term
interface eth0
ipv6 nd prefix 2001:db8:1111:2222::/64 
no ipv6 nd suppress-ra

It is a little bit basic. It doesn't support RDNSS (DNS server addresses). But gives you a way to programmatically add a route announcement.

Tim Bray
  • 130
  • 4