网络查看配置相关命令
- dhclient :自动获取IP地址
- route -n/ip route/ifconfig -a :查看网关
- 公共DNS推荐 :119.29.29.29(dnspod)、114.114.114.114(电信)、202.106.0.20(联通)、8.8.8.8(谷歌)
[root@linux2019 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.16.255.253 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
172.16.240.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0
[root@linux2019 ~]# ip route
default via 172.16.255.253 dev eth0
169.254.0.0/16 dev eth0 scope link metric 1002
172.16.240.0/20 dev eth0 proto kernel scope link src 172.16.242.129
[root@linux2019 ~]# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.242.129 netmask 255.255.240.0 broa