主题: [11-冬]ping实训
实训地点:南区8号楼宿舍
实训人员:张亦唯
实训时间:2012年2月23日
------------------------------------------------------------
1、ping环回地址,验证本地计算机上TCP/IP及其配置是否正确。
答:直接ping 127.0.0.1。
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
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
结果分析:环回地址通畅,本地计算机上的TCP/IP配置正常。
2、ping同一子网内计算机IP地址,验证是否正确地添加到网络。
答:先通过ipconfig得知本机IP地址:
Ethernet adapter 无线网络连接:
Connection-specific DNS Suffix . : shu.edu.cn
IP Address. . . . . . . . . . . . : 59.79.41.50
Subnet Mask . . . . . . . . . . . : 255.255.254.0
Default Gateway . . . . . . . . . : 59.79.41.254
Ethernet adapter 本地连接:
Media State . . . . . . . . . . . : Media disconnected
尝试ping 59.79.41.51:
Pinging 59.49.41.51 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 59.49.41.51:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
毫无反应。
结果分析:据说学校对交换机作了端口隔离,同网段网络不通不能说明问题。
3、ping不同网段计算机的地址,验证是否正确地添加到网络。
ping室友IP地址58.199.135.233:
Pinging 58.199.135.233 with 32 bytes of data:
Reply from 58.199.135.233: bytes=32 time=6ms TTL=127
Reply from 58.199.135.233: bytes=32 time=7ms TTL=127
Reply from 58.199.135.233: bytes=32 time=7ms TTL=127
Reply from 58.199.135.233: bytes=32 time=6ms TTL=127
Ping statistics for 58.199.135.233:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 6ms, Maximum = 7ms, Average = 6ms
反应良好,通过128-127=1个路由器网段,证明确实属于外网。
结果分析:能正常问不同网段计算机,证明本机已经正确添加到网络。
4、ping默认网关的IP地址,验证默认网管是否运行以及能否与本地网络上的本地主机通信。
ping 59.79.41.254:
Pinging 59.79.41.254 with 32 bytes of data:
Reply from 59.79.41.254: bytes=32 time=7ms TTL=64
Reply from 59.79.41.254: bytes=32 time=3ms TTL=64
Reply from 59.79.41.254: bytes=32 time=3ms TTL=64
Reply from 59.79.41.254: bytes=32 time=3ms TTL=64
Ping statistics for 59.79.41.254:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 7ms, Average = 4ms
反应正常。
结果分析:默认网关路由器运行正常。
5、ping远程主机的主机名,验证能否进行域名解析及通过路由器通信。
ping hyqinglan.net:
Pinging hyqinglan.net [96.44.172.209] with 32 bytes of data:
Reply from 96.44.172.209: bytes=32 time=280ms TTL=42
Reply from 96.44.172.209: bytes=32 time=262ms TTL=42
Reply from 96.44.172.209: bytes=32 time=300ms TTL=42
Reply from 96.44.172.209: bytes=32 time=308ms TTL=42
Ping statistics for 96.44.172.209:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 262ms, Maximum = 308ms, Average = 287ms
延迟较大,经过路由较多,但访问无问题。
结果分析:DNS解析及路由器通信畅通。
6、使用ping的不同选项进行测试:
对hyqinglan.net发送8192B的数据包:
Pinging hyqinglan.net [96.44.172.209] with 8192 bytes of data:
Reply from 96.44.172.209: bytes=8192 time=348ms TTL=42
Reply from 96.44.172.209: bytes=8192 time=273ms TTL=42
Reply from 96.44.172.209: bytes=8192 time=297ms TTL=42
Reply from 96.44.172.209: bytes=8192 time=328ms TTL=42
Ping statistics for 96.44.172.209:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 273ms, Maximum = 348ms, Average = 311ms
通信依然能够正常进行。
对hyqinglan.net发送10组数据包:
Pinging hyqinglan.net [96.44.172.209] with 32 bytes of data:
Reply from 96.44.172.209: bytes=32 time=323ms TTL=42
Reply from 96.44.172.209: bytes=32 time=316ms TTL=42
Reply from 96.44.172.209: bytes=32 time=358ms TTL=42
Reply from 96.44.172.209: bytes=32 time=479ms TTL=42
Reply from 96.44.172.209: bytes=32 time=300ms TTL=42
Reply from 96.44.172.209: bytes=32 time=319ms TTL=42
Reply from 96.44.172.209: bytes=32 time=351ms TTL=42
Reply from 96.44.172.209: bytes=32 time=361ms TTL=42
Reply from 96.44.172.209: bytes=32 time=384ms TTL=42
Reply from 96.44.172.209: bytes=32 time=406ms TTL=42
Ping statistics for 96.44.172.209:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 300ms, Maximum = 479ms, Average = 359ms
10组都得到正常回复。
对hyqinglan.net发送数据包并记录9个路由主机:
Pinging hyqinglan.net [96.44.172.209] with 32 bytes of data:
Reply from 96.44.172.209: bytes=32 time=308ms TTL=42
Route: 10.105.3.133 ->
172.31.1.59 ->
202.120.116.1 ->
202.120.127.3 ->
202.112.27.102 ->
202.112.27.130 ->
202.112.6.70 ->
202.112.53.90 ->
202.112.53.89
Reply from 96.44.172.209: bytes=32 time=388ms TTL=42
Route: 10.105.3.133 ->
172.31.1.59 ->
202.120.116.1 ->
202.120.127.3 ->
202.112.27.102 ->
202.112.27.130 ->
202.112.6.70 ->
202.112.53.138 ->
202.112.53.137
Reply from 96.44.172.209: bytes=32 time=499ms TTL=42
Route: 10.105.3.133 ->
172.31.1.59 ->
202.120.116.1 ->
202.120.127.3 ->
202.112.27.102 ->
202.112.27.130 ->
202.112.6.70 ->
202.112.53.90 ->
202.112.53.89
Reply from 96.44.172.209: bytes=32 time=384ms TTL=42
Route: 10.105.3.133 ->
172.31.1.59 ->
202.120.116.1 ->
202.120.127.3 ->
202.112.27.102 ->
202.112.27.130 ->
202.112.6.70 ->
202.112.53.138 ->
202.112.53.137
Ping statistics for 96.44.172.209:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 308ms, Maximum = 499ms, Average = 394ms
部分经过的主机被得到记录。
设置“不分段”标志并ping hyqinglan.net:
C:\Documents and Settings\Administrator>ping -f hyqinglan.net
Pinging hyqinglan.net [96.44.172.209] with 32 bytes of data:
Reply from 96.44.172.209: bytes=32 time=376ms TTL=42
Reply from 96.44.172.209: bytes=32 time=283ms TTL=42
Reply from 96.44.172.209: bytes=32 time=268ms TTL=42
Reply from 96.44.172.209: bytes=32 time=290ms TTL=42
Ping statistics for 96.44.172.209:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 268ms, Maximum = 376ms, Average = 304ms
不知道有啥区别……
结果分析:部分命令看不出效果,总之横竖还是联通了……
实训心得:ping是最常用的检测网络连通性及网络延迟的手段。早在初中时候,我们打CS,就知道ping一下服务器查看latency,但对原理不甚了解。现在终于知道了更多。