• 静态路由,PC1与PC2之间的通信使用AR1-AR2-AR3链路。
  • 浮动静态路由,PC1与PC2之间的通信使用主链路AR1-AR2-AR3,备用链路AR1-AR4-AR3。
  • 静态路由负载分担,使用两台路径实现PC1与PC2之间的通信。
  • 默认路由。

静态路由,PC1与PC2之间的通信使用AR1-AR2-AR3链路

AR1 的初始配置

The device is running!<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]interface G
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]ip addr 172.16.10.1 24
Sep 18 2022 13:41:51-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the UP state.
[AR1-GigabitEthernet0/0/0]q
[AR1]interface G
[AR1]interface GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]ip addr 10.10.14.1 24
Sep 18 2022 13:42:25-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the UP state.
[AR1-GigabitEthernet0/0/1]q
[AR1]interface G
[AR1]interface GigabitEthernet 0/0/2
[AR1-GigabitEthernet0/0/2]ip addr 10.10.12.1 24
[AR1-GigabitEthernet0/0/2]
Sep 18 2022 13:42:49-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the UP state.
[AR1-GigabitEthernet0/0/2]q
[AR1]user-inter
[AR1]user-interface cons
[AR1]user-interface console 0
[AR1-ui-console0]idle-timeout 0 0
[AR1-ui-console0]q
[AR1]

AR2 的初始配置

The device is running!<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2
[AR2]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip addr 10.10.12.2 24
Sep 18 2022 13:56:29-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the UP state.
[AR2-GigabitEthernet0/0/1]q
[AR2]int g0/0/2
[AR2-GigabitEthernet0/0/2]ip addr 10.10.23.2 24
Sep 18 2022 13:56:59-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the UP state.
[AR2-GigabitEthernet0/0/2]q
[AR2]int cons
[AR2]user-in
[AR2]user-interface conso
[AR2]user-interface console 0
[AR2-ui-console0]idle-timeout 0 0
[AR2-ui-console0]q
[AR2]

AR3 的初始配置

The device is running!<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR3
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip addr 172.16.30.3 24
Sep 18 2022 13:59:29-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the UP state.
[AR3-GigabitEthernet0/0/0]q
[AR3]int g0/0/1
[AR3-GigabitEthernet0/0/1]ip addr 10.10.34.3 24
Sep 18 2022 14:00:52-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the UP state.
[AR3-GigabitEthernet0/0/1]q
[AR3]int g0/0/2
[AR3-GigabitEthernet0/0/2]ip addr 10.10.23.3 24
Sep 18 2022 14:01:22-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the UP state.
[AR3-GigabitEthernet0/0/2]1^
Error: Unrecognized command found at '^' position.
[AR3-GigabitEthernet0/0/2]q
[AR3]user-inter
[AR3]user-interface consol
[AR3]user-interface console 0
[AR3-ui-console0]idle-timeout 0 0
[AR3-ui-console0]1^
Error: Unrecognized command found at '^' position.
[AR3-ui-console0]q
[AR3]

AR4 的初始配置

The device is running!<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR4
[AR4]int g0/0/1
[AR4-GigabitEthernet0/0/1]ip addr 10.10.14.4 24
Sep 18 2022 14:03:16-08:00 AR4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the UP state.
[AR4-GigabitEthernet0/0/1]q
[AR4]int g0/0/2
[AR4-GigabitEthernet0/0/2]ip addr 10.10.34.4 24
Sep 18 2022 14:03:52-08:00 AR4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the UP state.
[AR4-GigabitEthernet0/0/2]q
[AR4]user-inter
[AR4]user-interface consol
[AR4]user-interface console 0
[AR4-ui-console0]idle-timeout 0 0
[AR4-ui-console0]q
[AR4]

查看接口配置:      display ip interface brief

<AR1>display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 0Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              172.16.10.1/24       up         up
GigabitEthernet0/0/1              10.10.14.1/24        up         up
GigabitEthernet0/0/2              10.10.12.1/24        up         up
NULL0                             unassigned           up         up(s)
<AR1>[AR2]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              unassigned           down       down
GigabitEthernet0/0/1              10.10.12.2/24        up         up
GigabitEthernet0/0/2              10.10.23.2/24        up         up
NULL0                             unassigned           up         up(s)
[AR2][AR3]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 0Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              172.16.30.3/24       up         up
GigabitEthernet0/0/1              10.10.34.3/24        up         up
GigabitEthernet0/0/2              10.10.23.3/24        up         up
NULL0                             unassigned           up         up(s)
[AR3][AR4]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              unassigned           down       down
GigabitEthernet0/0/1              10.10.14.4/24        up         up
GigabitEthernet0/0/2              10.10.34.4/24        up         up
NULL0                             unassigned           up         up(s)
[AR4]

测试直连连通性

<AR1>ping 172.16.10.10PING 172.16.10.10: 56  data bytes, press CTRL_C to breakReply from 172.16.10.10: bytes=56 Sequence=1 ttl=128 time=70 msReply from 172.16.10.10: bytes=56 Sequence=2 ttl=128 time=10 msReply from 172.16.10.10: bytes=56 Sequence=3 ttl=128 time=10 msReply from 172.16.10.10: bytes=56 Sequence=4 ttl=128 time=20 msReply from 172.16.10.10: bytes=56 Sequence=5 ttl=128 time=10 ms--- 172.16.10.10 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/24/70 ms<AR1>ping 10.10.12.2PING 10.10.12.2: 56  data bytes, press CTRL_C to breakReply from 10.10.12.2: bytes=56 Sequence=1 ttl=255 time=70 msReply from 10.10.12.2: bytes=56 Sequence=2 ttl=255 time=20 msReply from 10.10.12.2: bytes=56 Sequence=3 ttl=255 time=10 msReply from 10.10.12.2: bytes=56 Sequence=4 ttl=255 time=10 msReply from 10.10.12.2: bytes=56 Sequence=5 ttl=255 time=10 ms--- 10.10.12.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/24/70 ms<AR1>ping 10.10.14.4PING 10.10.14.4: 56  data bytes, press CTRL_C to breakReply from 10.10.14.4: bytes=56 Sequence=1 ttl=255 time=100 msReply from 10.10.14.4: bytes=56 Sequence=2 ttl=255 time=30 msReply from 10.10.14.4: bytes=56 Sequence=3 ttl=255 time=10 msReply from 10.10.14.4: bytes=56 Sequence=4 ttl=255 time=10 msReply from 10.10.14.4: bytes=56 Sequence=5 ttl=255 time=30 ms--- 10.10.14.4 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/36/100 ms<AR1>[AR2]ping 10.10.12.1PING 10.10.12.1: 56  data bytes, press CTRL_C to breakReply from 10.10.12.1: bytes=56 Sequence=1 ttl=255 time=20 msReply from 10.10.12.1: bytes=56 Sequence=2 ttl=255 time=20 msReply from 10.10.12.1: bytes=56 Sequence=3 ttl=255 time=30 msReply from 10.10.12.1: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.10.12.1: bytes=56 Sequence=5 ttl=255 time=30 ms--- 10.10.12.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/24/30 ms[AR2]ping 10.10.23.3PING 10.10.23.3: 56  data bytes, press CTRL_C to breakReply from 10.10.23.3: bytes=56 Sequence=1 ttl=255 time=70 msReply from 10.10.23.3: bytes=56 Sequence=2 ttl=255 time=20 msReply from 10.10.23.3: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.10.23.3: bytes=56 Sequence=4 ttl=255 time=30 msReply from 10.10.23.3: bytes=56 Sequence=5 ttl=255 time=20 ms--- 10.10.23.3 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/32/70 ms[AR2][AR3]ping 172.16.30.10PING 172.16.30.10: 56  data bytes, press CTRL_C to breakReply from 172.16.30.10: bytes=56 Sequence=1 ttl=128 time=150 msReply from 172.16.30.10: bytes=56 Sequence=2 ttl=128 time=20 msReply from 172.16.30.10: bytes=56 Sequence=3 ttl=128 time=10 msReply from 172.16.30.10: bytes=56 Sequence=4 ttl=128 time=10 msReply from 172.16.30.10: bytes=56 Sequence=5 ttl=128 time=10 ms--- 172.16.30.10 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/40/150 ms[AR3]ping 10.10.34.4PING 10.10.34.4: 56  data bytes, press CTRL_C to breakReply from 10.10.34.4: bytes=56 Sequence=1 ttl=255 time=40 msReply from 10.10.34.4: bytes=56 Sequence=2 ttl=255 time=10 msReply from 10.10.34.4: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.10.34.4: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.10.34.4: bytes=56 Sequence=5 ttl=255 time=20 ms--- 10.10.34.4 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/22/40 ms[AR3]ping 10.10.23.2PING 10.10.23.2: 56  data bytes, press CTRL_C to breakReply from 10.10.23.2: bytes=56 Sequence=1 ttl=255 time=20 msReply from 10.10.23.2: bytes=56 Sequence=2 ttl=255 time=30 msReply from 10.10.23.2: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.10.23.2: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.10.23.2: bytes=56 Sequence=5 ttl=255 time=20 ms--- 10.10.23.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/22/30 ms[AR3][AR4]ping 10.10.14.1PING 10.10.14.1: 56  data bytes, press CTRL_C to breakReply from 10.10.14.1: bytes=56 Sequence=1 ttl=255 time=40 msReply from 10.10.14.1: bytes=56 Sequence=2 ttl=255 time=30 msReply from 10.10.14.1: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.10.14.1: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.10.14.1: bytes=56 Sequence=5 ttl=255 time=30 ms--- 10.10.14.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/28/40 ms[AR4]ping 10.10.12.2PING 10.10.12.2: 56  data bytes, press CTRL_C to breakRequest time outRequest time outRequest time outRequest time outRequest time out--- 10.10.12.2 ping statistics ---5 packet(s) transmitted0 packet(s) received100.00% packet loss[AR4]ping 10.10.34.3PING 10.10.34.3: 56  data bytes, press CTRL_C to breakReply from 10.10.34.3: bytes=56 Sequence=1 ttl=255 time=20 msReply from 10.10.34.3: bytes=56 Sequence=2 ttl=255 time=30 msReply from 10.10.34.3: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.10.34.3: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.10.34.3: bytes=56 Sequence=5 ttl=255 time=20 ms--- 10.10.34.3 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/22/30 ms[AR4]

PC1 ping / tracert  PC2

Welcome to use PC Simulator!PC>ping 172.16.30.10Ping 172.16.30.10: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!--- 172.16.30.10 ping statistics ---5 packet(s) transmitted0 packet(s) received100.00% packet lossPC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1    *  *  *2    *  *  *3    *  *  *4    *  *  *5    *  *  *6    *  *  *7    *  *  *8    *  *  *PC>
[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 13       Routes : 13       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.1      GigabitEthernet
0/0/210.10.12.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1]

AR1 添加 静态路由  ]ip route-static 172.16.30.0 24 10.10.12.2

[AR1]ip route-static 172.16.30.0 24 10.10.12.2
[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.1      GigabitEthernet
0/0/210.10.12.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.0/24  Static  60   0          RD   10.10.12.2      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1]

AR2 添加静态路由      [AR2]ip route-static 172.16.30.0 24 10.10.23.3

[AR2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 10       Routes : 10       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.2      GigabitEthernet
0/0/110.10.12.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.23.0/24  Direct  0    0           D   10.10.23.2      GigabitEthernet
0/0/210.10.23.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR2]ip rout
[AR2]ip route
[AR2]ip route-static 172.16.30.0 24 10.10.23.3
[AR2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 11       Routes : 11       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.2      GigabitEthernet
0/0/110.10.12.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.23.0/24  Direct  0    0           D   10.10.23.2      GigabitEthernet
0/0/210.10.23.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.30.0/24  Static  60   0          RD   10.10.23.3      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR2]

PC1 ping PC2, 对AR3 g0/0/0 抓包可以发现 Echo(ping)Request和Reply

PC1 ping PC2, 对AR3 g0/0/2 抓包可以发现 Echo(ping)Request但没有Reply

AR3 添加静态路由     [AR3]ip route-static 172.16.10.0 24 10.10.23.2

[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 13       Routes : 13       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.23.0/24  Direct  0    0           D   10.10.23.3      GigabitEthernet
0/0/210.10.23.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3]ip route-static 172.16.10.0 24 10.10.23.2
[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.23.0/24  Direct  0    0           D   10.10.23.3      GigabitEthernet
0/0/210.10.23.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.23.2      GigabitEthernet
0/0/2172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3]

AR2 添加静态路由。   [AR2]ip route-static 172.16.10.0 24 10.10.12.1

[AR2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 11       Routes : 11       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.2      GigabitEthernet
0/0/110.10.12.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.23.0/24  Direct  0    0           D   10.10.23.2      GigabitEthernet
0/0/210.10.23.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.30.0/24  Static  60   0          RD   10.10.23.3      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR2]ip route-static 172.16.10.0 24 10.10.12.1
[AR2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 12       Routes : 12       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.2      GigabitEthernet
0/0/110.10.12.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.23.0/24  Direct  0    0           D   10.10.23.2      GigabitEthernet
0/0/210.10.23.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.12.1      GigabitEthernet
0/0/1172.16.30.0/24  Static  60   0          RD   10.10.23.3      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR2]

PC1 ping tracert PC2

PC>ping 172.16.30.10Ping 172.16.30.10: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 172.16.30.10: bytes=32 seq=2 ttl=125 time=31 ms
From 172.16.30.10: bytes=32 seq=3 ttl=125 time=16 ms
From 172.16.30.10: bytes=32 seq=4 ttl=125 time=31 ms
From 172.16.30.10: bytes=32 seq=5 ttl=125 time=16 ms--- 172.16.30.10 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/23/31 msPC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.10.1   <1 ms  16 ms  <1 ms2  10.10.12.2   31 ms  <1 ms  16 ms3  10.10.23.3   15 ms  32 ms  15 ms4  172.16.30.10   16 ms  15 ms  32 msPC>

AR1 浮动路由设置    [AR1]ip route-static 172.16.30.0 24 10.10.14.4 preference 65

[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.1      GigabitEthernet
0/0/210.10.12.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.0/24  Static  60   0          RD   10.10.12.2      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1]ip route-static 172.16.30.0 24 10.10.14.4 preference 65
[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.1      GigabitEthernet
0/0/210.10.12.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.0/24  Static  60   0          RD   10.10.12.2      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1]int g0/0/2
[AR1-GigabitEthernet0/0/2]shutdown
Sep 18 2022 17:33:58-08:00 AR1 %%01IFPDT/4/IF_STATE(l)[3]:Interface GigabitEther
net0/0/2 has turned into DOWN state.
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]
Sep 18 2022 17:33:58-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the DOWN state.
[AR1-GigabitEthernet0/0/2]q
[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 11       Routes : 11       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.0/24  Static  65   0          RD   10.10.14.4      GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1]

R4 配置静态路由

[AR4]ip route-static 172.16.10.0 24 10.10.14.1
[AR4]ip route-static 172.16.30.0 24 10.10.34.3

[AR4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 10       Routes : 10       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.14.0/24  Direct  0    0           D   10.10.14.4      GigabitEthernet
0/0/110.10.14.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.0/24  Direct  0    0           D   10.10.34.4      GigabitEthernet
0/0/210.10.34.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR4]ip route-static 172.16.10.0 24 10.10.14.1
[AR4]ip route-static 172.16.30.0 24 10.10.34.3
[AR4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 12       Routes : 12       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.14.0/24  Direct  0    0           D   10.10.14.4      GigabitEthernet
0/0/110.10.14.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.0/24  Direct  0    0           D   10.10.34.4      GigabitEthernet
0/0/210.10.34.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.14.1      GigabitEthernet
0/0/1172.16.30.0/24  Static  60   0          RD   10.10.34.3      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR4]

R3 配置浮动静态路由

[AR3]ip route-static 172.16.10.0 24 10.10.34.4 preference 65

[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.23.0/24  Direct  0    0           D   10.10.23.3      GigabitEthernet
0/0/210.10.23.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.23.2      GigabitEthernet
0/0/2172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3]ip route-static 172.16.10.0 24 10.10.34.4 preference 65
[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.23.0/24  Direct  0    0           D   10.10.23.3      GigabitEthernet
0/0/210.10.23.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.23.2      GigabitEthernet
0/0/2172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 1        Routes : 2        Configured Routes : 2Static routing table status : <Active>Destinations : 1        Routes : 1Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface172.16.10.0/24  Static  60   0          RD   10.10.23.2      GigabitEthernet
0/0/2Static routing table status : <Inactive>Destinations : 1        Routes : 1Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface172.16.10.0/24  Static  65   0          R    10.10.34.4      GigabitEthernet
0/0/1[AR3]int g0/0/2
[AR3-GigabitEthernet0/0/2]shutdown
Sep 18 2022 18:27:16-08:00 AR3 %%01IFPDT/4/IF_STATE(l)[3]:Interface GigabitEther
net0/0/2 has turned into DOWN state.
[AR3-GigabitEthernet0/0/2]
Sep 18 2022 18:27:16-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the DOWN state.
[AR3-GigabitEthernet0/0/2]q
[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 11       Routes : 11       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  65   0          RD   10.10.34.4      GigabitEthernet
0/0/1172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3]

PC1 ping tracert PC2,浮动路由

PC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.10.1   <1 ms  16 ms  <1 ms2  10.10.12.2   31 ms  <1 ms  16 ms3  10.10.23.3   15 ms  32 ms  15 ms4  172.16.30.10   16 ms  15 ms  32 msPC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.10.1   <1 ms  15 ms  16 ms2  10.10.14.4   16 ms  15 ms  31 ms3  10.10.34.3   16 ms  31 ms  16 ms4    *172.16.30.10   31 ms  16 msPC>ping 172.16.30.10Ping 172.16.30.10: 32 data bytes, Press Ctrl_C to break
From 172.16.30.10: bytes=32 seq=1 ttl=125 time=16 ms
From 172.16.30.10: bytes=32 seq=2 ttl=125 time=31 ms
From 172.16.30.10: bytes=32 seq=3 ttl=125 time=16 ms
From 172.16.30.10: bytes=32 seq=4 ttl=125 time=31 ms
From 172.16.30.10: bytes=32 seq=5 ttl=125 time=16 ms--- 172.16.30.10 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 16/22/31 msPC>

重新打开AR1的G0/0/2接口,查看路由表。

路由表的浮动路由65下去,静态路由60上来

[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 11       Routes : 11       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.0/24  Static  65   0          RD   10.10.14.4      GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1]int g0/0/2
[AR1-GigabitEthernet0/0/2]undo shutdown
[AR1-GigabitEthernet0/0/2]q
[AR1]undo shutdown
Sep 18 2022 18:40:21-08:00 AR1 %%01IFPDT/4/IF_STATE(l)[5]:Interface GigabitEther
net0/0/2 has turned into UP state.
[AR1]undo shutdown
Sep 18 2022 18:40:21-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the UP state.
[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.1      GigabitEthernet
0/0/210.10.12.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.0/24  Static  60   0          RD   10.10.12.2      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1]

AR3  开启G0/0/2接口,查看路由表。

路由表的浮动路由65下去,静态路由60上来

[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 11       Routes : 11       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  65   0          RD   10.10.34.4      GigabitEthernet
0/0/1172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3]int g0/0/2
[AR3-GigabitEthernet0/0/2]undo shutdown
[AR3-GigabitEthernet0/0/2]
Sep 18 2022 18:43:33-08:00 AR3 %%01IFPDT/4/IF_STATE(l)[5]:Interface GigabitEther
net0/0/2 has turned into UP state.
[AR3-GigabitEthernet0/0/2]
Sep 18 2022 18:43:33-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the UP state.
[AR3-GigabitEthernet0/0/2]q
[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 14       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.23.0/24  Direct  0    0           D   10.10.23.3      GigabitEthernet
0/0/210.10.23.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.23.2      GigabitEthernet
0/0/2172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3]

PC1 ping tracert PC2

#  浮动静态路由
PC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.10.1   <1 ms  15 ms  16 ms2  10.10.14.4   16 ms  15 ms  31 ms3  10.10.34.3   16 ms  31 ms  16 ms4    *172.16.30.10   31 ms  16 ms# 静态路由
PC>ping 172.16.30.10Ping 172.16.30.10: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
From 172.16.30.10: bytes=32 seq=4 ttl=125 time=15 ms
From 172.16.30.10: bytes=32 seq=5 ttl=125 time=32 ms--- 172.16.30.10 ping statistics ---5 packet(s) transmitted2 packet(s) received60.00% packet lossround-trip min/avg/max = 0/23/32 msPC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.10.1   <1 ms  15 ms  16 ms2  10.10.12.2   <1 ms  15 ms  32 ms3  10.10.23.3   15 ms  16 ms  16 ms4  172.16.30.10   31 ms  15 ms  16 msPC>

静态路由负载分担

[AR1]undo ip route-static 172.16.30.0 24 10.10.14.4 preference 65
[AR1]ip route-static 172.16.30.0 24 10.10.14.4
[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 15       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.1      GigabitEthernet
0/0/210.10.12.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.0/24  Static  60   0          RD   10.10.12.2      GigabitEthernet
0/0/2Static  60   0          RD   10.10.14.4      GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR1][AR2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 12       Routes : 12       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.2      GigabitEthernet
0/0/110.10.12.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.23.0/24  Direct  0    0           D   10.10.23.2      GigabitEthernet
0/0/210.10.23.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.12.1      GigabitEthernet
0/0/1172.16.30.0/24  Static  60   0          RD   10.10.23.3      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR2][AR3]undo ip route-static 172.16.10.0 24 10.10.34.4 preference 65
[AR3]ip route-static 172.16.10.0 24 10.10.34.4
[AR3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 14       Routes : 15       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.23.0/24  Direct  0    0           D   10.10.23.3      GigabitEthernet
0/0/210.10.23.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.23.2      GigabitEthernet
0/0/2Static  60   0          RD   10.10.34.4      GigabitEthernet
0/0/1172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR3][AR4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 12       Routes : 12       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.14.0/24  Direct  0    0           D   10.10.14.4      GigabitEthernet
0/0/110.10.14.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.0/24  Direct  0    0           D   10.10.34.4      GigabitEthernet
0/0/210.10.34.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Static  60   0          RD   10.10.14.1      GigabitEthernet
0/0/1172.16.30.0/24  Static  60   0          RD   10.10.34.3      GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[AR4]

PC1 tracert PC2,分别关闭R2,R4


PC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.10.1   <1 ms  16 ms  16 ms2    *  *10.10.12.2   15 ms3  10.10.23.3   31 ms  32 ms  31 ms4  172.16.30.10   16 ms  31 ms  15 msPC>tracert 172.16.30.10traceroute to 172.16.30.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.10.1   16 ms  16 ms  <1 ms2    *10.10.14.4   47 ms  <1 ms3    *10.10.34.3   31 ms  15 ms4    *172.16.30.10   16 ms  31 msPC>

书上的结果,PC1去PC2是AR1-AR2-AR3和AR1-AR4-AR3交替进行

AR1 和 AR3 取消静态路由,配置默认路由。

AR1-AR2-AR3

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo ip route-static 172.16.30.0 24
[Huawei]display ip rout
[Huawei]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 13       Routes : 13       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.12.0/24  Direct  0    0           D   10.10.12.1      GigabitEthernet
0/0/210.10.12.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.14.0/24  Direct  0    0           D   10.10.14.1      GigabitEthernet
0/0/110.10.14.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.14.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.10.0/24  Direct  0    0           D   172.16.10.1     GigabitEthernet
0/0/0172.16.10.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.10.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[Huawei]ip route-static 0.0.0.0 0 10.10.12.2
[Huawei]display ip routing-table pr
[Huawei]display ip routing-table protocol s
[Huawei]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 1        Routes : 1        Configured Routes : 1Static routing table status : <Active>Destinations : 1        Routes : 1Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface0.0.0.0/0   Static  60   0          RD   10.10.12.2      GigabitEthernet
0/0/2Static routing table status : <Inactive>Destinations : 0        Routes : 0[Huawei]<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo ip route-sta
[Huawei]undo ip route-static 172.16.10.0 24
[Huawei]displ
[Huawei]display ip r
[Huawei]display ip rd-filter
[Huawei]display ip rout
[Huawei]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 13       Routes : 13       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface10.10.23.0/24  Direct  0    0           D   10.10.23.3      GigabitEthernet
0/0/210.10.23.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/210.10.34.0/24  Direct  0    0           D   10.10.34.3      GigabitEthernet
0/0/110.10.34.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/110.10.34.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0172.16.30.0/24  Direct  0    0           D   172.16.30.3     GigabitEthernet
0/0/0172.16.30.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0172.16.30.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0[Huawei]display ip routing-table pro
[Huawei]display ip routing-table protocol static
[Huawei]ip route-stat
[Huawei]ip route-static 0.0.0.0 0 10.10.23.2
[Huawei]

AR1-AR4-AR3

# AR1
[Huawei]ip route-static 0.0.0.0 0 10.10.14.4
[Huawei]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 1        Routes : 2        Configured Routes : 2Static routing table status : <Active>Destinations : 1        Routes : 2Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface0.0.0.0/0   Static  60   0          RD   10.10.12.2      GigabitEthernet
0/0/2Static  60   0          RD   10.10.14.4      GigabitEthernet
0/0/1Static routing table status : <Inactive>Destinations : 0        Routes : 0[Huawei]# AR3[Huawei]ip route-static 0.0.0.0 0 10.10.34.4
[Huawei]display ip routing-able protocol static^
Error: Unrecognized command found at '^' position.
[Huawei]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 1        Routes : 2        Configured Routes : 2Static routing table status : <Active>Destinations : 1        Routes : 2Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface0.0.0.0/0   Static  60   0          RD   10.10.23.2      GigabitEthernet
0/0/2Static  60   0          RD   10.10.34.4      GigabitEthernet
0/0/1Static routing table status : <Inactive>Destinations : 0        Routes : 0[Huawei]

PC2 tracert PC1


# AR2 AR4 都开着
PC>tracert 172.16.10.10traceroute to 172.16.10.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.30.3   31 ms  <1 ms  16 ms2  10.10.23.2   31 ms  31 ms  16 ms3  10.10.12.1   31 ms  16 ms  31 ms4  172.16.10.10   16 ms  31 ms  16 ms# 关闭AR2PC>tracert 172.16.10.10traceroute to 172.16.10.10, 8 hops max
(ICMP), press Ctrl+C to stop1  172.16.30.3   16 ms  <1 ms  16 ms2  10.10.34.4   15 ms  16 ms  15 ms3  10.10.14.1   16 ms  31 ms  16 ms4    *172.16.10.10   31 ms  31 msPC>

HCIA-Datacom 网络技术实验指南 第2章 构建互联互通的IP网络相关推荐

  1. hcna网络技术学习指南_网络工程与弱电工程师有什么区别?这些你都会吗

    网络技术是弱电中的重要的一部分,很多弱电朋友一直在自己的岗位没有新的突破,根本原因是对网络了解不深,弱电90%以上的项目都离不开网络技术的应用.在我们弱电VIP技术群中,网络技术也是讨论的最多问题之一 ...

  2. 无线传感网络技术实验-实现一种传播协议

    无线传感网络技术实验-实现一种传播协议 题目要求 设计与分析 模拟传播代码 实验结果图 题目要求 在无线多跳自组织网络下,高效地将关键数据从网络一段扩散至全网,广泛用于网络控制.公共数据广播.时间同步 ...

  3. 《云数据中心网络架构与技术》读书笔记 | 第5章 构建数据中心的物理网络(Underlay网络)

    第5章 构建数据中心的物理网络(Underlay网络) 5.1 物理组网和基础网络 包含Fabric.Spine.Leaf.Service Leaf.Server Leaf.Border Leaf角色 ...

  4. 计算机三级考试网络技术怎么复习,2017计算机三级考试的三大复习阶段(网络技术为例)...

    2017计算机三级考试的三大复习阶段(网络技术为例) 2017上半年的计算机等级考试已经落下了帷幕,还没有考或者考试不理想的同学们是否已经准备复习下半年考试了呢?以下是百分网小编搜索整理的关于2017 ...

  5. 《HCNA网络技术学习指南》-命令版

    目录 基础命令 STP协议 VLAN GVRP协议 DHCP协议 NAT网络地址转换 访问控制列表 链路技术 (1)链路聚合 (2)Smart Link (3)Montitor Link 路由协议基础 ...

  6. IP网络技术实验(一)直通网线和交叉网线的制作

    一.目的和要求 (1) 熟悉T568A.T568B标准网线的线序: (2) 掌握网络直通电缆.交叉电缆的制作步骤,为以后构建计算机局域网打下基础: (3) 直通与交叉网线的连通性测试. (4) 描述两 ...

  7. 计算机网络Ipv6知识点总结,重点总结:自考计算机与网络技术基础

    第六章计算机网络协议 计算机网络体系结构定义: 体系结构是一个广义的概念,它包括三类重要的相互有关的结构,即物理结构.逻辑结构和软件结构. (全国01下考过单选第6题) 逻辑结构是指执行各种网络操作任 ...

  8. 运营商IMS网间互联互通组网关键技术研究

     [摘  要]随着近年来4G和5G网络技术的快速发展,传统的互联互通方式已经不能满足未来的业务发展,因此通过IMS网间实现IP方式的互联互通成为了运营商网络演进的必由之路.对IMS网间互联互通中涉及的 ...

  9. 用一个智能魔方,转动IP网络的时代变局

    在欧洲核子研究中心(CERN)下属的欧洲物理实验室的旧办公室,有一间普通的不能再普通的办公室.区别于其他屋子的地方,仅仅是门上挂着一本旧书,上面写着 "暂时离开办公室".然后是一个 ...

最新文章

  1. m1芯片支持php,M1芯片兼容性怎么样 M1芯片软件兼容好吗
  2. mysql编程的二维数组_调出mysql中数据,输出一个二维数组的表格
  3. python定义词典_python – 自定义类是一个字典,但初始化没有字典副本?
  4. 机器人学习--AMCL导航包自己修改源码编译和调用方法
  5. Bootstrap组件_导航
  6. 【转】Android Camera 相机开发详解
  7. How is new Appoinment id generated in my task followup scenario
  8. 上传html 0字节,HTML ajax 上传文件限制文件的类型和文件大小
  9. 小D课堂 - 新版本微服务springcloud+Docker教程_4-02 微服务调用方式之ribbon实战 订单调用商品服务...
  10. 李宏毅机器学习Lesson2——Logistic Regression实现收入预测
  11. Multi-level learning based memetic algorithm for community detection笔记
  12. 【所见即所得】数据分析最有用的25个 Matplotlib图【附代码】
  13. Python数据可视化(微课版)-简介
  14. WeChat 微信公众号开发步骤
  15. 给高科技强国的后来者埋下的痛
  16. PHP和Socket简介
  17. [网络工程师]-路由配置-NAT配置
  18. 计算机语言表示教师节快乐,教师节快乐的祝福语38句
  19. mysql 分钟_MySQL如何获取一个指定时间中的分钟数(MINUTE函数)呢?
  20. FME2012世界之旅——实时博客

热门文章

  1. jq 批量删除 php,PHP基础班初学心得:用JQ实现表单的全选、反选、取消和删除功能...
  2. Windows下,Pytorch使用Imagenet-1K训练ResNet的经验(有代码)
  3. 学生宿舍管理项目开发计划书_1学生信息管理系统项目开发计划书
  4. mssql和mysql的存储过程区别_MySQL和SQL Server存储过程写法上有什么区别?
  5. Redis官网下载步骤(含windows版)
  6. Friends or ‘Enemies?‘
  7. 今年双十一套路太流弊了!
  8. 大淘客CMS添加自定义友链
  9. 计算机网络职称考试试题,职称考试Internet题库9-职称计算机考试网络应用试卷与试题.pdf...
  10. 20.Scala中本地函数与作为语言一等公民的函数详解