7

When the data sent in an Ethernet frame is less than 46 bytes, extra padding needs to be added to the payload. The question is:

  • Which is the value of that Ethernet padding?

I'm asking since in real captures I checked this padding seems random, i.e. a changing combination of 1s and 0s.

0

2 Answers 2

8

IEEE 802 packets may have a minimum size restriction. When necessary, the data field should be padded (with octets of zero) to meet the IEEE 802 minimum frame size requirements. This padding is not part of the IP datagram and is not included in the total length field of the IP header.

2
8

The padding can have any values, decided by the network interface card, the operating system and the driver.

Conservative OS might pad with zeros. Lazy OS might leave whatever was in those memory locations alone, and you'll see leftovers from the previous frame.

2
  • 9
    Leaving data from a previous frame seems like a security problem, since the previous frame would likely have been destined to a different remote device, application, or user.
    – Barmar
    Commented Sep 24, 2018 at 21:11
  • @Barmar Yes, which can be fixed by enforcing longer dataframes so no padding will be added.
    – Mast
    Commented Sep 25, 2018 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.