Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用netcap抓不到网络包 #14

Open
ShifengLeee opened this issue Oct 28, 2024 · 2 comments
Open

使用netcap抓不到网络包 #14

ShifengLeee opened this issue Oct 28, 2024 · 2 comments

Comments

@ShifengLeee
Copy link

在机器A上ping机器B,机器B的ip为x.x.x.x,网络接口为bond0,能够ping通。但是在机器B上用netcap抓包,执行正常无报错,但是没有任何数据输出。

机器A上执行ping:
$ping x.x.x.x
PING x.x.x.x (x.x.x.x) 56(84) bytes of data.
64 bytes from x.x.x.x: icmp_seq=1 ttl=53 time=30.9 ms
64 bytes from x.x.x.x: icmp_seq=2 ttl=53 time=30.8 ms
64 bytes from x.x.x.x: icmp_seq=3 ttl=53 time=30.9 ms
64 bytes from x.x.x.x: icmp_seq=4 ttl=53 time=30.9 ms

机器B上执行netcap抓不到数据包:
sudo ./netcap skb -f icmp_rcv@1 -e "host x.x.x.x" -i bond0
sudo ./netcap skb -f icmp_rcv@1 -e "host x.x.x.x"

@bigbang009
Copy link
Contributor

在机器A上ping机器B,机器B的ip为x.x.x.x,网络接口为bond0,能够ping通。但是在机器B上用netcap抓包,执行正常无报错,但是没有任何数据输出。

机器A上执行ping: $ping x.x.x.x PING x.x.x.x (x.x.x.x) 56(84) bytes of data. 64 bytes from x.x.x.x: icmp_seq=1 ttl=53 time=30.9 ms 64 bytes from x.x.x.x: icmp_seq=2 ttl=53 time=30.8 ms 64 bytes from x.x.x.x: icmp_seq=3 ttl=53 time=30.9 ms 64 bytes from x.x.x.x: icmp_seq=4 ttl=53 time=30.9 ms

机器B上执行netcap抓不到数据包: sudo ./netcap skb -f icmp_rcv@1 -e "host x.x.x.x" -i bond0 sudo ./netcap skb -f icmp_rcv@1 -e "host x.x.x.x"

netcap进程退出了吗?

@royzhr
Copy link
Contributor

royzhr commented Jan 7, 2025

首先确认过滤规则是否正确,再尝试去掉 -i bond0 参数尝试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants