Identifying Ethernet Header Types

There are 3 different Ethernet Header types defined by the IEEE and in use today. So, one question comes to mind: When a Ethernet receiver receives a frame, how does it know what kind of header it is? After all, if a receiver is unable to properly recognize the header type, it will not be able to properly extract the frame data and send it to the proper upper layer protocol or application.

Three possible Ethernet header types a receiver might see:

- Ethernet V2 (aka DIX) 802.3 Revised by IEEE in 1997
- Original IEEE 802.3 Ethernet
- Original IEEE 802.3 with a SNAP Header

 

(image credit: CCIE Routing & Switching Exam Guide Vol 3)

As you can see from the frame formatting above, there is no difference between frame types until the field immediately following the 2-byte Type/Length field. The first thing we will need to know is if the field immediately following Type/Length is a Data field (as would be the case with the IEEE modified Ethernet V2 frame), or is it a 802.2 DSAP field (as would be the case in an original IEEE 802.3 frame)? The answer to this question lies in the value of the Type/Length field.

If the Type/Length field has a value of 1536 or higher then the frame is Ethernet V2 and the Type/Length field represents the Type of data to immediately follow in the Data field. If the Type/Length field has a value of less than 1536 then it represents a Length and we can assume the field immediately following is a 802.2 DSAP. If we find that a DSAP field follows the Type/Length field, next we need to find out if this frame contains a SNAP header immediately following the 802.2 Control field. The presence of a SNAP header is signified by the DSAP field having a value of 0xAA hex. If DSAP has a value of 0xAA then we know a SNAP header immediately follows the 802.2 Control field.

In summary, for a receiver to discern the type of Ethernet header it’s receiving it needs to look at the value of the Type/Length field. If the Type/Length field signifies the presence of 802.2, then the receiver will know if a SNAP header is present by looking at the contents of the 802.2 DSAP field.

###

 

References:CCIE Routing & Switching Exam Guide Vol 3

Comments

  1. Thomas B. says:

    This is probably obvious to everyone else, but I can’t seem to figure it out. If Type/Length indicates a Type, how do you determine the Length? Do you just look for an interframe gap or something?

    • owlman says:

      Ethernet is a type of self-clocking synchronous serial communication. On the wire, the Ethernet signal has an embedded clock, so the hardware knows exactly when the first and last bits arrive (because no clock information means no data). It simply has to count the bits, then divide by 8 to get the byte count of the frame.

      http://en.wikipedia.org/wiki/Manchester_code

      I think 35 years ago when they invented Ethernet it was quite expensive hardware-wise to count the bits, so they included the length in the frame for easier processing…

Trackbacks

  1. [...] like there are 3 different Ethernet header formats, there are also 3 different types of Ethernet [...]

Speak Your Mind

*