Ethernet Layer – Why Preamble is Not Considered Part of the Ethernet Header

ethernetlayer1layer2

  1. If I search where does my data start in an Ethernet frame, I get a common answer which says TCP header( 20 bytes) + IP header ( 20 bytes) + Ethernet header( SA + DA + Type) i.e 14 bytes. So, in short the answer to that question becomes at 52-54 bytes the data starts in an Ethernet frame but shouldn't we add 8 bytes of preamble too in it ?

  2. Also, I searched about ethernet frame size which is 1514 for ethernet frames. Why are we ignoring Preamble and CRC here ?

Best Answer

Adding to jonathanjo's answer:

Ethernet has components in both layers 1 (because it can run over different media) and 2 (because the frames are the same on the different media).

The Preamble, SoF Delimiter, and Inter-packet Gap are really in layer-1 (waking up the receiver, etc.), while the frame (including the header, payload, and FCS) is in layer-2.

The data in an ethernet frame is the payload of an ethernet frame. Your Question 1 assumes that every layer-3 protocol is IPv4, and every layer-4 protocol is TCP, which are bad assumptions. Ethernet doesn't know or care which layer-3 protocol it carries (IPv4, IPX, IPv6, AppleTalk, etc.), so the data of the frame is the payload. For example, the IPv4 packet header is 20 to 60 octets, while the IPv6 packet header is always 40 octets. Ethernet doesn't know this, it only knows that it has a payload field, not what is in that field.

The ethernet frame header is normally 14 octets, unless you have a tagged frame, then it is 18 octets. The MTU is the maximum payload size. Ethernet also has a minimum frame size of 64 octets, including the FCS, so the payload can range from 42 (with tag) or 46 (without tag) octets, up to the maximum payload size of 1500 octets. That means that ethernet frames (header and payload) are from 60 octets to 1514 (without tag) or 1518 (with tag) octets.

If by where the data starts, you mean application data, that is really going to depend on all the protocols. The UDP header is only 8 octets, and the UDP payload may be the application data, or it may be a datagram for an application-layer protocol that has its own header that may not be counted as application data. In your example of TCP, you may be running a web browser to a web server. Do you count HTTP (an application-layer-protocol) or HTML as the data (HTML is the data for HTTP)? When you refer to the data, it is relative to the protocol to which you are referring.