免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1239 | 回复: 0
打印 上一主题 下一主题

Ethernet Frame [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-09-01 15:53 |只看该作者 |倒序浏览

                现今,见到的比较多的ethernet frames有如下的四种:
a. Ethernet II
b. Ethernet 802.3 (Raw), aka Novell Ethernet
c. Ethernet 802.3/802.2  by IEEE
d. Ethernet SNAP
file:///C:/DOCUME%7E1/Jianglei/LOCALS%7E1/Temp/moz-screenshot.jpg
---------------------------------------------------------------------------------| Preamble | Dest MAC | Src MAC | Length/EtherType |       Data       |   FCS   |---------------------------------------------------------------------------------
| 8 bytes  |  6 bytes | 6 bytes |      2 bytes     |  46 - 1500 bytes | 4 bytes |
这是个不同帧类型有不同的包结构:
Ethernet II   Novell IPX/SPX, TCP/IP, and AppleTalk Phase 1 protocols >
Preamble            : 8 bytesDestination Address : 6 bytesSource Address      : 6 bytesEthernet Type       : 2 bytes (Novell 0x81-37)Data Field          : Between 46 and 1500 bytesPad Characters      : Variable, stuffs data field up to 46 bytesFrame Check Sequence: 4 bytesMin Frame Length    : 64 bytesMax Frame Length    : 1518 bytes (not including Preamble)
Ethernet 802.3 (Raw)
Preamble            : 8 bytesDestination Address : 6 bytesSource Address      : 6 bytesLength Field        : 2 bytes  ------------------> followed by 0xFFFFData Field          : Between 46 and 1500 bytesPad Characters      : Variable, stuffs data field up to 46 bytesFrame Check Sequence: 4 bytesMin Frame Length    : 64 bytes
Max Frame Length    : 1518 bytes (not including Preamble)
Ethernet 802.3/802.2  IPX/SPX and FTAM >
Preamble            : 8 bytesDestination Address : 6 bytesSource Address      : 6 bytesLength Field        : 2 bytesData Field          : Between 46 and 1500 bytes (including LLC)Pad Characters      : Variable, stuffs data field up to 46 bytesFrame Check Sequence: 4 bytesMin Frame Length    : 64 bytesMax Frame Length    : 1518 bytes (not including Preamble)
The LLC field consists of:
Destination Service Access Point (DSAP): 1 byte  (NetWare 0xE0)
Source Service Access Point (SSAP)     : 1 byte  (NetWare 0xE0)
Control Field                          : 1 byte  (NetWare 0x03)
Ethernet SNAP   
Preamble            : 8 bytes
Destination Address : 6 bytes
Source Address      : 6 bytes
Length Field        : 2 bytes
Data Field          : Between 46 and 1500 bytes (including LLC)
Pad Characters      : Variable, stuffs data field up to 46 bytes
Frame Check Sequence: 4 bytes
Min Frame Length    : 64 bytes
Max Frame Length    : 1518 bytes (not including Preamble)
The LLC field (the first eight bytes in the data field) consists of:
Destination Service Access Point (DSAP): 1 byte  (0xAA)Source Service Access Point (SSAP)     : 1 byte  (0xAA)Control Field                          : 1 byte  (NetWare 0x03)Organizational Code                    : 3 bytes (0x00-00-00)Ethernet Type                          : 2 bytes (NetWare 0x81-37)
那么如何区分这四个frames
1)  Receive good frame.
2)  Analyze frame.  Perform the following steps, in order:
  • If the EtherType/Length value is greater than 0x05-DC (decimal
    1500), then process the frame as Ethernet II. Any EtherType value
    greater than 0x05-DC (such as 0x0800 for IP or 0x81-37 for NetWare
    IPX/SPX) will be interpreted as an Ethernet II frame.

  • If the IPX header (0xFF-FF) follows the Length field, the frame is
    interpreted as a 802.3 (Raw) frame with Netware IPX/SPX traffic.
    Standard SSAP and DSAP values do not include hexadecimal FF, so the
    802.3 (Raw) frame can be distinguished from LLC frames (Ethernet
    SNAP, 802.2).

  • Next, the byte following the length field (DSAP) is examined.  If the value is 0xAA, the frame is interpreted as a SNAP frame.
    Otherwise, it is interpreted as a 802.2 frame.

所以顺序为
Ethernet II -> Ethernet 802.3 -> Ethernet SNAP -> Ethernet 802.2
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/42903/showart_372480.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP