Trouble with L5 networking

I connect L5 through cable with my L13 at home and a PC running Manjaro at work. Both have a SharedEthernet connection setup and when I connect the cable L5 gets network. But although at home L13 works fine, at work it has suddenly stopped working. It is more than a week now I try to find what is wrong, but no luck. I have the same settings on PC and L13 on the NetworkManager configuration for SharedEthernet.

When I connect L5 with the Manjaro PC, dmesg gives shows that the device is recognized
but although nm@PC shows that SharedEthernet has become active, L5 is still without network. ssh purism@pureos.local fails with

$ ssh purism@pureos.local
ssh: Could not resolve hostname pureos.local: Name or service not known

Still with L13 all is working fine.

dmesg:

[71580.948525] usb 3-3: new high-speed USB device number 14 using xhci_hcd
[71581.089701] usb 3-3: New USB device found, idVendor=316d, idProduct=4c05, bcdDevice= 6.01
[71581.089716] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71581.089723] usb 3-3: Product: Librem 5
[71581.089727] usb 3-3: Manufacturer: Purism, SPC
[71581.089731] usb 3-3: SerialNumber: 0123456789
[71581.092690] cdc_acm 3-3:1.0: ttyACM0: USB ACM device
[71581.113493] cdc_ncm 3-3:1.2: MAC-Address: 76:87:3b:99:23:cc
[71581.113661] cdc_ncm 3-3:1.2 usb0: register ‘cdc_ncm’ at usb-0000:00:14.0-3, CDC NCM (NO ZLP), 76:87:3b:99:23:cc
[71581.408648] audit: type=1131 audit(1679992520.092:1034): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg=‘unit=NetworkManager-dispatcher comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’
[71581.874489] cdc_ncm 3-3:1.2 enp0s20u3i2: renamed from usb0
[71581.974500] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s20u3i2: link becomes ready
[71581.990548] audit: type=1325 audit(1679992520.672:1035): table=nm-shared-enp0s20u3i2:126 family=2 entries=12 op=nft_register_chain pid=257163 subj=unconfined comm=“nft”
[71581.990563] audit: type=1300 audit(1679992520.672:1035): arch=c000003e syscall=46 success=yes exit=2280 a0=3 a1=7ffd8e84e9e0 a2=0 a3=7f444f77ec2c items=0 ppid=718 pid=257163 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=“nft” exe="/usr/bin/nft" subj=unconfined key=(null)
[71581.990565] audit: type=1327 audit(1679992520.672:1035): proctitle=2F7573722F62696E2F6E6674002D66002D
[71582.033995] audit: type=1130 audit(1679992520.716:1036): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg=‘unit=NetworkManager-dispatcher comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’

The last message keeps repeating. What might be wrong?

OK, if the above information is not adequate for debugging, how could I bring the network up using the command line to see what goes wrong?

: (…

Have you tried connecting using the IP address?

1 Like

And is your IPv6 environment the same? (comparing home v. work) For simplicity, it would be best to have IPv6 disabled completely, so that we are talking IPv4-only, but that may not be possible in your environment.

For clarity, is that ssh command being executed on the “PC” end (whether that’s the Librem 13 laptop at home or the PC at work)?

I would always start with ping (and by IP address as suggested).

have IPv6 disabled completely

I know nothing about IP6. How can I disable it? I definitely do not need it.

Have you tried connecting using the IP address?

That is the problem: L5 does not get an IP address. ifconfig does not show an IP. It should be 10.88.0.X. But no such appears on ifconfig output. I see something though on usb0 interface that looks like IP6. Maybe. But the PC nm on the desktop shows that L5 is connected and recognized as Purism SPC (something like this) I am not at work yet.

Manjaro : (

Why? What is the problem? We were for years using Ubuntu. And everyone was signing pdf documents with okular except us because Ubuntu insisted on giving an ancient okular. Version 2 with current okular above 20.

Assiging an IP address address is the responsibility of the host. Normally NetworkManager does it. Try mucking about with nmcli, there is some option to show the complete configuration of the network you use to share. You could compare the config between your 2 hosts.

I can’t tell you how to do that on Manjaro but on Ubuntu … launch Settings application / click Network / choose the interface / click the settings icon (cog icon) next to the relevant interface / click IPv6 tab / choose Disable radio button

Does the other end (Manjaro PC) get an IP address?

nmcli conn show $uuid

where $uuid is replaced by the relevant UUID listed by

nmcli conn

?

As this information is persisted, if the connection to the Librem 5 gets really messed up, sometimes it could be good to

nmcli conn delete $uuid

and start again with the config, being careful to save the config first and being careful to delete the right connection.

The host says it has assigned the IP 10.88.0.1 to L5. But ssh purism@10.88.0.1 asks for password and never succeeds (Permission denied). On the L5 side ifconfig does not show 10.88.0.1 and of course has no access to the network.
ifconfig on L5 (thanks to minicom/serial access):

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::58f1:6a76:5f19:b063 prefixlen 64 scopeid 0x20<link> ether fa:e4:14:22:77:86 txqueuelen 1000 (Ethernet) RX packets 3954 bytes 332510 (324.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 366 bytes 67444 (65.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

On the NM applet if I disable/ignore IP6 then the connection fails miserably. The icon of nm pulsates very fast from connected to disconnected. I will copy below the output of nmcli conn show XXXX but I guess it is time to take the issue to the Manjaro forums. I guess they will know the quirks of the distribution. I tried older kernels no luck. Maybe it is an NM bug.

=== outputs of commands ===
on L5:
[purism@pureos ~]$ nmcli -p
usb0: connecting (getting IP configuration) to Wired connection 1
“usb0”
ethernet (configfs-gadget.g1), FA:E4:14:22:77:86, hw, mtu 1500

on PC:
$ nmcli -p
enp0s20u3i2: connected to EthernetShared
“Purism SPC Librem 5”
ethernet (cdc_ncm), 4A:4B:B7:35:79:50, hw, mtu 1500
inet4 10.88.0.1/24
route4 10.88.0.0/24 metric 105
inet6 fe80::ac62:4618:a80f:3b01/64
route6 fe80::/64 metric 1024
$

$ nmcli conn show 536410e9-aff4-4d0a-b396-5c094dd4bb66
connection.id: EthernetShared
connection.uuid: 536410e9-aff4-4d0a-b396-5c094dd4bb66
connection.stable-id: –
connection.type: 802-3-ethernet
connection.interface-name: –
connection.autoconnect: yes
connection.autoconnect-priority: 1
connection.autoconnect-retries: -1 (default)
connection.multi-connect: 0 (default)
connection.auth-retries: -1
connection.timestamp: 1680078313
connection.read-only: no
connection.permissions: –
connection.zone: –
connection.master: –
connection.slave-type: –
connection.autoconnect-slaves: -1 (default)
connection.secondaries: –
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
connection.llmnr: -1 (default)
connection.id: EthernetShared
connection.uuid: 536410e9-aff4-4d0a-b396-5c094dd4bb66
connection.stable-id: –
connection.type: 802-3-ethernet
connection.interface-name: –
connection.autoconnect: yes
connection.autoconnect-priority: 1
connection.autoconnect-retries: -1 (default)
connection.multi-connect: 0 (default)
connection.auth-retries: -1
connection.timestamp: 1680078313
connection.read-only: no
connection.permissions: –
connection.zone: –
connection.master: –
connection.slave-type: –
connection.autoconnect-slaves: -1 (default)
connection.secondaries: –
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
connection.llmnr: -1 (default)
connection.dns-over-tls: -1 (default)
connection.mptcp-flags: 0x0 (default)
connection.wait-device-timeout: -1
connection.wait-activation-delay: -1
802-3-ethernet.port: –
802-3-ethernet.speed: 0
802-3-ethernet.duplex: –
802-3-ethernet.auto-negotiate: no
802-3-ethernet.mac-address: –
802-3-ethernet.cloned-mac-address: –
802-3-ethernet.generate-mac-address-mask:–
802-3-ethernet.mac-address-blacklist: –
802-3-ethernet.mtu: auto
802-3-ethernet.s390-subchannels: –
802-3-ethernet.s390-nettype: –
802-3-ethernet.s390-options: –
802-3-ethernet.wake-on-lan: default
802-3-ethernet.wake-on-lan-password: –
802-3-ethernet.accept-all-mac-addresses:-1 (default)
ipv4.method: shared
ipv4.dns: –
ipv4.dns-search: –
ipv4.dns-options: –
ipv4.dns-priority: 0
ipv4.addresses: 10.88.0.1/24
ipv4.gateway: –
ipv4.routes: –
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.routing-rules: –
ipv4.replace-local-rule: -1 (default)
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: –
ipv4.dhcp-iaid: –
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: –
ipv4.dhcp-fqdn: –
ipv4.dhcp-hostname-flags: 0x0 (none)
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.required-timeout: -1 (default)
ipv4.dad-timeout: -1 (default)
ipv4.dhcp-vendor-class-identifier: –
ipv4.link-local: 0 (default)
ipv4.dhcp-reject-servers: –
ipv4.auto-route-ext-gw: -1 (default)
ipv6.method: auto
ipv6.dns: –
ipv6.dns-search: –
ipv6.dns-options: –
ipv6.dns-priority: 0
ipv6.addresses: –
ipv6.gateway: –
ipv6.routes: –
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.routing-rules: –
ipv6.replace-local-rule: -1 (default)
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.required-timeout: -1 (default)
ipv6.ip6-privacy: 0 (disabled)
ipv6.addr-gen-mode: stable-privacy
ipv6.ra-timeout: 0 (default)
ipv6.mtu: auto
ipv6.dhcp-duid: –
ipv6.dhcp-iaid: –
ipv6.dhcp-timeout: 0 (default)
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: –
ipv6.dhcp-hostname-flags: 0x0 (none)
ipv6.auto-route-ext-gw: -1 (default)
ipv6.token: –
proxy.method: none
proxy.browser-only: no
proxy.pac-url: –
proxy.pac-script: –
GENERAL.NAME: EthernetShared
GENERAL.UUID: 536410e9-aff4-4d0a-b396-5c094dd4bb66
GENERAL.DEVICES: enp0s20u3i2
GENERAL.IP-IFACE: enp0s20u3i2
GENERAL.STATE: activated
GENERAL.DEFAULT: no
GENERAL.DEFAULT6: no
GENERAL.SPEC-OBJECT: –
GENERAL.VPN: no
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveC>
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Setting>
GENERAL.ZONE: –
GENERAL.MASTER-PATH: –
IP4.ADDRESS[1]: 10.88.0.1/24
IP4.GATEWAY: –
IP4.ROUTE[1]: dst = 10.88.0.0/24, nh = 0.0.0.0, mt = >
IP6.ADDRESS[1]: fe80::ac62:4618:a80f:3b01/64
IP6.GATEWAY: –
IP6.ROUTE[1]: dst = fe80::/64, nh = ::, mt = 1024

This is not the phone’s address, it’s the host’s. You need to make sure that a DHCP server is running correctly if you want IPv4. Best to compare with the computer where it works.

… which I take to mean “running on the PC”.

It can be a very basic DHCP server, and it can be (should be?) limited to that one interface (the USB interface).

The question is: what changed?

What changed?

I do not know. This PC has a static IP. I do not need to run dhcp

Anyway, I started with

systemctl start dhcpcd

and got one more IP for the PC (in addition to the static one).
So I will stop it and read its configuration for running it only on usb0 and not eth0.

No, you need to run the DHCP server on the PC on the correct interface. This should be done automatically by NetworkManager.

If you don’t care about the phone connecting to the internet via your PC, then I would recommend using IPv6 for the internal network instead. It does away with all the DHCP crap by default.

If you don’t care about the phone connecting to the internet via your PC

This is what I want. Because wifi is not good in my office and I need L5 to connect through the PC say for updates.

Let me post some screenshots. Maybe you see something I miss. The settings are the same with my L13 where everything works as expected. The Device field is empty but it is also empty on L13. If I choose enp0s20u3i2 nothing improves. Is it possible I miss some relating to NM dhcp package?

image

image

image

image

Those are the same settings as you posted in text form. I can’t see anything in them, but I also didn’t compare them with a working setup. If that doesn’t give an answer, maybe there’s something in NM logs.

Ah, yes. Forgot that. Good hint. I will check ASAP.

journalctl -u NetworkManager.service

and looking through messages I see the following:

Μαρ 29 13:46:00 damo NetworkManager[718]: <info>  [1680086760.8082] device (enp0s20u3i2): state change: ip-config -> ip-check (reason 'none', sys-iface-state>
Μαρ 29 13:46:00 damo NetworkManager[625689]: dnsmasq: failed to create listening socket for 10.88.0.1: Address already in use
Μαρ 29 13:46:00 damo dnsmasq[625689]: failed to create listening socket for 10.88.0.1: Address already in use
Μαρ 29 13:46:00 damo dnsmasq[625689]: FAILED to start up
Μαρ 29 13:46:00 damo NetworkManager[718]: <warn>  [1680086760.8305] dnsmasq-manager: dnsmasq exited with error: Network access problem (address in use, permi>
Μαρ 29 13:46:00 damo NetworkManager[718]: <info>  [1680086760.8306] device (enp0s20u3i2): state change: ip-check -> secondaries (reason 'none', sys-iface-sta>
Μαρ 29 13:46:00 damo NetworkManager[718]: <info>  [1680086760.8307] device (enp0s20u3i2): state change: secondaries -> activated (reason 'none', sys-iface-st>
Μαρ 29 13:46:00 damo NetworkManager[718]: <info>  [1680086760.8310] device (enp0s20u3i2): Activation: successful, device activated.
Μαρ 29 13:46:32 damo NetworkManager[718]: <info>  [1680086792.8188] device (enp0s20u3i2): state change: activated -> failed (reason 'ip-config-unavailable', >
Μαρ 29 13:46:32 damo NetworkManager[718]: <warn>  [1680086792.8194] device (enp0s20u3i2): Activation: failed for connection 'EthernetShared'
Μαρ 29 13:46:32 damo NetworkManager[718]: <info>  [1680086792.8198] device (enp0s20u3i2): state change: failed -> disconnected (reason 'none', sys-iface-stat>
Μαρ 29 13:46:32 damo NetworkManager[718]: <info>  [1680086792.8267] policy: auto-activating connection 'EthernetShared' (536410e9-aff4-4d0a-b396-5c094dd4bb66)

How come it is in use? So now I have two problems. One is to find why this is in use. The other is if I can use something else in nm? 10.87.0.1/24 is OK?

Yes, the entire network area of 10.0.0.0/8 is for private use.

Check out netstat -ptuwnl for any other dnsmasq instances. The address could also be 0.0.0.0.

A lot of random Linux distros will already be using dnsmasq. man dnsmasq covers the options you might need in order to run multiple instances - because otherwise they very likely will interfere with each other. I guess the first task would be: with the Librem 5 not connected to the Manjaro PC, confirm that dnsmasq is already running on the PC. (If it is then you would want to reconfigure the existing instance of dnsmasq so that it plays more nicely but, without a detailed knowledge of your environment, it would be difficult to advise exactly what that config change should be.)

Of course if you are prepared for some hassle, you shouldn’t need to use DHCP at all. A static IP at each end in 10.87.0 should be adequate. (The downside is that if you don’t use DHCP at work then you would either need to change the config each time you flip flop between home and work, or not use DHCP at home either for this interface - and that would be even less convenient if you also use the Librem 5 connected via USB in other environments.)