qnx和android网络的混杂模式抓包

文章介绍了如何在Android/Linux系统中设置网络设备的混杂模式以抓取所有数据包,并使用tcpdump工具进行抓包。对于QNX设备,通过nicinfo查看设备状态,并且提到QNX默认支持混杂模式。然而,在QNX的emac0接口上,混杂模式可能无法捕获虚拟vlan3的response包,尽管wireshark可以显示。建议使用tcpdump结合grep过滤以避免错误。
摘要由CSDN通过智能技术生成

导航:https://blog.csdn.net/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

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.core_networking/topic/drivers_Troubleshooting.html

然后通过tcpdump抓包:

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.utilities/topic/t/tcpdump.html

-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 过滤

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值