Does anyone have a clue? I don't.
In comp.sys.raspberry-pi The Natural Philosopher <tnp@invalid.invalid> wrote:
Does anyone have a clue? I don't.
What do the logs on the Pi end say? Maybe it barfs and stops replying.
Theo
But if the Pi Zero is disconnected and then reconnected, it fails to
pick up DHCP.
This is the syslog for a *successful* connection after reboot
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5981]
dhcp4 (usb0): option dhcp_lease_time => '43200'
But this is what happens when the device is unplugged and re plugged in..
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5013]
device (usb0): interface index 4 renamed iface from 'usb0' to 'enxf62dad34f39e'
First of all, huge thanks to all who helped me get to the bottom of the memory bug...code seems rock solid now.
Here is another 'strangeness' .
The Pi Zero W is configured to present its usb interface as an ethernet device, in order that for initial configuration, it can be plugged into
a host computer which will acquire an Ethernet connection and be issued
by DHCP with an address that can directly communicate with the Pi Zeros
web server by issuing a command in the host computers web browser to a
fixed IP address. When this works, it works perfectly.
If the host computer (HP Elite Desk, Linux MINT 20) is rebooted WITH the
Pi Zero connected, it works.
If the host computer is rebooted *without* the Pi Zero connected and
the Pi Zero is subsequently connected, it works.
But if the Pi Zero is disconnected and then reconnected, it fails to
pick up DHCP.
The network manager app tries indefinitely to get a connection, and fails.
If the computer is told to reboot with the Pi Zero connected, it hangs.
If the computer is powered off and on, it works.
This is the syslog for a *successful* connection after reboot
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5981]
dhcp4 (usb0): option dhcp_lease_time => '43200'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5982]
dhcp4 (usb0): option domain_name_servers => '172.16.21.32'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5982]
dhcp4 (usb0): option expiry => '1694897859'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5983]
dhcp4 (usb0): option host_name => 'juliet'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5983]
dhcp4 (usb0): option ip_address => '172.16.21.3'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5983]
dhcp4 (usb0): option next_server => '172.16.21.32'
Sep 16 09:57:42 juliet avahi-daemon[735]: Joining mDNS multicast group
on interface usb0.IPv4 with address 172.16.21.3.
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5983]
dhcp4 (usb0): option requested_broadcast_address => '1'
Sep 16 09:57:42 juliet avahi-daemon[735]: New relevant interface
usb0.IPv4 for mDNS.
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5984]
dhcp4 (usb0): option requested_domain_name => '1'
Sep 16 09:57:42 juliet avahi-daemon[735]: Registering new address record
for 172.16.21.3 on usb0.IPv4.
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5984]
dhcp4 (usb0): option requested_domain_name_servers => '1'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5984]
dhcp4 (usb0): option requested_domain_search => '1'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5985]
dhcp4 (usb0): option requested_host_name => '1'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5985]
dhcp4 (usb0): option requested_interface_mtu => '1'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5985]
dhcp4 (usb0): option requested_ms_classless_static_routes => '1'
Sep 16 09:57:42 juliet NetworkManager[739]: <info> [1694854662.5985]
dhcp4 (usb0): option requested_nis_domain => '1'
But this is what happens when the device is unplugged and re plugged in..
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.4136] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/4)
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5013]
device (usb0): interface index 4 renamed iface from 'usb0' to 'enxf62dad34f39e'
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5233]
device (enxf62dad34f39e): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5242]
device (enxf62dad34f39e): carrier: link connected
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5263] settings: (enxf62dad34f39e): created default wired connection 'Wired connection 2'
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5267]
device (enxf62dad34f39e): state change: unavailable -> disconnected
(reason 'none', sys-iface-state: 'managed')
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5316] policy: auto-activating connection 'Wired connection 2' (c8d6876c-99de-3b51-b55d-c6fe727632ed)
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5319]
device (enxf62dad34f39e): Activation: starting connection 'Wired
connection 2' (c8d6876c-99de-3b51-b55d-c6fe727632ed)
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5320]
device (enxf62dad34f39e): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5324]
device (enxf62dad34f39e): state change: prepare -> config (reason
'none', sys-iface-state: 'managed')
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5327]
device (enxf62dad34f39e): state change: config -> ip-config (reason
'none', sys-iface-state: 'managed')
Sep 16 09:41:53 juliet NetworkManager[737]: <info> [1694853713.5329]
dhcp4 (enxf62dad34f39e): activation: beginning transaction (timeout in
45 seconds)
Sep 16 09:41:59 juliet NetworkManager[737]: <info> [1694853719.5490]
device (enxf62dad34f39e): state change: ip-config -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed
')
Sep 16 09:41:59 juliet NetworkManager[737]: <info> [1694853719.5649]
dhcp4 (enxf62dad34f39e): canceled DHCP transaction
Sep 16 09:41:59 juliet NetworkManager[737]: <info> [1694853719.5650]
dhcp4 (enxf62dad34f39e): state changed unknown -> done
Does anyone have a clue? I don't.
It seems that your Raspi OS is set up to provide 'predictable
interface names', which changes usb0 to enx<MAC without colons>,
so your Ethernet is f6:2d:ad:34:f3:9e.
The Network Manager gets confused of the naming change.
There is an option to disable the interface name change in
raspi-config.
It seems that your Raspi OS is set up to provide 'predictable
interface names', which changes usb0 to enx<MAC without colons>,
so your Ethernet is f6:2d:ad:34:f3:9e.
The Network Manager gets confused of the naming change.
There is an option to disable the interface name change in
raspi-config.
On 16/09/2023 16:50, Tauno Voipio wrote:
It seems that your Raspi OS is set up to provide 'predictable
interface names', which changes usb0 to enx<MAC without colons>,
so your Ethernet is f6:2d:ad:34:f3:9e.
The Network Manager gets confused of the naming change.
There is an option to disable the interface name change in
raspi-config.
Umm. I looked into this it it appeared to be disabled.
I am even more confused
Well I explicitly selected to disable it in the config tool and now it
seems to work
Where (what file) is that config option stored?
1) This Orwellian termed "predictable names" thing is a real PIA. To
be fair, it is probably the sort of thing that is a good thing if you
a) really need it and b) can deal with the fallout.
2) You might want to join the Raspberry Pi help forum and ask your
questions there. I say this entirely in peaces and love - this is
not a "You're off topic in my newsgroup!" flame. It is a good
forum and they are very attentive to people's questions such as
yours. forums.raspberrypi.com should get you there.
I'm not trying to discourage you from posting RPi questions to
Usenet, but I think you'll do better there.
On Sat, 16 Sep 2023 22:31:19 -0000 (UTC)
gazelle@shell.xmission.com (Kenny McCormack) wrote:
1) This Orwellian termed "predictable names" thing is a real PIA. To
be fair, it is probably the sort of thing that is a good thing if you
a) really need it and b) can deal with the fallout.
It's most useful (read pretty much essential) if there are multiple
interfaces and you want to make sure they get the right static routes and >firewall rules.
In article <ue5711$8pt$6@dont-email.me>,
The Natural Philosopher <tnp@invalid.invalid> wrote:
...
Well I explicitly selected to disable it in the config tool and now it
seems to work
That's good. I was going to comment to that effect (that the network names thing was your issue, but others beat me to it.
Where (what file) is that config option stored?
The standard advice given at this point is to look at the code in /usr/bin/raspi-config. It is a shell script, and reasonably readable.
Searching around a bit, I found this function:
get_net_names() {
if grep -q "net.ifnames=0" $CMDLINE || [ "$(readlink -f /etc/systemd/network/99-def
ault.link)" = "/dev/null" ] ; then
echo 1
else
echo 0
fi
}
I think that should give you the general idea.
there is also a set_net_names() function in there too.
Two other comments:
1) This Orwellian termed "predictable names" thing is a real PIA. To be
fair, it is probably the sort of thing that is a good thing if you
a) really need it and b) can deal with the fallout. But for most
people, it is just a PIA. It was added to RaspiOS a few releases
back, but then when people complained about it, they made it
off-by-default. So, you must be running one of the versions where
it is on-by-default.
2) You might want to join the Raspberry Pi help forum and ask your
questions there. I say this entirely in peaces and love - this is
not a "You're off topic in my newsgroup!" flame. It is a good
forum and they are very attentive to people's questions such as
yours. forums.raspberrypi.com should get you there.
I'm not trying to discourage you from posting RPi questions to
Usenet, but I think you'll do better there.
On 16/09/2023 23:31, Kenny McCormack wrote:
2) You might want to join the Raspberry Pi help forum and ask your >> questions there. I say this entirely in peaces and love - this is >> not a "You're off topic in my newsgroup!" flame. It is a good
forum and they are very attentive to people's questions such as
yours. forums.raspberrypi.com should get you there.
I'm not trying to discourage you from posting RPi questions to
Usenet, but I think you'll do better there.
I think c.s.raspberry-pi is a perfectly good corner of usenet in which
to post Raspberry Pi questions :)
In article <20230917084313.b1052a54cd60f92b29aa0616@eircom.net>,
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
On Sat, 16 Sep 2023 22:31:19 -0000 (UTC)
gazelle@shell.xmission.com (Kenny McCormack) wrote:
1) This Orwellian termed "predictable names" thing is a real PIA. To >>> be fair, it is probably the sort of thing that is a good thing if you
a) really need it and b) can deal with the fallout.
It's most useful (read pretty much essential) if there are multiple
interfaces and you want to make sure they get the right static routes and
firewall rules.
You're probably right. Which is about 0.000001% of users.
Which is why they were right to make it off-by-default. Those who need it, will be able to enable it.
For most people, it was: What the h*** is this???
On 17.9.2023 0.34, The Natural Philosopher wrote:
On 16/09/2023 22:29, The Natural Philosopher wrote:
On 16/09/2023 16:50, Tauno Voipio wrote:
It seems that your Raspi OS is set up to provide 'predictable
interface names', which changes usb0 to enx<MAC without colons>,
so your Ethernet is f6:2d:ad:34:f3:9e.
The Network Manager gets confused of the naming change.
There is an option to disable the interface name change in
raspi-config.
Umm. I looked into this it it appeared to be disabled.
I am even more confused
Well I explicitly selected to disable it in the config tool and now it
seems to work
Where (what file) is that config option stored?
The simple way to keep the original name on USB Ethernet is to
create a symlink /etc/systemd/network/73-usb-net-by-mac.link
pointing to /dev/null.
Of course, the link has to be created with sudo or running as root.
On 17.9.2023 11.12, Kenny McCormack wrote:
In article <20230917084313.b1052a54cd60f92b29aa0616@eircom.net>,
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
On Sat, 16 Sep 2023 22:31:19 -0000 (UTC)
gazelle@shell.xmission.com (Kenny McCormack) wrote:
1) This Orwellian termed "predictable names" thing is a real
PIA. To
be fair, it is probably the sort of thing that is a good thing if you
a) really need it and b) can deal with the fallout.
It's most useful (read pretty much essential) if there are multiple >>> interfaces and you want to make sure they get the right static routes
and
firewall rules.
You're probably right. Which is about 0.000001% of users.
Which is why they were right to make it off-by-default. Those who
need it,
will be able to enable it.
For most people, it was: What the h*** is this???
It is one of the side-effects of systemd.
If I need many Ethernet interfaces on a Pi, I'll use a VLAN aware
switch and put the separate ports in separate VLANS, trunked to
the Pi connection. The VLANs can be accessed from the OS directly
as separate virtual interfaces.
On 17/09/2023 15:52, Tauno Voipio wrote:
On 17.9.2023 11.12, Kenny McCormack wrote:Well this PI has 'two, but very small' as the song says - usb0 and wlan0.
In article <20230917084313.b1052a54cd60f92b29aa0616@eircom.net>,
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
On Sat, 16 Sep 2023 22:31:19 -0000 (UTC)
gazelle@shell.xmission.com (Kenny McCormack) wrote:
1) This Orwellian termed "predictable names" thing is a real >>>>> PIA. To
be fair, it is probably the sort of thing that is a good thing if you >>>>> a) really need it and b) can deal with the fallout.
It's most useful (read pretty much essential) if there are multiple
interfaces and you want to make sure they get the right static
routes and
firewall rules.
You're probably right. Which is about 0.000001% of users.
Which is why they were right to make it off-by-default. Those who
need it,
will be able to enable it.
For most people, it was: What the h*** is this???
It is one of the side-effects of systemd.
If I need many Ethernet interfaces on a Pi, I'll use a VLAN aware
switch and put the separate ports in separate VLANS, trunked to
the Pi connection. The VLANs can be accessed from the OS directly
as separate virtual interfaces.
It seems perfectly simple to distinguish between them, to me.
I cant remember how they were configured - I cargo culted some script -
but the issue seemed to be that dnsmasq wasnt in the end expecting to
deal with the interface as it became renamed, but with usb0.
i.e. in /etc/dnsmasq.conf we have
interface=usb0
bind-dynamic
domain-needed
bogus-priv
dhcp-range=172.16.21.1,172.16.21.5,255.255.0.0,12h
So that would explain why, if the interface was renamed at some point,
the client machine couldn't get DHCP.
Oh. I just looked and that interface has now disconnected itself. Maybe
the problem is still extant.
Nope. It still seems to work.
I am back to two interfaces.
I do get it that its handy to have unique Ids for disks and interfaces
so that whether a disk is /dev/sda or /dev/sdb it gets mounted in the
correct place....and likewise if one had a dozen usb0 1 2 3 etc Ethernet adapters ..one would want to give them some sort of unique id, but, as
you say, if that is where you are going you probably have the nous to
enable smart ID via MAC address anyway, without it being the default
On 16/09/2023 23:31, Kenny McCormack wrote:
2) You might want to join the Raspberry Pi help forum and ask your
questions there. I say this entirely in peaces and love - this is
not a "You're off topic in my newsgroup!" flame. It is a good
forum and they are very attentive to people's questions such as
yours. forums.raspberrypi.com should get you there.
I'm not trying to discourage you from posting RPi questions to
Usenet, but I think you'll do better there.
I think c.s.raspberry-pi is a perfectly good corner of usenet in which
to post Raspberry Pi questions :)
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 140:09:27 |
Calls: | 166 |
Files: | 5,389 |
Messages: | 223,236 |