What is the capture filter for a specific IPv4 subnet? I had thought that this would do:
However, I don't capture any traffic with this filter at all (where I know there is traffic, since I can see some on that subnet when capturing without the filter). asked 20 May '13, 08:18 multipleinte... |
2 Answers:
You need to supply the netmask as well, e.g. answered 20 May '13, 08:24 grahamb ♦ edited 20 May '13, 08:24 |
I also thought that without a netmask, bpf would default to classfull addresses, but I never ran into it because I had CIDR subnets everywhere. Or maybe the behavior has changed over time ... OK, the manpage says it all:
So, "net 192.168.1" will also work... My "learn-something-new-item" for today :-) answered 22 May '13, 02:00 SYN-bit ♦♦ |
see also the following similar question, for IPv6.