HA联动路由三层主备直路组网典型配置举例

HA联动路由三层主备直路由操作_java

HA联动路由三层主备直路由操作_前端_02

HA联动路由三层主备直路由操作_数据库_03

DeviceA

[RBM-DeviceA]remote-backup  group

[RBM-DeviceA-remote-backup-group]remote-ip 10.2.1.2

[RBM-DeviceA-remote-backup-group]local-ip 10.2.1.1

[RBM-DeviceA-remote-backup-group]data-channel  interface  GigabitEthernet  1/0/2

[RBM-DeviceA-remote-backup-group]device-role  primary

RBM_P[RBM-DeviceA-remote-backup-group]undo  backup-mode

RBM_P[RBM-DeviceA-remote-backup-group]hot-backup  enable

RBM_P[RBM-DeviceA-remote-backup-group]configuration auto-sync  enable

RBM_P[RBM-DeviceA-remote-backup-group]configuration  sync-check interval 13

RBM_P[RBM-DeviceA-remote-backup-group]adjust-cost  ospf enable  absolute  5000

RBM_P[RBM-DeviceA-remote-backup-group]track 1

RBM_P[RBM-DeviceA-remote-backup-group]track 2

RBM_P[RBM-DeviceA-remote-backup-group]quit

RBM_P[RBM-DeviceA]

RBM_P<RBM-DeviceA>sa force

DeviceB

<RBM-DeviceB>sys

System View: return to User View with Ctrl+Z.

[RBM-DeviceB-remote-backup-group]remote-ip 10.2.1.1

[RBM-DeviceB-remote-backup-group]local-ip 10.2.1.2

[RBM-DeviceB-remote-backup-group]data-channel  interface  GigabitEthernet  1/0/2

[RBM-DeviceB-remote-backup-group]device-role  secondary

RBM_P[RBM-DeviceB-remote-backup-group]%Oct 25 17:15:38:171 2024 RBM-DeviceB RBM/6/RBM_RUNNING_STATUS_CHANGED: -Context=1; RBM running status changed to active.

RBM_P[RBM-DeviceB-remote-backup-group]undo  backup-mode

RBM_P[RBM-DeviceB-remote-backup-group]hot-backup  enable

RBM_P[RBM-DeviceB-remote-backup-group]con

RBM_P[RBM-DeviceB-remote-backup-group]configuration  auto-sync  enable

RBM_P[RBM-DeviceB-remote-backup-group]configuration  sync-check  interval  12

RBM_P[RBM-DeviceB-remote-backup-group]adjust-cost  ospf enable  absolute  5000

RBM_P[RBM-DeviceB-remote-backup-group]track 1

RBM_P[RBM-DeviceB-remote-backup-group]track 2

RBM_P[RBM-DeviceB-remote-backup-group]display  this

#

remote-backup group

 data-channel interface GigabitEthernet1/0/2

 configuration sync-check interval 12

 adjust-cost ospf enable absolute 5000

 track 1

 track 2

 local-ip 10.2.1.2

 remote-ip 10.2.1.1

 device-role secondary

#

Return

测试

HA联动路由三层主备直路由操作_OSPF_04

HA联动路由三层主备直路由操作_前端_05

HA联动路由三层主备直路由操作_java_06

1 配置思路

(1)      确保主备设备的软硬件环境一致

# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。

(2)      配置Router A

# 配置接口GigabitEthernet1/0/7的IPv4地址为2.1.1.2/24。

# 配置接口GigabitEthernet1/0/8的IPv4地址为2.1.10.2/24。

# 配置OSPF路由协议,保证路由可达,具体步骤略。

(3)      配置Router B

# 配置接口GigabitEthernet1/0/7的IPv4地址为10.1.1.2/24。

# 配置接口GigabitEthernet1/0/8的IPv4地址为10.1.10.2/24。

# 配置OSPF路由协议,保证路由可达,具体步骤略。

(4)      配置Device A

a.   配置接口IPv4地址

# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。

<DeviceA> system-view

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] ip address 2.1.1.1 255.255.255.0

[DeviceA-GigabitEthernet1/0/1] quit

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

b.   配置OSPF,保证路由可达

# 配置设备上的OSPF功能,OSPF协议自身的链路开销值建议保持默认配置即可。

[DeviceA] router id 2.1.1.1

[DeviceA] ospf

[DeviceA-ospf-1] area 0

[DeviceA-ospf-1-area-0.0.0.0] network 2.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] quit

[DeviceA-ospf-1] quit

c.   配置高可靠性

# 配置Track项监控接口状态。

[DeviceA] track 1 interface gigabitethernet 1/0/1

[DeviceA-track-1] quit

[DeviceA] track 2 interface gigabitethernet 1/0/2

[DeviceA-track-2] quit

# 使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。

[DeviceA] remote-backup group

[DeviceA-remote-backup-group] remote-ip 10.2.1.2

[DeviceA-remote-backup-group] local-ip 10.2.1.1

[DeviceA-remote-backup-group] data-channel interface gigabitethernet 1/0/3

[DeviceA-remote-backup-group] device-role primary

RBM_P[DeviceA-remote-backup-group] undo backup-mode

RBM_P[DeviceA-remote-backup-group] hot-backup enable

RBM_P[DeviceA-remote-backup-group] configuration auto-sync enable

RBM_P[DeviceA-remote-backup-group] configuration sync-check interval 12

# 开启HA调整备设备上动态路由协议OSPF的开销值功能,并以绝对方式对外通告开销值,绝对值为6000。

RBM_P[DeviceA-remote-backup-group] adjust-cost ospf enable absolute 6000

# 配置HA与序号为1和2的Track项联动。

RBM_P[DeviceA-remote-backup-group] track 1

RBM_P[DeviceA-remote-backup-group] track 2

RBM_P[DeviceA-remote-backup-group] quit

d.   配置安全业务

# 以上有关HA的配置部署完成后,可以配置各种安全业务。对于HA支持配置信息备份的功能模块仅需要在此主管理设备上(Device A)进行配置即可。

(5)      配置Device B

a.   配置接口IPv4地址

# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。

<DeviceB> system-view

[DeviceB] interface gigabitethernet 1/0/1

[DeviceB-GigabitEthernet1/0/1] ip address 2.1.10.1 255.255.255.0

[DeviceB-GigabitEthernet1/0/1] quit

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

b.   配置OSPF,保证路由可达

# 配置设备上的OSPF功能,OSPF协议自身的链路开销值建议保持默认配置即可。

[DeviceB] router id 2.1.10.1

[DeviceB] ospf

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] network 2.1.10.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] network 10.1.10.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

c.   配置高可靠性

# 配置Track项监控接口状态。

[DeviceB] track 1 interface gigabitethernet 1/0/1

[DeviceB-track-1] quit

[DeviceB] track 2 interface gigabitethernet 1/0/2

[DeviceB-track-2] quit

# 使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。

[DeviceB] remote-backup group

[DeviceB-remote-backup-group] remote-ip 10.2.1.1

[DeviceB-remote-backup-group] local-ip 10.2.1.2

[DeviceB-remote-backup-group] data-channel interface gigabitethernet 1/0/3

[DeviceB-remote-backup-group] device-role secondary

RBM_S[DeviceB-remote-backup-group] undo backup-mode

RBM_S[DeviceB-remote-backup-group] hot-backup enable

RBM_S[DeviceB-remote-backup-group] configuration auto-sync enable

RBM_S[DeviceB-remote-backup-group] configuration sync-check interval 12

# 开启HA调整备设备上动态路由协议OSPF的开销值功能,并以绝对方式对外通告开销值,绝对值为6000。

RBM_S[DeviceB-remote-backup-group] adjust-cost ospf enable absolute 6000

# 配置HA与序号为1和2的Track项联动。

RBM_S[DeviceB-remote-backup-group] track 1

RBM_S[DeviceB-remote-backup-group] track 2

RBM_S[DeviceB-remote-backup-group] quit

(6)      配置Host

# 配置Host的默认网关为10.10.10.254