So I have a Debian Buster system running radvd
which also has a /etc/network/interfaces
and for some reason only my wlan0 interface has an IPv6 address from my allocated /64 and not the eth0 interface despite no apparent differences in configuration.
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:96:8f:f0 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::ba27:ebff:fe96:8ff0/64 scope link
valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:c3:da:a5 brd ff:ff:ff:ff:ff:ff
inet 192.168.84.1/24 brd 192.168.84.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 2001:XXXX:XXXX:XX81::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::ba27:ebff:fec3:daa5/64 scope link
valid_lft forever preferred_lft forever
This is my radvd.cond
...
interface eth0
{
AdvSendAdvert on;
prefix 2001:XXXX:XXXX:XX00::1/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
interface wlan0
{
AdvSendAdvert on;
prefix 2001:XXXX:XXXX:XX81::1/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
Here is /etc/network/interfaces
...
iface lo inet6 loopback
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.7 192.168.1.8
up route add -net 192.168.84.0 netmask 255.255.255.0 gw 192.168.84.1
down route del net 192.168.84.0 netmask 255.255.255.0 gw 192.168.84.1
iface eth0 inet6 static
address 2001:XXXX:XXXX:XX00::1/64
auto wlan0
iface wlan0 inet static
address 192.168.84.1
netmask 255.255.255.0
up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
up route del -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
iface wlan0 inet6 static
address 2001:XXXX:XXXX:XX81::1/64
allow-hotplug eth1
iface eth1 inet manual
And finally my sysctl -a
values for wlan0 and eth0...
net.ipv6.conf.eth0.accept_dad = 1
net.ipv6.conf.eth0.accept_ra = 1
net.ipv6.conf.eth0.accept_ra_defrtr = 1
net.ipv6.conf.eth0.accept_ra_from_local = 0
net.ipv6.conf.eth0.accept_ra_min_hop_limit = 1
net.ipv6.conf.eth0.accept_ra_mtu = 1
net.ipv6.conf.eth0.accept_ra_pinfo = 1
net.ipv6.conf.eth0.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.eth0.accept_ra_rt_info_min_plen = 0
net.ipv6.conf.eth0.accept_ra_rtr_pref = 1
net.ipv6.conf.eth0.accept_redirects = 1
net.ipv6.conf.eth0.accept_source_route = 0
net.ipv6.conf.eth0.addr_gen_mode = 0
net.ipv6.conf.eth0.autoconf = 1
net.ipv6.conf.eth0.dad_transmits = 1
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.eth0.disable_policy = 0
net.ipv6.conf.eth0.drop_unicast_in_l2_multicast = 0
net.ipv6.conf.eth0.drop_unsolicited_na = 0
net.ipv6.conf.eth0.enhanced_dad = 1
net.ipv6.conf.eth0.force_mld_version = 0
net.ipv6.conf.eth0.force_tllao = 0
net.ipv6.conf.eth0.forwarding = 2
net.ipv6.conf.eth0.hop_limit = 64
net.ipv6.conf.eth0.ignore_routes_with_linkdown = 0
net.ipv6.conf.eth0.keep_addr_on_down = 0
net.ipv6.conf.eth0.max_addresses = 16
net.ipv6.conf.eth0.max_desync_factor = 600
net.ipv6.conf.eth0.mc_forwarding = 0
net.ipv6.conf.eth0.mldv1_unsolicited_report_interval = 10000
net.ipv6.conf.eth0.mldv2_unsolicited_report_interval = 1000
net.ipv6.conf.eth0.mtu = 1500
net.ipv6.conf.eth0.ndisc_notify = 0
net.ipv6.conf.eth0.ndisc_tclass = 0
net.ipv6.conf.eth0.proxy_ndp = 0
net.ipv6.conf.eth0.regen_max_retry = 3
net.ipv6.conf.eth0.router_probe_interval = 60
net.ipv6.conf.eth0.router_solicitation_delay = 1
net.ipv6.conf.eth0.router_solicitation_interval = 4
net.ipv6.conf.eth0.router_solicitation_max_interval = 3600
net.ipv6.conf.eth0.router_solicitations = -1
net.ipv6.conf.eth0.seg6_enabled = 0
net.ipv6.conf.eth0.suppress_frag_ndisc = 1
net.ipv6.conf.eth0.temp_prefered_lft = 86400
net.ipv6.conf.eth0.temp_valid_lft = 604800
net.ipv6.conf.eth0.use_oif_addrs_only = 0
net.ipv6.conf.eth0.use_tempaddr = 0
Here are the wlan0 interface sysctl values...
net.ipv6.conf.wlan0.accept_dad = 1
net.ipv6.conf.wlan0.accept_ra = 1
net.ipv6.conf.wlan0.accept_ra_defrtr = 1
net.ipv6.conf.wlan0.accept_ra_from_local = 0
net.ipv6.conf.wlan0.accept_ra_min_hop_limit = 1
net.ipv6.conf.wlan0.accept_ra_mtu = 1
net.ipv6.conf.wlan0.accept_ra_pinfo = 1
net.ipv6.conf.wlan0.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.wlan0.accept_ra_rt_info_min_plen = 0
net.ipv6.conf.wlan0.accept_ra_rtr_pref = 1
net.ipv6.conf.wlan0.accept_redirects = 1
net.ipv6.conf.wlan0.accept_source_route = 0
net.ipv6.conf.wlan0.addr_gen_mode = 0
net.ipv6.conf.wlan0.autoconf = 0
net.ipv6.conf.wlan0.dad_transmits = 1
net.ipv6.conf.wlan0.disable_ipv6 = 0
net.ipv6.conf.wlan0.disable_policy = 0
net.ipv6.conf.wlan0.drop_unicast_in_l2_multicast = 0
net.ipv6.conf.wlan0.drop_unsolicited_na = 0
net.ipv6.conf.wlan0.enhanced_dad = 1
net.ipv6.conf.wlan0.force_mld_version = 0
net.ipv6.conf.wlan0.force_tllao = 0
net.ipv6.conf.wlan0.forwarding = 2
net.ipv6.conf.wlan0.hop_limit = 64
net.ipv6.conf.wlan0.ignore_routes_with_linkdown = 0
net.ipv6.conf.wlan0.keep_addr_on_down = 0
net.ipv6.conf.wlan0.max_addresses = 16
net.ipv6.conf.wlan0.max_desync_factor = 600
net.ipv6.conf.wlan0.mc_forwarding = 0
net.ipv6.conf.wlan0.mldv1_unsolicited_report_interval = 10000
net.ipv6.conf.wlan0.mldv2_unsolicited_report_interval = 1000
net.ipv6.conf.wlan0.mtu = 1500
net.ipv6.conf.wlan0.ndisc_notify = 0
net.ipv6.conf.wlan0.ndisc_tclass = 0
net.ipv6.conf.wlan0.proxy_ndp = 0
net.ipv6.conf.wlan0.regen_max_retry = 3
net.ipv6.conf.wlan0.router_probe_interval = 60
net.ipv6.conf.wlan0.router_solicitation_delay = 1
net.ipv6.conf.wlan0.router_solicitation_interval = 4
net.ipv6.conf.wlan0.router_solicitation_max_interval = 3600
net.ipv6.conf.wlan0.router_solicitations = -1
net.ipv6.conf.wlan0.seg6_enabled = 0
net.ipv6.conf.wlan0.suppress_frag_ndisc = 1
net.ipv6.conf.wlan0.temp_prefered_lft = 86400
net.ipv6.conf.wlan0.temp_valid_lft = 604800
net.ipv6.conf.wlan0.use_oif_addrs_only = 0
net.ipv6.conf.wlan0.use_tempaddr = 2
The wlan0 interface looks much the same, though net.ipv6.conf.eth0.autoconf
was set to 1
though I checked and it definitely isn't set in sysctl.conf
or sysctl.d
either.
If inet settings fail with ifupdown, they will prevent inet6 settings to be applied.
When eth0 is first brought up, wlan0 has probably not yet been and has no IP configured. Thus the extra (and probably not even needed) settings with the route through the wlan0's IP don't work. This makes eth0 fail to be brought up (logically: from the point of view of ifupdown. It was actually brought up), and the inet6 stanza is not run through.
So: remove all those extra
up route add/del
entries. If you really don't want to remove them, add an extra|| true
(or2>/dev/null || :
) at the end of each, preventing those commands to ever fail the whole setup.