Chinaunix

标题: Ethernet Frame [打印本页]

作者: johnny_jiang    时间: 2007-09-01 15:53
标题: Ethernet Frame

                现今,见到的比较多的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:



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

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/42903/showart_372480.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2