DELLR720服务器安装光纤网卡,添加网卡配置文件方法
#查看光纤网卡名称
[root@controller3 ~]# ip a
6: enp68s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 90:e2:ba:93:5c:ce brd ff:ff:ff:ff:ff:ff
inet 10.0.0.23/24 brd 10.0.0.255 scope global enp68s0f0
valid_lft forever preferred_lft forever
inet6 fe80::72a6:4e1e:d6d9:e4e4/64 scope link
valid_lft forever preferred_lft forever
7: enp68s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 90:e2:ba:93:5c:d0 brd ff:ff:ff:ff:ff:ff
inet 10.10.0.23/24 brd 10.10.0.255 scope global enp68s0f1
valid_lft forever preferred_lft forever
inet6 fe80::bf27:865b:3495:5b07/64 scope link
valid_lft forever preferred_lft forever
#查看网卡是否激活
[root@controller3 ~]# nmcli con show
NAME UUID TYPE DEVICE
eno3 2823b189-b84b-38e2-b136-eb430086ed6e 802-3-ethernet eno3
eno4 e662dfca-bfb6-32a1-9439-223c46ff0df2 802-3-ethernet eno4
feth0 36edfc1e-d9cf-4941-ab5f-63f49b89ede7 802-3-ethernet enp68s0f0
feth1 2ce9e84d-63ea-46ed-921f-7ef169d4b17c 802-3-ethernet enp68s0f1
virbr0 084f62b7-90a6-4546-9992-dc4547fc0c8e bridge virbr0
Wired connection 1 7d07f930-7a76-373b-90a9-1fbcd9ea7499 802-3-ethernet —
Wired connection 2 c4cb93fb-6242-3eb9-b759-45904c4bf32b 802-3-ethernet —
eno1 fd9cc557-2ff0-3818-ac90-0a495ddfc0ce 802-3-ethernet —
eno2 2cf6f68a-e447-3418-b7b3-3095f3b497a9 802-3-ethernet —
#添加网卡配置文件
nmcli con add con-name feth0 ifname enp68s0f0 type ethernet
nmcli con add con-name feth1 ifname enp68s0f1 type ethernet
#删除网卡
nmcli con del enp68s0f1
#配置各网卡网段
[root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno3
HWADDR=74:86:7A:D0:1D:62
TYPE=Ethernet
DEFROUTE=yes
BOOTPROTO=static
IPADDR=10.0.101.23
NETMASK=255.255.255.0
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eno3
UUID=2823b189-b84b-38e2-b136-eb430086ed6e
ONBOOT=yes
AUTOCONNECT_PRIORITY=-999
[root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno4
HWADDR=74:86:7A:D0:1D:63
TYPE=Ethernet
DEFROUTE=yes
BOOTPROTO=static
IPADDR=10.0.102.23
NETMASK=255.255.255.0
GATEWAY=10.0.102.254
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eno4
UUID=e662dfca-bfb6-32a1-9439-223c46ff0df2
ONBOOT=yes
AUTOCONNECT_PRIORITY=-999
[root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-feth0
TYPE=Ethernet
BOOTPROTO=static
IPADDR=10.0.0.23
NETMASK=255.255.255.0
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=feth0
UUID=36edfc1e-d9cf-4941-ab5f-63f49b89ede7
DEVICE=enp68s0f0
ONBOOT=yes
[root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-feth1
TYPE=Ethernet
BOOTPROTO=static
IPADDR=10.10.0.23
NETMASK=255.255.255.0
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=feth1
UUID=2ce9e84d-63ea-46ed-921f-7ef169d4b17c
DEVICE=enp68s0f1
ONBOOT=yes