Arch linux: setting IPv6 address, if_addaddress6: Invalid argument
I have native IPv6 connectivity from my ISP, Verso Networks in Denver.
I have dhcpd running on the gateway with this config file:
hostname ironsides
allowinterfaces enp48s0
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
option interface_mtu
require dhcp_server_identifier
nohook lookup-hostname
noipv4ll
noipv6rs
interface enp48s0
ipv6rs
ia_na 1
ia_pd 2 enp32s0/0
enp48s0 is connected to The Internet, enp32s0 is on my LAN. This works for the gateway box. dhcpcd acquires an address and sets default routes and such:
# ip -6 address show dev enp48s0
4: enp48s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2604:f880:0:87:6a05:caff:fe4a:8ac7/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 2591550sec preferred_lft 604350sec
inet6 fe80::6a05:caff:fe4a:8ac7/64 scope link
valid_lft forever preferred_lft forever
I have radvd set to advertise /60 addresses for the prefix that dhcpcd acquires. Here's radvd.conf:
interface enp32s0 {
AdvSendAdvert on;
MinRtrAdvInterval 5;
MaxRtrAdvInterval 15;
prefix ::/64 {
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
The weird thing is that my other Arch linux box won't get an IPv6 address that radvd sends out. On the gateway box, journalctl says this:
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): timer_handler called for enp32s0
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): ::/64 auto prefix detected on iface enp32s0
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): auto-selected prefix 2604:f880:0:8050::/60 on interface enp32s0
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): sending RA to ff02::1 on enp32s0 (fe80::6a05:caff:fe5a:3ab7), 2 options (using 56/1210 bytes)
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): enp32s0 next scheduled RA in 7.80783 second(s)
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): polling for 7.807 second(s), next iface is enp32s0
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): enp32s0 recvmsg len=56
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): enp32s0 received a packet
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): enp32s0 received RA from: fe80::6a05:caff:fe5a:3ab7 (myself)
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): processed RA on enp32s0
Nov 16 08:21:34 baldur radvd[5432]: [Nov 16 08:21:34] radvd (5432): polling for 7.807 second(s), next iface is enp32s0
On the client, for every RA that baldur (the gateway) sends out,
mirabilis (the client) says this, every time baldur radvd sends RA to ff02::1 on enp32s0 (which mirabilis, the client) is on.
Nov 16 08:21:34 mirabilis dhcpcd[20783]: wlp3s0: Router Advertisement from fe80::6a05:caff:fe5a:3ab7
Nov 16 08:21:34 mirabilis dhcpcd[20783]: wlp3s0: adding address 2604:f880:0:8050:e71e:88b6:e10b:bbb3/60
Nov 16 08:21:34 mirabilis dhcpcd[20783]: wlp3s0: pltime 14400 seconds, vltime 86400 seconds
Nov 16 08:21:34 mirabilis dhcpcd[20783]: if_addaddress6: Invalid argument
Nov 16 08:21:34 mirabilis dhcpcd[20783]: wlp3s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT
I've googled "if_addaddress6: Invalid argument" and I haven't come up with much.
If I set the IPv6 address "2604:f880:0:8050:e71e:88b6:e10b:bbb3/60" by hand, with ip, it works fine. Routes to The Internet, I can ping and traceroute ipv6.google.com from the client and everything.
Why won't it assign the address?
Edited 16 Nov 2017. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 7 · 100% up
- Kind
- Text
- ID
- 7dd487
2 comments
As a general rule of thumb, all on-link ranges should be /64 in v6. The point of the /60 is so that you have 16 separate /64s (...which is kinda an unjustifiably small allocation, but that's a different discussion). Perhaps more to the point, SLAAC requires /64.
Assign something like
2604:f880:0:8050::1/64on enp32s0 rather than2604:f880:0:8050::1/60.I think I got it sorted out, with thanks to Dagger0 for a hint that put me on the right path.
dhcpcd.confon the gateway has to have IPv6 config something like this:"8ac7" is the last 2 bytes of the hardware address of enp48s0, and "3ab7" are the last two bytes of enp32s0's hardware address.
radvd.confon the gateway machine looks like this:I believe I had "prefix ::/60", which made
radvdgive out /60 prefixes. I think.Anyway, between setting
iaidvalues and the::/64change, my gateway advertised routes, delegated a prefix to the LAN NIC, and the client picks up and uses a globally-routeable IPv6 address.