【概念解释】packet, frame,...

2023-05-16

参考

[1] Definition of Network Units: Packet, Fragment, Frame, Datagram, and Segment
[2] Difference between Frame and packets in IEEE 802.11

1 背景

不同的OSI层 & 不同的协议都有自己的 specific units
the packet, fragment, frame, datagram, and segment, …
作为wireless领域的的phd candidate,目前还并不是很清晰这些units的具体定义以及互相之间的联系,因此专门写一篇笔记理一下

2 OSI model

先复习一下
在这里插入图片描述

在这里插入图片描述
下面从底层向高层记录

3 Frame

frames are small parts of a message

It helps to identify data and determine the way it should be decoded and interpreted

frame有两种类型:
fixed-length and variable-length frames

variable-length frames需要规定起始符和结束符,fixed-length frame不用

4 Packet & Frame

The basic unit of communication between a source and a destination in a network. Data sent through the network is divided into packets, that are recombined by the destination devices.

packets结构如下
在这里插入图片描述


Frame & Pakcet区别

The main difference between a packet and a frame is the association with the OSI layers

A frame contains more information about the transmitted message than a packet

Frames are not much different from packets. Frames contain more information about the data than Packets

越往底层,units包含的信息越多,越复杂。


In each network, there is a maximum size of the data to be transmitted called the MTU (Maximum Transmitted Unit). Packets can often be larger than the maximum size, so each packet is also divided into smaller pieces of data called fragments.

Fragment仍然属于网络层

When the network layer receives a packet, it checks the MTU of the packet. If the packet length is bigger than the MTU, the network layer checks the Don’t Fragment (DF) flag associated with the packet. If the DF flag is 1, we discard the packet. Otherwise, the network layer decides the size of the fragments, create the header, encapsulate the fragments within the header, and send them to the next layer在这里插入图片描述
现在知道路由器是干啥用的了

5 Datagram & Segment

In a datagram, we divide data frequently and transmitted from source to destination without a predefined route. We also can’t guarantee the order of delivery to the receiver end.

While TCP uses packets in connection-oriented protocols, datagrams are used in UDP, making them carry less information since they don’t need to have a response message from the destination

In the case we sent an email using the UDP protocol, there will be no packets but datagrams. The information transmitted would be in the following figure:
在这里插入图片描述
A segment is a broken piece of a packet with a TCP header in each of them

f we sent an email with a TCP connection, then the data that exists in the transport layer to complete the operation is an example of a segment. The email packet will then become:

在这里插入图片描述

6 Specificaitons on PHY layer

上面是广义的计算机网络的知识, network layer的pakcet作为payload被包含在data link layer的frame中

在 PHY layer中,packet 与 frame有另外的意思

比如在 IEEE 802.11标准中(WIFI)的packets中,the frame is encapsulated within the data field of the packet

在matlab的数据处理中,也经常用frame来作为数据单位,比如处理音频流时的长度参数叫frameLength

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【概念解释】packet, frame,... 的相关文章

  • 添加 TabBarController 作为视图的子视图

    当我的应用程序启动时 我正在加载启动屏幕 然后我想加载一个TabBarController 它是ViewControllers 但是 我的 TabBarController 窗口无法缩放到屏幕尺寸 底部的 TabBar 的 3 4 可能被切
  • 如何在 iOS 的照片拼贴中滑动时调整视图大小?

    我正在编写一个照片编辑器演示 用户可以水平或垂直滑动以将视图分割为他们想要的许多小视图 然后用户可以拖动每个视图的边框来重新调整视图的大小 问题是我不知道如何制作照片拼贴 用户可以拖动视图边框来改变视图的大小 我认为每个白色边框 如下图所示
  • 如何在android中使用opencv从另一帧中减去一帧

    我正在处理视频的帧 我想从其他帧中减去一帧以找出差异 但我不知道如何继续 我尝试将位图帧转换为垫子 然后减去它们 但它不起作用 我正在使用 opencv 2 4 3 作为 mat 函数 谁能告诉我该怎么做 如果可能的话用代码片段进行解释 我
  • 如何在c中创建自定义数据包?

    我正在尝试使用 TCP IP 协议使用 C 语言制作自定义数据包 当我说自定义时 我的意思是能够更改数据包中的任何值 例如 MAC IP 地址等 我尝试四处搜索 但找不到任何实际指导我或给我示例源代码的东西 如何创建自定义数据包或者我应该在
  • 嗅探并显示 UTF-8 格式的 TCP 数据包

    我正在尝试使用 tcpdump 来显示在我的网络上流动的 tcp 数据包的内容 我有类似的东西 tcpdump i wlan0 l A A 选项将内容显示为 ASCII 文本 但我的文本似乎是 UTF 8 有没有办法使用 tcpdump 正
  • 在 iPhone 中重新定位后,框架/窗口尺寸“不正确”

    在我的 iPhone OS 应用程序中 我想要 需要 观察设备方向的变化 以便重新排列屏幕的某些部分 我使用的方法是使用CGRect frame UIScreen mainScreen applicationFrame获取屏幕尺寸 并从那里
  • 如何呈现更小的视图控制器

    我想要以比屏幕更小的尺寸呈现视图控制器 vc2 如何在 Swift 3 中做到这一点 感谢帮助 这是我的代码 IBAction func leftButtonPressed sender UIButton let vc2 self stor
  • 在 WPF Frame 控件中关闭导航页面声音

    我在 WPF 窗口中有一个 Frame 元素 并且应用程序中的所有内容都是使用 Frame Navigate 加载的 但是 当导航到新页面时 默认会播放该声音 它与 Internet Explorer 中播放的声音相同 有什么方法可以从应用
  • Scapy发送的数据包收不到

    我正在尝试使用以下命令使用 scapy 发送 UDP 数据包 gt gt send IP dst 127 0 0 1 src 111 111 111 111 UDP dport 5005 Hello Sent 1 packets 并从tcp
  • 以编程方式下载视频android的第一帧

    我想从我的 Android 应用程序的服务器下载视频文件的单帧 我不想下载前面的完整视频 使用该帧作为缩略图向用户显示 以便用户选择后可以下载 ffmpeg可以使用以下命令从视频流创建缩略图 ffmpeg itsoffset 4 i htt
  • 为什么我无法更改 UILabel 的框架?

    我这两天一直在尝试修改一个框架UILabel 哪个 很荒谬 UILabel是一个 IBOutlet 但这不是原因 为什么它不起作用 我试图创建一个UILabel以编程方式和 它仍然不起作用 我是这样做的 self descriptionLa
  • C# 读取字节数组

    好的 我正在构建服务器 客户端应用程序 基本上服务器接收一个包含 header 2bytes cryptokeys 2bytes 和数据的数据包 我正在考虑构建类以将整个数据包 字节 加载到其中 然后使用内部类方法处理数据包 现在回答问题
  • 如何使用 selenium 执行网页上的所有 javascript 内容,以在完全加载的网页上查找并发送登录表单信息

    我一直在尝试制作一个 Python 脚本来登录某个网站 浏览菜单 填写表单并将其生成的文件保存到文件夹中 我一直在使用 Selenium 尝试使网站完全加载 以便我可以找到登录的元素 但我没有成功 可能是因为网站在完全加载之前执行了大量 J
  • 通过 Internet 发送 UDP 数据包

    我正在尝试了解 P2P 去中心化网络的一些细节 我的问题如下 假设我有两台名为 comp1 和 comp2 的机器 现在 comp1 设置在我的家庭网络中的路由器后面 comp2 位于我的办公室中 也位于路由器后面 我是否可以像这样在 In
  • UIView框架、边界和中心

    我想知道如何以正确的方式使用这些属性 我认为 frame可以从我正在创建的视图的容器中使用 它设置相对于容器视图的视图位置 它还设置该视图的大小 Also center可以从我正在创建的视图的容器中使用 此属性更改视图相对于其容器的位置 最
  • CALayerframe.size不等于bounds.size

    我在CALayer上遇到了一些奇怪的事情 最后发现CALayer的frame size不等于它的bounds size 这是我无法理解的 我知道frame是在super的坐标系中 bounds是它自己的坐标 并且通常的情况是frame or
  • Tkinter 框架滚动条

    我的目标是向其中有多个标签的框架添加一个垂直滚动条 一旦框架内的标签超过框架的高度 滚动条就会自动启用 经过一番搜索 我发现this https stackoverflow com questions 3085696 adding a sc
  • 在 mac 上使用 AVFoundation 和 AVCaptureVideoDataOutput 时如何使用自定义视频分辨率

    我需要处理捕获的视频帧的每一帧 尽管AVCaptureDevice formats提供了这么多不同尺寸的框架尺寸 看起来AVCaptureSession仅支持预设中定义的帧大小 我也尝试过设置AVCaptureDevice activeFo
  • 在 SwiftUI 中使用获取视图的宽度

    我需要获取渲染视图的宽度SwiftUI 这显然没那么容易 我的看法是 我需要一个返回视图尺寸的函数 就这么简单 var body some View VStack alignment leading Text timer name font
  • 自动调整大小完成后如何获取帧大小

    我想知道 如何以及何时 viewDidLoad viewWillAppear viewDidAppear 可以获得自动调整大小以适合其父视图的 UIViews 框架大小 从你的问题中不清楚你为什么想要它 但我想这是为了布局你的子视图 幸运的

随机推荐