ospf anycast ip

mpls1网卡

15: lo2: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 62:0c:90:5d:08:bd brd ff:ff:ff:ff:ff:ff
    inet 5.5.5.5/32 scope global lo2
       valid_lft forever preferred_lft forever
root@mpls1:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:e5:30:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.199/24 brd 192.168.122.255 scope global enp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fee5:3019/64 scope link 
       valid_lft forever preferred_lft forever
3: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:d9:52:82 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.3/24 scope global enp7s0
       valid_lft forever preferred_lft forever
4: lo1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 5a:0a:49:19:5c:d1 brd ff:ff:ff:ff:ff:ff
    inet 3.3.3.3/32 scope global lo1
       valid_lft forever preferred_lft forever

 

root@mpls1:~# vtysh

Hello, this is FRRouting (version 7.3.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

mpls1# sh run
Building configuration...

Current configuration:
!
frr version 7.3.1
frr defaults traditional
hostname mpls1
log syslog informational
service integrated-vtysh-config
!
interface enp1s0
 shutdown
!
router ospf
 ospf router-id 192.168.122.198
 redistribute connected
 redistribute static
 network 3.3.3.3/32 area 0
 network 5.5.5.5/32 area 0
 network 192.168.1.0/24 area 0
!
line vty
!
end

 



mpls2网络

root@mpls2:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 52:54:00:73:55:cd brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.164/24 brd 192.168.122.255 scope global enp1s0
       valid_lft forever preferred_lft forever
3: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:ea:64:6e brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.4/24 scope global enp5s0
       valid_lft forever preferred_lft forever
4: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:d7:a1:de brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.4/24 scope global enp6s0
       valid_lft forever preferred_lft forever
5: lo1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether ae:16:70:de:24:3f brd ff:ff:ff:ff:ff:ff
    inet 4.4.4.4/32 scope global lo1
       valid_lft forever preferred_lft forever
    inet6 fe80::ac16:70ff:fede:243f/64 scope link 
       valid_lft forever preferred_lft forever

mpls3网络

root@mpls3:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 52:54:00:5a:42:f2 brd ff:ff:ff:ff:ff:ff
3: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:98:81:e8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.5/24 scope global enp7s0
       valid_lft forever preferred_lft forever
4: lo1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether c6:ae:c5:de:5c:f1 brd ff:ff:ff:ff:ff:ff
    inet 5.5.5.5/32 scope global lo1
       valid_lft forever preferred_lft forever
 
 
mpls3# sh run
Building configuration...

Current configuration:
!
frr version 7.3.1
frr defaults traditional
hostname mpls3
log file /var/log/frr/ospfd.log
log syslog informational
service integrated-vtysh-config
!
debug ospf event
debug ospf packet all
!
interface enp1s0
 shutdown
!
router ospf
 ospf router-id 192.168.122.35
 redistribute connected
 redistribute static
 network 5.5.5.5/32 area 0
 network 192.168.2.0/24 area 0
!
line vty
!
end
mpls3#

 




mpls2
mpls2# conf t
mpls2(config)# int enp5s0
mpls2(config-if)# ip ospf cost 1
mpls2(config-if)# quit
mpls2(config)# int enp6s0
mpls2(config-if)# ip ospf cost 1
mpls2(config-if)# do wr
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Integrated configuration saved to /etc/frr/frr.conf
[OK]
mpls2(config-if)# end
mpls2# sh run
Building configuration...

Current configuration:
!
frr version 7.3.1
frr defaults traditional
hostname mpls2
log file /var/log/frr/ospfd.log
log syslog informational
service integrated-vtysh-config
!
debug ospf event
debug ospf packet all
!
interface enp1s0
 shutdown
!
interface enp5s0
 ip ospf cost 1
!
interface enp6s0
 ip ospf cost 1
!
router ospf
 ospf router-id 192.168.122.164
 redistribute connected
 redistribute static
 network 4.4.4.4/32 area 0
 network 192.168.1.0/24 area 0
 network 192.168.2.0/24 area 0
!
line vty
!
end
 
mpls2# ping 5.5.5.5
PING 5.5.5.5 (5.5.5.5) 56(84) bytes of data.
64 bytes from 5.5.5.5: icmp_seq=1 ttl=64 time=0.146 ms
64 bytes from 5.5.5.5: icmp_seq=2 ttl=64 time=0.113 ms
64 bytes from 5.5.5.5: icmp_seq=3 ttl=64 time=0.109 ms
64 bytes from 5.5.5.5: icmp_seq=4 ttl=64 time=0.112 ms
^C
--- 5.5.5.5 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3075ms
rtt min/avg/max/mdev = 0.109/0.120/0.146/0.015 ms
mpls2# 

 

 

root@mpls1:~# tcpdump -i enp7s0 icmp -env
tcpdump: listening on enp7s0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:05:23.712528 52:54:00:d7:a1:de > 52:54:00:d9:52:82, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 64989, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.1.4 > 5.5.5.5: ICMP echo request, id 16411, seq 1, length 64
19:05:23.712558 52:54:00:d9:52:82 > 52:54:00:d7:a1:de, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 37469, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 192.168.1.4: ICMP echo reply, id 16411, seq 1, length 64
19:05:24.740246 52:54:00:d7:a1:de > 52:54:00:d9:52:82, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 65131, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.1.4 > 5.5.5.5: ICMP echo request, id 16411, seq 2, length 64
19:05:24.740268 52:54:00:d9:52:82 > 52:54:00:d7:a1:de, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 37685, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 192.168.1.4: ICMP echo reply, id 16411, seq 2, length 64
19:05:25.764241 52:54:00:d7:a1:de > 52:54:00:d9:52:82, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 65331, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.1.4 > 5.5.5.5: ICMP echo request, id 16411, seq 3, length 64
19:05:25.764263 52:54:00:d9:52:82 > 52:54:00:d7:a1:de, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 37931, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 192.168.1.4: ICMP echo reply, id 16411, seq 3, length 64
19:05:26.788248 52:54:00:d7:a1:de > 52:54:00:d9:52:82, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 65381, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.1.4 > 5.5.5.5: ICMP echo request, id 16411, seq 4, length 64
19:05:26.788269 52:54:00:d9:52:82 > 52:54:00:d7:a1:de, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 38182, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 192.168.1.4: ICMP echo reply, id 16411, seq 4, length 6
Last login: Thu Aug  6 17:23:41 2020 from 192.168.2.254
root@mpls3:~# tcpdump -i enp7s0 icmp -env             ---------------抓不到报文
tcpdump: listening on enp7s0, link-type EN10MB (Ethernet), capture size 262144 bytes

 

mpls2# conf t
mpls2(config)# int enp6s0
mpls2(config-if)# ip ospf cost 5
mpls2(config-if)# do wr
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Integrated configuration saved to /etc/frr/frr.conf
[OK]
mpls2(config-if)# end
mpls2# sh run
Building configuration...

Current configuration:
!
frr version 7.3.1
frr defaults traditional
hostname mpls2
log file /var/log/frr/ospfd.log
log syslog informational
service integrated-vtysh-config
!
debug ospf event
debug ospf packet all
!
interface enp1s0
 shutdown
!
interface enp5s0
 ip ospf cost 1
!
interface enp6s0
 ip ospf cost 5
!
router ospf
 ospf router-id 192.168.122.164
 redistribute connected
 redistribute static
 network 4.4.4.4/32 area 0
 network 192.168.1.0/24 area 0
 network 192.168.2.0/24 area 0
!
line vty
!
end
mpls2# 

 

mpls2# ping 5.5.5.5
PING 5.5.5.5 (5.5.5.5) 56(84) bytes of data.
64 bytes from 5.5.5.5: icmp_seq=1 ttl=64 time=0.118 ms
64 bytes from 5.5.5.5: icmp_seq=2 ttl=64 time=0.121 ms
64 bytes from 5.5.5.5: icmp_seq=3 ttl=64 time=0.117 ms
64 bytes from 5.5.5.5: icmp_seq=4 ttl=64 time=0.110 ms
64 bytes from 5.5.5.5: icmp_seq=5 ttl=64 time=0.111 ms
64 bytes from 5.5.5.5: icmp_seq=6 ttl=64 time=0.103 ms
64 bytes from 5.5.5.5: icmp_seq=7 ttl=64 time=0.107 ms
64 bytes from 5.5.5.5: icmp_seq=8 ttl=64 time=0.107 ms
64 bytes from 5.5.5.5: icmp_seq=9 ttl=64 time=0.122 ms
64 bytes from 5.5.5.5: icmp_seq=10 ttl=64 time=0.113 ms
64 bytes from 5.5.5.5: icmp_seq=11 ttl=64 time=0.095 ms
64 bytes from 5.5.5.5: icmp_seq=12 ttl=64 time=0.099 ms
64 bytes from 5.5.5.5: icmp_seq=13 ttl=64 time=0.095 ms
64 bytes from 5.5.5.5: icmp_seq=14 ttl=64 time=0.098 ms
64 bytes from 5.5.5.5: icmp_seq=15 ttl=64 time=0.097 ms
64 bytes from 5.5.5.5: icmp_seq=16 ttl=64 time=0.100 ms
64 bytes from 5.5.5.5: icmp_seq=17 ttl=64 time=0.096 ms
64 bytes from 5.5.5.5: icmp_seq=18 ttl=64 time=0.097 ms
64 bytes from 5.5.5.5: icmp_seq=19 ttl=64 time=0.094 ms
64 bytes from 5.5.5.5: icmp_seq=20 ttl=64 time=0.086 ms
64 bytes from 5.5.5.5: icmp_seq=21 ttl=64 time=0.099 ms
64 bytes from 5.5.5.5: icmp_seq=22 ttl=64 time=0.095 ms
64 bytes from 5.5.5.5: icmp_seq=23 ttl=64 time=0.090 ms
64 bytes from 5.5.5.5: icmp_seq=24 ttl=64 time=0.089 ms
64 bytes from 5.5.5.5: icmp_seq=25 ttl=64 time=0.103 ms
64 bytes from 5.5.5.5: icmp_seq=26 ttl=64 time=0.115 ms
64 bytes from 5.5.5.5: icmp_seq=27 ttl=64 time=0.120 ms
64 bytes from 5.5.5.5: icmp_seq=28 ttl=64 time=0.125 ms
64 bytes from 5.5.5.5: icmp_seq=29 ttl=64 time=0.124 ms
64 bytes from 5.5.5.5: icmp_seq=30 ttl=64 time=0.106 ms

 

root@mpls3:~# tcpdump -i enp7s0 icmp -env
tcpdump: listening on enp7s0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:08:21.433039 52:54:00:ea:64:6e > 52:54:00:98:81:e8, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 35632, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.2.4 > 5.5.5.5: ICMP echo request, id 16415, seq 27, length 64
19:08:21.433065 52:54:00:98:81:e8 > 52:54:00:ea:64:6e, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 61723, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 192.168.2.4: ICMP echo reply, id 16415, seq 27, length 64
19:08:22.457043 52:54:00:ea:64:6e > 52:54:00:98:81:e8, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 35717, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.2.4 > 5.5.5.5: ICMP echo request, id 16415, seq 28, length 64
19:08:22.457062 52:54:00:98:81:e8 > 52:54:00:ea:64:6e, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 61786, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 192.168.2.4: ICMP echo reply, id 16415, seq 28, length 64
19:08:23.481039 52:54:00:ea:64:6e > 52:54:00:98:81:e8, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 35788, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.2.4 > 5.5.5.5: ICMP echo request, id 16415, seq 29, length 64
19:08:23.481057 52:54:00:98:81:e8 > 52:54:00:ea:64:6e, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 61926, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 192.168.2.4: ICMP echo reply, id 16415, seq 29, length 64
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel
root@mpls3:~# 

 

root@mpls1:~# tcpdump -i enp7s0 icmp -env -----------抓不到
tcpdump: listening on enp7s0, link-type EN10MB (Ethernet), capture size 262144 bytes

 

 

mpls2#  sh ip ospf route
============ OSPF network routing table ============
N    3.3.3.3/32            [15] area: 0.0.0.0
                           via 192.168.1.3, enp6s0
N    4.4.4.4/32            [10] area: 0.0.0.0
                           directly attached to lo1
N    5.5.5.5/32            [15] area: 0.0.0.0
                           via 192.168.1.3, enp6s0
N    192.168.1.0/24        [5] area: 0.0.0.0
                           directly attached to enp6s0
N    192.168.2.0/24        [6] area: 0.0.0.0
                           directly attached to enp5s0

============ OSPF router routing table =============
R    192.168.122.35        [6] area: 0.0.0.0, ASBR
                           via 192.168.2.5, enp5s0
R    192.168.122.198       [5] area: 0.0.0.0, ASBR
                           via 192.168.1.3, enp6s0

============ OSPF external routing table ===========


mpls2# sh ip a
% Ambiguous command: sh ip a
mpls2# sh ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

O>* 3.3.3.3/32 [110/15] via 192.168.1.3, enp6s0, 00:11:29
O   4.4.4.4/32 [110/10] via 0.0.0.0, lo1 onlink, 2d01h11m
C>* 4.4.4.4/32 is directly connected, lo1, 2d01h11m
O>* 5.5.5.5/32 [110/15] via 192.168.1.3, enp6s0, 00:05:38
O   192.168.1.0/24 [110/5] is directly connected, enp6s0, 00:11:29
C>* 192.168.1.0/24 is directly connected, enp6s0, 2d01h11m
O   192.168.2.0/24 [110/6] is directly connected, enp5s0, 00:05:38
C>* 192.168.2.0/24 is directly connected, enp5s0, 2d01h11m
mpls2#
mpls1# sh ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

O   3.3.3.3/32 [110/10] via 0.0.0.0, lo1 onlink, 2d00h21m
C>* 3.3.3.3/32 is directly connected, lo1, 2d00h21m
O>* 4.4.4.4/32 [110/11] via 192.168.1.4, enp7s0, 2d00h12m
O   5.5.5.5/32 [110/10] via 0.0.0.0, lo2 onlink, 01:49:06
C>* 5.5.5.5/32 is directly connected, lo2, 02:02:46
O   192.168.1.0/24 [110/1] is directly connected, enp7s0, 2d00h12m
C>* 192.168.1.0/24 is directly connected, enp7s0, 2d00h21m
O>* 192.168.2.0/24 [110/7] via 192.168.1.4, enp7s0, 00:06:22
mpls1# 
mpls3# sh ip ospf route
============ OSPF network routing table ============
N    3.3.3.3/32            [16] area: 0.0.0.0
                           via 192.168.2.4, enp7s0
N    4.4.4.4/32            [11] area: 0.0.0.0
                           via 192.168.2.4, enp7s0
N    5.5.5.5/32            [10] area: 0.0.0.0
                           directly attached to lo1
N    192.168.1.0/24        [6] area: 0.0.0.0
                           via 192.168.2.4, enp7s0
N    192.168.2.0/24        [1] area: 0.0.0.0
                           directly attached to enp7s0

============ OSPF router routing table =============
R    192.168.122.164       [1] area: 0.0.0.0, ASBR
                           via 192.168.2.4, enp7s0
R    192.168.122.198       [6] area: 0.0.0.0, ASBR
                           via 192.168.2.4, enp7s0

============ OSPF external routing table ===========


mpls3# sh ip  route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

K * 0.0.0.0/0 [0/100] via 192.168.122.1, enp1s0 inactive, src 192.168.122.35, 01:15:11
O>* 3.3.3.3/32 [110/16] via 192.168.2.4, enp7s0, 00:13:12
O>* 4.4.4.4/32 [110/11] via 192.168.2.4, enp7s0, 1d23h38m
O   5.5.5.5/32 [110/10] via 0.0.0.0, lo1 onlink, 2d00h21m
C>* 5.5.5.5/32 is directly connected, lo1, 2d00h21m
O>* 192.168.1.0/24 [110/6] via 192.168.2.4, enp7s0, 00:13:12
O   192.168.2.0/24 [110/1] is directly connected, enp7s0, 2d00h21m
C>* 192.168.2.0/24 is directly connected, enp7s0, 2d00h21m
mpls3# 

把mpls2,两个端口的 cost改成一样

 

mpls2# conf t
mpls2(config)# int enp6s0
mpls2(config-if)# ip ospft cost 1
% Unknown command: ip ospft cost 1
mpls2(config-if)# ip ospf cost 1
mpls2(config-if)# quit
mpls2(config)# int enp5s0
mpls2(config-if)# ip ospft cost 1
% Unknown command: ip ospft cost 1
mpls2(config-if)# ip ospf cost 1
mpls2(config-if)# end
mpls2# wr
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Integrated configuration saved to /etc/frr/frr.conf
[OK]
mpls2# sh ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

O>* 3.3.3.3/32 [110/11] via 192.168.1.3, enp6s0, 00:00:56
O   4.4.4.4/32 [110/10] via 0.0.0.0, lo1 onlink, 2d01h15m
C>* 4.4.4.4/32 is directly connected, lo1, 2d01h15m
O>* 5.5.5.5/32 [110/11] via 192.168.1.3, enp6s0, 00:00:36
  *                     via 192.168.2.5, enp5s0, 00:00:36
O   192.168.1.0/24 [110/1] is directly connected, enp6s0, 00:00:56
C>* 192.168.1.0/24 is directly connected, enp6s0, 2d01h15m
O   192.168.2.0/24 [110/1] is directly connected, enp5s0, 00:00:36
C>* 192.168.2.0/24 is directly connected, enp5s0, 2d01h15m
mpls2# 

 

root@mpls2:~# ping 5.5.5.5 -I 4.4.4.4
PING 5.5.5.5 (5.5.5.5) from 4.4.4.4 : 56(84) bytes of data.
64 bytes from 5.5.5.5: icmp_seq=1 ttl=64 time=0.153 ms
64 bytes from 5.5.5.5: icmp_seq=2 ttl=64 time=0.124 ms
64 bytes from 5.5.5.5: icmp_seq=3 ttl=64 time=0.120 ms
64 bytes from 5.5.5.5: icmp_seq=4 ttl=64 time=0.120 ms
64 bytes from 5.5.5.5: icmp_seq=5 ttl=64 time=0.127 ms
^C
--- 5.5.5.5 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4102ms
rtt min/avg/max/mdev = 0.120/0.128/0.153/0.018 ms
root@mpls2:~# 

 

root@mpls1:~# tcpdump -i enp7s0 icmp -env
tcpdump: listening on enp7s0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:25:28.850588 52:54:00:d7:a1:de > 52:54:00:d9:52:82, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 7350, offset 0, flags [DF], proto ICMP (1), length 84)
    4.4.4.4 > 5.5.5.5: ICMP echo request, id 16437, seq 1, length 64
19:25:28.850619 52:54:00:d9:52:82 > 52:54:00:d7:a1:de, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 31686, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 4.4.4.4: ICMP echo reply, id 16437, seq 1, length 64
19:25:29.862278 52:54:00:d7:a1:de > 52:54:00:d9:52:82, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 7532, offset 0, flags [DF], proto ICMP (1), length 84)
    4.4.4.4 > 5.5.5.5: ICMP echo request, id 16437, seq 2, length 64
19:25:29.862297 52:54:00:d9:52:82 > 52:54:00:d7:a1:de, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 31818, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 4.4.4.4: ICMP echo reply, id 16437, seq 2, length 64
19:25:30.886288 52:54:00:d7:a1:de > 52:54:00:d9:52:82, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 7613, offset 0, flags [DF], proto ICMP (1), length 84)
    4.4.4.4 > 5.5.5.5: ICMP echo request, id 16437, seq 3, length 64
19:25:30.886306 52:54:00:d9:52:82 > 52:54:00:d7:a1:de, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 31889, offset 0, flags [none], proto ICMP (1), length 84)
    5.5.5.5 > 4.4.4.4: ICMP echo reply, id 16437, seq 3, length 64

 

上一篇:【华为云技术分享】物体检测yolo3算法 学习笔记2


下一篇:52学习上线了