i want to build a filter which filters duplicated frames in a capture i want to filter it bi ip.identification number. for example if i have 5 frames with ip.id = 1000 i would like that after applying the filter only 1 frame will stay thank you asked 24 Jan '11, 07:11 Dima edited 24 Jan '11, 07:14 |
One Answer:
If you want to filter (delete) duplicate frames, the ip.id is not sufficient as the same ip.id can be used for different IP addresses without being a duplicate. You can use editcap to delete duplicate packets (from "editcap -h"):
Hope this helps, Cheers, Sake PS Editcap is a command line tool and part of the Wireshark "suite" answered 24 Jan '11, 07:30 SYN-bit ♦♦ edited 24 Jan '11, 07:31 |
thank you very much it did help me what a pity that i can't use this while live capture but it's enough for now
10x again
At capture time you want to make sure the mirroring configuration just gives you each packet once. You did not mention how you capture the packets, but the most likely source for duplicates is when you capture traffic on a vlan in both directions (as each frame enters the vlan and will also leave the vlan).
If that's the case, limit the capture to RX-only so that you capture only traffic that enters the vlan.
What is the filter to find duplicate "ip id" in this case?
There isn't one.
Packet filters act only on fields within a single packet; there is, unfortunately, no way to say, for example, "match packets where the value of this field is equal to the value of that field in some previous packet".
That's also true of capture filters, and, while we might be able to support packet filters that can match fields in previous packets, by adding new syntax for that and new code for that, the way capture filters work inherently makes them stateless (the BPF engine does not keep state between packets), so neither we nor the libpcap/WinPcap developers can make it filter out duplicate IP IDs.
(And, of course, just because two packets from one IP address to another have the same IP ID, that doesn't mean they're duplicates, and, as Sake noted, that's even more true if the packets didn't all go from host A to host B.)