Linux高性能服务器-学习(1)tcpdump抓包
(1)在Linux下打开终端,输入命令:
a123@123:~$ sudo tcpdump -i any -ent '(dst 14.119.104.189 and src 192.168.140.128)' or '(dst 192.168.140.128 and src 14.119.104.189)'
此时终端会等待抓取这种类型的包
(2)打开另外一个终端,输入命令:
123@123:~/桌面$ ping 14.119.104.189
(3)第一个终端会抓取到这种类型的包,如下:
Out 00:0c:29:bc:32:90 ethertype IPv4 (0x0800), length 100: 192.168.140.128 > 14.119.104.189: ICMP echo request, id 4, seq 1, length 64
In 00:50:56:f7:0f:1b ethertype IPv4 (0x0800), length 100: 14.119.104.189 > 192.168.140.128: ICMP echo reply, id 4, seq 1, length 64
Out 00:0c:29:bc:32:90 ethertype IPv4 (0x0800), length 100: 192.168.140.128 > 14.119.104.189: ICMP echo request, id 4, seq 2, length 64
In 00:50:56:f7:0f:1b ethertype IPv4 (0x0800), length 100: 14.119.104.189 > 192.168.140.128: ICMP echo reply, id 4, seq 2, length 64
Out 00:0c:29:bc:32:90 ethertype IPv4 (0x0800), length 100: 192.168.140.128 > 14.119.104.189: ICMP echo request, id 4, seq 3, length 64
In 00:50:56:f7:0f:1b ethertype IPv4 (0x0800), length 100: 14.119.104.189 > 192.168.140.128: ICMP echo reply, id 4, seq 3, length 64

浙公网安备 33010602011771号