1.ip地址的查看
$ifconfig
或
$ip addr
2.网络连通性测试
-
ping
$ ping 192.168.1
-
测试端口的连通性
$ telnet www.baidu.com 80
或
python3 -m telnetlib -d www.baidu.com 80
无telnet命令但是有python可以使用如上命令
-
路径探测跟踪
-
tracepath
$ tracepath www.baidu.com
-
traceroute
安装
$ yum install traceroute
使用
$traceroute www.baidu.com
-
3.curl命令
4.wget命令
5.tcpdump命令
tcpdump -i lo0 dst 192.168.1.1 and dst port 39975 -w icmp.pcap
参考