# 正常开始捕获
tcpdump net 65.192.0.0/10 # 1
# 报错: tcpdump: non-network bits set in "10.44.0.0/10"
tcpdump net 10.44.0.0/10 # 2
# 正常开始捕获
tcpdump net 10.44.0.0/14 # 3, 14 以上正常捕获
找到网上的说法是:
This is because the apparent intent of your rule is to exclude traffic from your local network, and the correct way to specify a network address is to specify the network's lowest IP address (which is called the network address) / netmask. If you specify any address other than the lowest address in the range for a network with a netmask of $myNetworkBytes, then you will get the error message:
man page 中的解释:
True if the IPv4/v6 address matches net with a netmask len bits wide. May be qualified with src or dst.
OK, 然后我还是没太明白(哭~), 有大佬解释下吗? 1 可以, 2 却不行, 3 为什么 14 就可以了, 不应该是 16 之后才可以吗?
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.