Why the minimum length of an Ethernet frame is 512 bits?

Here is my understanding about the reason behind the Minimum Ethernet Frame Size (64 Bytes).

The old Ethernet (10BASE5) LAN spread across the campus area of the university and the normal distance is around 2500 meters. Due the physical characteristic of cables, the network is segmented with 500 meter cables (see fig). Speed of this LAN is 10Mbps and the cables are coaxial (not CAT5).

Why the minimum length of an Ethernet frame is 512 bits?

Ethernet is a broadcast medium and at a time only one node should sent its frame on the medium. If more then one node is trying to send their frames, then collision will happen. To avoid collision, Ethernet is using the CSMA/CD technique. In Wire-line network, the device Transmit and Receive on a same medium. So it is easy to detect the collision just by sensing the media using CSMA/CD. But in Wireless network, Transmit and Receive is happening on different frequency and it can’t detect the collision. So it uses the CSMA/CA, the collision avoidance technique.

What is collision? Before the packet transmission, the Ethernet adapter will check the Ethernet medium for some signal. If it finds the medium is idle, then starts the transmission. Otherwise, it waits until the medium become idle and then transmits. During the packet transmission, if the adapter detects another transmission, then it aborts the transmission and sends jam signal – make sure all other transmitters are aware of collision, and it will backoff – Do not send any frame/packet and wait for some amount of time, as specified in the exponential backoff algorithm.

Some more details, refer the image. Now machine A sense no signal in the medium and start sending the 100 bytes packet. When it is sending the 50th byte, it detect some collision on the medium and immediately abort its transmission. Is it right? May be No! Why?

The Ethernet adapter will send the frame bits for some X uSec and pause the transmission to check for a collision on the medium and then continue. When it is checking like this, the 1st bit signal of current own packet hit the other end of network and echoed back in the opposite direction. Our device is still busy in sending the remaining bytes and checking for collision. If it detect the own frame’s echo as a collision then, it will wrongly stop the transmission. And if it does like this, it will never be able to successfully transmit a complete packet. So it should ignore this echo and continue its transmission.

But there is no special technique to differentiate the echo and collisions, then how to ignore the echo collision? The trick is timing, by the time the own frame echo is reaching back, all the other systems in the network detected a collision and stopped their transmission. So that the device can safely ignore this echo. Now the next question is, after how much time, it should start ignoring the collisions?

We can find this value using a simple calculation:

LAN Length (L) = 500 x 5 = 2500 Meters

Signal propagation delay on the Cable (S) = 200 Meters/uSec

Delay added by repeater (D) = ~3uSec x 2 (Bi-Direction) x 4 Repeaters = 24 uSec

Round Trip Delay (RTD) = (Total Distance/S) + Other Delays = (2L/S) + D = ((2 *  2500) /200) + 24 = 49 uSec

So we should start ignoring the collision after the RTD Time, 49uSec. For everyone to notice the collision, we should keep transmitting the bits for the RTD Time or more. So the minimum frame size must be greater then the number of bits that can be transmitted with-in the RTD time.

LAN Capacity (C) = 10Mbps

Bits transmitted with-in RTD = RTD x LAN Capacity = (49 x (10^-6)) x (10 x (10^6)) = 490 Bits.

Minimum Ethernet Frame/Packet size > 490 Bits

We will take the nearest big number with power of 8, is 512 Bits.

The minimum Ethernet Frame Size is 512/8 = 64 Bytes. The recent advancement in the Ethernet speed leads to the increase in the minimum frame size. But to maintain the backward compatibility the same minimum frame size retained. And instead of increasing the frame size, the length of the high speed Ethernet network is reduced. The Maximum frame size (1518 or 1522 for VLAN support) was decided to prevent a particular node from hogging the network for long time, efficient buffer handling, retransmission, error recovery, QoS, etc. The start and end of the Ethernet packets are detected using the special sequence called start/end delimiters.

Read about Relationship between Packet Size and Cable Length also

In one of the previous blog entry, shared my understanding about the minimum Ethernet Frame Size. In this entry, sharing my understanding about the relationship between the Minimum Ethernet Frame/Packet Size and the Maximum Ethernet Cable Length.

Now we are going to find the maximum cable length for the old 10Mbps (10Base5) Ethernet network:

Minimum Ethernet Frame size = 64bytes = 512bits

Propagation Delay/ Signal speed on cable = 200m/us

Time to transmit one bit in 10Mbps = (1000ms * 1000us * 1000ns) / 10000000 bits = 100ns

Time to transmit the minimum Frame = (100ns * 512bits) = 51.2us

Length of the cable = speed * min frame TX time = 200m * 51us = 10200m = 10Km.

The maximum Ethernet cable length is 10Km. Is it right?? NO!!. Why?? The 51.2us is the Round Trip Delay(RTD). So the 10Km is Round Trip Distance and the actual length is 10Km/2 = 5Km.

The new maximum cable length is 5KM. Is it right?? NO!!. Why?? To answer this Qus, we need to see more details: The maximum length of the one segment of old 10Base5 cable is only 500m. To make an 1Km cable, 2 segments can be connected (500 + 500) using a repeater. The repeater device in the middle will also introduce some delay. Old repeater will add 3us delay in one direction and bi-directional delay is 6us.

To make a 5Km cable, we need 10 cable segments and 9 repeaters. The repeaters alone add nearly (9*6)= 54us delay in the path, which is more then the time to transmit the minimum frame. For us, the total round trip delay should be with-in 51us. The available options are, reduce the total length of the cable and reduce the number of repeaters in the middle. In the total delay, delay introduced by repeaters should not be greater then 50%. So the new formula is (25us + 25us) = 50us.

No of repeaters that introduce 25us delay = 25/6 = 4 Repeaters

Cable length that introduce 25us RTD = (25 * 200m) / 2 = 2500m = 2.5Km

The maximum cable length for the 10Mbps Ethernet network is 2.5Km, which can be made using 5 cable segments and 4 repeaters.

In the recent years, Ethernet device speed increased by 10 and 100 times. Due to this, the sender transmits the frame faster. As per CSMA/CA, the collision can be detected only before the end of the packet transmission. So if we maintain the same frames size and cable length, then a station will transmit a frame too fast (very much less then 50us), and miss the collision occurs at the other end of the cable. To avoid this, we have to,

  • maintain the maximum cable length and increase the minimum frame size OR
  • maintain the same slot time and decrease the maximum cable length OR
  • increase the slot time and decrease the maximum cable length.

For example, in 100Mbps network, the cable length is reduced to 500m and in 1Gbps network, minimum Ethernet frame/packet size is increased to 256 or 512 bytes.

Let see the calculation behind the length reduction in 100Mbps network:

Time to transmit one bit in 100Mbps = (1000ms * 1000us * 1000ns) / 100000000 bits = 10ns

Time to transmit the minimum Frame = (10ns * 512bits) = 5.12us

Length of the cable = speed * min frame TX time = 200m * 5us = 1000m = 1Km (Round Trip Length).

The one way length is 500m. But the practical limit is around  250m.

Effect of Duplex Mode in Cable Length:

The old Ethernet network was using the coaxial cable and all systems were connected in that cable directly. In this transmission and reception is on the same medium, but not at the same time. Because it is not an collision free environment and work in Half-Duplex mode, CSMA/CD will help to detect the collisions.

The new Ethernet device with IEEE 802.3x standard are having capability to transmit and receive in a independent point to point link (PC to PC or PC to Hub/Switch) on CAT UTP cables. This made the link as a collision free and need of CSMA/CD protocol is removed. This mode of transmission is called Full-Duplex. In this, throughput of the link is doubled, time wasted due to the collision is removed and cable length can also be increased.

Let see how the cable length can be increased in Full-Duplex mode:

In Half-Duplex mode, after transmission of every frame, device should be change to receive mode. So there was a hard limit in the timing requirements, to ensure collision propagated to all systems within the time required to transmit 512 bits. In Full-Duplex mode this limitation is removed, because Tx and Rx independent and system can sustain for some more delay. So the cable length can be extended upto 1 or 1.5Km.

Why should Ethernet frame should be 512 bytes long?

To know for sure that the frame it just sent did not collide with another frame, the transmitter may need to send as many as 512 bits. Not coincidentally, every Ethernet frame must be at least 512 bits (64 bytes) long: 14 bytes of header plus 46 bytes of data plus 4 bytes of CRC.

Why does Ethernet have a minimum frame size?

The minimum frame size on Ethernet is so that by the time the beginning of a frame gets all the way across a maximum-width network, if a collision is detected there on the far side of the network, there's still enough time for the jam signal (collision detection notification) to make it all the way back across the ...

Why Ethernet has maximum and minimum frame length?

Since data travels at a finite speed a minimum packet size was required to ensure that if a collision happens it happened everywhere. The larger you make the minimum packet size the larger and/or faster you can make the network before CSMA/CD breaks down.

How is the minimum size of an Ethernet frame determined?

64 bytes is the minimum size. It's basically determined by the signal propagation time in the original Ethernet cable at the original 10Mbit/s speed: the packet has to be long enough so that everyone on the cable will hear its beginning before the transmitter transmits it to the end.