tshark
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tshark [2016/09/14 21:14] – [Saving and Reading Network Data Using Files] walkeradmin | tshark [2023/03/09 22:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 90: | Line 90: | ||
</ | </ | ||
\\ | \\ | ||
- | The second-most useful parameter is -r. When followed by a valid filename, it allows you to read and process a previously captured file with network data. | + | The second-most useful parameter is <color purple>-r</ |
+ | \\ | ||
+ | \\ | ||
+ | If you get the following error:< | ||
+ | \\ | ||
+ | Enter: sudo usermod -a -G wireshark pi | ||
\\ | \\ | ||
\\ | \\ | ||
==== Capture Filters ==== | ==== Capture Filters ==== | ||
\\ | \\ | ||
- | Capture filters are filters that are applied during data capturing; therefore, they make tshark discard network traffic that does not match the filter criteria and avoids the creation of huge capture files. This can be done using the -f command-line parameter, followed by a filter in double quotes. | + | Capture filters are filters that are applied during data capturing; therefore, they make tshark discard network traffic that does not match the filter criteria and avoids the creation of huge capture files. This can be done using the <color purple>-f</ |
\\ | \\ | ||
The most important TCP-related Field Names used in capture filters are tcp.port (which is for filtering the source or the destination TCP port), tcp.srcport (which is for checking the TCP source port) and tcp.dstport (which is for checking the destination port). | The most important TCP-related Field Names used in capture filters are tcp.port (which is for filtering the source or the destination TCP port), tcp.srcport (which is for checking the TCP source port) and tcp.dstport (which is for checking the destination port). | ||
Line 105: | Line 110: | ||
\\ | \\ | ||
==== Display Filters ==== | ==== Display Filters ==== | ||
+ | \\ | ||
+ | Display filters are filters that are applied after packet capturing; therefore, they just " | ||
+ | \\ | ||
+ | Display Filters support comparison and logical operators. <color purple> | ||
+ | \\ | ||
+ | When defining rules, remember that the <color purple> | ||
+ | \\ | ||
+ | Also remember that MAC addresses are truly useful when you want to track a given machine on your LAN, because the IP of a machine can change if it uses DHCP, but its MAC address is more difficult to change. \\ | ||
+ | \\ | ||
+ | Display filters are extremely useful tools when used correctly, but you still have to interpret the results, find the problem and think about the possible solutions yourself. It is advisable that you visit the display filters reference site for TCP-related traffic at\\ | ||
+ | http:// | ||
+ | \\ | ||
+ | For the list of all the available field names related to UDP traffic, see \\ | ||
+ | http:// | ||
\\ | \\ | ||
\\ | \\ | ||
- | Display filters are filters that are applied after packet capturing; therefore, they just " | ||
- | |||
- | Display Filters support comparison and logical operators. The http.response.code == 404 && ip.addr == 192.168.10.1 display filter shows the traffic that either comes from the 192.168.10.1 IP address or goes to the 192.168.10.1 IP address that also has the 404 (Not Found) HTTP response code in it. The !bootp && !ip filter excludes BOOTP and IP traffic from the output. The eth.addr == 01: | ||
- | |||
- | When defining rules, remember that the ip.addr != 192.168.1.5 expression does not mean that none of the ip.addr fields can contain the 192.168.1.5 IP address. It means that one of the ip.addr fields should not contain the 192.168.1.5 IP address! Therefore, the other ip.addr field value can be equal to 192.168.1.5! You can think of it as "there exists one ip.addr field that is not 192.168.1.5" | ||
- | |||
- | Also remember that MAC addresses are truly useful when you want to track a given machine on your LAN, because the IP of a machine can change if it uses DHCP, but its MAC address is more difficult to change. | ||
- | |||
- | Display filters are extremely useful tools when used correctly, but you still have to interpret the results, find the problem and think about the possible solutions yourself. It is advisable that you visit the display filters reference site for TCP-related traffic at http:// | ||
- |
tshark.1473884060.txt.gz · Last modified: 2023/03/09 22:35 (external edit)