Примечание
R1 идёт по сетям 10.0.31.0 и 10.0.23.0, а ICMP‑Reply от R2 идёт через 10.0.12.0.
[root@R3 ~]# tcpdump -xx -i eth1
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
[root@R2 ~]# tcpdump -xx -i eth2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), snapshot length 262144 bytes
ping -c3 <dstIP> отправьте три ICMP‑пакета с R1 на R2 в сеть 10.0.23.0/24
[root@R1 ~]# ping -c3 10.0.23.2
PING 10.0.23.2 (10.0.23.2) 56(84) bytes of data.
64 bytes from 10.0.23.2: icmp_seq=1 ttl=64 time=0.647 ms
64 bytes from 10.0.23.2: icmp_seq=2 ttl=64 time=0.600 ms
64 bytes from 10.0.23.2: icmp_seq=3 ttl=64 time=0.593 ms
--- 10.0.23.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2033ms
rtt min/avg/max/mdev = 0.593/0.613/0.647/0.023 ms
[root@R1 ~]#
Примечание
[root@R3 ~]# tcpdump -xx -i eth1
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
15:03:11.208377 IP 10.0.31.1 > 10.0.23.2: ICMP echo request, id 20, seq 1, length 64
0x0000: 0800 2721 3d8f 0800 2718 1fbc 0800 4500
0x0010: 0054 98d3 4000 4001 57d3 0a00 1f01 0a00
0x0020: 1702 0800 4263 0014 0001 ae13 d068 0000
0x0030: 0000 6b38 0d00 0000 0000 1011 1213 1415
0x0040: 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425
0x0050: 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435
0x0060: 3637
15:03:12.216848 IP 10.0.31.1 > 10.0.23.2: ICMP echo request, id 20, seq 2, length 64
0x0000: 0800 2721 3d8f 0800 2718 1fbc 0800 4500
0x0010: 0054 9c52 4000 4001 5454 0a00 1f01 0a00
0x0020: 1702 0800 743f 0014 0002 af13 d068 0000
0x0030: 0000 385b 0d00 0000 0000 1011 1213 1415
0x0040: 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425
0x0050: 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435
0x0060: 3637
15:03:13.240997 IP 10.0.31.1 > 10.0.23.2: ICMP echo request, id 20, seq 3, length 64
0x0000: 0800 2721 3d8f 0800 2718 1fbc 0800 4500
0x0010: 0054 9f28 4000 4001 517e 0a00 1f01 0a00
0x0020: 1702 0800 d0e0 0014 0003 b013 d068 0000
0x0030: 0000 dab8 0d00 0000 0000 1011 1213 1415
0x0040: 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425
0x0050: 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435
0x0060: 3637
[root@R2 ~]# tcpdump -xx -i eth2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), snapshot length 262144 bytes
15:03:11.713981 IP R2 > 10.0.31.1: ICMP echo reply, id 20, seq 1, length 64
0x0000: 0800 2715 a82d 0800 2745 0741 0800 4500
0x0010: 0054 0c14 0000 4001 2493 0a00 1702 0a00
0x0020: 1f01 0000 4a63 0014 0001 ae13 d068 0000
0x0030: 0000 6b38 0d00 0000 0000 1011 1213 1415
0x0040: 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425
0x0050: 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435
0x0060: 3637
15:03:12.722582 IP R2 > 10.0.31.1: ICMP echo reply, id 20, seq 2, length 64
0x0000: 0800 2715 a82d 0800 2745 0741 0800 4500
0x0010: 0054 0eff 0000 4001 21a8 0a00 1702 0a00
0x0020: 1f01 0000 7c3f 0014 0002 af13 d068 0000
0x0030: 0000 385b 0d00 0000 0000 1011 1213 1415
0x0040: 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425
0x0050: 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435
0x0060: 3637
15:03:13.746411 IP `R2` > 10.0.31.1: ICMP echo reply, id 20, seq 3, length 64
0x0000: 0800 2715 a82d 0800 2745 0741 0800 4500
0x0010: 0054 0fb4 0000 4001 20f3 0a00 1702 0a00
0x0020: 1f01 0000 d8e0 0014 0003 b013 d068 0000
0x0030: 0000 dab8 0d00 0000 0000 1011 1213 1415
0x0040: 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425
0x0050: 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435
0x0060: 3637
[root@R1 ~]# sysctl net.ipv4.conf.all.forwarding=1
[root@R1 ~]#
[root@R2 ~]# sysctl net.ipv4.conf.all.forwarding=1
[root@R1 ~]#
[root@R3 ~]# ip route add 10.0.12.0/24 via 10.0.23.2
[root@R3 ~]#
ping -c3 <dstIP> отправьте три ICMP‑пакета с R3 на R1 в сеть 10.0.12.0/24
[root@R3 ~]# ping -c3 10.0.12.1
PING 10.0.12.1 (10.0.12.1) 56(84) bytes of data.
64 bytes from 10.0.12.1: icmp_seq=1 ttl=64 time=0.618 ms
64 bytes from 10.0.12.1: icmp_seq=2 ttl=64 time=1.01 ms
64 bytes from 10.0.12.1: icmp_seq=3 ttl=64 time=0.753 ms
--- 10.0.12.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2039ms
rtt min/avg/max/mdev = 0.618/0.795/1.014/0.164 ms
[root@R3 ~]#