Size of empty UDP and TCP packet?

后端 未结 4 995
萌比男神i
萌比男神i 2020-11-29 02:37

What is the size of an empty UDP datagram? And that of an empty TCP packet?

I can only find info about the MTU, but I want to know what is the \"base\" size of these

4条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 03:12

    If you intend to calculate the bandwidth consumption and relate them to the maximum rate of your network (like 1Gb/s or 10Gb/s), it is necessary, as pointed out by Useless, to add the Ethernet framing overhead at layer 1 to the numbers calculated by Felix and others, namely

    • 7 bytes preamble
    • 1 byte start-of-frame delimiter
    • 12 bytes interpacket gap

    i.e. a total of 20 more bytes consumed per packet.

提交回复
热议问题