華為AR2220 配置以太鏈路+以太鏈路的主備介面備份
阿新 • • 發佈:2018-12-27
一、組網需求
1、如圖所示,RouterA通過三個介面與RouterB直連,正常情況下,HostA通過RouterA的GE0/0/0介面與HostB進行資料傳輸。
為了提高HostA與HostB間資料傳輸的可靠性,使用者希望當GE0/0/0接口出現故障時,能夠優先將流量切換到GE0/0/1介面。
2、網路拓撲
3、配置思路
採用如下的思路配置主備介面備份:
配置各介面IP地址及HostA與HostB之間的靜態路由,確保網路層互通。
在RouterA上配置GE0/0/0為主介面,GE0/0/1和GE0/0/2為GE0/0/0的備份介面,且GE0/0/1的優先順序較高,實現主介面故障時,GE0/0/1優先提供備份服務。
配置主介面與備份介面相互切換的延時,避免主備介面頻繁切換而導致網路震盪。
二、操作步驟
1、配置路由器介面IP地址
<Huawei>system-view [Huawei]sysname RouterA [RouterA]interface GigabitEthernet 4/0/0 [RouterA-GigabitEthernet4/0/0]ip address 192.168.1.254 24 [RouterA-GigabitEthernet4/0/0]q [RouterA]interface GigabitEthernet 0/0/0 [RouterA-GigabitEthernet0/0/0]ip address 1.1.1.1 24 [RouterA-GigabitEthernet0/0/0]q [RouterA]interface GigabitEthernet 0/0/1 [RouterA-GigabitEthernet0/0/1]ip address 2.2.2.1 24 [RouterA-GigabitEthernet0/0/1]q [RouterA]interface GigabitEthernet 0/0/2 [RouterA-GigabitEthernet0/0/2]ip address 3.3.3.1 24 [RouterA-GigabitEthernet0/0/2]q <Huawei>system-view [Huawei]sysname RouterB [RouterB]interface GigabitEthernet 4/0/0 [RouterB-GigabitEthernet4/0/0]ip address 192.168.2.254 24 [RouterB-GigabitEthernet4/0/0]q [RouterB]interface GigabitEthernet 0/0/0 [RouterB-GigabitEthernet0/0/0]ip address 1.1.1.2 24 [RouterB-GigabitEthernet0/0/0]q [RouterB]interface GigabitEthernet 0/0/1 [RouterB-GigabitEthernet0/0/1]ip address 2.2.2.2 24 [RouterB-GigabitEthernet0/0/1]q [RouterB]interface GigabitEthernet 0/0/2 [RouterB-GigabitEthernet0/0/2]ip address 3.3.3.2 24 [RouterB-GigabitEthernet0/0/2]q
2、配置靜態路由
[RouterA]ip route-static 192.168.2.0 24 1.1.1.2
[RouterA]ip route-static 192.168.2.0 24 2.2.2.2
[RouterA]ip route-static 192.168.2.0 24 3.3.3.2
[RouterB]ip route-static 192.168.1.0 24 1.1.1.1
[RouterB]ip route-static 192.168.1.0 24 2.2.2.1
[RouterB]ip route-static 192.168.1.0 24 3.3.3.1
3、在RouterA上配置G0/0/0為主介面,G0/0/1和G0/0/2為備份介面,且G0/0/1和G0/0/2的優先順序分別為30和20
[RouterA]interface GigabitEthernet 0/0/0
[RouterA-GigabitEthernet0/0/0]standby interface GigabitEthernet 0/0/1 30
[RouterA-GigabitEthernet0/0/0]standby interface GigabitEthernet 0/0/2 20
[RouterA-GigabitEthernet0/0/0]q
4、在RouterA上配置介面相互切換延時為10秒
[RouterA]interface GigabitEthernet 0/0/0
[RouterA-GigabitEthernet0/0/0]standby timer delay 10 10
[RouterA-GigabitEthernet0/0/0]q
5、檢視配置結果
[RouterA]display standby state
Interface Interfacestate Backupstate Backupflag Pri Loadstate
GigabitEthernet0/0/0 UP MUP MU
GigabitEthernet0/0/1 STANDBY STANDBY BU 30
GigabitEthernet0/0/2 STANDBY STANDBY BU 20
Backup-flag meaning:
M---MAIN B---BACKUP V---MOVED U---USED
D---LOAD P---PULLED
----------------------------------------------------------------------------
Below is track BFD information:
Bfd-Name Bfd-State BackupInterface State
----------------------------------------------------------------------------
Below is track IP route information:
Destination/Mask Route-State BackupInterface State
----------------------------------------------------------------------------
Below is track NQA Information:
Instance Name BackupInterface State
6、手動shutdown RouterA主介面G0/0/0,檢視備份介面狀態
[RouterA]interface GigabitEthernet 0/0/0
[RouterA-GigabitEthernet0/0/0]shutdown
[RouterA-GigabitEthernet0/0/0]q
[RouterA]display standby state
Interface Interfacestate Backupstate Backupflag Pri Loadstate
GigabitEthernet0/0/0 DOWN MDOWN MU
GigabitEthernet0/0/1 UP UP BU 30
GigabitEthernet0/0/2 STANDBY STANDBY BU 20
Backup-flag meaning:
M---MAIN B---BACKUP V---MOVED U---USED
D---LOAD P---PULLED
----------------------------------------------------------------------------
Below is track BFD information:
Bfd-Name Bfd-State BackupInterface State
----------------------------------------------------------------------------
Below is track IP route information:
Destination/Mask Route-State BackupInterface State
----------------------------------------------------------------------------
Below is track NQA Information:
Instance Name BackupInterface State