Jump to content

MAC address


Pocster

Recommended Posts

25 minutes ago, SteamyTea said:

Why not use a host name to SSH into.

 

You can, if you want, give it a number.

I like IP's because I group things in ranges

 

e.g. iPads are 192.168.8.50 -> 60

pi's 192.168.8.100 -> 130 

 

etc. etc.

 

 

Link to comment
Share on other sites

Also..

https://github.com/home-assistant/operating-system/issues/245

 

 

My hypothesis was correct; somehow the os/sd card stores the Mac address it was installed on (!).



I removed the SD card, etched the image again, put it in the prod machine and it setup a new hassio and was visible on the correct IP; i.e. the install process worked out the Mac address of the hardware.

Would love to know where the Mac address is stored and where I could have changed it rather than starting again!

snip

Your quickest way to fix might be to backup (in hassos), reinstall hassos from scratch on the new pi, which will use the new pi mac address, and then restore the hassos backup.



 

Hope that make more sense to you than it does to me.

  • Like 1
Link to comment
Share on other sites

Looks like the Pi can load a MAC address override during kernel boot.

https://raspberrypi.stackexchange.com/questions/68513/pi-using-a-random-mac-address-after-every-reboot-how-do-i-stop-this-behavior

/boot/config.txt

 

Perhaps you have that set in the SD card image you are using 

 

 

Btw MAC addresses are only supposed to be globally unique if allocated in the global (not locally administered) range, see b1 of the first byte in https://en.m.wikipedia.org/wiki/MAC_address

 

That said I've seen manufacturers fail to assign unique addresses even within the so-called globally unique range. If you imagine a mass produced low cost devices (ESP32 *cough* *cough*) with multiple manufacturing lines running at once, perhaps in different buildings/cities, it takes a lot more time effort and money to coordinate all the lines to guarantee each device is unique, and no MAC addresses wasted (they are a limited resource after all). Much easier to blat a random address into each device and just hope no two identical snowflakes ever meet in the wild.  

Edited by joth
  • Like 2
Link to comment
Share on other sites

19 hours ago, pocster said:

Yeah I detect router / switch are getting confused .

 

I hesitate to ask this - but is it a virgin router?

 

Cos they do get their MACs confused occasionally.

 

Also what on earth possesses anyone to use fixed IP addresses - just use dynamic IP addresses and get on with the building work - you're just creating diversionary IT management work which ain't gonna get the place finished....    although reading between lines it may never be....     ?

 

Simon

  • Haha 1
Link to comment
Share on other sites

13 minutes ago, Bramco said:

 

I hesitate to ask this - but is it a virgin router?

 

Cos they do get their MACs confused occasionally.

 

Also what on earth possesses anyone to use fixed IP addresses - just use dynamic IP addresses and get on with the building work - you're just creating diversionary IT management work which ain't gonna get the place finished....    although reading between lines it may never be....     ?

 

Simon

Not virgin but evil Hawaei - so I’m sure the great Chinese nation is interfering in my technological madness .

Not a fan of dynamic ip’s . I tend to memorise the common ones . So bathroom ip for example I’ll know - easy to access rather than ‘finding ‘ it’s ip when it goes wrong . Stationary targets easier than a moving one . I’m allowed a little break of IT fun before I’m back to the bricks n mortar .

Link to comment
Share on other sites

2 hours ago, TerryE said:

There's a parameter in your /boot/config.txt which can be used to override the MAC addr: smsc95xx.macaddr=<whatever valid addr you want>.

Yeah I found that before my solution and it didn’t seem to work .

Link to comment
Share on other sites

Sigh!

 

Doesn't work!. The USB RJ45 dongle (i.e. crap mass produced Chinese thing ) all have the same MAC - can't see a way round it.

I'm guessing that perhaps I need a bridge/switch in-between modem and unmanaged switches. But can you get one that allocates ( or spoofs ) MAC's and of course IP??

Link to comment
Share on other sites

Just now, joth said:

 

Errr.... buy a less-cheap USB ethernet dongle.

 

Yeah I did think that. But whether I buy from Ebay/Amazon/Curry's etc. I've got no idea of the MAC situation I have I.

All these devices are ultimately made in China. Just trying to find a permanent solution . I'm using pi zero with amp hat's because they are small and cheap but needed ethernet connection for reliability.Did try even doing POE to them - all the things I bought either failed or simply didn't work. Could swap back to raspberry pi 3/4's , but then I've got to buy new amp hats and they all use more juice.

Link to comment
Share on other sites

Right enough fecking about!

Back to good old raspberry pi 3 or 4 (so a nice unique MAC ) ; dig out some amp hat's. Purchase a few poe hats. This should solve it all.

 

Have quite a few zero's ( and amp hat's ) available if anyone is now interested???

 

Forgot I had this fan to overclock the bad boy!

IMG_5040.jpg

Link to comment
Share on other sites

2 minutes ago, pocster said:

Have quite a few zero's ( and amp hat's ) available if anyone is now interested

Would have been, but need unique and static MAC address now I have taken your lead and ditched using host names.

I take it this network is for the home automation system you are designing and coding for us all.

Link to comment
Share on other sites

23 minutes ago, SteamyTea said:

Would have been, but need unique and static MAC address now I have taken your lead and ditched using host names.

I take it this network is for the home automation system you are designing and coding for us all.

Useless human.

Link to comment
Share on other sites

1 hour ago, pocster said:

Sigh!

 

Doesn't work!. The USB RJ45 dongle (i.e. crap mass produced Chinese thing ) all have the same MAC - can't see a way round it.

 

What?! *Now* you're telling us you're using a plug-in network adapter?! Talk about a wild goose chase. Yeah, if it's cheap Chinese nonsense then you can almost guarantee non-unique MAC addresses. 

 

Buy something better quality and your problem will be solved. 

  • Haha 1
Link to comment
Share on other sites

29 minutes ago, MJNewton said:

 

What?! *Now* you're telling us you're using a plug-in network adapter?! Talk about a wild goose chase. Yeah, if it's cheap Chinese nonsense then you can almost guarantee non-unique MAC addresses. 

 

Buy something better quality and your problem will be solved. 

Forgot to mention they were zero's so yes have a usb/RJ45 splodge .

 

None the less for IoT we need unique mac on everything. Surely the chinese can't think everyone will just have 1 usb/rj45 connector in their house?. But of course they don't care. I have loads of these. But for HA ( as it's Z wave ) they are used just for PoE capability therefore never cared about the Mac address.

For whole house audio it matters

Link to comment
Share on other sites

12 minutes ago, SteamyTea said:

Why not try Zero W, they have wifi and BT built in.

 

And a more serious question, why not use hostnames?

I prefer everything wired. For ethernet and power where possible. Wifi is left 'free' for mobile things like phones and laptops. You only have so much wifi bandwidth available.

 

A host name still requires a unique IP ( which isn't a problem ). Non unique Mac addresses mess up ARP, network comms etc. . Switches/routers will send packet data to the wrong device if there is mac address confusion/duplication.

Edited by pocster
Link to comment
Share on other sites

2 minutes ago, SteamyTea said:

I have only had about 5 Pis connect using host names and not had a problem, but may play sometime in the future when I am not commuting up country every weekend.

Only an issue if you add ethernet capability ( with chinese rubbish ). On WiFi you won't have those issues. Of course if you mean 3/4's etc. that have ethernet then they should all have unique Mac's .

Why do you have 5? - which 5 people do you spy on?

Edited by pocster
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...