tcpdump 捕获全网 UDP 流量,但不捕获 TCP

tcpdump 捕获全网 UDP 流量,但不捕获 TCP

当使用 观察流量时sudo tcpdump udp,它的行为应该如此:我可以看到网络中发生的所有流量,即使我正在使用的机器不参与其中。

然而,当发出命令时须藤 tcpdump tcp,我只是看到我没有参与的流量:在其他两台机器之间传输的数据包不可见。

我读过关于交换网络,但据我了解,如果是这种情况,我也不应该看到 UDP 流量。

我使用 Ubuntu 14.04.1 LTS 作为我的操作系统。

是什么阻止我跟踪 TCP 流量?

跟踪的 UDP 流量:

00:35:58.813682 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:58.815133 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:58.998898 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:58.999134 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.201377 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.201968 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.370964 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.371582 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.553621 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.554164 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.717320 IP ubuntuserver.fritz.box.42149 > fritz.box.domain: 32553+ PTR? 255.178.168.192.in-addr.arpa. (46)
00:35:59.718072 IP fritz.box.domain > ubuntuserver.fritz.box.42149: 32553 NXDomain* 0/1/0 (106)
00:35:59.718241 IP ubuntuserver.fritz.box.49986 > fritz.box.domain: 41172+ PTR? 22.178.168.192.in-addr.arpa. (45)
00:35:59.719231 IP fritz.box.domain > ubuntuserver.fritz.box.49986: 41172* 1/1/3 PTR JanBerktold.fritz.box. (166)
00:35:59.719395 IP ubuntuserver.fritz.box.50904 > fritz.box.domain: 53292+ PTR? 21.178.168.192.in-addr.arpa. (45)
00:35:59.720181 IP fritz.box.domain > ubuntuserver.fritz.box.50904: 53292* 1/1/3 PTR JanBerktold.fritz.box. (166)
00:35:59.752634 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.752871 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.926701 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:35:59.926919 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.143513 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.144083 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.349315 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.365001 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.552357 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.552778 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.721407 IP ubuntuserver.fritz.box.38326 > fritz.box.domain: 11041+ PTR? 1.178.168.192.in-addr.arpa. (44)
00:36:00.722244 IP fritz.box.domain > ubuntuserver.fritz.box.38326: 11041* 1/1/3 PTR fritz.box. (153)
00:36:00.722371 IP ubuntuserver.fritz.box.43901 > fritz.box.domain: 36201+ PTR? 34.178.168.192.in-addr.arpa. (45)
00:36:00.723199 IP fritz.box.domain > ubuntuserver.fritz.box.43901: 36201* 1/1/3 PTR ubuntuserver.fritz.box. (167)
00:36:00.767687 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.768093 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.979263 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:00.979480 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:01.188186 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:01.188592 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
00:36:01.401442 IP JanBerktold.fritz.box.2008 > 192.168.178.255.2008: UDP, length 16
-- LOT MORE OF THESE --

注意:ubuntuserver 是跟踪机器,Janberktold 是 Win8 桌面。

到目前为止,我认为 192.168.178.255 地址是路由器,但这似乎是广播地址。我想这解决了这个问题:我实际上位于交换网络上。

答案1

这有两种可能性。

  1. 您正在看到 UDP 广播流量。

  2. 您会看到两个远程系统之间的 UDP 流量。您是正确的,交换机通过 MAC 地址隔离流量。然而,为了做到这一点,它需要知道哪些段针对哪些 MAC 地址。它通过基于流量的学习来做到这一点。当交换机收到数据包时,它可以了解发送者 MAC 地址的接口。但是,当它收到一个它不知道接收者的数据包时,它必须将该数据包转发到其所有接口。这(可能)是您在计算机上看到的流量。

您也会看到 TCP 流量,但您最多可能只能看到初始 SYN,因为从那时起,交换机将了解发送方和接收方的接口。

答案2

该流量很可能是广播流量,您看到的流量的来源和目的地是什么?

相关内容