tcpip-icmp

ICMP測試


更新記錄

item note
20150824 第一版

目錄


TCP-IP / ICMP

  • 使用wireshark抓取封包內容

  • 第8個送出ICMP(ping request),第9個接到ICMP(ping reply)

Alt text

  • 細節

Alt text

  • 板端訊息
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  ./tcpdump -i eth0 -nn

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:09:52:77:00:11
inet addr:192.168.1.111 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::209:52ff:fe77:11/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1505 errors:0 dropped:237 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:181598 (177.3 KiB) TX bytes:2552 (2.4 KiB)
Interrupt:56

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2128 (2.0 KiB) TX bytes:2128 (2.0 KiB)

# ping 192.168.1.51
PING 192.168.1.51 (192.168.1.51): 56 data bytes
00:10:12.682608 IP 192.168.1.111 > 192.168.1.51: ICMP echo request, id 56068, seq 0, length 64
00:10:12.683152 IP 192.168.1.51 > 192.168.1.111: ICMP echo reply, id 56068, seq 0, length 64
64 bytes from 192.168.1.51: seq=0 ttl=128 time=0.753 ms
00:10:13.682903 IP 192.168.1.111 > 192.168.1.51: ICMP echo request, id 56068, seq 1, length 64
00:10:13.683484 IP 192.168.1.51 > 192.168.1.111: ICMP echo reply, id 56068, seq 1, length 64
64 bytes from 192.168.1.51: seq=1 ttl=128 time=0.742 ms
00:10:14.683091 IP 192.168.1.111 > 192.168.1.51: ICMP echo request, id 56068, seq 2, length 64
00:10:14.683540 IP 192.168.1.51 > 192.168.1.111: ICMP echo reply, id 56068, seq 2, length 64
64 bytes from 192.168.1.51: seq=2 ttl=128 time=0.590 ms
00:10:15.683265 IP 192.168.1.111 > 192.168.1.51: ICMP echo request, id 56068, seq 3, length 64
00:10:15.683872 IP 192.168.1.51 > 192.168.1.111: ICMP echo reply, id 56068, seq 3, length 64
64 bytes from 192.168.1.51: seq=3 ttl=128 time=0.752 ms

參考來原