空 UDP 和 TCP 数据包的大小? [英] Size of empty UDP and TCP packet?

查看:52
本文介绍了空 UDP 和 TCP 数据包的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

空 UDP 数据报的大小是多少?还有一个空的 TCP 数据包?

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

我只能找到有关 MTU 的信息,但我想知道这些的基本"大小是多少,以便估算基于它们的协议的带宽消耗.

I can only find info about the MTU, but I want to know what is the "base" size of these, in order to estimate bandwidth consumption for protocols on top of them.

推荐答案

TCP:

以太网帧的大小 - 24 字节
IPv4 标头的大小(无任何选项)- 20 字节
TCP 标头的大小(无任何选项)- 20 字节

Size of Ethernet frame - 24 Bytes
Size of IPv4 Header (without any options) - 20 bytes
Size of TCP Header (without any options) - 20 Bytes

承载带有空 TCP 段的 IP 数据包的以太网帧的总大小 - 24 + 20 + 20 = 64 字节

Total size of an Ethernet Frame carrying an IP Packet with an empty TCP Segment - 24 + 20 + 20 = 64 bytes

UDP:

以太网帧的大小 - 24 字节
IPv4 标头的大小(无任何选项)- 20 字节
UDP 头的大小 - 8 字节

Size of Ethernet frame - 24 Bytes
Size of IPv4 Header (without any options) - 20 bytes
Size of UDP header - 8 bytes

承载带有空 UDP 数据报的 IP 数据包的以太网帧的总大小 - 24 + 20 + 8 = 52 字节

Total size of an Ethernet Frame carrying an IP Packet with an empty UDP Datagram - 24 + 20 + 8 = 52 bytes

这篇关于空 UDP 和 TCP 数据包的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆