• How do I get my Pi4 (Fedora) to use a real and stable MAC address?

    From Lars Poulsen@3:770/3 to All on Fri Sep 13 08:25:45 2024
    The current fad is to use random MAC addresses. I want anything that is "infrastructure" to have unique and stable MAC addresses, so that DHCP
    can give them stable IP addresses. My Pi4 runs Fedora (which is very
    stable on it except for the GUI), but it seems to always come up with randomized MAC addresses. Does it not HAVE a hardware MAC address?

    And if it has one, where do I tell Fedora to use it?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Lars Poulsen on Fri Sep 13 16:49:58 2024
    On 13/09/2024 16:25, Lars Poulsen wrote:
    The current fad is to use random MAC addresses. I want anything that is "infrastructure" to have unique and stable MAC addresses, so that DHCP
    can give them stable IP addresses. My Pi4 runs Fedora (which is very
    stable on it except for the GUI), but it seems to always come up with randomized MAC addresses. Does it not HAVE a hardware MAC address?

    And if it has one, where do I tell Fedora to use it?

    Well there are various places. RASPI-CONFIG can I think turn it off for ethernet.

    Oh. its network manager that does it

    If you have a GUI look under 'interface' and 'etherne't and select
    desired option from 'cloned MAC address'

    If no GUI use nmcli
    But I don't have the magic spell


    --
    Renewable energy: Expensive solutions that don't work to a problem that
    doesn't exist instituted by self legalising protection rackets that
    don't protect, masquerading as public servants who don't serve the public.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lawrence D'Oliveiro@3:770/3 to The Natural Philosopher on Sat Sep 14 01:37:13 2024
    On Fri, 13 Sep 2024 16:49:58 +0100, The Natural Philosopher wrote:

    Oh. its network manager that does it

    I disable NetworkManager on machines I consider “servers” or “infrastructure”. Then I manually configure the network interfaces.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lars Poulsen@3:770/3 to Lawrence D'Oliveiro on Sat Sep 14 08:37:58 2024
    On 9/13/2024 6:37 PM, Lawrence D'Oliveiro wrote:
    On Fri, 13 Sep 2024 16:49:58 +0100, The Natural Philosopher wrote:

    Oh. its network manager that does it

    I disable NetworkManager on machines I consider “servers” or “infrastructure”. Then I manually configure the network interfaces.

    So how do I manually configure the ethernet port to use the hardware MAC address?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lawrence D'Oliveiro@3:770/3 to Lars Poulsen on Sat Sep 14 22:31:58 2024
    On Sat, 14 Sep 2024 08:37:58 -0700, Lars Poulsen wrote:

    On 9/13/2024 6:37 PM, Lawrence D'Oliveiro wrote:

    On Fri, 13 Sep 2024 16:49:58 +0100, The Natural Philosopher wrote:

    Oh. its network manager that does it

    I disable NetworkManager on machines I consider “servers” or
    “infrastructure”. Then I manually configure the network interfaces.

    So how do I manually configure the ethernet port to use the hardware MAC address?

    Every NIC has a built-in address, which it should default to.

    Or, a quick look at the docs
    <https://manpages.debian.org/8/ip-link.8.en.html> gives

    ip link set «device» address «addr»

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lars Poulsen@3:770/3 to Lawrence D'Oliveiro on Sun Sep 15 13:58:09 2024
    On 9/14/2024 3:31 PM, Lawrence D'Oliveiro wrote:
    On Sat, 14 Sep 2024 08:37:58 -0700, Lars Poulsen wrote:

    On 9/13/2024 6:37 PM, Lawrence D'Oliveiro wrote:

    On Fri, 13 Sep 2024 16:49:58 +0100, The Natural Philosopher wrote:

    Oh. its network manager that does it

    I disable NetworkManager on machines I consider “servers” or
    “infrastructure”. Then I manually configure the network interfaces.

    So how do I manually configure the ethernet port to use the hardware MAC
    address?

    Every NIC has a built-in address, which it should default to.

    Or, a quick look at the docs <https://manpages.debian.org/8/ip-link.8.en.html> gives

    ip link set «device» address «addr»

    Not quite responsive:
    1) I do not want to invent a MAC address, I want to tell it to use the manufacturer's supposedly unique default address AFTER the OS/driver/network-manager/whatever has already wiped it out during the
    boot process. Your command example assumes that I know what it is.
    2)As you can see in the subject line, I am running Fedora, not
    rasp(b)ian. Even if Fedora's GUI does not work on the RP4, I would
    rather run headless than have to learn Debian system management after a
    decade of living in RedHat world.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Townley@3:770/3 to Lars Poulsen on Sun Sep 15 23:06:09 2024
    On 15/09/2024 21:58, Lars Poulsen wrote:
    On 9/14/2024 3:31 PM, Lawrence D'Oliveiro wrote:
    On Sat, 14 Sep 2024 08:37:58 -0700, Lars Poulsen wrote:

    On 9/13/2024 6:37 PM, Lawrence D'Oliveiro wrote:

    On Fri, 13 Sep 2024 16:49:58 +0100, The Natural Philosopher wrote:

    Oh. its network manager that does it

    I disable NetworkManager on machines I consider “servers” or
    “infrastructure”. Then I manually configure the network interfaces. >>>
    So how do I manually configure the ethernet port to use the hardware MAC >>> address?

    Every NIC has a built-in address, which it should default to.

    Or, a quick look at the docs
    <https://manpages.debian.org/8/ip-link.8.en.html> gives

         ip link set «device» address «addr»

    Not quite responsive:
    1) I do not want to invent a MAC address, I want to tell it to use the manufacturer's supposedly unique default address AFTER the OS/driver/network-manager/whatever has already wiped it out during the
    boot process. Your command example assumes that I know what it is.
    2)As you can see in the subject line, I am running Fedora, not
    rasp(b)ian. Even if Fedora's GUI does not work on the RP4, I would
    rather run headless than have to learn Debian system management after a decade of living in RedHat world.


    Don't feed the troll!

    --
    Chris

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lawrence D'Oliveiro@3:770/3 to All on Sun Sep 15 22:08:07 2024
    On Sat, 14 Sep 2024 22:31:58 -0000 (UTC), I wrote:

    Or, a quick look at the docs <https://manpages.debian.org/8/ip-link.8.en.html> gives

    ip link set «device» address «addr»

    Actually, I think it might be

    ip link set «device» macaddr ...

    There are “del” and “flush” options there, in addition to “set” -- I
    expect one of them will have the effect of reverting to the default MAC address.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lawrence D'Oliveiro@3:770/3 to Lars Poulsen on Sun Sep 15 21:33:22 2024
    On Sun, 15 Sep 2024 13:58:09 -0700, Lars Poulsen wrote:

    ... I am running Fedora, not rasp(b)ian.

    Irrelevant.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lawrence D'Oliveiro@3:770/3 to All on Sun Sep 15 23:53:47 2024
    On Sun, 15 Sep 2024 22:08:07 -0000 (UTC), I wrote:

    On Sat, 14 Sep 2024 22:31:58 -0000 (UTC), I wrote:

    Or, a quick look at the docs
    <https://manpages.debian.org/8/ip-link.8.en.html> gives

    ip link set «device» address «addr»

    Actually, I think it might be

    ip link set «device» macaddr ...

    No, it is in fact the first form. Note that the link must be down before
    you can change its MAC address.

    Also if you set this to a non-default value, “ip link show” will show that default value as the “permaddr”. So you can easily set it back to that.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lars Poulsen@3:770/3 to Lawrence D'Oliveiro on Sun Sep 15 18:02:27 2024
    On 9/15/2024 4:53 PM, Lawrence D'Oliveiro wrote:
    On Sun, 15 Sep 2024 22:08:07 -0000 (UTC), I wrote:

    On Sat, 14 Sep 2024 22:31:58 -0000 (UTC), I wrote:

    Or, a quick look at the docs
    <https://manpages.debian.org/8/ip-link.8.en.html> gives

    ip link set «device» address «addr»

    Actually, I think it might be

    ip link set «device» macaddr ...

    No, it is in fact the first form. Note that the link must be down before
    you can change its MAC address.

    Also if you set this to a non-default value, “ip link show” will show that
    default value as the “permaddr”. So you can easily set it back to that.

    Running headless, using ssh to login, I cannot use an interactive
    command to do this. Does this information live in a configuration file somewhere under /etc?
    And the difference between raspian (a Debian derivative) and Fedora
    (which uses systemd) *does* make a difference.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Lars Poulsen on Mon Sep 16 05:36:29 2024
    On 15/09/2024 21:58, Lars Poulsen wrote:
    On 9/14/2024 3:31 PM, Lawrence D'Oliveiro wrote:
    On Sat, 14 Sep 2024 08:37:58 -0700, Lars Poulsen wrote:

    On 9/13/2024 6:37 PM, Lawrence D'Oliveiro wrote:

    On Fri, 13 Sep 2024 16:49:58 +0100, The Natural Philosopher wrote:

    Oh. its network manager that does it

    I disable NetworkManager on machines I consider “servers” or
    “infrastructure”. Then I manually configure the network interfaces. >>>
    So how do I manually configure the ethernet port to use the hardware MAC >>> address?

    Every NIC has a built-in address, which it should default to.

    Or, a quick look at the docs
    <https://manpages.debian.org/8/ip-link.8.en.html> gives

         ip link set «device» address «addr»

    Not quite responsive:
    1) I do not want to invent a MAC address, I want to tell it to use the manufacturer's supposedly unique default address AFTER the OS/driver/network-manager/whatever has already wiped it out during the
    boot process. Your command example assumes that I know what it is.
    2)As you can see in the subject line, I am running Fedora, not
    rasp(b)ian. Even if Fedora's GUI does not work on the RP4, I would
    rather run headless than have to learn Debian system management after a decade of living in RedHat world.


    Unfortunately you are probably the only one here that is using RedHat on
    a Pi.

    AFAIK, ethernet defaults to 'one permanent MAC address' - its only wifi
    that tends to switch around for security in public wifi spaces.

    Have you actually checked to see if you are getting ethernet randomisation? ifconfig -a will display it


    --
    Climate Change: Socialism wearing a lab coat.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Lars Poulsen on Mon Sep 16 05:38:10 2024
    On 16/09/2024 02:02, Lars Poulsen wrote:
    Running headless, using ssh to login, I cannot use an interactive
    command to do this.
    Yes you can.

    > Does this information live in a configuration file
    somewhere under /etc?
    Yes.
    And the difference between raspian (a Debian derivative) and Fedora
    (which uses systemd) *does* make a difference.

    Debian uses systemd.

    Are you just trolling?

    --
    "Anyone who believes that the laws of physics are mere social
    conventions is invited to try transgressing those conventions from the
    windows of my apartment. (I live on the twenty-first floor.) "

    Alan Sokal

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lawrence D'Oliveiro@3:770/3 to The Natural Philosopher on Mon Sep 16 06:41:15 2024
    On Mon, 16 Sep 2024 05:38:10 +0100, The Natural Philosopher wrote:

    Are you just trolling?

    Please, stop with the ad-hominem bullshit. If you can’t help, shut up.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Lars Poulsen on Mon Sep 16 08:12:58 2024
    On 9/13/24 16:25, Lars Poulsen wrote:
    The current fad is to use random MAC addresses. I want anything that is "infrastructure" to have unique and stable MAC addresses, so that DHCP
    can give them stable IP addresses. My Pi4 runs Fedora (which is very
    stable on it except for the GUI), but it seems to always come up with randomized MAC addresses. Does it not HAVE a hardware MAC address?

    And if it has one, where do I tell Fedora to use it?

    This what I use, when NIC MAC is changed by a new install.

    #!/bin/sh
    UUID=$(nmcli -t con show | grep Wired | cut -d: -f2)
    nmcli connection down $UUID
    nmcli connection modify $UUID ethernet.cloned-mac-address
    "xx:xx:xx:xx:xx:xx" #put here your preferred MAC address
    nmcli connection modify $UUID -ethernet.mac-address ""
    nmcli connection up $UUID

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to Lars Poulsen on Mon Sep 16 11:37:29 2024
    On 16.9.2024 4.02, Lars Poulsen wrote:
    On 9/15/2024 4:53 PM, Lawrence D'Oliveiro wrote:
    On Sun, 15 Sep 2024 22:08:07 -0000 (UTC), I wrote:

    On Sat, 14 Sep 2024 22:31:58 -0000 (UTC), I wrote:

    Or, a quick look at the docs
    <https://manpages.debian.org/8/ip-link.8.en.html> gives

         ip link set «device» address «addr»

    Actually, I think it might be

         ip link set «device» macaddr ...

    No, it is in fact the first form. Note that the link must be down before
    you can change its MAC address.

    Also if you set this to a non-default value, “ip link show” will show
    that
    default value as the “permaddr”. So you can easily set it back to that.

    Running headless, using ssh to login, I cannot use an interactive
    command to do this. Does this information live in a configuration file somewhere under /etc?
    And the difference between raspian (a Debian derivative) and Fedora
    (which uses systemd) *does* make a difference.


    After logged in with SSH, you *are using* an interactive command.

    The distribution should not change the systemd setup. The configuration
    files are in /lib/systemd/, /run/systemd and /etc/systemd. Please get
    the systemd documentation and read it. The network setup is in network subdirectory in the three places.

    On a Raspberry, the hardware MAC address is probably b8:27:eb:xx:yy:zz.
    Please post what the first octet (b8 above) is.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lars Poulsen@3:770/3 to The Natural Philosopher on Mon Sep 16 15:30:42 2024
    On 9/15/2024 9:36 PM, The Natural Philosopher wrote:
    Unfortunately you are probably the only one here that is using RedHat on
    a Pi.

    You may well be right about that.

    AFAIK, ethernet defaults to 'one permanent MAC address' - its only wifi
    that tends to switch around for security in public wifi spaces.

    Have you actually checked to see if you are getting ethernet randomisation? ifconfig -a will display it

    Thank you for an actually useful suggestion. I had forgotten to check
    that and just assumed that was the cause of a change in IP address.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Lars Poulsen on Tue Sep 17 10:44:35 2024
    On 16/09/2024 23:30, Lars Poulsen wrote:
    On 9/15/2024 9:36 PM, The Natural Philosopher wrote:
    Unfortunately you are probably the only one here that is using RedHat
    on a Pi.

    You may well be right about that.

    AFAIK, ethernet defaults to 'one permanent MAC address' - its only
    wifi that tends to switch around for security in public wifi spaces.

    Have you actually checked to see if you are getting ethernet
    randomisation?
    ifconfig -a will display it

    Thank you for an actually useful suggestion. I had forgotten to check
    that and just assumed that was the cause of a change in IP address.



    Hang on a minute.... IP address or MAC address?

    IP address may change any time you connect to the DHCP server (if you
    are using DHCP).

    ifconfig -a
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    *inet 192.168.0.101* netmask 255.255.255.0 broadcast 192.168.0.255
    inet6 fe80::9a2:3187:4600:cfc1 prefixlen 64 scopeid 0x20<link>
    *ether d8:3a:dd:85:22:b1* txqueuelen 1000 (Ethernet)
    RX packets 335547 bytes 39007037 (37.2 MiB)
    RX errors 0 dropped 158 overruns 0 frame 0
    TX packets 348598 bytes 256465720 (244.5 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    This is a statically configured *IP address* on a Pi 4B
    I assume the Ethernet *MAC* address is always the same.

    Looking up the MAC address online:
    Result:
    MAC Address Prefix Manufacturer
    D83ADD Raspberry Pi Trading Ltd

    --
    The lifetime of any political organisation is about three years before
    its been subverted by the people it tried to warn you about.

    Anon.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lars Poulsen@3:770/3 to The Natural Philosopher on Tue Sep 17 19:24:31 2024
    On 9/17/2024 2:44 AM, The Natural Philosopher wrote:
    On 16/09/2024 23:30, Lars Poulsen wrote:
    On 9/15/2024 9:36 PM, The Natural Philosopher wrote:
    Unfortunately you are probably the only one here that is using RedHat
    on a Pi.

    You may well be right about that.

    AFAIK, ethernet defaults to 'one permanent MAC address' - its only
    wifi that tends to switch around for security in public wifi spaces.

    Have you actually checked to see if you are getting ethernet
    randomisation?
    ifconfig -a will display it

    Thank you for an actually useful suggestion. I had forgotten to check
    that and just assumed that was the cause of a change in IP address.



    Hang on a minute.... IP address or MAC address?

    IP address may change any time you connect to the DHCP server (if you
    are using DHCP).

    ifconfig -a
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
           *inet 192.168.0.101*  netmask 255.255.255.0  broadcast 192.168.0.255
            inet6 fe80::9a2:3187:4600:cfc1  prefixlen 64  scopeid 0x20<link>
           *ether d8:3a:dd:85:22:b1*  txqueuelen 1000  (Ethernet)
            RX packets 335547  bytes 39007037 (37.2 MiB)
            RX errors 0  dropped 158  overruns 0  frame 0
            TX packets 348598  bytes 256465720 (244.5 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    This is a statically configured *IP address* on a Pi 4B
    I assume the Ethernet *MAC* address is always the same.

    Looking up the MAC address online:
    Result:
    MAC Address Prefix    Manufacturer
    D83ADD                Raspberry Pi Trading Ltd

    My DHCP server on that network has a list of known hosts (known by their
    MAX address) and what their IP address should be. Hence my annoyance
    when employees with iPhones have randomized MAC addresses.

    The "hobby" RPI4 in my "work" network was acquired in the hope that it
    may grow into being able to become an edge router for my home network.

    The edge router on my work network is a very nice headless AMD64 with 4
    Gigabit ethernet ports running Fedora with iptables, OpenVPN and lots of logging to keep the subnets behind it safe.

    Considering the time I have spent on my RPI experiments, the savings on
    the hardware have been a false economy.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to Lars Poulsen on Wed Sep 18 18:52:09 2024
    On 18.9.2024 5.24, Lars Poulsen wrote:

    --- discussion snopped ---

    My DHCP server on that network has a list of known hosts (known by their
    MAX address) and what their IP address should be. Hence my annoyance
    when employees with iPhones have randomized MAC addresses.

    The randomised MAC addresses of iPhones are from the 'locally
    administered' MAC address ranges. The non-local non-multicast
    addresses have a first octet of x0, x4, x8 or xc, where x is
    any hex digit.

    The locally administered addresses have a first octet of x2, x6,
    xa or xe (like 76:f9:76:17:f6:4d, from my iPhone).

    The iPhone MAC address fudging can be turned on/off for each network separately, from the 'i' menu of the WiFi connection. Just tell your
    folks to turn off the fudging for your network or stay outside.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Lawrence D'Oliveiro@3:770/3 to Lars Poulsen on Thu Sep 19 01:24:26 2024
    On Tue, 17 Sep 2024 19:24:31 -0700, Lars Poulsen wrote:

    My DHCP server on that network has a list of known hosts (known by their
    MAX address) and what their IP address should be. Hence my annoyance
    when employees with iPhones have randomized MAC addresses.

    But surely those employees have individual accounts in your company authentication database, do they not: so could you not assign them IP
    addresses associated with those particular accounts?

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