BT IPv6 September 2017
This is an update to: BT Broadband with native IPv6
Around four months after setting up native IPv6 with BT, I restarted my router for the first time and noticed a distinct lack of IPv6 connectivity. There were no global IPv6 addresses assigned at all.
This is what I could see looking in the log:
File extract: /var/log/syslog
dhcpcd: bt: unsupported interface family 00 dhcpcd: bt: cannot assign multiple prefixes with a SLA of 0 dhcpcd: bt: DHCPv6 server does not support OPTION_PD_EXCLUDE
I have no idea what the first log message means.
The second log message was due to me trying to assign prefixes to both my bt (sla_id 0) and lan (sla_id 1) interfaces with the following.
File extract: /etc/dhcpcd.conf
# Configure IPv6 on bt and accept router solicitations interface bt ipv6only ipv6rs # Delegate prefixes to bt and lan interfaces ia_pd 1 bt/0 lan/1
I read the manpage for dhcpcd5 and noticed that …sla_id can be 0 only if the Delegated Prefix is assigned to one interface.So when assigning multiple prefixes I would have to start from sla_id 1 instead.
The manpage was helpful with the third log message too: you cannot assign a prefix to the requesting interface unless the DHCPv6 server supports RFC6603 Prefix Exclude Option. BT either doesn’t support this option or it no longer does. So I can’t assign a prefix to my bt interface.
This is the revised configuration that I tried.
hostname duid option rapid_commit option domain_name_servers, domain_name, domain_search, host_name option classless_static_routes option ntp_servers require dhcp_server_identifier nohook lookup-hostname # Globally disabling router solicitation as requesting # prefix delegation noipv6rs # Only try to configure these interfaces allowinterfaces bt lan # Only configure IPv6 on lan interface: internal IPv4 is static interface lan ipv6only # Configure IPv6 on bt and accept router solicitations interface bt ipv6only ipv6rs # Request a prefix for lan. Using sla_id 0 resulted in the full /56 # being assigned to lan, whereas sla_id 1 results in a /64. ia_pd 1 lan/1
No default route
I now had prefix delegation working again and a global /64 prefix assigned to my lan but I still couldn’t ping over IPv6.
# ping6 allysmith.uk connect: Network is unreachable
I checked to see what the default route was and discovered that there was no default route through bt.
# ip -6 route show 2a00:23c4:1004:1a01::/64 dev lan proto kernel metric 203 fe80::/64 dev lan proto kernel metric 256 fe80::/64 dev wan proto kernel metric 256 fe80::/10 dev bt metric 1 fe80::/10 dev bt proto kernel metric 256
Adding this route manually worked; I couldn’t understand why it wasn't picking the route up through router advertisements. Then I remembered that there was a bug/feature, in Debian at least, that IPv6 disables router advertisements when you have forwarding set. I had written the following script to deal with this but forgot to update it when I renamed interface ppp0 to bt.
#!/bin/bash # Accept IPv6 Router Advertisements on bt even when IPv6 forwarding is enabled if [ "$PPP_IFACE" = "bt" ]; then logger IPv6 interface up on bt, changing to accept_ra=2 echo 2 > /proc/sys/net/ipv6/conf/"$PPP_IFACE"/accept_ra fi
This is the result after a restart. My external interface bt has a link-local IPv6 address, which is all BT assign. I have requested a prefix from BT (/56) and assigned a /64 to my lan interface.
# ifconfig bt: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 184.108.40.206 netmask 255.255.255.255 destination 172.16.19.19 inet6 fe80::ac70:b56f:6e12:2994 prefixlen 10 scopeid 0x20<link> ppp txqueuelen 3 (Point-to-Point Protocol) RX packets 125 bytes 25669 (25.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 159 bytes 18100 (17.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lan: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.0.1 netmask 255.255.255.0 broadcast 172.16.0.255 inet6 fe80::224:8cff:fe48:6ce4 prefixlen 64 scopeid 0x20<link> inet6 2a00:23c4:1004:1a01::1 prefixlen 64 scopeid 0x0<global> ether 00:24:8c:48:6c:e4 txqueuelen 1000 (Ethernet) RX packets 206 bytes 39567 (38.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 142 bytes 40483 (39.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 114 bytes 9656 (9.4 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 114 bytes 9656 (9.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wan: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1508 inet6 fe80::8616:f9ff:fe05:bf61 prefixlen 64 scopeid 0x20<link> ether 84:16:f9:05:bf:61 txqueuelen 1000 (Ethernet) RX packets 136 bytes 29251 (28.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 179 bytes 23379 (22.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The default route has been provided through router advertisements. The additional unreachable route on lo has been created by dhcpcd5 (as sla_id 0) for the remaining prefixes in my /56 that I haven’t assigned: any traffic to them would be rejected locally and not passed upstream through bt.
# ip -6 route show 2a00:23c4:1004:1a01::/64 dev lan proto kernel metric 203 unreachable 2a00:23c4:1004:1a00::/56 dev lo metric 1024 error -101 fe80::/64 dev lan proto kernel metric 256 fe80::/64 dev wan proto kernel metric 256 fe80::/10 dev bt metric 1 fe80::/10 dev bt proto kernel metric 256 default via fe80::223:3eff:fe8c:b250 dev bt proto ra metric 1024 expires 4336sec hoplimit 64