Ethernet in the Data Link Layer: Frame Format, CSMA/CD, and Worked GATE Examples

Build Ethernet from its frame fields upward, then solve collision-window, back-off, efficiency, and domain-counting problems with the reasoning shown.

KnowledgeGate Team

Exam prep & CS education

Updated 15 Aug 20266 min read

You may know Ethernet as the technology used in a LAN and still freeze when a GATE numerical asks for the minimum frame size or a back-off probability. Interviews expose the same gap by asking what actually happens when two machines transmit together. Both answers come from one condition: a sender must still be transmitting when a worst-case collision gets back to it. The 64-byte floor, the 51.2 microsecond slot, the back-off probabilities and the efficiency ratio all fall out of that single requirement.

The data link layer is commonly described using two sublayers. Logical Link Control, standardised as IEEE 802.2, sits above Media Access Control. Ethernet, standardised as IEEE 802.3, covers the MAC sublayer and also defines physical-layer behaviour.

Ethernet II and IEEE 802.3 use the same position for one important 2-byte field. In Ethernet II it is a Type value of at least 1536, such as 0x0800 for IPv4. In 802.3 it is a payload Length of at most 1500. Modern LAN traffic uses Ethernet II framing in most cases.

At this layer, Ethernet provides framing, 48-bit physical addressing, access control on a shared medium, and error detection through CRC. It detects corruption but does not correct it. Logical addressing and path selection belong one layer up, where the choice between distance vector and link state routing settles which path a packet takes.

The Ethernet frame, field by field

Read an untagged 802.3 frame from left to right:

Field

Size

Purpose

Preamble

7 bytes

Alternating 10101010 bits help the receiver synchronise

Start Frame Delimiter

1 byte

10101011 marks the coming frame

Destination MAC

6 bytes

Identifies the intended receiver

Source MAC

6 bytes

Identifies the sender

Length/Type

2 bytes

Carries either payload length or protocol type

Data and pad

46 to 1500 bytes

Carries the payload and any required padding

Frame Check Sequence

4 bytes

Carries the CRC-32 result for error detection

The preamble and SFD are physical-layer overhead, so they are not counted inside the familiar Ethernet frame bounds. The minimum is 6 + 6 + 2 + 46 + 4 = 64 bytes. The maximum is 6 + 6 + 2 + 1500 + 4 = 1518 bytes.

If a higher-layer packet supplies only 20 bytes of payload, Ethernet adds 26 bytes of padding to reach the 46-byte data-field minimum. The classic 1500-byte maximum payload is also the MTU value that appears in IP fragmentation problems.

Ethernet 802.3 frame fields from Preamble and SFD through MAC addresses, Length/Type, the 46 to 1500 byte data field, and the 4-byte FCS.

MAC addresses and how a switch uses them

A MAC address is 48 bits, or 6 bytes, normally written as 12 hexadecimal digits. For a globally assigned address, the first 3 bytes identify the organisationally unique identifier and the last 3 are vendor-assigned. The I/G bit, the least significant bit of the first byte, distinguishes an individual address from a group address. FF:FF:FF:FF:FF:FF is the broadcast address.

A switch acts through three verbs. It learns the source MAC and incoming port, forwards a frame to the port for a known destination, and floods a frame when the destination is unknown or broadcast. Flooding sends the frame through every relevant port except the one on which it arrived. This is the direct answer when an interviewer asks what a switch does with a destination it has never seen.

CSMA/CD and the collision window: a worked example

On shared half-duplex Ethernet, Carrier Sense Multiple Access with Collision Detection means listen before transmitting, keep listening while transmitting, and send a jam signal if a collision is detected. The station then waits for a random back-off interval before retrying.

The governing condition is Tt >= 2 x Tp. A sender must still be transmitting when a worst-case collision returns from the far end of the network.

Consider a 10 Mbps Ethernet bus that is 2 km long, with propagation speed 2 x 10^8 m/s.

  1. One-way propagation delay is Tp = 2000 / (2 x 10^8) = 10^-5 s = 10 microseconds.

  2. The collision round trip is 2 x Tp = 20 microseconds.

  3. Minimum frame length is L = bandwidth x 2Tp = 10^7 x 20 x 10^-6 = 200 bits.

  4. Therefore, this network's theoretical minimum is 200 / 8 = 25 bytes.

Classic 10 Mbps Ethernet standardised a 51.2 microsecond slot time. Applying the same reasoning gives 10^7 x 51.2 x 10^-6 = 512 bits = 64 bytes. That slot is sized for the standard's worst-case path, roughly 2500 m of cable through repeaters rather than one 2 km segment, which is why 64 bytes comes out larger than the 25 bytes above. The 64-byte minimum in the frame format is therefore a collision-detection requirement, not an arbitrary number.

Collision-window timeline on a 2 km Ethernet bus, with A starting at t=0 and the collision returning to A at 20 microseconds.

Binary exponential back-off and Ethernet efficiency

After the nth consecutive collision, a station chooses an integer k uniformly from 0 through 2^n - 1, with the exponent capped at 10. It waits k slot times before trying again, and abandons the frame after 16 collisions.

After a third collision, k is one of 0 through 7, so each value has probability 1/8. With a 51.2 microsecond slot, the wait ranges from zero to 7 x 51.2 = 358.4 microseconds. If stations A and B draw independently, A wins by choosing the smaller value in 28 of the 64 ordered pairs. Thus P(A wins) = 28/64 = 7/16, while a tie has probability 8/64 = 1/8.

The common Ethernet efficiency approximation is 1 / (1 + 6.44a), where a = Tp/Tt. For a 1000-byte frame at 10 Mbps, Tt = 8000 / 10^7 = 800 microseconds. Using Tp = 10 microseconds, a = 10/800 = 0.0125. Efficiency is therefore 1 / (1 + 6.44 x 0.0125) = 1/1.0805, approximately 0.925, or 92.5%.

Larger frames and shorter cables improve efficiency because transmission occupies more time relative to propagation. That is the same trade-off behind minimum frame size and maximum network diameter.

Hubs, bridges, and switches: count the domains

A hub repeats bits, so every device attached through it shares one collision domain and one broadcast domain. A bridge or switch creates one collision domain per port, but its ports remain in one broadcast domain unless a VLAN or router separates them. A router separates broadcast domains.

Suppose two hubs feed one switch and three more hosts connect directly to that switch. The two hub-facing ports contribute two collision domains, and the three host-facing ports contribute three more. The total is 5 collision domains and 1 broadcast domain.

On a full-duplex switched link, each endpoint has separate transmit and receive paths. There is no shared medium and no collision, so CSMA/CD is effectively retired. Modern gigabit Ethernet still retains the 64-byte minimum for frame-format compatibility.

How GATE and interviews test Ethernet

GATE commonly flips one unknown in the collision-window relation: minimum frame length, bandwidth, propagation delay, or cable length. It also tests back-off probabilities, the efficiency ratio a = Tp/Tt, frame fields, and collision-domain versus broadcast-domain counts. The listed subtopics and the marking scheme change with the cycle, so read them from the official GATE information brochure published by that year's organising institute.

Interviews ask how a switch learns, why the MTU is 1500 bytes, what CRC detects, and whether a full-duplex switch port can have collisions. They often move next to IP addressing and subnetting, then to the difference between reliable and best-effort transport.

The short version, and your next step

  • An untagged Ethernet frame spans 64 to 1518 bytes, excluding preamble and SFD.

  • Tt >= 2Tp is the central CSMA/CD condition.

  • Binary exponential back-off widens the random choice after each collision.

  • A switch learns source addresses, forwards known destinations, and floods unknown ones.

  • Full-duplex switching removes collisions, but not the established frame format.

Practise collision, efficiency, and domain-counting numericals under time in the GATE Test Series, Mocks and Topic-wise Tests. If the whole subject needs rebuilding, GATE Guidance by Sanchit Sir provides a structured route through Computer Networks. If you want to compare the available paths first, browse the GATE CS Exam Preparation Courses and Test Series category.