• PI Zero W. Another puzzler

    From The Natural Philosopher@3:770/3 to All on Sat Sep 16 10:19:48 2023
    XPost: comp.os.linux.misc

    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.


    --
    The higher up the mountainside
    The greener grows the grass.
    The higher up the monkey climbs
    The more he shows his arse.

    Traditional

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Theo@3:770/3 to The Natural Philosopher on Sat Sep 16 13:27:32 2023
    XPost: comp.os.linux.misc

    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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Theo on Sat Sep 16 15:07:38 2023
    XPost: comp.os.linux.misc

    On 16/09/2023 13:27, Theo wrote:
    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.

    I am not sure...
    I will try and get that info. IIRC it keeps dishing out the data and
    its not accepted for some reason.

    A bit more googling reveals that this is not an unknown problem - the
    pseudo Ethernet interface is distinctly sketchy, by all accounts...



    Theo

    --
    Gun Control: The law that ensures that only criminals have guns.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From David W. Hodgins@3:770/3 to All on Sat Sep 16 12:15:32 2023
    XPost: comp.os.linux.misc

    On Sat, 16 Sep 2023 05:19:48 -0400, The Natural Philosopher <tnp@invalid.invalid> wrote:

    <parts snipped> Just including the parts relevant to my suggestion ...

    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'

    There isn't enough shown from the good connection to show whether it's occurring
    after the interface is renamed or before it. I'm just wondering if it's not being recognized due to that, in combination with settings in the dhcp server.

    Try adding the kernel boot parameter net.ifnames=0 to stop the interface being renamed.

    If that fails, run wireshark on the host so you can compare what is being sent and received to/from the dhcp server.

    Regards, Dave Hodgins

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to The Natural Philosopher on Sat Sep 16 18:50:06 2023
    XPost: comp.os.linux.misc

    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.

    --

    -TV


    On 16.9.2023 12.19, The Natural Philosopher wrote:

    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.



    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Tauno Voipio on Sat Sep 16 22:29:16 2023
    XPost: comp.os.linux.misc

    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

    --
    “It is dangerous to be right in matters on which the established
    authorities are wrong.”

    ― Voltaire, The Age of Louis XIV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Tauno Voipio on Sat Sep 16 22:22:42 2023
    XPost: comp.os.linux.misc

    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.

    Tauno, that sounds promising. I will look into it.
    --
    Labour - a bunch of rich people convincing poor people to vote for rich
    people by telling poor people that "other" rich people are the reason
    they are poor.

    Peter Thompson

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to The Natural Philosopher on Sat Sep 16 22:34:24 2023
    XPost: comp.os.linux.misc

    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?

    --
    "And if the blind lead the blind, both shall fall into the ditch".

    Gospel of St. Mathew 15:14

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Kenny McCormack@3:770/3 to tnp@invalid.invalid on Sat Sep 16 22:31:18 2023
    XPost: comp.os.linux.misc

    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.

    --
    The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL:
    http://user.xmission.com/~gazelle/Sigs/Rorschach

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Kenny McCormack on Sun Sep 17 08:43:12 2023
    XPost: comp.os.linux.misc

    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.

    --
    Steve O'Hara-Smith
    Odds and Ends at http://www.sohara.org/
    Host: Beautiful Theory meet Inconvenient Fact
    Obit: Beautiful Theory died today of factual inconsistency

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Richard Harnden@3:770/3 to Kenny McCormack on Sun Sep 17 08:32:04 2023
    XPost: comp.os.linux.misc

    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 :)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Kenny McCormack@3:770/3 to steveo@eircom.net on Sun Sep 17 08:12:48 2023
    XPost: comp.os.linux.misc

    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???

    --
    I love the poorly educated.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Kenny McCormack on Sun Sep 17 09:17:50 2023
    XPost: comp.os.linux.misc

    On 16/09/2023 23:31, Kenny McCormack wrote:
    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.

    Yeah > found thatr link but couldnt believe it
    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.

    AFAIK I downloaded the latest a couple of months ago.

    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 found many instances of the problem there. I found no solution

    I'm not trying to discourage you from posting RPi questions to
    Usenet, but I think you'll do better there.


    As it happens I have done pretty well here so far..;-)

    --
    "And if the blind lead the blind, both shall fall into the ditch".

    Gospel of St. Mathew 15:14

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Richard Harnden on Sun Sep 17 09:19:36 2023
    On 17/09/2023 08:32, Richard Harnden wrote:
    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 :)


    I think his point was that forums.raspberrypi.com might be a better
    places to get *answers*.


    --
    How fortunate for governments that the people they administer don't think.

    Adolf Hitler

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to Kenny McCormack on Sun Sep 17 17:52:54 2023
    XPost: comp.os.linux.misc

    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.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Tauno Voipio on Sun Sep 17 15:54:44 2023
    XPost: comp.os.linux.misc

    On 17/09/2023 15:48, Tauno Voipio wrote:
    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.


    Yes. Something - presumably Raspi-config - did that. It was confusing.
    The NO option was highlighted in that program so I assumed that was its
    current state, but hitting return seems to have made it NO when it
    wasn't before. And a find mtime -1 revealed that that was the only
    likely looking file that had changed.

    Only that idiot Poettering could have conceived of the idea of linking a
    file to /dev/null was in fact a way to configure a computer.


    --
    The theory of Communism may be summed up in one sentence: Abolish all
    private property.

    Karl Marx

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Tauno Voipio on Sun Sep 17 16:08:42 2023
    XPost: comp.os.linux.misc

    On 17/09/2023 15:52, Tauno Voipio wrote:
    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.

    Well this PI has 'two, but very small' as the song says - usb0 and wlan0.

    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



    --
    No Apple devices were knowingly used in the preparation of this post.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to The Natural Philosopher on Sun Sep 17 21:21:24 2023
    XPost: comp.os.linux.misc

    On 17.9.2023 18.08, The Natural Philosopher wrote:
    On 17/09/2023 15:52, Tauno Voipio wrote:
    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.

    Well this PI has 'two, but very small'  as the song says - usb0 and wlan0.

    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




    wlan0 is a different beast, not a subject to current discussion.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Kenny McCormack@3:770/3 to nospam.harnden@gmail.com on Fri Sep 29 12:10:50 2023
    XPost: comp.os.linux.misc

    In article <ue6a1l$9eaf$1@dont-email.me>,
    Richard Harnden <nospam.harnden@gmail.com> wrote:
    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 :)


    I get what you're saying. And, as I went to great lengths to explain in
    the text quoted above, I'm absolutely *not* doing the usual "You're
    off-topic! slag". I am genuinely trying to help OP.

    But have you looked at the content of the c.s.r group? It is dominated by
    3 (last time I checked) interminable threads about nonsense. Also, it is
    (or was) dominated by discussions of running various flavors of BSD on the
    Pi, something basically nobody does (*). So, yeah, it has pretty much lost its way and its relevance.

    (*) Pretty much everyone runs RaspiOS - and for good reason.

    Editor's note: I see that this thread is cross-posted into c.s.r. So
    noted. I am reading/posting to it from c.o.l.m

    --
    So to cure the problem of arrogant incompetent rich people we should turn
    the government over to an arrogant incompetent trust fund billionaire
    who knows nothing about government and who has never held a job in his
    entire spoiled life?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)