4

How does ethernet understand what is the upper layer of a frame? What are the values in Ethernet II field? Ethernet is in data link layer, so the upper layer is network layer.

When processing at physical layer and link layer is completed, I have read that frame data is forwarded towards upper layer protocols for processing according to its Type Field. I am a bit confused by this statement as well.

1
  • Removed the off-topic request for resources.
    – Ron Maupin
    Commented Feb 18, 2019 at 2:12

3 Answers 3

6

The values in the Ether Type field tell ethernet to which process to pass the payload of the ethernet frame. Ethernet, itself, has no idea what the network protocol is, or how to read the payload. This allows ethernet to carry any network protocol (IPv4, IPX, IPv6, AppleTalk, etc.).

The Ether Type values are detailed in IEEE 802 Numbers.

6

How does the ethernet understands what is the upper layer?

It doesn't (need to).

What are the values in Ethernet II field? Ethernet is in data link layer, so the upper layer is network layer.

Ethernet encompasses the physical and the data link layer. Anything can ride on top of that, even application-layer protocols. The EtherType(?) field indicates the kind of payload an Ethernet frame is carrying.

When processing at physical layer and link layer is completed , frame data is forwarded towards upper layer protocols for processing which is shown in Type Field. I am bit confused by this statement as well.

The operating system receives the frame from the NIC driver and passes it to a registered handler for the indicated EtherType, e.g. 0x0800 goes to the IPv4 stack.

1

Something to understand about network standards is that, for the most part, they only specify stuff that is important for interoperability. Exactly how things are implemented within a given host is normally considered a matter for individual implementers.

It is desirable for everyone to agree on what EtherType values mean and to avoid different protocols using the same EtherType. Therefore the IEEE maintains a registry of EtherType values. You can find the list at https://standards-oui.ieee.org/ethertype/eth.txt

However the details of how the receiver processes the Ethertype field are something that is best left up to the implementer to perform in a way that is appropriate for their environment. A developer of an embedded network stack for a microcontroller which will only ever support a very limited range of protocols may use a simple switch statement. A developer of a general purpose operating system is more likely to implement some form of "registration" mechanism to allow handlers for multiple protocols to be added or removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.