Changing MAC address on my ethernet to USB adapter

i have a Netgear XR500 router it builds a network map with every known device. and my pi is added again and again becaus of the different mac adresses every restart. this screws my qos settings as well. every new device gets a fixed percentage of bandwith... i think you got the point...

so i looked around the www for 4 hours now and found nothing. so please help me out! im not a unix pro btw. but something like: "connect with ssh and go to /etc..... open with nano and add .... line" should work for me :slight_smile:

You mean to say the MAC address burned-in by the vendor is changing all the time ?

pi@ph5:~ $ ip -br link show eth0
eth0             UP             b8:27:eb:5e:xx:xx <BROADCAST,MULTICAST,UP,LOWER_UP>

Exactly! I get a new mac or lets say my router sees a new mac whenever the pi is rebooting.

Over the time These manny pi´s Clock up my qos Settings and so on…

Gesendet von Mail für Windows 10

I need to set a mac adress for the pi-hole!!! simple reason: my router creates a new unamed device every restart. because the mac is never the same as before. this is a huge problem because my qos settings are prozentual so with 5 total devices i set 80% bandwith to gaming pc and rest (5% each) for the other devices. 20 restarts later everything gets completely screwed because i have 25 devices now. and all the 20 new devices got some bandwith from every existing device. so in the end everything is on isdn speed exept the pi.

You need to configure your OSes network stack to do what you want. We're not going to be doing anything to change MAC addresses.

1 Like

oh dear... it is not about my os... it is my router! i have a netgear XR500 with dumaos and this has qos 2.0 anti bufferbloat and all the fancy gaming stuff. problem is it is adding another unnamed device (pi-hole) ervery restart. so my animated network map gets fuller and fuller and the manually chosen bandwith allocations are useless because there are more and more pi´s every day...is there a way to show you a screenshot? i think this would show you what i mean so you would instant understand my problem.

What ever it may be it's not something we'll be adding or doing with Pi-hole.

ok understand so far but im shure there is a way to set a permanent mac somhow in any config file would you please point me in the right direction? im not that experianced with unix... i tryed this:

in the /etc/boot/config.txt

dtoverlay=enc28j60
sudo ifconfig eth0 hw ether 0E:A6:11:89:30:B0

but it doesnt work...

I don't know what OS you are using? You should search for the name of your distribution and "how to set static mac", I'm sure you will find what you are looking for.

1 Like

ah sorry i thought the pi-hole is the os. so im using a pi zero as host with the enc28j60 network adapter.
the pi-hole runs under a debian distribution. but thanks alot! i think this was the hint i needed i will continue on my own frome here.
and i dont want to waste your time with newbie questions :wink:

thanks alot

chears

Btw. Are you might german? Because of the de in your Name… in this case feel free to swich to german it is my first langeruge…

cheers

Gesendet von Mail für Windows 10

Could you post output for below command before:

uptime && ip -br link show eth0

And after reboot:

uptime && ip -br link show eth0

Redact the last three octets for privacy!

EDIT:
And is that the same address displayed on your router ?

Almost.
I can understand and read but write awfully.
Dutchman here.

I gave him a couple more reboots and made some screenshots as well so the Outputs from pi match what the router sees. And the qos screenshots are a perfect Illustration of my Problem. Over time my whole Network gets no bandwith.

Tue 18 Aug 08:46:36 BST 2020

eth0 UP 8e:f9:76:9a:a2:2f <BROADCAST,MULTICAST,UP,LOWER_UP>

Tue 18 Aug 09:07:13 BST 2020

eth0 UP ea:81:b0:23:99:5a <BROADCAST,MULTICAST,UP,LOWER_UP>

Gesendet von Mail für Windows 10

Ok thats a local MAC address and not a Universal vendor one:

You must have software running on the Pi that configures this local MAC address at boot or something.
The stock Raspbian distro for the Pi doesnt do this ... yet i believe.
Cant help you with that as i dont know what distro your running and what software and no experience on the matter.

You can manually set local MAC with below (method 2):

1 Like

and it looks like that it will never happen...

so i got to that point before... than i tryed to find out how to change the mac and found something similar to your link (method2). but once i read the instructions one thing really hold me back... i did the whole setup without screen or keyboard. i just flashed the card, put it into the pi and from there on i ssh´ed my way to the web interface. followed the tutorial from linus tech tips. the point is obvius once i put the device down to change the mac i will loose the access to it. and yes it has wifi so i could use wifi but this way is a bit tricky for me first i would have to reconfigure my v-lans and bring a not vpn´ed router into my main ethernet and than set up wifi on the pi via commandline yay! i hoped to avoid that way... isnt there any config or boot file where i can put the command?

i already tryed this one here but sadly wont work...

"sudo nano /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.11.3/24
static routers=192.168.11.1
static domain_name_servers=1.1.1.1

static hwaddress ether 00:11:22:33:44:55"

with a different mac adress of course...

allsow tryed this in the
"/etc/boot/config.txt

dtoverlay=enc28j60 # the needed overlay for my ethernet interface
sudo ifconfig eth0 hw ether 0E:A6:11:89:30:B0"

wont work either

You haven't mentioned distro ?
Desktop installed and connected via Wifi maybe ?

https://www.raspberrypi.org/forums/viewtopic.php?t=237623

If Network-manager is installed.
To disable the MAC address randomization create the file:

/etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf

And add:

[connection]
wifi.mac-address-randomization=1
[device]
wifi.scan-rand-mac-address=no

btw. if it would help i can give you direct ssh acces to the pi and setup a temporary password so you can see for yourself

it is a debian on a pi zero

i followed this tutorial:

NetworkManager installed ?

nmcli