linux - 想要了解 wwan0 上传输的数据量?

标签 linux networking

我有一个 Linux 系统,它通过 lte 调制解调器连接到互联网,我通过 modemManager 与它通信。所以我在理解消耗的数据字节数方面有点困难。

root@raspberrypi-cm3:~# mmcli -b 0
-------------------------
 Status     | connected : 'yes'
            | suspended : 'no'
            | interfaces: 'wwan0'
            | IP timeout: '20'
 -------------------------
 Properties |       apn: 'myapn'
            |   roaming: 'allowed'
            |   IP type: 'none'
            |      user: 'none'
            |  password: 'none'
            |    number:  'none'
 -------------------------
 Stats      |            Duration: '105060'
            |      Bytes received: '6300'
            |   Bytes transmitted: '6209'

root@raspberrypi-cm3:~# ping -c 1 -s 0 www.opendns.com
8 bytes from ****.****.****.*** seq =0 ttl=50
1 packet transmitted, 1 packet received, 0% packet loss

root@raspberrypi-cm3:~# mmcli -b 0
-------------------------
 Status     | connected : 'yes'
            | suspended : 'no'
            | interfaces: 'wwan0'
            | IP timeout: '20'
 -------------------------
 Properties |       apn: 'myapn'
            |   roaming: 'allowed'
            |   IP type: 'none'
            |      user: 'none'
            |  password: 'none'
            |    number:  'none'
 -------------------------
 Stats      |            Duration: '105090'
            |      Bytes received: '6512'
            |   Bytes transmitted: '6359'

根据调制解调器经理的说法。我消耗了 150 字节的数据来向 opendns 发送 ping 我收到了 212 字节的数据?

但这怎么可能。我使用 ICMP header 发送 8 个字节并接收 8 个字节,总共接收到 16 个字节的数据。

有人可以解释一下这些附加数据字节来自哪里吗? 当我与我的域名服务器通信时,它们只是一种开销吗?如果这是一个开销,是否有某种公式可以用来计算消耗的近似数据?

我的最终目标只是交叉验证消耗的总数据字节

最佳答案

我通过使用 tcpdump 创建 pcap 文件找到了答案。感谢您对我的问题投了反对票并且没有提供任何答案。对于像我这样的其他初学者。如果您面临类似的问题。请使用tcpdump,这将为您提供有关设备发送和接收的数据包的详细说明。

关于linux - 想要了解 wwan0 上传输的数据量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58821012/

相关文章:

linux - NETLINK_ROUTE channel 可用于将消息从内核模块发送到用户空间程序吗?

c++ - 如何在未使用 C++ 连接到 DC 时获取成员计算机的专有名称

ipad - 是否有任何 API 可以区分 3G 网络和 Wifi?

c# - 如何检测文件是否在网络上?

linux - 无法通过 ssh 使用无密码登录

linux - windows-在双引导中安装 Linux 和 "break"RAID 0

python 原始套接字 : Protocol not supported