afunms

My Software,My Dream—Forge a more perfect NMS product.

如何区分不同的帧格式

Ethernet Frame Formats:
 
Ethernet (a.k.a. Ethernet II)
        +---------+---------+---------+----------
        |   Dst   |   Src   | Type   | Data... 
        +---------+---------+---------+----------
         <-- 6 --> <-- 6 --> <-- 2 --> <-46-1500->
         Type 0x80 0x00 = TCP/IP
         Type 0x06 0x00 = XNS
         Type 0x81 0x37 = Novell NetWare
         
802.3
        +---------+---------+---------+----------
        |   Dst   |   Src   | Length | Data... 
        +---------+---------+---------+----------
         <-- 6 --> <-- 6 --> <-- 2 --> <-46-1500->
 
802.2 (802.3 with 802.2 header)
        +---------+---------+---------+-------+-------+-------+----------
        |   Dst   |   Src   | Length | DSAP | SSAP |Control| Data... 
        +---------+---------+---------+-------+-------+-------+----------
                                       <- 1 -> <- 1 -> <- 1 -> <-43-1497->
SNAP (802.3 with 802.2 and SNAP headers) 
        +---------+---------+---------+-------+-------+-------+-----------+---------+-----------
        |   Dst   |   Src   | Length | 0xAA | 0xAA | 0x03 | Org Code |   Type | Data...   
        +---------+---------+---------+-------+-------+-------+-----------+---------+-----------
                                                               <-- 3 --> <-- 2 --> <-38-1492->

Ethernet中存在这四种Frame的格式,如果不能很好的区分他们,那么肯定会造成网络的混乱,
现实中网络设备可以很好的识别它们,那么网络设备又是如何识别的呢?

(1) 如何区分EthernetII与其他格式的帧

     如果帧头跟随source mac地址的2 bytes的值大于1500则此Frame为EthernetII格式的。否则就是其他格式的帧。
   
 (2)其他帧格式的区别

   接着比较紧接着的两bytes如果为0xFFFF则为Novell Ethernet 类型的Frame
   如果为0xAAAA则为Ethernet SNAP格式的Frame ,如果都不是则为Ethernet 

   802.3/802.2格式的帧

posted on 2008-07-21 08:30 afunms 阅读(364) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 

My Links

News

留言簿(18)

随笔档案

相册

搜索

最新评论

阅读排行榜