Hello all,
I have been undergoing a process of moving my IPv4/6 configurations from the Jail /etc/rc.conf files to the /etc/jail.conf files for [theoretical] ease of maintenance. I am running into a problem, however.
If I leave it to the Jail's /etc/rc.conf to start the networking with the following the IPv6 DAD finishes basically instantly and services can bind to the assigned ULA, a SLAAC ULA and a SLAAC GLA no problem.
However, when moving this functionality into /etc/jail.conf with the following
/etc/jail.conf.d/ns1.conf
Why is IPv6 not working as expected when using jail.conf but is working quickly when using rc.conf?
I have been undergoing a process of moving my IPv4/6 configurations from the Jail /etc/rc.conf files to the /etc/jail.conf files for [theoretical] ease of maintenance. I am running into a problem, however.
If I leave it to the Jail's /etc/rc.conf to start the networking with the following the IPv6 DAD finishes basically instantly and services can bind to the assigned ULA, a SLAAC ULA and a SLAAC GLA no problem.
Code:
ifconfig_vnetns1="inet 172.23.1.10/24"
ifconfig_vnetns1_ipv6="inet6 fd33:58bc:59a0:2301::10/64 accept_rtadv"
defaultrouter="172.23.1.1"
However, when moving this functionality into /etc/jail.conf with the following
exec.start sequence, IPv6 DAD takes several minutes and services such as ISC BIND do not bind the the IPv6 addresses after they are added:
Code:
path = "/jails/${name}";
host.hostname = "${name}.myfqdn.com";
$macprefix = "02:14:a4:21";
enforce_statfs 1;
mount.devfs;
exec.clean;
exec.consolelog = "/var/log/jails/${name}.log";
vnet;
vnet.interface = "vnet${name}";
# Default local FreeBSD pkg cache
mount = "/var/cache/pkg /jails/${name}/var/cache/pkg nullfs rw 0 0";
exec.prestart = "ifconfig epair${id} create up";
exec.prestart += "ifconfig epair${id}a up descr jail:${name}";
exec.prestart += "ifconfig bridge${vlan} addm epair${id}a";
exec.prestart += "ifconfig epair${id}b ether ${macprefix}:${id}:0b";
exec.prestart += "ifconfig epair${id}b name vnet${name}";
exec.start = "ifconfig vnet${name} ${ipv4} up";
exec.start += "route add default ${ipv4gw}";
exec.start += "ifconfig vnet${name} inet6 ${ipv6} up";
exec.start += "sh /etc/rc";
exec.poststart = "logger -t jail jail ${name} started";
exec.prestop = "ifconfig vnet${name} -vnet ${name}";
exec.stop = "sh /etc/rc.shutdown";
exec.poststop = "ifconfig bridge${vlan} deletem epair${id}a";
exec.poststop += "ifconfig epair${id}a destroy";
exec.poststop += "logger -t jail jail ${name} stopped";
.include "/etc/jail.conf.d/*.conf";
/etc/jail.conf.d/ns1.conf
Code:
ns1 {
$id = "52";
$vlan = "101";
devfs_ruleset = "7";
$ipv4 = "172.23.1.10/24";
$ipv4gw = "172.23.1.1";
$ipv6 = "fd33:58bc:59a0:2301::10/64 accept_rtadv";
}
Why is IPv6 not working as expected when using jail.conf but is working quickly when using rc.conf?