tracetoute(1)
code:mermaid
graph LR
subgraph NET0172.28.0.0/24
R1172.28.0.1
M0172.28.0.2
end
subgraph NET1172.28.1.0/24
R2172.28.1.1
M1172.28.1.2
end
subgraph NET_ROUTER172.168.0.0/27
R3172.168.0.1
R4172.168.0.2
end
M1 <-- 172.28.1.0/24 --> R1
M2 <-- 172.28.0.0/24 --> R2
R3 <-- 172.168.0.0/27 --> R4
R1 --- R2
172.28.0.0/24のマシンから、172.28.1.0/24のマシンにtracerouteを投げた
code:sh
079876edf559:~# tcpdump -vv
tcpdump: listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
05:33:58.631694 IP (tos 0x0, ttl 1, id 22421, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33435: bad udp cksum 0x5968 -> 0x94db! UDP, length 18
05:33:58.631716 IP (tos 0xc0, ttl 64, id 34835, offset 0, flags none, proto ICMP (1), length 74)
079876edf559 > app_a.tcpip_labnet_a: ICMP time exceeded in-transit, length 54
IP (tos 0x0, ttl 1, id 22421, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33435: bad udp cksum 0x5968 -> 0x94db! UDP, length 18
05:33:58.632472 IP (tos 0x0, ttl 1, id 22422, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33436: bad udp cksum 0x5968 -> 0x93da! UDP, length 18
05:33:58.632489 IP (tos 0xc0, ttl 64, id 34836, offset 0, flags none, proto ICMP (1), length 74)
079876edf559 > app_a.tcpip_labnet_a: ICMP time exceeded in-transit, length 54
IP (tos 0x0, ttl 1, id 22422, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33436: bad udp cksum 0x5968 -> 0x93da! UDP, length 18
05:33:58.632606 IP (tos 0x0, ttl 1, id 22423, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33437: bad udp cksum 0x5968 -> 0x92d9! UDP, length 18
05:33:58.632614 IP (tos 0xc0, ttl 64, id 34837, offset 0, flags none, proto ICMP (1), length 74)
079876edf559 > app_a.tcpip_labnet_a: ICMP time exceeded in-transit, length 54
IP (tos 0x0, ttl 1, id 22423, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33437: bad udp cksum 0x5968 -> 0x92d9! UDP, length 18
05:33:58.632643 IP (tos 0x0, ttl 2, id 22424, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33438: bad udp cksum 0x5968 -> 0x91d7! UDP, length 18
05:33:58.632673 IP (tos 0xc0, ttl 63, id 26938, offset 0, flags none, proto ICMP (1), length 74)
app_b.tcpip_labnet_b > app_a.tcpip_labnet_a: ICMP app_b.tcpip_labnet_b udp port 33438 unreachable, length 54
IP (tos 0x0, ttl 1, id 22424, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33438: bad udp cksum 0x5968 -> 0x91d7! UDP, length 18
05:33:58.634162 IP (tos 0x0, ttl 2, id 22425, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33439: bad udp cksum 0x5968 -> 0x90d6! UDP, length 18
05:33:58.634192 IP (tos 0xc0, ttl 63, id 26939, offset 0, flags none, proto ICMP (1), length 74)
app_b.tcpip_labnet_b > app_a.tcpip_labnet_a: ICMP app_b.tcpip_labnet_b udp port 33439 unreachable, length 54
IP (tos 0x0, ttl 1, id 22425, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33439: bad udp cksum 0x5968 -> 0x90d6! UDP, length 18
05:33:58.634307 IP (tos 0x0, ttl 2, id 22426, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33440: bad udp cksum 0x5968 -> 0x8fd5! UDP, length 18
05:33:58.634324 IP (tos 0xc0, ttl 63, id 26940, offset 0, flags none, proto ICMP (1), length 74)
app_b.tcpip_labnet_b > app_a.tcpip_labnet_a: ICMP app_b.tcpip_labnet_b udp port 33440 unreachable, length 54
IP (tos 0x0, ttl 1, id 22426, offset 0, flags DF, proto UDP (17), length 46)
app_a.tcpip_labnet_a.36357 > app_b.tcpip_labnet_b.33440: bad udp cksum 0x5968 -> 0x8fd5! UDP, length 18
pingを投げる
TTL
code:sh
b05667d13673:~# ping -t 1 172.28.1.2
PING 172.28.1.2 (172.28.1.2) 56(84) bytes of data.
From 172.28.0.1 icmp_seq=1 Time to live exceeded
From 172.28.0.1 icmp_seq=2 Time to live exceeded
^C
--- 172.28.1.2 ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1018ms
b05667d13673:~# ping -t 2 172.28.1.2
PING 172.28.1.2 (172.28.1.2) 56(84) bytes of data.
64 bytes from 172.28.1.2: icmp_seq=1 ttl=63 time=0.178 ms
64 bytes from 172.28.1.2: icmp_seq=2 ttl=63 time=0.118 ms
^C
--- 172.28.1.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1051ms
rtt min/avg/max/mdev = 0.118/0.148/0.178/0.030 ms