1.查看IP # ip addr
2.查看路由 # ip route
3.查看DNS # cat /etc/resolv.conf
4.查看主机名 # hostname
5.查看网关 netstat -rn route -n
ONBOOT="yes" #开启自动启用网络连接 IPADDR0="192.168.21.128" #设置IP地址 PREFIX0="24" #设置子网掩码 GATEWAY0="192.168.21.2" #设置网关 DNS1="8.8.8.8" #设置主DNS DNS2="8.8.4.4" #设置备DNS