0

This is a follow up question to this post and subsequently this post.

To save you from a long read I am trying to force a MAC address change on my Pi Zero ethernet adapter with:

ifconfig eth0 down; ifconfig eth0 hw ether 21:21:21:21:00:11; ifconfig eth0 up; ifconfig eth0

But I receive the error message:

ether: Host name lookup failure
ifconfig: `--help' gives usage information.
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::bb7e:8c36:1a6c:4d5e  prefixlen 64  scopeid 0x20<link>
        ether 10:10:12:10:10:10  txqueuelen 1000  (Ethernet)
        RX packets 1342  bytes 95363 (93.1 KiB)
        RX errors 1  dropped 5  overruns 0  frame 1
        TX packets 817  bytes 102452 (100.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Why can I not find ether? Many additional details leading up to this point can be found in the linked questions if needed.

Matt
  • 426
  • 2
  • 6
  • 16
  • odd error - the 21:21:21:21:00:11 address in the question is not valid - because of the LSB set in the first byte of the MAC ... but I can see the MAC is 10:10:12:10:10:10 in the output - are you actually trying to set the address to 21:21:21:21:00:11? In a previous answer I suggested the safest MAC addresses https://raspberrypi.stackexchange.com/a/88936/33057 the first part being x2, x6, xA or xE – Jaromanda X Oct 16 '18 at 22:04
  • Yeah I was trying to switch it to another address just to test the method again and happened to pick 21 arbitrarily. I also tried a MAC address starting with 99, is that also invalid? – Matt Oct 16 '18 at 22:06
  • My mistake I should have followed your initial advice. – Matt Oct 16 '18 at 22:08
  • 1
    any ODD number as the second digit i.e. 1,3,5,7,9,B,D,F will be invalid ... the 2,6,A,E in the list are the so called "locally administered" MAC addresses - not likely to clash with a manufacturer MAC address (whose second digits would be one of 0,4,8,C – Jaromanda X Oct 16 '18 at 22:12
  • @JaromandaX even using 22:12:12:12:12:12 I receive the exact same error message – Matt Oct 17 '18 at 00:22
  • @JaromandaX The other options you mentioned have the same error too – Matt Oct 17 '18 at 00:24
  • really? I though you said in this chat that ifconfig eth0 down; ifconfig eth0 hw ether 10:00:00:00:00:11; ifconfig eth0 up; ifconfig eth0 worked? and from the output in the question ether 10:10:12:10:10:10 looks like it does – Jaromanda X Oct 17 '18 at 00:42
  • ether: Host name lookup failure - that's a weird error to get ... type those commands one at a time ... it's definitely the ifconfig eth0 hw ether ...... line that triggers that error? – Jaromanda X Oct 17 '18 at 00:44
  • @JaromandaX to your first comment, that is correct. Which is why this is so weird, the command was previously working perfectly fine and suddenly it stopped working – Matt Oct 17 '18 at 00:46
  • Figured it out.... This is embarassing, I'd forgotten to write eth0 in one of the commands – Matt Oct 17 '18 at 00:53
  • Please make an answer and accept it two days later. – Ingo Oct 17 '18 at 20:16

1 Answers1

0

I had forgotten an eth0 in ifconfig eth0 down; ifconfig eth0 hw ether 21:21:21:21:00:11; ifconfig eth0 up; ifconfig eth0

Additionally, as Jaromanda said - 21:21:21:21:00:11 is an invalid MAC address. The second digit of the MAC address ought to be 2, 6, A, or E, the locally administered addresses.

Matt
  • 426
  • 2
  • 6
  • 16