Packets, frames, bytes, octets and datagrams

本文介绍了网络通信中不同层次的数据传输单位,如应用层的数据经过封装变为IP数据报,再经过链路层成为带有MAC地址的帧。数据报、帧、包和字节(八位字节)在网络传输中各有其特定含义,理解这些概念对于网络管理和TCP/IP通信至关重要。最大帧大小、分片与MTU等概念也在此得到阐述。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Packets, frames, bytes, octets and datagrams
Chapter 1. Network Administration Fundamentals 

You will hear, in your walk through this world of networking and TCP/IP people referring to packets and frames, octets and datagrams. What is what? In the strictest sense packets and frames are different and datagrams are different again. However, many people refer to these interchangeably. Let 's clear up the definitions here.

When a unit of data, beginning at the application layer (top layer) is transmitted to lower layers, headers and trailers are appended to it. Once the unit of data reaches the IP layer and source and destination IP addresses are added to it, it then is known as an IP datagram. The unit of data, feeling a little bloated from having all this extra baggage is then sent to the link layer where source and destination MAC addresses are perpended to it. Now it is called a frame - and more accurately an Ethernet frame (if the physical layer is Ethernet). To be precise, the unit of data passed between the IP layer and the network interface card is really a packet of data. Thus, a packet can be an entire IP datagram or perhaps a fragment of an IP datagram.

UDP units of data, being connectionless (and thus not really too concerned whether the receiver actually got the data or not) are also referred to as datagrams.

This leaves octets. Octets are units of 8 bits (also know as bytes). Thus the maximum size of a frame in Ethernet is 1513 octets or 1513 bytes. Any larger and the frame must be split or fragmented. As you might expect, fragmentation causes delay so it is good to keep all your frames below the MTU size.

### Dell G3 Ubuntu 20.04 网络接口配置与状态解析 在安装并运行 Ubuntu 20.04 的 Dell G3 笔记本上,如果发现 `ifconfig` 命令仅显示 `lo` `wlo1` 接口而未显示 `enp3s0` 或其他有线网络接口,则可能是由于缺少必要的网卡驱动程序或网络管理工具的配置不当所致[^1]。 #### 一、网络接口名称解释 - **`lo`**: 这是本地回环接口 (loopback),用于测试机器内部通信功能。 - **`wlo1`**: 表示无线网络接口,通常对应 Wi-Fi 功能。 - **`enp3s0`**: 是现代 Linux 发行版中常见的命名方式之一,表示物理以太网适配器。此命名遵循 systemd 提供的可预测网络设备名方案[^3]。 当执行命令 `ifconfig -a` 后未能看到预期中的 `eth0` 而仅有上述提到的几个条目时,可能意味着系统的硬件支持存在问题或者需要进一步调整软件环境来激活该组件。 #### 二、确认当前状况的方法 为了更好地理解实际情形,可以通过以下步骤收集更多信息: 1. 使用更全面的工具替代传统 `ifconfig` 查看所有可用网络端口详情: ```bash ip addr show ``` 2. 列举已加载模块列表查找是否有相关联的Ethernet控制器被识别到: ```bash lsmod | grep e1000e ``` 3. 如果怀疑特定型号芯片组的支持情况不足,则需核实BIOS版本是否最新以及操作系统内核兼容性如何。 #### 三、解决方案概述 针对无法检测到 Ethernet 设备这一现象,以下是几种常见处理措施及其背后原理说明: ##### 方法A:更新驱动程序支持包 确保系统已经安装最新的固件补丁集,并尝试手动引入额外资源库以便获取专有的闭源驱动选项。例如对于Intel系列NIC来说,有时单独下载对应的`.deb`文件重新编译链接能够解决问题。 ##### 方法B:修改Netplan YAML配置文档 按照官方推荐做法编辑位于 `/etc/netplan/` 下面的一个YAML格式描述档(通常是类似于`01-netcfg.yaml`这样的名字),定义静态IP参数或者其他高级属性如下所示: ```yaml network: version: 2 renderer: networkd ethernets: enp3s0: dhcp4: true ``` 保存更改之后记得应用新的设定通过下面指令完成生效过程: ```bash netplan apply ``` ##### 方法C:重启服务单元 有时候仅仅是因为某些后台进程尚未完全初始化好就报错了而已,因此简单地停止再启动一次Network Manager即可恢复正常工作秩序[^5]: ```bash sudo systemctl restart NetworkManager ``` --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值