Centos7.9添加新网卡配置

查看新网卡MAC地址

ip addr
...
  link/ether 02:11:32:21:5f:65 brd ff:ff:ff:ff:ff:ff
...

获取网卡UUID

nmcli connection show
UUID 72553b15-3d86-32a1-8624-bfd5648f4e40

新增网卡配置文件

/etc/sysconfig/network-scripts/ifcfg-eth1

如下配置,NAME\UUID\HWADDR\DEVICE根据实际硬件信息配置即可,其他IP地址信息正常配置即可

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID=72553b15-3d86-32a1-8624-bfd5648f4e40
HWADDR=02:11:32:2e:6d:f5
DEVICE=eth1
ONBOOT=yes
IPADDR=172.16.0.8
PREFIX=16
GATEWAY=172.16.0.1
DNS1=172.16.0.8
IPV6_PRIVACY=no

重启网络

service network restart
posted @ 2022-02-12 20:18  GreeneGe  阅读(1454)  评论(0编辑  收藏  举报

https://github.com/Glf9832