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

網管問題討論

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

文章門神 » 週六 4月 11日, 2009年 7:21 am

光用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

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


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將他推算出來
@onion9@
答案當然是可以的

所以一個小小的Ping就有這麼大的學問了 ^^

今天教大家兩個最簡單的動作

光用Ping的指令就可以知道您的作業系統是Windows還是Linux
viewtopic.php?f=24&t=2783

光用Ping的指令就可以知道您經過幾個Router
viewtopic.php?f=24&t=2784
ps:求助順序請直接
(1)電洽 04-2260-5121 / 0963-685-121
(2)http://line.naver.jp/ti/p/%40xat.0000132120.jmw 技術客服 LINE
(3)問題請優先洽詢 help@ublink.org
Telegram 頻道 Channel https://t.me/ublinkorg 韌體更新發佈
其他線上聯絡方式,http://www.ublink.org/index.php/contact
頭像
門神
 
文章: 6265
註冊時間: 週五 12月 8日, 2006年 11:10 am
來自: 台中
送出感謝: 16
擁有感謝: 0 次

回到 網管答問

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 8 位訪客

cron