UDP/IP/Ethernet header length issue

162 views
Skip to first unread message

Vineet

unread,
Dec 23, 2014, 8:01:51 AM12/23/14
to ns-3-...@googlegroups.com
I'm using a point-to-point channel between two nodes communicating via UDP. The channel capacity is set to 944 kbps.
The application layer payload size is 88 bytes.
With the addition of lower layer headers, the packet size is 88 + 8(UDP) + 20(IP) + 18(Ethernet) = 134 bytes.

Hence, with zero propagation delay, theoretical transmission delay = 134*8/944k = 1.1355 ms.
But, it takes exactly 1ms for the packet to reach the destination.
The additional 0.1355 ms is not being accounted for.

The packet size corresponding to 1 ms of transmission delay is 118 bytes, which means the size of ethernet frame is 2 bytes.

Why is there a discrepancy between the theoretical and practical delays? Is there any wrong assumption that i am making?

Cheers,
Vineet

Tommaso Pecorella

unread,
Dec 23, 2014, 12:59:08 PM12/23/14
to ns-3-...@googlegroups.com
Hi,

wrong assumptions.

First things first. The Ethernet header may not be 18 bytes long. It may be 26 bytes if the preamble is added.
Second problem: you forgot the llc/snap header. Add 8 extra bytes.

This, of course, would make everything WORSE. Fortunately the last wrong assumption completely reverts all this. You're using Point-to-Point. Who said that p2p is using an Ethernet header ?
As a matter of fact, p2p is using a p2p header, 2 bytes only.

Now, (88 + 8 + 20 + 2) * 8 / 944 = 118 / 118 = 1

Cheers,

T.

Vineet Gokhale

unread,
Dec 25, 2014, 9:24:22 PM12/25/14
to ns-3-...@googlegroups.com

Hi Tommaso,

Thanks for pointing out the misconceptions. That really helped.

Cheers,
Vineet

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/-quyvsiysGw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages