[root@docker network-scripts]# pwd
/etc/sysconfig/network-scripts
在当前目录下找到网卡配置文件
[root@docker network-scripts]# ls ifcfg*
ifcfg-ens33 ifcfg-lo
vim ifcfg-ens33
BOOTPROTO="none"
NAME="ens37"
DEVICE="ens37"
ONBOOT="yes"
IPADDR=192.168.0.80
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
DNS1=192.168.0.1
DNS2=114.114.114.114
[root@docker network-scripts]# systemctl restart network
[root@docker network-scripts]# ip add
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:fe:ee:ad brd ff:ff:ff:ff:ff:ff
inet 192.168.174.100/24 brd 192.168.174.255 scope global noprefixroute ens33
valid_lft forever preferred_lft forever