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

参考

[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

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值