方案一:
1,首先修改网卡物理配置文件,没有这个文件的话新建一个或者从已有的环境上拷贝一份过来按照要求进行修改
vi /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3b:25:c4", ATTR{type}=="1", KERNEL=="eth0", NAME="agl0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3b:25:ce", ATTR{type}=="1", KERNEL=="eth1", NAME="agl1"
关键字解释:
ATTR{address}=="00:0c:29:3b:25:ce" ##物理网卡MAC地址 ifconfig查看
KERNEL=="eth1" ##原网卡名
NAME="agl1" # 网卡名修改为agl1
此时可以reboot重启机器使网卡重命名生效
2,修改网卡配置文件
vi /etc/network/interfaces
auto agl1
iface agl1 inet static
address 172.16.19.XX
netmask 255.255.255.0
这个要配置成修改后新的网卡名字
auto agl1##网卡名对应要正确1234567
http://keaa.net/linux-ubuntu-wifi-network-rename-or-change.html
https://blog.csdn.net/CANGYE0504/article/details/122066725
标签:ATTR,配置,网卡,修改,agl1,address,net From: https://www.cnblogs.com/lianhaifeng/p/17346967.html