landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

How to get ipv6?

Sun May 09, 2021 9:46 am

Hi

I'm trying to get an ipv6 address of the form

Code: Select all

 inet6 200X:X:X:X:X:X:X:X/64 scope global dynamic mngtmpaddr
This is on a Pi Zero Wifi. (It has a USB ethernet device, which is also required as a quasi-antenna (LOL) to get Wifi working) I'm trying to get IPv6 on the USB ethernet device.

Code: Select all

# cat /etc/issue
Raspbian GNU/Linux 10 \n \l
A link local address exists whether ipv6 is in /etc/modules or not:

Code: Select all

    inet6 fe80::2e0:4cff:fe53:4458/64 scope link 
       valid_lft forever preferred_lft forever
An ipv4 address exists too.

I have rebooted, the situation is still the same.

There are 2 Gentoo (x86) installations in the same subnet (same upstream router) that get global scope ipv6 addresses with no configuration at all. That means, I tried to find information about how to configure this, found nothing, reviewed my ip6tables setup, and then had working ipv6 addresses on both. (ping works, and ipv6-test works on the laptop.) The Gentoo installations fully work with ipv4 and ipv6.

The link local addresses are weird. They are in different subnets, and they can ping each other only if "%eth0" is appended, like so:

Code: Select all

    inet6 fe80::2e0:4cff:fe53:4458/64 scope link 
       valid_lft forever preferred_lft forever
root@raspi0w:/home/pi# ping fe80::de39:6fff:fe52:f5f6%eth0
PING fe80::de39:6fff:fe52:f5f6%eth0(fe80::de39:6fff:fe52:f5f6%eth0) 56 data bytes
64 bytes from fe80::de39:6fff:fe52:f5f6%eth0: icmp_seq=1 ttl=64 time=2.84 ms
^C
Even the Pi Zero Wifi can ping the others this way.

However, it cannot get a global scope address.

ip6tables is empty.

Note! I tried to find /etc/network/interfaces configurations to make this work. There is lots and lots of talk about static ipv6 addresses, and how automatic configuration would be even easier, but almost everyone carefully avoids mentioning

Code: Select all

iface eth0 inet6 auto
# or
iface eth0 inet6 dhcp
# or even anything like
iface eth0 inet dhcp
                  inet6 auto
Are these lines redundant, wrong, harmful? Or is anything like this required? I tried a lot of variants, nothing works, but this one causes some debug output:

Code: Select all

iface eth0 inet6 dhcp
# --------------
# ifup eth0
...
Listening on Socket/eth0
Sending on   Socket/eth0
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA "LSDX"
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 1060ms.
RCV: Advertise message on eth0 from fe80::de39:6fff:fe52:f5f6.
RCV:  X-- Server ID: 00:03:00:01:dc:39:6f:52:f5:f6
PRC: Lease failed to satisfy.
XMT: Forming Solicit, 1060 ms elapsed.
XMT:  X-- IA_NA "LSDX"
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 2070ms.
RCV: Advertise message on eth0 from fe80::de39:6fff:fe52:f5f6.
RCV:  X-- Server ID: 00:03:00:01:dc:39:6f:52:f5:f6
PRC: Lease failed to satisfy.
XMT: Forming Solicit, 3140 ms elapsed.
XMT:  X-- IA_NA "LSDX"
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 4270ms.
RCV: Advertise message on eth0 from fe80::de39:6fff:fe52:f5f6.
and so on, forever, with increasing timeouts.

I also observed the cargo cult of installing various packages mentioned in relation with ipv6

Code: Select all

# history|grep apt.*install
  223  apt install rdnssd
  224  apt install ndisc6
  230  apt install dhclient
  236  apt install radvd
  241  apt install dhcp6c
  242  apt install wide-dhcpv6
  243  apt install dhcpv6
  244  apt install kame
  245  apt install wide-dhcpv6-client
Some of these are real packages, and are now installed.

Yet another way to get debug info:

Code: Select all

# dhcp6c -D -f eth0
May/09/2021 10:23:33: get_duid: extracted an existing DUID from /var/lib/dhcpv6/dhcp6c_duid: 00:01:00:01:28:29:b5:07:b8:27:eb:0c:8b:f0
May/09/2021 10:23:33: cfdebug_print: <3>comment [# Default dhpc6c configuration: it assumes the address is autoconfigured using] (78)
May/09/2021 10:23:33: cfdebug_print: <3>comment [# router advertisements.] (24)
May/09/2021 10:23:33: cfdebug_print: <3>[profile] (7)
May/09/2021 10:23:33: cfdebug_print: <7>[default] (7)
May/09/2021 10:23:33: cfdebug_print: <3>begin of closure [{] (1)
May/09/2021 10:23:33: cfdebug_print: <3>[information-only] (16)
May/09/2021 10:23:33: cfdebug_print: <3>end of sentence [;] (1)
May/09/2021 10:23:33: cfdebug_print: <3>[request] (7)
May/09/2021 10:23:33: cfdebug_print: <3>[domain-name-servers] (19)
May/09/2021 10:23:33: cfdebug_print: <3>end of sentence [;] (1)
May/09/2021 10:23:33: cfdebug_print: <3>[request] (7)
May/09/2021 10:23:33: cfdebug_print: <3>[domain-name] (11)
May/09/2021 10:23:33: cfdebug_print: <3>end of sentence [;] (1)
May/09/2021 10:23:33: cfdebug_print: <3>[script] (6)
May/09/2021 10:23:33: cfdebug_print: <3>["/etc/wide-dhcpv6/dhcp6c-script"] (32)
May/09/2021 10:23:33: cfdebug_print: <3>end of sentence [;] (1)
May/09/2021 10:23:33: cfdebug_print: <3>end of closure [}] (1)
May/09/2021 10:23:33: cfdebug_print: <3>end of sentence [;] (1)
May/09/2021 10:23:33: configure_pool: called
May/09/2021 10:23:33: clear_poolconf: called
May/09/2021 10:23:33: dhcp6_reset_timer: reset a timer on eth0, state=INIT, timeo=0, retrans=363
May/09/2021 10:23:33: client6_send: a new XID (12623b) is generated
May/09/2021 10:23:33: copy_option: set client ID (len 14)
May/09/2021 10:23:33: copy_option: set elapsed time (len 2)
May/09/2021 10:23:33: client6_send: send solicit to ff02::1:2%eth0
May/09/2021 10:23:33: dhcp6_reset_timer: reset a timer on eth0, state=SOLICIT, timeo=0, retrans=1038
May/09/2021 10:23:33: client6_recv: receive advertise from fe80::de39:6fff:fe52:f5f6%eth0 on eth0
May/09/2021 10:23:33: dhcp6_get_options: get DHCP option client ID, len 14
May/09/2021 10:23:33:   DUID: 00:01:00:01:28:29:b5:07:b8:27:eb:0c:8b:f0
May/09/2021 10:23:33: dhcp6_get_options: get DHCP option server ID, len 10
May/09/2021 10:23:33:   DUID: 00:03:00:01:dc:39:6f:52:f5:f6
May/09/2021 10:23:33: dhcp6_get_options: get DHCP option preference, len 1
May/09/2021 10:23:33:   preference: 0
May/09/2021 10:23:33: dhcp6_get_options: get DHCP option DNS, len 16
May/09/2021 10:23:33: dhcp6_get_options: get DHCP option opt_86, len 16
May/09/2021 10:23:33: dhcp6_get_options: unknown or unexpected DHCP6 option opt_86, len 16
May/09/2021 10:23:33: client6_recvadvert: server ID: 00:03:00:01:dc:39:6f:52:f5:f6, pref=0
May/09/2021 10:23:33: client6_recvadvert: reset timer for eth0 to 0.990339
May/09/2021 10:23:34: select_server: picked a server (ID: 00:03:00:01:dc:39:6f:52:f5:f6)
May/09/2021 10:23:34: client6_send: a new XID (379c11) is generated
May/09/2021 10:23:34: copy_option: set client ID (len 14)
May/09/2021 10:23:34: copy_option: set server ID (len 10)
May/09/2021 10:23:34: copy_option: set elapsed time (len 2)
May/09/2021 10:23:34: client6_send: send request to ff02::1:2%eth0
May/09/2021 10:23:34: dhcp6_reset_timer: reset a timer on eth0, state=REQUEST, timeo=0, retrans=900
May/09/2021 10:23:34: client6_recv: receive reply from fe80::de39:6fff:fe52:f5f6%eth0 on eth0
May/09/2021 10:23:34: dhcp6_get_options: get DHCP option client ID, len 14
May/09/2021 10:23:34:   DUID: 00:01:00:01:28:29:b5:07:b8:27:eb:0c:8b:f0
May/09/2021 10:23:34: dhcp6_get_options: get DHCP option server ID, len 10
May/09/2021 10:23:34:   DUID: 00:03:00:01:dc:39:6f:52:f5:f6
May/09/2021 10:23:34: dhcp6_get_options: get DHCP option preference, len 1
May/09/2021 10:23:34:   preference: 0
May/09/2021 10:23:34: dhcp6_get_options: get DHCP option DNS, len 16
May/09/2021 10:23:34: dhcp6_get_options: get DHCP option opt_86, len 16
May/09/2021 10:23:34: dhcp6_get_options: unknown or unexpected DHCP6 option opt_86, len 16
May/09/2021 10:23:34: info_printf: nameserver[0] fd00::de39:6fff:fe52:f5f6
May/09/2021 10:23:34: dhcp6_remove_event: removing an event on eth0, state=REQUEST
May/09/2021 10:23:34: dhcp6_remove_event: removing server (ID: 00:03:00:01:dc:39:6f:52:f5:f6)
May/09/2021 10:23:34: client6_recvreply: got an expected reply, sleeping.
# (Output ends there)
^C
According to Google results, the "dhcp6_get_options: unknown or unexpected DHCP6 option opt_86" is unrelated to this. (No openvpn is running)

The message "Too few arguments." that is usually part of every ifup/ifdown command in many, but not all, Debian based installations may or may not be harmless. I don't display it here, you might see it yourself when running ifup. Nobody can even tell where it's coming from.

The output of "sysctl -a|grep ipv6" is the same as on the laptop, where ipv6 works. So nothing to see there.

Thanks
Last edited by landaupole on Sun May 09, 2021 10:32 am, edited 1 time in total.

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6

Sun May 09, 2021 9:54 am

Does your ISP support IPv6? Or are you using something like a Hurricane Electric tunnel?
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 10:43 am

IPv6 comes from the ISP.

The ISP facing router gets IPv4 and a /56 IPv6 prefix.

One Gentoo/x86 box and a Gentoo/x86 laptop can get IPv6 from this ISP facing router, via Ethernet and Wifi. I think smart phones and some other devices can get IPv6 in the same way, but did not fully test everything. (I remember seeing IPv6 addresses starting with 200x: on smart phones)

The raspbian box gets link-local ipv6 and it seems to work (ping), see above.

It is connected to the ISP facing router via a USB ethernet device, and can ping everything in the IPv4 subnet just fine. It can also ping ipv6 link-local addresses, see above. It just can not get an IPv6 global scope address. At least 2 other devices in the same situation can.

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6?

Sun May 09, 2021 10:50 am

What's in /etc/modprobe.d? There may be a *.conf file in there that disables IPv6.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 11:00 am

Code: Select all

$ ls -l /etc/modprobe.d
total 8
-rw-r--r-- 1 root root 17 Nov  5  2019 blacklist-8192cu.conf
-rw-r--r-- 1 root root 19 Mar  2  2017 blacklist-rtl8xxxu.conf
pi@raspi0w:~ $ cat /etc/modprobe.d/*
blacklist 8192cu
blacklist rtl8xxxu
pi@raspi0w:~ $

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6?

Sun May 09, 2021 11:06 am

OK. So not that.

What happens if you do sudo modprobe ipv6?
What does sysctl -a | grep disable_ipv6 show?

Should have

Code: Select all

root@pioneer:/etc # sysctl -a | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.enxb827eb00069e.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.wlx000f1340184f.disable_ipv6 = 0
root@pioneer:/etc #
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 11:49 am

Code: Select all

# lsmod|grep ipv6
ipv6                  475136  28
# sudo modprobe ipv6
# sysctl -a | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.wlan0.disable_ipv6 = 0
# ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::ba27:ebff:fe0c:8bf0/64 scope link 
       valid_lft forever preferred_lft forever
21: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::2e0:4cff:fe53:4458/64 scope link 
       valid_lft forever preferred_lft forever

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 1:11 pm

I tried some change in the ISP facing router. It basically says that prefixes (IA_PD) and ipv6 addresses (IA_NA) should be assigned to downstream devices via DHCPv6. Also used this "iface eth0 inet6 dhcp" in /etc/network/interfaces.

This does change something, but is not useful.

It assigns a global scope /128 address. Nothing else, no routes, so still no outside communication is possible.

Maybe this mode in the router is buggy. So it is better to turn it off. But certainly something with this raspbian instance is broken, because it cannot get a usable ipv6 address where everything else can.

Here is output from this variant (now reverted). Just for comparison. This too doesn't work.

Code: Select all

# ifup eth0  
 ... the ipv4 stuff ...
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on Socket/eth0
Sending on   Socket/eth0
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA "LSDX"
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 1040ms.
RCV: Advertise message on eth0 from fe80::de39:6fff:fe52:f5f6.
RCV:  X-- Preference 0.
RCV:  X-- IA_NA "LSDX"
RCV:  | X-- starts 1620564075
RCV:  | X-- t1 - renew  +1800
RCV:  | X-- t2 - rebind +2880
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 200X:NEW_RASPI_ADDRESS:4458
RCV:  | | | X-- Preferred lifetime 3600.
RCV:  | | | X-- Max lifetime 7200.
RCV:  X-- Server ID: 00:03:00:01:dc:39:6f:52:f5:f6
RCV:  Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC:  X-- Initial candidate 00:03:00:01:dc:39:6f:52:f5:f6 (s: 10104, p: 0).
XMT: Forming Request, 0 ms elapsed.
XMT:  X-- IA_NA "LSDX"
XMT:  | X-- Requested renew  +3600
XMT:  | X-- Requested rebind +5400
XMT:  | | X-- IAADDR 200X:NEW_RASPI_ADDRESS:4458
XMT:  | | | X-- Preferred lifetime +7200
XMT:  | | | X-- Max lifetime +7500
XMT:  V IA_NA appended.
XMT: Request on eth0, interval 1090ms.
RCV: Reply message on eth0 from fe80::de39:6fff:fe52:f5f6.
RCV:  X-- Preference 0.
RCV:  X-- IA_NA "LSDX"
RCV:  | X-- starts 1620564076
RCV:  | X-- t1 - renew  +1800
RCV:  | X-- t2 - rebind +2880
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 200X:NEW_RASPI_ADDRESS:4458
RCV:  | | | X-- Preferred lifetime 3600.
RCV:  | | | X-- Max lifetime 7200.
RCV:  X-- Server ID: 00:03:00:01:dc:39:6f:52:f5:f6
PRC: Bound to lease 00:03:00:01:dc:39:6f:52:f5:f6.
Too few arguments.   (as always)
Too few arguments.
root@raspi0w:/home/pi# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: wlan0: <NOT RELEVANT>
22: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:e0:4c:53:44:58 brd ff:ff:ff:ff:ff:ff
    inet ... Something ...
    inet6 200X:NEW_RASPI_ADDRESS:4458/128 scope global    # <-------- Note the /128!
       valid_lft forever preferred_lft forever
    inet6 fe80::2e0:4cff:fe53:4458/64 scope link 
       valid_lft forever preferred_lft forever
root@raspi0w:/home/pi#  ping 2620:119:35::35   # some DNS server
connect: Network is unreachable
root@raspi0w:/home/pi#  ping 200X:THE_ROUTER:f5f3   # The other devices can ping this.
connect: Network is unreachable
root@raspi0w:/home/pi# ip -6 route
::1 dev lo proto kernel metric 256 pref medium
200X:NEW_RASPI_ADDRESS:4458 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
More explanations: The fe80::de39:6fff:fe52:f5f6 is the router's link-local address. This is used as default gateway on another box, and it works.

Preferably, the Pi Zero should get its ipv6 address "inside a /64 network", set a route accordingly, and set a default gateway. Like the other box: (Gentoo x86, no explicit configuration)

Code: Select all

# ip -6 route
200X:ASSIGNED_PREFIX::/64 dev eth0 proto kernel metric 256 expires 7048sec pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
  ...
default via fe80::de39:6fff:fe52:f5f6 dev eth0 proto ra metric 1024 expires 1648sec hoplimit 255 pref medium   # router's link local address
other_device /etc/dnsmasq.d # ip -6 addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group ext2 qlen 1000
    inet6 200X:OTHER_DEVICE:672c/64 scope global dynamic mngtmpaddr      # inside ASSIGNED_PREFIX
       valid_lft 7111sec preferred_lft 1389sec
    inet6 fe80::20d:b9ff:fe15:672c/64 scope link    # other device's link local address
       valid_lft forever preferred_lft forever

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6?

Sun May 09, 2021 3:31 pm

What's in /etc/dhcpcd.conf?

Mine has

Code: Select all

option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac hardware
nohook lookup-hostname
static domain_name_servers=2xxx:cafe:dead:beef:ba27:ebff:fe85:c936 192.168.3.14 8.8.8.8
noarp
#interface wlan0
#static ip_address=192.168.3.7/24
#static routers=192.168.168.254
#static domain_name_servers=2xxx:cafe:dead:beef:ba27:ebff:fe85:c936 192.168.3.14 8.8.8.8
#interface eth0
#static ip_address=192.168.3.77/24
#static domain_name_servers=2xxx:cafe:dead:beef:ba27:ebff:fe85:c936 192.168.3.14 8.8.8.8
I'm not assigning the static addresses in there any longer, because with slaac hardware they're predictable.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 3:44 pm

Code: Select all

# grep ^[^#] /etc/dhcpcd.conf
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac private

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6?

Sun May 09, 2021 3:58 pm

Is there a root advertiser daemon running anywhere on your LAN? If it's the router, try a router reboot.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 4:19 pm

I don't think so. I don't know what it is.

However, the router has been recently rebooted. See above, one other box has got proper ipv6 connectivity from this router. And yet another box (laptop) can get it any time.

Even if there were another "secret" router, or root advertiser daemon, that really provides this, then still the Pi Zero should just work the same as the other boxes.

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6?

Sun May 09, 2021 5:01 pm

Try restarting dhcpcd with sudo systemctl restart dhcpcd
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 5:12 pm

May 09 18:11:31 raspi0w dhcpcd[1492]: Not running dhcpcd because /etc/network/interfaces
May 09 18:11:31 raspi0w dhcpcd[1492]: defines some interfaces that will use a
May 09 18:11:31 raspi0w dhcpcd[1492]: DHCP client or static address

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6?

Sun May 09, 2021 5:56 pm

landaupole wrote:
Sun May 09, 2021 5:12 pm
May 09 18:11:31 raspi0w dhcpcd[1492]: Not running dhcpcd because /etc/network/interfaces
May 09 18:11:31 raspi0w dhcpcd[1492]: defines some interfaces that will use a
May 09 18:11:31 raspi0w dhcpcd[1492]: DHCP client or static address
Undo your changes to /etc/network/interfaces.

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 6:12 pm

No effect.

Removing the "iface eth0 inet dhcp" lines, or removing dhcp, is not an option, as it is much more likely to brick the box than to contribute to debbuging ipv6.

User avatar
DougieLawson
Posts: 41308
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to get ipv6?

Sun May 09, 2021 7:44 pm

landaupole wrote:
Sun May 09, 2021 6:12 pm
No effect.

Removing the "iface eth0 inet dhcp" lines, or removing dhcp, is not an option, as it is much more likely to brick the box than to contribute to debbuging ipv6.
Then I'm sorry I can't offer any further help.
You've made changes that are known to break networking in RaspiOS.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

epoch1970
Posts: 6495
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: How to get ipv6?

Sun May 09, 2021 7:48 pm

landaupole wrote:
Sun May 09, 2021 6:12 pm
No effect.

Removing the "iface eth0 inet dhcp" lines, or removing dhcp, is not an option, as it is much more likely to brick the box than to contribute to debbuging ipv6.
Well. That contributes to disabling dhcpcd, that’s what it does.
So configure IPv6 in ifupdown, or remove what you added and let dhcpcd take care of configuring the interfaces.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Sun May 09, 2021 8:28 pm

I found something else.

I ran iptraf-ng on the Pi Zero and on the laptop. On the Pi Zero iptraf-ng shows all the pings (request and reply including with the router) and shows something like "neigh sol" and "router sol" packets shortly after running ifup and then periodically.

Code: Select all

 IP (76 bytes) from fe80::2e0:4cff:fe53:4458 to ff02::16 on eth0                                                                                                        
... (avahi stuff) 
IP (96 bytes) from fe80::2e0:4cff:fe53:4458 to ff02::16 on eth0                                                                                                        
...
 ICMPv6 router sol (56 bytes) from fe80::2e0:4cff:fe53:4458 to ff02::2 on eth0                                                                                          
 ICMPv6 router sol (56 bytes) from fe80::2e0:4cff:fe53:4458 to ff02::2 on eth0                                                                                          
 ICMPv6 router sol (56 bytes) from fe80::2e0:4cff:fe53:4458 to ff02::2 on eth0                                                                                          
 
What's missing is any replies from the router.

The same thing run on the laptop shows a lot of background activity, router sol and other packets. When not connected to an ipv6 router, there is no reply to router sol, as expected.

The laptop connected to the ipv6 router:

Code: Select all

ICMPv6 router sol (56 bytes) from fe80::2bb:60ff:fe71:dc25 to ff02::2 on wlp60s0                                                 
ICMPv6 router adv (152 bytes) from fe80::de39:6fff:fe52:f5f6 to ff02::1 on wlp60s0       # This is the difference                                       
...
ICMPv6 neigh sol (72 bytes) from :: to ff02::1:ff71:dc25 on wlp60s0                                                              
...
ICMPv6 dest unrch (not beyondsp) (138 bytes) from fe80::de39:6fff:fe52:f5f6 to fe80::2bb:60ff:fe71:dc25 on wlp60s0                
...
ICMPv6 dest unrch (not beyondsp) (128 bytes) from fe80::de39:6fff:fe52:f5f6 to fe80::2bb:60ff:fe71:dc25 on wlp60s0                
ICMPv6 dest unrch (not beyondsp) (128 bytes) from fe80::de39:6fff:fe52:f5f6 to fe80::2bb:60ff:fe71:dc25 on wlp60s0                
ICMPv6 dest unrch (not beyondsp) (128 bytes) from fe80::de39:6fff:fe52:f5f6 to fe80::2bb:60ff:fe71:dc25 on wlp60s0                
 IP (76 bytes) from fe80::2bb:60ff:fe71:dc25 to ff02::16 on wlp60s0                                                                
 IP (76 bytes) from fe80::2bb:60ff:fe71:dc25 to ff02::16 on wlp60s0                                                                
There is a "router adv" in response to the "router sol". Whatever happens then, I don't know, but the end result is working connectivity.

Could the router be treating the devices differently? Is it possible that an unmanaged switch selectively drops "router adv" packets? (No) Could the "router adv" packets disappear somewhere in the Pi Zero's IP stack?

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Tue May 11, 2021 8:53 am

I replaced that unmanaged switch in between the Pi Zero and the router.

No change. Still no "router adv" packets.

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Tue May 11, 2021 3:03 pm

I tried my laptop in the same place, with the switch in between. The one that gets working ipv6 over Wifi with the same router.

The laptop gets ipv6 immediately.

The Pi Zero still does not.

TudorJ
Posts: 60
Joined: Thu Jul 09, 2015 8:41 pm
Location: Cockfosters

Re: How to get ipv6?

Tue May 11, 2021 4:19 pm

On my Pi zero I had to install Samba to get IPv6!

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Thu May 20, 2021 5:17 pm

I installed Samba right away, just for a test. No change.

To summarize:

ipv6 works with link-local addresses connections. It sends router solicitations but does not receive router advertisements. Setting IPv6 addresses and routes manually, it cannot ping the router over these addresses. It is a USB ethernet adapter.

The (Linux) laptop works flawlessly in the exact same situation.

A different board (not raspberry), with slarm64, also works flawlessly, but without the old Unmanaged 100M cheap switch in between.

A different, also old Unmanaged 100M cheap switch as a replacement changes nothing.

Maybe these cheap switches have a glitch when they see IPv6 multicast, and maybe some installations of Linux have workarounds for this?

landaupole
Posts: 16
Joined: Sat Apr 11, 2020 3:23 pm

Re: How to get ipv6?

Mon May 24, 2021 10:48 am

So, this is not solved, but kind of settled.

I could try to test it all much more rigorously, but for me it is a waste of time.

I use yet another little device for the ipv6 job. This is NOT connected to the same (Unmanaged 100M) switch, where the Pi Zero fails to get RAs, can not communicate over any global scope ipv6 address, but can communicate just fine over link local addresses, and where the laptop (Linux) gets full ipv6 just fine within seconds.

Long sentence, lots of repetition, but then you don't need to read the whole thread.

The new little box is a rock chip based one, it has slarm64, debian and gentoo distros available, and the booting procedure is different. One can actually see the kernels with their version numbers in /boot. I guess one could somewhat easily compile a kernel oneself.

This one is connected via 3 old Managed switches which seem all unaware of ipv6, via a special VLAN. One of the switches has an option "Unknown Multicast" ---> Drop or Flood, so I choosed Flood after waiting a few minutes for ipv6. In testing, it got ipv6 quickly when connected directly (no switch) to the router.

Now, that new box gets full ipv6, but still it literally takes a few minutes after booting. (The PiZero never gets proper ipv6)

So for me and for now, this is good enough, but if you have more information about this, please share ...

- Does ipv6 work for you? Does it fail in a similar way? Can you nail it down to certain kinds of switches that make it fail, or certain kinds of kernels that work anyway or that fail?

... thanks

Return to “Troubleshooting”