1. ping
(1) 检查本地网卡是否工作正常
请在”运行”中输入ping 127.0.0.1观察结果,如果出现下列信息则网卡工作正常,
否则请检查网卡的安装和驱动程序是否正常。
C:\>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
(2) 检查网络是否正常
一般检查网络是否正常都是通过ping网关(×.×.×.×为网关地址)地址,
如果出现下面的情况则是正常。
C:\>ping ×.×.×.× -n 2
Pinging ×.×.×.× with 32 bytes of data:
Reply from ×.×.×.×: bytes=32 time<10ms TTL=255
Reply from ×.×.×.×: bytes=32 time<10ms TTL=255
如果出现以下情况则表明网络连接或者是配置有问题。
C:\>ping ×.×.×.×
Pinging ×.×.×.× with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
如果出现以下的情况则说明网卡没有正常工作。
C:\>ping ×.×.×.×
Pinging ×.×.×.× with 32 bytes of data:
Destination host unreachable.
Destination host unreachable.
2. tracert
tracert命令是用来测试路由的,通过其中的测试可以知道网络连接中什么地方出现了问题。
具体如下:
C:\>tracert www.scuec.edu.cn
Tracing route to news.scuec.edu.cn [210.42.144.120]
over a maximum of 30 hops:
1 16 ms <10 ms <10 ms 218.197.223.254
2 * * * Request timed out.
如出现这种问题,其中一个原因是网络中心对各种报文做了限制,还有一个就是网络不通。
如果出现下面的这种现象就是正常:
C:\>tracert job.eistar.net
Tracing route to job.eistar.net [218.197.223.47]
over a maximum of 30 hops:
1 <10 ms <10 ms <10 ms LINFENGWEB2 [218.197.223.47]
Trace complete.
如果出现下面的这种现象就是正常:
C:\>tracert www.scuec.edu.cn
Tracing route to news.scuec.edu.cn [210.42.144.120]
over a maximum of 30 hops:
1 <10 ms <10 ms <10 ms LINFENGWEB2 [210.42.144.120]
Trace complete.
如果出现以下的情况:
C:\>tracert www.sina.com.cn
Tracing route to jupiter.sina.com.cn [202.112.8.2]
over a maximum of 30 hops:
1 16 ms <10 ms 16 ms 218.197.223.254
2 <10 ms <10 ms <10 ms 192.168.1.102
3 <10 ms <10 ms <10 ms 192.168.1.37
4 282 ms 281 ms 281 ms 202.112.21.202
5 922 ms 907 ms 921 ms wh0.cernet.net [202.112.53.81]
6 16 ms 15 ms 16 ms bjwh4.cernet.net [202.112.46.65]
7 16 ms 16 ms 15 ms 202.112.36.130
如在第五行中出现”922 ms 907 ms 921 ms wh0.cernet.net [202.112.53.81]”类似的情况则说明这个路由出现问题,应找网络中心解决。
3. netstat
检查现在正在通信的端口。
C:\>netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:25 0.0.0.0:0 LISTENING
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 218.197.223.57:80 202.114.7.1:1774 ESTABLISHED
TCP 218.197.223.57:80 202.114.215.33:1623 ESTABLISHED
TCP 218.197.223.57:80 202.114.215.33:1626 ESTABLISHED
TCP 218.197.223.57:80 218.88.94.75:1031 ESTABLISHED
TCP 218.197.223.57:80 218.197.195.25:1076 TIME_WAIT
TCP 218.197.223.57:80 218.197.195.25:1081 ESTABLISHED
TCP 218.197.223.57:80 218.197.195.25:1083 ESTABLISHED
TCP 218.197.223.57:80 218.197.207.14:4632 ESTABLISHED
UDP 0.0.0.0:135 *:*
UDP 0.0.0.0:445 *:*
UDP 0.0.0.0:1029 *:*
UDP 0.0.0.0:1031 *:*
UDP 0.0.0.0:1434 *:*
UDP 0.0.0.0:3456 *:*
其中第一列表明使用的协议,第二列列出本地的地址和端口,第三列表示和其他主机通信的IP地址和端口,第四列表示当前的状态。
其中0.0.0.0:0表示所有对所有地址所有端口都可以通信。