查看網關地址
route -n
ip route show
netstat -r
traceroute www.baidu.com 100
#第一行就是自己的網關
more /etc/network/interfaces #【Debian/Ubuntu Linux】
more /etc/sysconfig/network-scripts/ifcfg-eth0 #【Red Hat Linux】
查看DNS地址
cat /etc/resolv.conf
nslookup www.baidu.com
參考資料
http://blog.itpub.net/20674423/viewspace-1130322/
https://www.cnblogs.com/kerrycode/p/5407635.html