#配置精简版网卡
#配置精简版网卡
[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vi ifcfg-eth1
TYPE=Ethernet
BOOTPROTO=static
NAME=eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.229.170
NEIMASK=255.225.225.0
GATEWAY=192.168.229.2
DNS1=114.114.114.114
#重启网卡服务
[root@localhost network-scripts]# systemctl restart NetworkManager
#让IP地址生效
[root@localhost network-scripts]# ip link set eth1 down;ip link set eth1 up
#查看IP地址生效没有
[root@localhost ~]# ip addr show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0c:29:e4:64:80 brd ff:ff:ff:ff:ff:ff
inet 192.168.229.170/24 brd 192.168.229.255 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fee4:6480/64 scope link
valid_lft forever preferred_lft forever
#要是没有生效就重启系统
[root@localhost ~]# reboot