CentOS 7 shows the real name of lan card. Ex: enp2s0, enp8s0 OR
Sometimes we change the Motherboard or lan card of the systems. Then it takes a new name. So here i am going to show you to set the name of lan card as you like....
1. vi /etc/udev/rules.d/70-persistent-ipoib.rules
# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="74:27:ea:a9:27:07", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Sometimes we change the Motherboard or lan card of the systems. Then it takes a new name. So here i am going to show you to set the name of lan card as you like....
1. vi /etc/udev/rules.d/70-persistent-ipoib.rules
# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="74:27:ea:a9:27:07", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
So when ever you get a new lan card a new NAME will appear in the above file. You have to enable that line ( starting from SUBSYSTEM== ) and comment the other one. Make sure you have changed the ATTR{address} or MAC address to the current one.
Watch the video here.........
No comments:
Post a Comment