导航:https://blog.youkuaiyun.com/yudelian/article/details/129182837
android(linux)设备:
主设备设置混杂模式:
ifconfig eth0 promisc
然后通过tcpdump -i eth0 -p 可以抓所以经过eth0(eth0虚拟的各种vlan或者网桥)的包
qnx设备
命令 nicinfo
#nicinfo
Physical Node ID ........................... 000102 C510D4 Current Physical Node ID ................... 000102 C510D4 Current Operation Rate ..................... 100.00 Mb/s full-duplex Active Interface Type ...................... MII Active PHY Address ......................... 3 Power Management State ..................... Active Maximum Transmittable data Unit ............ 1514 Maximum Receivable data Unit ............... 1514 Receive Checksumming Enabled ............... TCPv6 Transmit Checksumming Enabled .............. TCPv6 Hardware Interrupt ......................... 0x5 DMA Channel ................................ 0 I/O Aperture ............................... 0xd400 - 0xd47f ROM Aperture ............................... 0 Memory Aperture ............................ 0xe6000000 - 0xe6000FFF Promiscuous Mode ........................... Off Multicast Support .......................... Enabled
可以看到这个混杂模式,这个应该通过驱动设置的,我们的qnx默认就是on
然后通过tcpdump抓包:
-p
Don't put the interface into promiscuous mode. Note that the interface might be in promiscuous mode for some other reason; hence, you can't use -p as an abbreviation for ether host {local-hw-addr} or ether broadcast.
也是通过
tcpdump -i eth0 -p 可以抓混杂包
注意:
1、主设备顾虑 虚拟机的数据包,有时候过滤不出来
在qnx侧的主网络设备 emac0抓包时发现,虚拟的vlan3的ping包request和response都有,但是emac0在混杂模式下只看到request包,没有response包,但是抓包文件在wireshark上能看到reply包
2、以防出错,可以通过tcpdump 后用grep 过滤
QNX与Android/Linux设备的混杂模式与tcpdump抓包分析
文章介绍了如何在Android/Linux系统中设置网络设备的混杂模式以抓取所有数据包,并使用tcpdump工具进行抓包。对于QNX设备,通过nicinfo查看设备状态,并且提到QNX默认支持混杂模式。然而,在QNX的emac0接口上,混杂模式可能无法捕获虚拟vlan3的response包,尽管wireshark可以显示。建议使用tcpdump结合grep过滤以避免错误。
2359

被折叠的 条评论
为什么被折叠?



