试图了解在wwan0上传输的数据量?

问题描述 投票:-3回答:1

我有一个通过lte调制解调器连接到Internet的linux系统,并且我正在通过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个字节的数据以将ping发送到opendns我正在接收212个字节的数据吗?

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

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

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

linux networking mmcli
1个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.