sudo vi /etc/sysconfig/network-scripts/ifcfg-<interface_name>
查看网关
ip route show
BOOTPROTO=none
DEVICE=eth0
TYPE="Ethernet"
PERSISTENT_DHCLIENT="yes"
ONBOOT=yes
IPADDR=192.168.3.151
PEERDNS=no
NETMASK=255.255.255.0
GATEWAY=192.168.3.1
DNS1=8.8.8.8
DNS2=114.114.114.114
sudo systemctl restart network