bobber205
bobber205

Reputation: 13372

Networking -- Padding of Data

For a homework assignment, I was tasked with creating a "Ping Pong" layer that sits right above the Ethernet stack.

I was able to easily complete the task but when I tested my application over my wireless connection and tried communication with my desktop computer (ethernet) on the same network I found some odd behavior.

It seems like the packet is being padded with information I did not add. From wireless->ethernet I get something like the following (as a hex output of the data received, taking off the ethernet header, periods are unprintable characters).

3-468...lkin54g......$ 0Hl.........*../..2..

When my desktop responds to my laptop (ethernet->wireless) I get something like the following

3-468................ .....................

Is this expected behavior?

Upvotes: 1

Views: 2205

Answers (2)

Andrew
Andrew

Reputation: 3332

When you send packets across the network, the data you are sending is wrapped up into successively larger data structures at each level of the OSI network layer model. When your operating system receives the packets of information, it unwraps the data as it goes up the layers. Reading more about the OSI model could be useful for better understanding.

Here is a picture that illustrates what is going on at each layer, from an ebook.

Upvotes: 0

Matthew Slattery
Matthew Slattery

Reputation: 46998

Yes. Valid Ethernet frames have a minimum size of 64 bytes (including the Ethernet header and a 4-byte checksum at the end).

Upvotes: 2

Related Questions