Ethernet frame

1 min readMar 29, 2024

TCP/UDP packets are encapsulated into IP packets, which are then encapsulated into Ethernet frames.

An ethernet frame consists of a preamble, start-frame-delimiter, ethernet header, data, and FCS.

Preamble: The frame preamble is used for synchronization and clock recovery. It is a 7-byte pattern of alternating 1s and 0s, denoted by 10101010. This pattern is used to synchronize the clocks of both the sender and the receiver. It helps the receiver detect the start of the frame and interpret subsequent bits accurately. By transmitting a known pattern before the start of the frame, the receiver can sample incoming bits at the correct time, even if there is a slight clock skew between the sender and the receiver. Alternating 1s and 0s patterns helps in analyzing the timing between transitions which in turn helps clock synchronization.

Start-frame-delimiter(SFD): SFD is a specific bit pattern (10101011) that indicates the end of the preamble and the start of the frame. SFD helps in extracting the frame contents and ensuring that the frame is processed correctly.

Frame Check Sequence (FCS): It is a 4-byte field generated using CRC(cyclic redundancy check) algorithm. It is used for error checking and ensuring data integrity.