@[toc]
簡單介紹命令
以太網工作在數據鏈路層
數據的三要素:1.語法2.語義3.同步(接口速率)
http://7n4.cn/或https://mac.51240.xom可以查詢MAC地址廠商
display mac-address 查看mac地址表
sysname R1 改名爲R1
dis version 查看系統版本
interface gigabitethernet0/0/1 進入g0/0/1接口
ip- subnet-vlan 查看接口vlan網段信息
speed 10 接口速率配置爲10M
undo negotiation auto 關閉自動協商
dis vlan 查看vlan接口分佈表
int g0/0/0 進入g0/0/0 接口
ip add 192.168.1.1. 24 配置接口ip地址爲192.168.1.1 子網掩碼24位
undo shutdown 啓用
pre 優先級
cost 花銷值
浮動路由
即備份一條優先級比當前路由低的路由
實驗名稱:
實現三臺路由器的loop 接口互聯互通
1.配置參數已設置,接下來就開始配置
2.思路:loop接口的ip地址相當於路由器自身的一個直連網段
配置各個路由器的接口ip就開始配置相應的路由條目
1.1.1.1 去ping 2.2.2.2,有兩條路可走,分別是R1》》R2,和R1》》R3》》R2,可以分別配置,先配置的優先級最高,後配置的最備用,等待優先級高的路由失效後就會觸發優先級低的路由,以免因爲鏈路損壞而影響數據及時傳輸
同理,1.1.1.1ping3.3.3.3 也是同樣的道理
2.2.2.2ping3.3.3.3也是
在這裏詳細解釋1.1.1.1去ping2.2.2.2的過程,剩下的舉一反三即可
R1》》R2
對於1.1.1.1而言,2.2.2.2是R1的非直連網段,所以數據過去的話需要去給R1配置一條2.2.2.0的靜態路由,下一跳爲12.0.0.2;數據回來就是從R2返回到R1,需要給R2配置一條1.1.1.0的靜態路由,下一跳爲12.0.0.1
R1》》R3》》R2
首先,值得注意的是,數據一來一回的優先級必須在同一鏈路上,不可以分開
R1的數據傳到R2,經過R3,需要給R1配置一條2.2.2.0的條目,下一跳爲13.0.0.3,因爲這個條目是第二個配置,所以在12.0.0.0正常作用的情況下,第二個條目不會被觸發,這裏配置這一條目,僅作備用;2.2.2.0也並不是R3的直連網段,所以需要給R3配置一條2.2.2.0的靜態路由,下一跳爲23.0.0.2。數據過去了,也要回來,配置路由的思路跟過去的一致,這裏就不贅述了,開始配置
3.開啓設備,先配置ip
R1
The device is running! '顯示設備已運行'
<Huawei>sys 'systtem-view,進入系統視圖'
Enter system view, return user view with Ctrl+Z. '反饋已進入'
[Huawei]undo info-center enable '關掉信息中心'
Info: Information center is disabled. '反饋已關掉'
[Huawei]int g0/0/0 '進入g0/0/0接口'
[Huawei-GigabitEthernet0/0/0]ip add 12.0.0.1 24 '配置ip地址'
[Huawei-GigabitEthernet0/0/0]undo shutdown '啓用'
Info: Interface GigabitEthernet0/0/0 is not shutdown. '反饋已啓用'
[Huawei-GigabitEthernet0/0/0]int g0/0/1 '進入g0/0/1接口'
[Huawei-GigabitEthernet0/0/1]ip add 13.0.0.1 24 '配置IP地址'
[Huawei-GigabitEthernet0/0/1]undo shutdown '啓用'
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[Huawei-GigabitEthernet0/0/1]q '返回到系統視圖'
[Huawei]int LoopBack 0 '進入Loopback 0 接口'
[Huawei-LoopBack0]ip address 1.1.1.1 24 '配置IP 地址'
[Huawei-LoopBack0]q '返回,不需要手動啓用'
[Huawei]dis ip int brief '查看接口ip信息'
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 8
Interface IP Address/Mask Physical Protocol
Ethernet0/0/0 unassigned down down
Ethernet0/0/1 unassigned down down
GigabitEthernet0/0/0 12.0.0.1/24 up up '已配置,up已啓用'
GigabitEthernet0/0/1 13.0.0.1/24 up up '已配置,up已啓用'
GigabitEthernet0/0/2 unassigned down down
GigabitEthernet0/0/3 unassigned down down
LoopBack0 1.1.1.1/24 up up(s) '已配置,up已啓用'
NULL0 unassigned up up(s)
Serial0/0/0 unassigned down down
Serial0/0/1 unassigned down down
Serial0/0/2 unassigned down down
Serial0/0/3 unassigned down down
R2的ip配置
[Huawei]sysname R2 '更名爲R2'
[R2]
Nov 7 2019 19:37:53-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 1, the ch
ange loop count is 0, and the maximum number of records is 4095.u '沒有及時關掉信息中心,就會出現這個信息'
[R2]undo info-center enable '關掉信息中心'
Info: Information center is disabled. '反饋關掉'
[R2]int g0/0/0 '進入g0/0/0接口'
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24 '配IP地址'
[R2-GigabitEthernet0/0/0]undo shutdown '啓用'
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]int g0/0/2 '進入g0/0/2接口'
[R2-GigabitEthernet0/0/2]ip add 23.0.0.2 24 '陪ip地址'
[R2-GigabitEthernet0/0/2]undo shutdown '啓用'
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R2-GigabitEthernet0/0/2]q '返回上一層'
[R2]int LoopBack 0 '進入loopback接口'
[R2-LoopBack0]ip add 2.2.2.2 24 '配置ip地址'
[R2-LoopBack0]q '返回上一層'
[R2]dis ip int b '查看接口ip信息表'
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 8
Interface IP Address/Mask Physical Protocol
Ethernet0/0/0 unassigned down down
Ethernet0/0/1 unassigned down down
GigabitEthernet0/0/0 12.0.0.2/24 up up '已配置,Up已啓用'
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 23.0.0.2/24 up up '已配置,up已啓用'
GigabitEthernet0/0/3 unassigned down down
LoopBack0 2.2.2.2/24 up up(s) '已配置,up已啓用'
NULL0 unassigned up up(s)
Serial0/0/0 unassigned down down
Serial0/0/1 unassigned down down
Serial0/0/2 unassigned down down
Serial0/0/3 unassigned down down
[R2]
R3的ip 配置
<Huawei>
<Huawei>system-view '進入系統視圖'
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable '關掉信息中心'
Info: Information center is disabled.
[Huawei]sysname R3 '更名爲R3'
[R3]int g0/0/1 '進入g0/0/1接口'
[R3-GigabitEthernet0/0/1]ip add 13.0.0.3 24 '配置ip信息'
[R3-GigabitEthernet0/0/1]undo shutdown '啓用'
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R3-GigabitEthernet0/0/1]int g0/0/2 '進入g0/0/2接口'
[R3-GigabitEthernet0/0/2]ip add 23.0.0.3 24 '配置ip地址'
[R3-GigabitEthernet0/0/2]undo shutdown '啓用'
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R3-GigabitEthernet0/0/2]q '返回上一層'
[R3]int LoopBack 0 '進入loopback 0 接口'
[R3-LoopBack0]ip add 3.3.3.3 24 '配置ip地址'
[R3-LoopBack0]q '返回上一層'
[R3]int LoopBack 1
[R3-LoopBack1]ip add 4.4.4.4 24
[R3-LoopBack1]q
[R3]dis ip interface brief '查看接口ip信息表'
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 8
Interface IP Address/Mask Physical Protocol
Ethernet0/0/0 unassigned down down
Ethernet0/0/1 unassigned down down
GigabitEthernet0/0/0 unassigned down down
GigabitEthernet0/0/1 13.0.0.3/24 up up '已配置,up已開啓'
GigabitEthernet0/0/2 23.0.0.3/24 up up '已配置,up已開啓'
GigabitEthernet0/0/3 unassigned down down
LoopBack0 3.3.3.3/24 up up(s) '已配置,uo已開啓'
LoopBack1 4.4.4.4/24 up up(s) '已配置,up已開啓'
NULL0 unassigned up up(s)
Serial0/0/0 unassigned down down
Serial0/0/1 unassigned down down
Serial0/0/2 unassigned down down
Serial0/0/3 unassigned down down
ip配置完畢,接下來就開始配置路由,先從1.1.1.1去ping 2.2.2.2的思路去配置
R1
<Huawei>system-view '進入系統視圖'
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1 '改名爲R1'
[R1]
Nov 7 2019 19:45:23-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095. '出現信息中心的信息'
Info: Information center is disabled. '關掉信息中心'
[R1]ip route-static 2.2.2.0 24 12.0.0.2 '配置靜態路由,目標網段2.2.2.0,下一跳12.0.0.2'
R2
[R2]ip route-static 1.1.1.0 24 12.0.0.1 '配置靜態路由,目標網段1.1.1.0 下一跳爲12.0.0.1'
R1的1.1.1.1 去ping 2.2.2.2
[R1]ping -a 1.1.1.1 2.2.2.2 '-a指定源ip地址'
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=50 ms '成功'
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 2.2.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/34/50 ms
接下來配置備用路由,即R1》》R3》》R2
R1
[R1]ip route-static 2.2.2.0 24 13.0.0.3 '配置靜態路由'
R3
[R3]ip route-static 2.2.2.0 24 23.0.0.2 '配置靜態路由'
再往回配
R2
[R2]ip route-static 1.1.1.0 24 23.0.0.3
R3
[R3]ip route-static 1.1.1.0 24 13.0.0.1
接下來可以把12.0.0.0/24的鏈路中斷
R1操作方法
[R1]int g0/0/0 '進入對應網段接口'
[R1-GigabitEthernet0/0/0]shutdown '關閉'
[R1-GigabitEthernet0/0/0]q
這個時候再ping一波
[R1]ping -a 1.1.1.1 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=254 time=80 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=254 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=254 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=254 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=254 time=50 ms
--- 2.2.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/62/80 ms
查看一下此時R1的路由表
[R1]dis ip routing-table '查看路由表'
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.0/24 Static 60 0 RD 13.0.0.3 GigabitEthernet '注意這一條'
0/0/1
13.0.0.0/24 Direct 0 0 D 13.0.0.1 GigabitEthernet
0/0/1
13.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
恢復12.0.0.1鏈路,再次查看路由表
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]undo shutdown
[R1-GigabitEthernet0/0/0]q
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.0/24 Static 60 0 RD 12.0.0.2 GigabitEthernet '注意這一條'
0/0/0
Static 60 0 RD 13.0.0.3 GigabitEthernet
0/0/1
12.0.0.0/24 Direct 0 0 D 12.0.0.1 GigabitEthernet
0/0/0
12.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
13.0.0.0/24 Direct 0 0 D 13.0.0.1 GigabitEthernet
0/0/1
13.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
接下來就主要按部就班把其餘的以同樣的形式配置好即可
1.1.1.1 ping 3.3.3.3
R1
[R1]ip route-static 3.3.3.0 24 13.0.0.3
R3
[R3]ip route-static 1.1.1.0 24 13.0.0.1
Error: The route already exists. '顯示之前已被配置過'
備用路由
R1
[R1]ip route-static 3.3.3.0 24 12.0.0.2
R2
[R2]ip route-static 3.3.3.0 24 23.0.0.3
R3
[R3]ip route-static 1.1.1.0 24 23.0.0.2
R2
[R2]ip route-static 1.1.1.0 24 12.0.0.1
Error: The route already exists.
2.2.2.2 ping 3.3.3.3
R2
[R2]ip route-static 3.3.3.0 24 23.0.0.3
Error: The route already exists.
R3
[R3]ip route-static 2.2.2.0 24 23.0.0.2
Error: The route already exists.
再去配置另一條備用路由
R2》》R1》》R3
R2
[R2]ip route-static 3.3.3.0 24 12.0.0.1
R1
[R1]ip route-static 3.3.3.0 24 13.0.0.3
Error: The route already exists.
R3
[R3]ip route-static 2.2.2.0 24 13.0.0.1
R1
[R1]ip route-static 2.2.2.0 24 12.0.0.2
Error: The route already exists.
完畢
接下來1.1.1.1 ping 3.3.3.3
[R1]ping -a 1.1.1.1 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=40 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=50 ms
--- 3.3.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/42/50 ms
2.2.2.2去ping 3.3.3.3
[R2]ping -a 2.2.2.2 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=50 ms
--- 3.3.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/42/50 ms
查看各個路由器的路由表
R1
[R1]dis ip routing-table '查看路由表'
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.0/24 Static 60 0 RD 12.0.0.2 GigabitEthernet
0/0/0
Static 60 0 RD 13.0.0.3 GigabitEthernet '備用路由'
0/0/1
3.3.3.0/24 Static 60 0 RD 13.0.0.3 GigabitEthernet
0/0/1
Static 60 0 RD 12.0.0.2 GigabitEthernet '備用路由'
0/0/0
12.0.0.0/24 Direct 0 0 D 12.0.0.1 GigabitEthernet
0/0/0
12.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
13.0.0.0/24 Direct 0 0 D 13.0.0.1 GigabitEthernet
0/0/1
13.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
R2
[R2]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Static 60 0 RD 12.0.0.1 GigabitEthernet
0/0/0
Static 60 0 RD 23.0.0.3 GigabitEthernet '備用路由'
0/0/2
2.2.2.0/24 Direct 0 0 D 2.2.2.2 LoopBack0
2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
3.3.3.0/24 Static 60 0 RD 23.0.0.3 GigabitEthernet
0/0/2
Static 60 0 RD 12.0.0.1 GigabitEthernet '備用路由'
0/0/0
12.0.0.0/24 Direct 0 0 D 12.0.0.2 GigabitEthernet
0/0/0
12.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
23.0.0.0/24 Direct 0 0 D 23.0.0.2 GigabitEthernet
0/0/2
23.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
R3
[R3]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Static 60 0 RD 13.0.0.1 GigabitEthernet
0/0/1
Static 60 0 RD 23.0.0.2 GigabitEthernet '備用路由'
0/0/2
2.2.2.0/24 Static 60 0 RD 23.0.0.2 GigabitEthernet
0/0/2
Static 60 0 RD 13.0.0.1 GigabitEthernet '備用路由'
0/0/1
3.3.3.0/24 Direct 0 0 D 3.3.3.3 LoopBack0
3.3.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0
4.4.4.0/24 Direct 0 0 D 4.4.4.4 LoopBack1
4.4.4.4/32 Direct 0 0 D 127.0.0.1 LoopBack1
13.0.0.0/24 Direct 0 0 D 13.0.0.3 GigabitEthernet
0/0/1
13.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.0.0.0/24 Direct 0 0 D 23.0.0.3 GigabitEthernet
0/0/2
23.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
```shell
可以發現各少了一個網段,但是並不影響loop間的互聯互通
可以斷掉一條鏈路,去測試備用鏈路
斷掉R1的g0/0/1
```shell
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]shutdown
再次ping一波
[R1]ping -a 1.1.1.1 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=254 time=80 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=254 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=254 time=80 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=254 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=254 time=60 ms
--- 2.2.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/68/80 ms
[R1]ping -a 1.1.1.1 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=10 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 3.3.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/36/50 ms
[R2]ping -a 2.2.2.2 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=50 ms
--- 3.3.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/34/50 ms
並不影響
再次查看路由表
R1
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.0/24 Static 60 0 RD 13.0.0.3 GigabitEthernet '備用路由'
0/0/1
3.3.3.0/24 Static 60 0 RD 13.0.0.3 GigabitEthernet
0/0/1
13.0.0.0/24 Direct 0 0 D 13.0.0.1 GigabitEthernet
0/0/1
13.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
R2
[R2]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Static 60 0 RD 23.0.0.3 GigabitEthernet '備用路由'
0/0/2
2.2.2.0/24 Direct 0 0 D 2.2.2.2 LoopBack0
2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
3.3.3.0/24 Static 60 0 RD 23.0.0.3 GigabitEthernet
0/0/2
23.0.0.0/24 Direct 0 0 D 23.0.0.2 GigabitEthernet
0/0/2
23.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
R3
[R3]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Static 60 0 RD 13.0.0.1 GigabitEthernet
0/0/1
Static 60 0 RD 23.0.0.2 GigabitEthernet
0/0/2
2.2.2.0/24 Static 60 0 RD 23.0.0.2 GigabitEthernet
0/0/2
Static 60 0 RD 13.0.0.1 GigabitEthernet
0/0/1
3.3.3.0/24 Direct 0 0 D 3.3.3.3 LoopBack0
3.3.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0
4.4.4.0/24 Direct 0 0 D 4.4.4.4 LoopBack1
4.4.4.4/32 Direct 0 0 D 127.0.0.1 LoopBack1
13.0.0.0/24 Direct 0 0 D 13.0.0.3 GigabitEthernet
0/0/1
13.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.0.0.0/24 Direct 0 0 D 23.0.0.3 GigabitEthernet
0/0/2
23.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
跟12.0.0.0相關的都改用了備用鏈路,再次印證了之前說的一個原理