Re: MAC Address changes between interfaces during each reboot in centos 7.6
Posted: 2019/05/08 12:37:48
I did it after the installation (don't remember, but it probably required a reboot).
The Community ENTerprise Operating System
https://forums.centos.org/
Code: Select all
# more /etc/udev/rules.d/70-persistent-ipoib.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="01:12:23:34:45:56", ATTR {type}=="1", KERNEL=="eth*", NAME="public"
# more /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=static
NAME=eth0
NM_CONTROLLED=no
DEVICE=eth0
ONBOOT=yes
HWADDR=01:12:23:34:45:56
DNS1="something"
DNS2="something"
IPADDR="something"
GATEWAY="something"
NETMASK="something"
NETWORK="something"
IPV6INIT=no
Before renaming, the actual interfaces will be in the following ordertunk wrote: ↑2019/05/08 13:59:56I seem to remember that I only edited these two files:Code: Select all
# more /etc/udev/rules.d/70-persistent-ipoib.rules SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="01:12:23:34:45:56", ATTR {type}=="1", KERNEL=="eth*", NAME="public" # more /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet BOOTPROTO=static NAME=eth0 NM_CONTROLLED=no DEVICE=eth0 ONBOOT=yes HWADDR=01:12:23:34:45:56 DNS1="something" DNS2="something" IPADDR="something" GATEWAY="something" NETMASK="something" NETWORK="something" IPV6INIT=no
Okay so how are you installing?changes has to be done during installation process
Probably, but that's local knowledge. If you know what networks you can have, you could try each interface in turn to determine if you can get to a "well known" (like a router) . The ICMP ping command supports -I <interface>. Or you could use DHCP to determine which network you are connected to (DHCP *should* give you a unique address and subnet mask, from which you can derive the network address). Or you could listen to the broadcasts on each interface to determine which network you are connected to. If IPv6 is (truly) involved, then things change again (IPv6 "does away" with ARP).Is there any unique attribute that can be considered for correct order during the renaming process