Ethernet padding

etherneticmppingwireshark

I'm using Wireshark for my project. I sent a ping over to Google.com and Wireshark said that the length was 57 bytes(when I received the reply it was 60 bytes long and it contained 6 bits of padding.
After I decided to send another packet that Wireshark said was 56 long the reply was 60 bytes long again but the padding contained 8 bits lets say I sent a packet with 42 lengths I received a 60 bytes reply but the padding contained 24 bits.
I want to know the reason why.

Best Answer

IEEE 802.3 describes structure of Ethernet frames. As it says the minimum frame length is 64 bytes. Every frame less than 64 bytes should be padded with 0 before transmitted on the Ethernet link. This padding is done by Ethernet network card adapter so you see 60 bytes frame only in received frames. In fact Wireshark capture transmitting frames before they leave the OS and entering the network adapter, i.e before padding process.

Please note that Wireshark omits the 4 last bytes of frame names FCS (Frame Check Sequence) which is used to detect corrupted frames. Thus you see 60 bytes instead of 64 bytes.

Related Topic