02-09-2023 06:44 AM - edited 02-09-2023 06:52 AM
From- What is Minimum Ethernet Frame Size? - GeeksforGeeks...
"The minimum size of an Ethernet frame is 64 bytes, consisting of a 6-byte Destination MAC address, a 6-byte Source MAC Address, a 2-byte Length/Type field, a 46-byte Payload, and a 4-byte Frame Check Sequence."
Above says: 1. minimum frame = 18 bytes. IP header + TCP header = 46 bytes.
Right now I'm staring at diagrams illustrating that both the IP header, and also the TCP header are 20 bytes each. (attached)
"46 bytes being the lower limit in order to ensure that the transmission media is occupied by the sender for the entire time it is sending the ethernet frame in order to prevent a collision. If the actual data is smaller than 46 bytes, it is padded by trailing zeroes."
QUESTION: Exactly where and how are these 6 bytes of options/padding allocated in the packet and/or segment?
Thank you.
02-09-2023 08:23 AM
I'm not 100% certain, without more detailed research, but I suspect the answer is as simple as Ethernet frames have minimum payload size allocations, whatever is not used for "real" payload is padded with zeros.
But, you're wondering, how do we know where the demarcation is between "real" payload, and the padding?
Simple, both the sender and the recipient, somehow, need to know what the payload should comprise. So, for example, if sender and recipient both use a "real" payload that's always 15 bytes, then we know padding will always be 46 - 15 = 31 bytes.
Or, if sender and recipient are using variable length "real" payloads, then length is always provided in a specific portion of the payload, say the first two bytes. So if first two bytes indicate variable payload is 13 bytes, we now know 46 - 2 - 13 = 31 bytes of padding.
If you study the IP packet and/or TCP segment structures, you'll see they have fixed allocation portions, including allocation for variable length allocations.
So, again, any time the "real" payload is less than Ethernet's minimum, we only need to know what the "real" payload size is, and pad with zero values to insure the minimum frame size it met.
Make sense?
02-09-2023 09:01 AM
This required minimum 6 bytes of padding, it lives inside the...
1. The IP "options" space?
2. The IP "padding" space?
3. and/or the segment options space?
4. and/or the segment "payload" space?
Thank you.
02-09-2023 02:26 PM
I would expect the answer to be, none of the above.
I would expect the padding to be within the frame's payload.
It's not L3 or L4 padding, but L2 padding.
BTW, this padding issue isn't restricted to just Ethernet frames, ATM has it too. Cells are always 53 bytes, 48 bytes being payload.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide