1、临时配置生效;
You can rename the device using the ip command:
/sbin/ip link set eth1 down
/sbin/ip link set eth1 name eth123
/sbin/ip link set eth123 up
2、配额udev策略永久生效;
You may also want to make sure that you configure a udev rule, so that this will work on the next reboot too. The path for udev moved in CentOS 7 to /usr/lib/udev/rules.d/72-persistent-net.rules change it
For example
ACTION==”add”, SUBSYSTEM==”net”, DRIVERS==”?“, ATTR{type}==”1”, PROGRAM=”/lib/udev/rename_device”, RESULT==”?“, NAME=”$result”
ACTION==”add”, SUBSYSTEM==”net”, DRIVERS==”?*”, ATTR{type}==”1”, ATTR{address}==”00:0c:29:f6:e0:3d”, PROGRAM=”/lib/udev/rename_device”, NAME=”ens34”