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
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