發新話題
打印

[教學] 基本連線檢測

[教學] 基本連線檢測

舊文重PO
--
基本連線檢測
舉例1(由本機向外測試):
C:\> ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : X30
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : Yes
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter 區域連線:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connection
        Physical Address. . . . . . . . . : 00-09-6B-A0-xx-xx
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 210.64.78.37
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 210.64.78.1
        DHCP Server . . . . . . . . . . . : 210.64.78.1
        DNS Servers . . . . . . . . . . . : 139.175.150.20
                                            139.175.55.244
        Lease Obtained. . . . . . . . . . : 2004年7月22日 下午 11:09:33
        Lease Expires . . . . . . . . . . : 2004年7月23日 上午 07:09:33

Ethernet adapter 無線網路連線:

        Connection-specific DNS Suffix  . : uniorg.net
        Description . . . . . . . . . . . : D-Link AirPlus DWL-650+ Wireless Cardbus Adapter
        Physical Address. . . . . . . . . : 00-80-C8-01-xx-xx
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.1.55
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.253
        DHCP Server . . . . . . . . . . . : 192.168.1.253
        DNS Servers . . . . . . . . . . . : 139.175.150.20
                                            139.175.150.20
                                            168.95.1.1
        Lease Obtained. . . . . . . . . . : 2004年7月22日 下午 10:58:43
        Lease Expires . . . . . . . . . . : 2004年7月29日 下午 10:58:43



網路架構說明:
我這是採標準內外2張NIC架構, 而兩端都是用 DCHP自動取得IP

接線圖:
     WAN (210.64.78.x)   LAN (192.168.1.x)
ATU-R→ HUB→ SERVER 1 → H ─→ PC1
       ╲╲→ SERVER 2 → U ─→ PC2
         ╲→ SERVER 3 → B ─→ PC3


而上面
IP Address. . . . . . . . . . . . : 210.64.78.37
IP Address. . . . . . . . . . . . : 192.168.1.55
這分別就是我電腦 兩個NIC對外對內 的IP
而你要測試網路有無通
還需要看
Default Gateway . . . . . . . . . : 210.64.78.1
Default Gateway . . . . . . . . . : 192.168.1.253

基本測試1 (看本機NIC有無正常動作)
ping 本機 ip 210.64.78.37, 192.168.1.55
C:\> ping 210.64.78.37

Pinging 210.64.78.37 with 32 bytes of data:

Reply from 210.64.78.37: bytes=32 time<1ms TTL=128
Reply from 210.64.78.37: bytes=32 time<1ms TTL=128
Reply from 210.64.78.37: bytes=32 time<1ms TTL=128
Reply from 210.64.78.37: bytes=32 time<1ms TTL=128

Ping statistics for 210.64.78.37:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
--
C:\> ping 192.168.1.55

Pinging 192.168.1.55 with 32 bytes of data:

Reply from 192.168.1.55: bytes=32 time<1ms TTL=128
Reply from 192.168.1.55: bytes=32 time<1ms TTL=128
Reply from 192.168.1.55: bytes=32 time<1ms TTL=128
Reply from 192.168.1.55: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.1.55:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
----
基本測試2 (看本機NIC對外有無正常動作, 也就是本機對外第一個設備這條線有無正常)
ping 本機對外 Gateway 210.64.78.1, 192.168.1.253
C:\> ping 210.64.78.1

Pinging 210.64.78.1 with 32 bytes of data:

Reply from 210.64.78.1: bytes=32 time=50ms TTL=64
Reply from 210.64.78.1: bytes=32 time=46ms TTL=64
Reply from 210.64.78.1: bytes=32 time=47ms TTL=64
Reply from 210.64.78.1: bytes=32 time=44ms TTL=64

Ping statistics for 210.64.78.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 44ms, Maximum = 50ms, Average = 46ms
--
C:\> ping 192.168.1.253

Pinging 192.168.1.253 with 32 bytes of data:

Reply from 192.168.1.253: bytes=32 time=7ms TTL=64
Reply from 192.168.1.253: bytes=32 time=1ms TTL=64
Reply from 192.168.1.253: bytes=32 time=1ms TTL=64
Reply from 192.168.1.253: bytes=32 time=1ms TTL=64

Ping statistics for 192.168.1.253:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 7ms, Average = 2ms

上述皆為正常狀態有回應的情況
表示由本機向外連的這條線路是正常連線狀態

C:\> ping 192.168.1.253

Pinging 192.168.1.253 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.253:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

而上面這 Request timed out. 表示對內連線線路連線有問題
同理對外若有這種訊息 表示你對外線路有問題
此時先確定 NIC 的 Link燈號是否有亮(這是最基本連線狀態表示, 若不亮上述全都不用再try了...)
先寫到這! 因為最近不少人連最基本連線檢測都還搞不清楚!
但主題 "基本網路測試" 這僅只是個入門...僅測線路連線狀態

補充說明:
因為我這網路架構的關係 所以我這對外第一個設備 210.64.78.1 這就已經是 ISP 機房端了
檢測到的結果就已經是跟ISP之間這條線路狀態
若你的網路架構PC前端有 分享器(IP Share) 則 舉例中的 區域連線 Gateway 就是本機到分享器這一段線路狀態, 若要測試你跟ISP這段則需要去看 分享器 中的 Gateway IP 是什麼再去 ping 它

PS
1. ping 使用到 TCP/IP 中的 icmptype 8 若有防火牆將它檔掉上述 也會全部都是 Request timed out.
所以要用ping必須沒被檔掉, 上述檢測結果才會正確, 但一般 ISP 的 Router 應該是不會檔
2. ISP: 網際網路服務提供者(Internet service provider) 通常簡稱ISP,是指能讓一般用戶連線到網際網路上的公司, 我這是用SEEDNet線路所以我的 ISP 就是 SEEDNet, 而有許多人用 HiNet 它也是台灣 ISP "大咖"中的一個

最後編輯 by star 在 2005-04-01 11:30 AM

jdli :
時間多捐獻給自己的技術跟修養, 網路上的名聲就跟packet依樣, 傳過水無痕

TOP

發新話題
page counter