FAQ
tcpdump
命令执行很慢 / 报文没显示,但是已抓到 / 报文抓得不全 / …
Linux 网络相关命令,如果执行起来很慢,尝试一下 -n
选项。没了 ip 地址、L4 port 解析成名称,速度杠杠的。
-n Don’t convert addresses (i.e., host addresses, port numbers, etc.) to names.
1 | admin@sonic:~$ sudo tcpdump -i Ethernet52 |
如何看 tag?
tcpdump 带 -e
选项。
1 | -e Print the link-level header on each dump line. This can be used, for example, to print MAC layer addresses for protocols such as Ethernet and IEEE 802.11. |
如何看 raw data?
带 -x
、-xx
、-X
、-XX
1 | -x When parsing and printing, in addition to printing the headers of each packet, print the data of each packet (minus its link level header) in hex. The smaller of the entire packet or |