tcpdump指定网卡抓不到包
有以下链接
tcp 0 0 xx.xxx.xxx.200:37868 xx.xxx.xxx.200:8912 ESTABLISHED
这是同一主机上的连接,ifconfig查看本机IP如下:
em1: flags=41xx.xxx.xxxT,RUNNING,MULTICAST> mtu 1500
inet 10.100.120.200 netmask 255.255.255.0 broadcast xx.xxx.xxx.255
inet6 xxxxxxxxxxxxxxxxxx prefixlen 64 scopeid 0x20<link>
ether xxxxxxxxxxxxxxxx txqueuelen 1000 (Ethernet)
RX packets 23533445831 bytes 12254750999380 (11.1 TiB)
RX errors 0 dropped 201 overruns 0 frame 0
TX packets 27314081080 bytes 20721227957904 (18.8 TiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 18
em1:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xxx.xxx.197 netmask 255.255.255.0 broadcast xx.xxx.xxx.255
ether xxxxxxxxxxxxxxxxxxx txqueuelen 1000 (Ethernet)
device interrupt 18
em1:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xxx.xxx.198 netmask 255.255.255.0 broadcast xx.xxx.xxx.255
ether xxxxxxxxxxxxxxx txqueuelen 1000 (Ethernet)
device interrupt 18
em1:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xxx.xxx.215 netmask 255.255.255.0 broadcast xx.xxx.xxx.255
ether xxxxxxxxxxxxx txqueuelen 1000 (Ethernet)
device interrupt 18
em1:4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xxx.xxx.133 netmask 255.255.255.0 broadcast xx.xxx.xxx.255
ether xxxxxxxxxxxxx txqueuelen 1000 (Ethernet)
device interrupt 18
em2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
....
em1 有虚拟网卡
tcpdump -i em1 tcp port 37868 什么也抓不到,只有tcpdump -i any 才能抓到37868端口的数据,请问是什么原因?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
既然是本机自连,数据包经过
lo
,不是em1
。试一下这样
tcpdump -i lo tcp port 37868
。