iT邦幫忙

24

光用Ping的指令就可以知道您經過幾個Router

光用Ping的指令就可以知道您經過幾個Router
http://ns2.ublink.org/phpbb/viewtopic.php?f=24&t=2784
光用Ping的指令就可以知道您經過幾個Router
簡簡單單的一個指令
確有很大的意思
請注意TTL的變化

Pinging 192.168.8.1 with 32 bytes of data:

Reply from 192.168.8.1: bytes=32 time<1ms TTL=255
Reply from 192.168.8.1: bytes=32 time<1ms TTL=255
Reply from 192.168.8.1: bytes=32 time<1ms TTL=255
Reply from 192.168.8.1: bytes=32 time<1ms TTL=255

這表示我TEST所用的電腦跟192.168.8.1同一段

Pinging 192.168.254.254 with 32 bytes of data:

Reply from 192.168.254.254: bytes=32 time=195ms TTL=254
Reply from 192.168.254.254: bytes=32 time=198ms TTL=254
Reply from 192.168.254.254: bytes=32 time=190ms TTL=254
Reply from 192.168.254.254: bytes=32 time=169ms TTL=254

TTL=254 , 表示我們已經經過一個Router了 , 因為TTL減1

我們證明一下使用Tracert

Tracing route to 192.168.254.254 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms my.router [192.168.8.1]
2 163 ms 170 ms 249 ms 192.168.254.254

Trace complete.

本機是192.168.8.10 Tracert 192.168.254.254
中間經過192.168.8.1
你看果然是經過一個Route

我們再Ping一台Linux的主機

Pinging 192.168.254.253 with 32 bytes of data:

Reply from 192.168.254.253: bytes=32 time=829ms TTL=62
Reply from 192.168.254.253: bytes=32 time=829ms TTL=62
Reply from 192.168.254.253: bytes=32 time=859ms TTL=62
Reply from 192.168.254.253: bytes=32 time=1397ms TTL=62

TTL=62 , 其怪對吧 , 我們是上學的
光用Ping的指令就可以知道您的作業系統是Windows還是Linux
http://ns2.ublink.org/phpbb/viewtopic.php?f=24&t=2783

結果不是應該是64嗎^^

道理很簡單
你Tracert 192.168.254.253之後你會發現

Tracing route to 192.168.254.253 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms my.router [192.168.8.1]
2 272 ms 186 ms 169 ms 192.168.254.254
3 287 ms 305 ms 330 ms 192.168.254.253

Trace complete.

本機是192.168.81.0
中間經過192.168.8.1
跟192.168.254.254兩個路由節點才到達
192.168.254.253

因此64-2當然等於62了
所以因此也可以正確得知
192.168.254.253是Linux系統

門神JanusLin反問大家當如果不知道你的環境的Submask時
是不是可以一樣用Ping跟Tracert將他推算出來
答案當然是可以的

所以一個小小的Ping就有這麼大的學問了 ^^
相關文章
光用Ping的指令就可以知道您的作業系統是Windows還是Linux
http://ns2.ublink.org/phpbb/viewtopic.php?f=24&t=2783

光用Ping的指令就可以知道您經過幾個Router
http://ns2.ublink.org/phpbb/viewtopic.php?f=24&t=2784


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
0

感恩分享!

0
kuochiahao
iT邦研究生 1 級 ‧ 2009-04-13 09:46:39

感恩分享!

0
root7405
iT邦新手 5 級 ‧ 2010-03-17 10:37:38

感謝分享..分析的不錯..

我要留言

立即登入留言