1. 适用条件
适用于难把tcpdump文件从linux设备中抓下来,可以通过远程获得十六进制报文,直接转为wireshark格式。
tttttcpdumptcpdumptcpdump
2. 简略过程
tcpdump -xx -tt
直接把报文用十六进制打印出来- 将报文导入软件
TextToWiresharkFormat-v2.0.exe
,转为wireshark报文 - 对于看DOCSIS 层的包,减去报头。
editcap -C 44 capture.pcap capture_1.pcap
3. 具体操作
(1) tcpdump -xx -tt
a. 如果是实时抓包,加端口抓,最后加-xx -tt
限定抓取方式。以下的操作会直接把十六进制报文打印出来。
Server#tcpdump -i any udp port 51920 -xx -tt
b. 如果是抓取文件,可以把文件dump出来。
Server# tcpdump -r zlm.out -xx -tt
reading from file zlm.out, link-type LINUX_SLL (Linux cooked)
1521155373.167889 IP module12.58610 > smm.51919: UDP, length 73
0x0000: 0000 0001 0006 0000 ca5a 1c0d 0000 0800