Rfc894 and rfc1042 (IEEE802) Encapsulation formats

Source: Internet
Author: User
Tags dsap

 

The Ethernet protocol implements the functions specified in rfc894. It can send and receive frames in rfc894 Encapsulation Format and is compatible with rfc1042 (IEEE802) Encapsulation Format mixed with rfc894.

Ethernet: in 1980, digital equipment companies (DEC), Intel companies, and Xerox (Xerox) launched the Dix V1.0 standard. In, the Dix standard, also known as Ethernet II, was introduced. It uses CSMA/CD (Carrier Sense, multiple access with collision detection) multi-channel access for carrier listeners with conflict detection.

802.3: In September 1985, IEEE introduced "802.3 access methods and physical layer specifications for carrier listener multiplexing (CSMA/CD) with conflict detection", that is, the 802.3 CSMA/CD Standard

Encapsulation of IP packets over Ethernet (RFC 894 ):

Header
... -------- + ------ +
Forward code | Destination Address | source address | type |
... -------- + ------ +
6 6 2

Type: 0x0800 --- IP 0x0806 --- ARP

Encapsulation of IP packets on IEEE802 (RFC 1042 ):

Header
... -------- +
MAC header | 802. {3/4/5} MAC header
... -------- +

+ ---------- + -------- +
| DSAP = k1 | SSAP = k1 | control | 802.2 LLC
+ ---------- + -------- +
1 1 1

+ -------- + --------- + ------- +
| Protocol ID or org code = k2 | type | 802.2 snap
+ -------- + --------- + ------- +
1 1 1 2

The K1 value is 170 (decimal) = 0xaa.
The K2 value is 0 (zero ).
The control value is 3 (unnumbered information) = 0x03.
Ethertype (IP = 2048, ARP = 2054) "Assigned Numbers", RFC-1010


Encapsulation of IPX package:
IPX has the following four encapsulation frames:
1. Ethernet II
2. IEEE 802.3 with LLC
3. IEEE 802.3 "Raw"
4. IEEE 802.3 with snap
 

1. Ethernet II (Ethernet V2)

... -------- + ------ + -------- + --... -- + ---------- +
Authorization code | Destination Address | source address | type | IPX header | data | FCS (verification) |
... -------- + ------ + -------- + --... -- + ---------- +
6 6 2
IPX type = 0x8137

2. IEEE 802.3 with LLC
... -------- + ------ + -------- + --... -- + ---------- +
Authorization code | Destination Address | source address | type | LLC | IPX header | data | FCS (verification) |
... -------- + ------ + -------- + --... -- + ---------- +
6 6 2 3

LLC:
-------- + --------
| DSAP | SSAP | CTRL |
-------- + --------
1 1 1

Ipx dsap = SSAP = 0xe0 CTRL = 0x03
DSAP = 0xe0 indicates that the package type is Novell IPX.

3. IEEE 802.3 "Raw"
... -------- + ------ + -------- + --... -- + ---------- +
Authorization code | Destination Address | source address | length | IPX header | data | FCS (verification) |
... -------- + ------ + -------- + --... -- + ---------- +
6 6 2

The emergence of IPX is earlier than 802.2 (LLC). Therefore, the earlier IPX package is directly encapsulated on 802.3, and 802.3 raw is encapsulated. Note that this encapsulation mode does not indicate fields of the type.

Note that the first two bytes of the IPX header are 0 xFFFF. This value is different from all DSAP definitions in LLC. Therefore, this value is used to distinguish IPX packets. In the processing of the eth_type_trans () function of kernel eth. C, we can see the following description:
/*
* This is a magic hack to spot IPX packets. Older Novell breaks
* The protocol design and runs IPX over 802.3 without an 802.2 LLC
* Layer. We look for FFFF which ISN 'ta used 802.2 SSAP/DSAP. This
* Won't work for Fault Tolerant Netware but does for the rest.
*/
If (* (unsigned short *) rawp = 0 xFFFF)
Return htons (eth_p_802_3 );


4. IEEE 802.3 with snap

... -------- + ------ + -------- + --... -- + ---------- +
Authorization code | Destination Address | source address | type | LLC | snap | IPX header | data | FCS (verification) |
... -------- + ------ + -------- + --... -- + ---------- +
6 6 2 3 5

LLC:
-------- + --------
| DSAP | SSAP | CTRL |
-------- + --------
1 1 1

DSAP = SSAP = 0xaa CTRL = 0x03
To use snap, you must set DSAP = SSAP = 0xaa

Snap:
----------- + --------
| Org code | type |
----------- + --------
3 2
IPX type = 0x8137

 
 
Reference:
1. Ethernet/802.3 attachment ethernetmask: http://blog.blogchina.com/upload/2005-01-25/200501251721262581.pdf
2. A Brief History of frame types.
Http://developer.novell.com/research/appnotes/1993/septembe/05/02.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.