V
V
Valentine2020-10-15 10:31:00
Computer networks
Valentine, 2020-10-15 10:31:00

What is the minimum Ethernet frame size and why?

Just a few days ago, a question was asked here about the frame size in Ethernet. The question was asked amateurishly, more like a copy-paste from some collection of problems, received several complaints, and the moderators demolished it. However, I managed to leave a rather broad answer. So that my answer and the time spent on it do not go to waste, I will make a copy of that question and write an answer to it myself.

Actually the question itself: where did the minimum size of an Ethernet frame come from ?

Experts are invited to discuss)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valentin, 2020-10-15
@vvpoloskin Question

The minimum frame value for normal Ethernet is 64 bytes. This is a known thing. But around this formed a lot of legends and conjectures.
This frame size comes with Ethernet I, this was done for the correct operation of the CSMA / CD algorithm. Let me remind you that in a common transmission medium, to eliminate collisions (this is when several devices simultaneously transmit a signal over the same conductor at the same time), Ethernet has its own transmission time slot for each device. That is, one device must send, and the other must receive, for a certain time slot (yes, this is the Time Division Multiplexing mechanism). This is influenced by physics in the form of a limitation on the speed of light propagation. Let's take the following formula:

2*L = C * t
t = S/Bandwidht
L = C * (S/Bandwidth)/2,

L - максимальная длина среды (провода)
t - время на прохождение сигнала
S - размер кадра
C - скорость распространения сигнала в среде (скорость света умноженная на коэффициент задержки сигнала в среде)

This is a direct proportion to the packet size and inverse to the signal propagation speed: the larger the frame size, the greater the distance, the greater the bandwidth, the shorter the distance. This is a purely mathematical formula, of course, further it is limited by the physics of signal propagation.
I will not give specific calculations, but for 10M Ethernet the distance is 5.12 km, and for 100M - 512 m, for 1000M - 51.2 m. This is with 64 bytes. We reduce the size of the frame - we get the distance 2 times less (we reduce it by powers of two).
Smart people thought that for 1000Base-T the maximum theoretical distance of 51 meters was too small and made a recommendation - increase the minimum frame size for 1000Base-T to 512 bytes. At the same time, the distance turned out to be about 409.6 m.
All this was a free retellingstack-over-flow response .
Now how it was implemented. The frame format for 10/100M Ethernet is as follows:
5f87fc50751a7834877318.png
Pad-finish with zeros to the minimum frame size. This is done at the MAC level (read, on L2, hello, OSI model).
And for 1000Base-T, we already add the Carier Extension field. And from the interesting, unlike the Pad Field, it is already clogged not with zeros, but with a special sequence of characters generated at the PHY level (hello again, OSI model).
And for 1000Base-T, we already add the Carier Extension field. And from the interesting, unlike the Pad Field, it is already clogged not with zeros, but with a special sequence of characters generated at the PHY level (hello again, OSI model).
5f87fcbf6c5aa609536799.png
This minimum frame size of 512 bytes is only valid for half-duplex Gigabit Ethernet with CSMA/CD enabled. With full-duplex, it is not added. Otherwise, it would be impossible to build lines for hundreds of kilometers via DWDM or even satellite. But a minimum of 64 bytes still remains. It seems to me that this was not removed due to the fact that it was much smaller (64 bytes - 14 bytes for headers - 2 for FCS, and then internal headers must be subtracted ...). You can experiment even on virtual machines between virtual interfaces - the frame is achieved by zeros. See here for more details on the structure .
In addition, the value values ​​in the Type/Length field according to IANAthe maximum frame length should be 0x0000-0x05DC (even though no one uses this now, now in most cases it will be 0x8000 - IPv4, well, or something else with VLANs, if you dump from the trunk port). Actually, this is the reason why the maximum L2 MTU value on switches is 1500 bytes.
An inquisitive reader will ask why use full-duplex in 1000Base-T, because there the signal is always transmitted in one direction on its two pairs, in the opposite direction - on others. The answer is to use gigabit hubs. When you use a hub, packets from two hosts can already run over two of your pairs. Another question is that in nature such people probably did not exist.
If you think about why think about it now, then there are other modern technologies with multiple access to the same environment. For example, the well-known wifi. And the CSMA / CD algorithm also works there (only its variation is CSMA / CA, a separate type of RTS / CTS frames is sent there. But, as they say, this is a completely different story, which can be read in detail at the link .

V
Viktor Taran, 2020-10-15
@shambler81

https://ru.wikipedia.org/wiki/IPv4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question