tcpdump / wireshark 捕获问题

tcpdump / wireshark capturing problems

刚开始使用 wireshark 和 tcpdump, 如果我在我的 IP 上捕获流量但没有在其他来源(我网络上的其他 IP)上捕获任何内容,它们都可以正常工作

我的设置:1 台电脑 运行ning windows 8(ip 192.168.0.2),1 台笔记本电脑 运行ning ubuntu(192.168.0.3).

都连接到便宜的非托管 5 端口 s,它连接到我的路由器。

都是有线的,甚至在笔记本电脑上试过无线模式。

如果我 运行 在我的笔记本电脑上使用过滤器进行 tcpdump:主机 192.168.0.2(计算机 IP 添加)它不会捕获任何东西!

如果我在我的计算机上 运行 wireshark 但使用诸如 dest 192.168.0.3(笔记本电脑 IP)之类的过滤器,则相同

尝试使用网络 192.168.0.0/24 进行 tcpdump(应该从我的整个网络捕获流量)...相同的结果,只捕获发往我 IP 的流量(来自 的笔记本电脑,我是 运行执行命令)

尝试在笔记本电脑和个人电脑上设置为混杂开启,结果相同。

知道为什么我无法从其他 IP 地址捕获任何内容吗?

"Both connected to a cheap unmanaged 5 port switch"

正如您已经发现的那样,您当前的捕获设置将不起作用。来自 Wireshark CaptureSetup/Ethernet wiki 页面:

In addition, if you are on a switched Ethernet, rather than a shared Ethernet, you will also have to take action to ensure that all traffic in which you're interested is sent to the Ethernet adapter on the machine running the packet capture program; that is not, by default, the case on switched networks, so attempts to capture on a switched network will, by default, see only traffic that the capturing machine would see when not in promiscuous mode.

请参阅同一页面以了解多种解决方案,包括使用 TAP、托管交换机甚至集线器(如果您能找到一个并且别无选择),仅举几例。

除了 Wireshark wiki 页面之外,我还强烈推荐阅读非常有才华的 Jasper Bongertz 的 6 部分 Network Capture Playbook系列:

  1. The Network Capture Playbook Part 1 – Ethernet Basics
  2. The Network Capture Playbook Part 2 – Speed, Duplex and Drops
  3. The Network Capture Playbook Part 3 – Network cards
  4. The Network Capture Playbook Part 4 – SPAN Port In-Depth
  5. The Network Capture Playbook Part 5 – Network TAP Basics
  6. The Network Capture Playbook Part 6 – Planning Network Troubleshooting