Pairing IP address with MAC address

I created two interfaces for two LAN devices. I gave the IPv4 adresses x.x100.254 and x.x.101.254. After a Reboot from the Raspberry-PI 4 the IPv4 adresses exchanged like the following pictures:

ok, and ???

The implied question is why did they switch and how to prevent it.


if we're doing the mind reading game, my guess is it's because the NIC(s) got discovered in a different order during boot.

yes the question ist why did they switch and how to prevent it?

How do you then assign an IP address to a device that is independent of the discovery order?

The devices in the range 100 have IP´s 100 and in the range 101 the IP´s 101. So the PI must pairing the IP´s with the MAC, otherwise I must control and change the IP´s after ecery Reboot

you were already told why

you can't prevent it, but you can work around it.
read Stable network interface names for USB Ethernet Dongles - #4 by bobafetthotmail + replies, even if it says USB, it should still work, since it's using MAC addresses.


But the PI don´t change the MAC, he changes the IP-Adresses
So the interface eth1 must use the static IP. The IP must be fix

Correct - we understood that, see: Pairing IP address with MAC address - #9 by frollic

How to Ensure Consistent Network Interface Assignments in OpenWrt? - #2 by vgaetera