1. 程式人生 > >Wireshark 分析捕獲的資料記錄

Wireshark 分析捕獲的資料記錄

轉載自:Wireshark 分析捕獲的資料記錄

  • 每一幀資料都有類似的結構組成,我這裡使用抓到一個對應的ping 包進行分析。

  • 這一幀包包含以下四種資訊.
    • Frame: 物理層的資料幀情況。
    • Ethernet II , Src: 資料鏈路層乙太網幀頭部資訊。
    • Internet Protocol Version 4, Src: 網際網路層IP包頭資訊。
    • Internet Control Message Protocol: 網際網路控制資訊協議。ping 小包所使用的協議。
    • 前三層基本上都是一樣的,第四層開始就可以出現TCP, UDP 協議,第五層就可能有HTTP 應用層協議等等。
  • 第一層 : Frame: 物理層的資料幀概況

    Frame 715: 98 bytes on wire (784 bits), 98 bytes captured (784 bits) on interface 0
        //第715幀,有98個位元組在線上,共784位,實際捕獲到784位元組在0介面
        Interface id: 0 (\Device\NPF_{B67BEA54-B193-42D8-9DA9-11312F90107A})    //介面ID:0
        Encapsulation type: Ethernet (1)                                    //封裝型別
Arrival Time: Mar 22, 2017 13:30:44.053763000 中國標準時間 //到達時間 Time shift for this packet: 0.000000000 seconds //包偏移時間,不懂。。. Epoch Time: 1490160644.053763000 seconds //有可能是1990 到現在的時間 Time delta from previous captured frame: 0.000349000 seconds//兩幀之間的時間間隔 Time delta from previous displayed frame: 0.000000000 seconds//捕獲到顯示的間隔時間
Time since reference or first frame: 274.038861000 seconds //此包和第一幀的時間間隔 Frame Number: 715 //幀號 Frame Length: 98 bytes (784 bits) //幀長度 Capture Length: 98 bytes (784 bits) //捕獲的幀長度 Frame is marked: False //幀顯著標志 Frame is ignored: False //幀忽略標誌 Protocols in frame: eth:ethertype:ip:icmp:data //幀內封裝的協議層次結構 Coloring Rule Name: ICMP //著色標記的協議 Coloring Rule String: icmp || icmpv6 //著色規則顯示的字串
  • 第二層: Ethernet II , Src: 資料鏈路層乙太網幀頭部資訊。
    Ethernet II, Src: TexasIns_ce:a9:4b (68:c9:0b:ce:a9:4b), Dst: AplexTec_0d:4e (40:d8:55:16:ad:4e)
           //     源MAC地址:TexasIns_ce:a9:4b (68:c9:0b:ce:a9:4b)  
            //目標MAC地址:AplexTec_0d:4e (40:d8:55:16:ad:4e)
    Destination: AplexTec_0d:4e (40:d8:55:16:ad:4e)   //目的MAC地址
    Source: TexasIns_ce:a9:4b (68:c9:0b:ce:a9:4b)     //源MAC地址   
  • 第三層: Internet Protocol Version 4, Src: 乙太網協議層
    Internet Protocol Version 4, Src: 192.168.0.199, Dst: 192.168.0.192
    // IPv4 協議                    源IP:192.168.0.199, 目的IP:192.168.0.192
            0100 .... = Version: 4     // 版本4
            .... 0101 = Header Length: 20 bytes (5)    // 頭長度20位元組
        Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)  //差分服務區域
            0000 00.. = Differentiated Services Codepoint: Default (0) // 差分服務欄位
            .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0) 
                                                                //明確的阻塞指示
            Total Length: 84                                        // 總長度
            Identification: 0x0000 (0)                              // 鑑別
        Flags: 0x02 (Don't Fragment)                                // 標誌
            0... .... = Reserved bit: Not set                       // 保留位
            .1.. .... = Don't fragment: Set                         // 不要分離碎片   
            ..0. .... = More fragments: Not set                     // 分離
        Fragment offset: 0  // 分的偏移量
        Time to live: 64    // 生存期
        Protocol: ICMP (1)  // 協議名稱
        Header checksum: 0xb7d1 [validation disabled]   // 頭部校驗和
        Header checksum status: Unverified             // 頭部校驗和檢驗狀態:
        Source: 192.168.0.199        // 源IP
        Destination: 192.168.0.192    // 目的地IP
        Source GeoIP: Unknown     // 源的 基於IP 查詢地理位置   Geo IP: Geolocation IP
        Destination GeoIP: Unknown
  • 第四層: UDP, TCP, ICMP, 等等協議層
    // 這裡面描述了這些協議獨有的東西:
    //  ping 小包一般所使用的就是這種協議進行傳輸資料
    Internet Control Message Protocol   // 因特網控制資訊協議
        Type: 8 (Echo (ping) request)   //  型別,ping 請求
        Code: 0
        Checksum: 0x6eb9 [correct]       // 和校驗
        Checksum Status: Good            // 和檢驗狀態
        Identifier (BE): 59906 (0xea02)  // 識別符號
        Identifier (LE): 746 (0x02ea)    // 識別符號
        Sequence number (BE): 5 (0x0005)    // BE 序列號
        Sequence number (LE): 1280 (0x0500)  //LE 序列號
        Data (56 bytes)                // 資料
          // ... ...