三根外网如何做RBM?
联通和电信1做出链路负载均衡根据运营商选路,电信2只做NAT SERVER,防火墙上联互联网交换机,防火墙口为三层口,交换机为防火墙接口做ACCESS,请问这种组网防火墙如何配置RBM能实现吗?
(0)
需要前置交换机,RBM是HA的方案,多条链路你需要配置负载
https://www.h3c.com/cn/d_202206/1628473_30005_0.htm#_Toc106722949
参考这个
(0)
互联网交换机就是前置交换机,请问这种组网可以实现吗?
如图1-26所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
同时需要在Device上配置动态NAT功能保证内网用户可以访问Internet,该公司拥有2.1.1.1到2.1.1.10十个外网IPv4地址。
图1-26 HA联动VRRP双主模式中接口NAT功能组网图
(1) 配置双主模式的HA组网环境
# 将Device A和Device B组建成双主模式的HA环境,其具体配置步骤请参见“1.22.2 HA联动VRRP三层双主组网典型配置举例”中的相关内容,本举例不再赘述。
(2) 配置动态NAT
在此配置举例中,仅需要在主管理设备Device A上配置NAT的相关配置,Device A上的NAT配置会自动同步到从管理设备Device B。
# 配置NAT地址组1,其地址成员范围为2.1.1.5到2.1.1.7,并与VRRP备份组1绑定。
RBM_P<DeviceA> system-view
RBM_P[DeviceA] nat address-group 1
RBM_P[DeviceA-address-group-1] address 2.1.1.5 2.1.1.7
RBM_P[DeviceA-address-group-1] vrrp vrid 1
RBM_P[DeviceA-address-group-1] quit
# 配置NAT地址组2,其地址成员范围为2.1.1.8到2.1.1.10,并与VRRP备份组2绑定。
RBM_P[DeviceA] nat address-group 2
RBM_P[DeviceA-address-group-2] address 2.1.1.8 2.1.1.10
RBM_P[DeviceA-address-group-2] vrrp vrid 2
RBM_P[DeviceA-address-group-2] quit
# 配置ACL 3000,仅允许10.1.1.1/25网段的报文通过;配置ACL 3001,仅允许10.1.1.129/25网段的报文通过。
RBM_P[DeviceA] acl advanced 3000
RBM_P[DeviceA-ipv4-adv-3000] rule permit ip source 10.1.1.1 0.0.0.127
RBM_P[DeviceA-ipv4-adv-3000] quit
RBM_P[DeviceA] acl advanced 3001
RBM_P[DeviceA-ipv4-adv-3001] rule permit ip source 10.1.1.129 0.0.0.127
RBM_P[DeviceA-ipv4-adv-3001] quit
# 在接口上配置出方向动态地址转换,允许使用地址组1中的IPv4地址对匹配ACL 3000的报文进行源地址转换,并在转换过程中使用端口信息;允许使用地址组2中的IPv4地址对匹配ACL 3001的报文进行源地址转换,并在转换过程中使用端口信息。
RBM_P[DeviceA] interface gigabitethernet 1/0/1
RBM_P[DeviceA-GigabitEthernet1/0/1] nat outbound 3000 address-group 1
RBM_P[DeviceA-GigabitEthernet1/0/1] nat outbound 3001 address-group 2
RBM_P[DeviceA-GigabitEthernet1/0/1] quit
# 以上配置完成后,内网主机Host 1能够通过Device A访问Internet。在Device A设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_P[DeviceA] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.100/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/2
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.5/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/1
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:16:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
# 以上配置完成后,内网主机Host 3能够通过Device B访问Internet。在Device B设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_S[DeviceB] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.200/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface:
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.8/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface:
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:17:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
(0)
您好,请知:
以下是RBM的配置举例:
如图1-19所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。
图1-19 HA联动VRRP三层主备组网图
(1) 确保主备设备的软硬件环境一致
# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。
(2) 配置Switch A
# 在Switch A上创建VLAN 10,并将连接Device A、Device B和Router的接口设置成工作在二层模式,接口链路类型为Access,并将此接口加入VLAN 10。
(3) 配置Switch B
# 在Switch B上创建VLAN 10,并将连接Device A、Device B和Host的接口设置成工作在二层模式,接口链路类型为Access,并将此接口加入VLAN 10。
(4) 配置Router
# 配置接口GigabitEthernet1/0/7的IPv4地址为2.1.1.15/24。
# 配置路由信息,去往内网流量的下一跳IPv4地址为VRRP备份组1的虚拟IPv4地址2.1.1.3,去往Internet流量的下一跳IPv4地址为出接口对端的IPv4地址。
(5) 配置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. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceA-security-zone-Trust] quit
c. 配置静态路由,保证路由可达
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由使设备与内外网之间路由可达。本举例假设到达外网的下一跳IPv4地址为2.1.1.15,实际环境中请以具体组网情况为准,具体配置步骤如下。
[DeviceA] ip route-static 0.0.0.0 0.0.0.0 2.1.1.15
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使10.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ip
[DeviceA-security-policy-ip] rule name trust-untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ip-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-ip-subnet 10.1.1.0 24
[DeviceA-security-policy-ip-3-trust-untrust] action pass
[DeviceA-security-policy-ip-3-trust-untrust] quit
# 配置安全策略规则,允许VRRP协议报文通过。当HA通道断开时,使Device A与Device B之间可以交换VRRP报文,进行VRRP角色竞选,保证网络互通。
[DeviceA-security-policy-ip] rule name vrrp1
[DeviceA-security-policy-ip-4-vrrp1] source-zone trust
[DeviceA-security-policy-ip-4-vrrp1] destination-zone local
[DeviceA-security-policy-ip-4-vrrp1] service vrrp
[DeviceA-security-policy-ip-4-vrrp1] action pass
[DeviceA-security-policy-ip-4-vrrp1] quit
[DeviceA-security-policy-ip] rule name vrrp2
[DeviceA-security-policy-ip-5-vrrp2] source-zone local
[DeviceA-security-policy-ip-5-vrrp2] destination-zone trust
[DeviceA-security-policy-ip-5-vrrp2] service vrrp
[DeviceA-security-policy-ip-5-vrrp2] action pass
[DeviceA-security-policy-ip-5-vrrp2] quit
[DeviceA-security-policy-ip] rule name vrrp3
[DeviceA-security-policy-ip-6-vrrp3] source-zone untrust
[DeviceA-security-policy-ip-6-vrrp3] destination-zone local
[DeviceA-security-policy-ip-6-vrrp3] service vrrp
[DeviceA-security-policy-ip-6-vrrp3] action pass
[DeviceA-security-policy-ip-6-vrrp3] quit
[DeviceA-security-policy-ip] rule name vrrp4
[DeviceA-security-policy-ip-7-vrrp4] source-zone local
[DeviceA-security-policy-ip-7-vrrp4] destination-zone untrust
[DeviceA-security-policy-ip-7-vrrp4] service vrrp
[DeviceA-security-policy-ip-7-vrrp4] action pass
[DeviceA-security-policy-ip-7-vrrp4] quit
[DeviceA-security-policy-ip] quit
e. 配置高可靠性
# 使用两台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] >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
RBM_P[DeviceA-remote-backup-group] quit
# 配置VRRP备份组,并与HA关联。实现HA对VRRP备份组的统一管理和流量引导。
RBM_P[DeviceA] interface gigabitethernet 1/0/1
RBM_P[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 2.1.1.3 active
RBM_P[DeviceA-GigabitEthernet1/0/1] quit
RBM_P[DeviceA] interface gigabitethernet 1/0/2
RBM_P[DeviceA-GigabitEthernet1/0/2] vrrp vrid 2 virtual-ip 10.1.1.3 active
RBM_P[DeviceA-GigabitEthernet1/0/2] quit
f. 配置安全业务
# 以上有关HA的配置部署完成后,可以配置各种安全业务。对于HA支持配置信息备份的功能模块仅需要在此主管理设备上(Device A)进行配置即可。
(6) 配置Device B
a. 配置接口IPv4地址
# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ip address 2.1.1.2 255.255.255.0
[DeviceB-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
b. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceB-security-zone-Trust] quit
c. 配置静态路由,保证路由可达
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由使设备与内外网之间路由可达。本举例假设到达外网的下一跳IPv4地址为2.1.1.15,实际环境中请以具体组网情况为准,具体配置步骤如下。
[DeviceB] ip route-static 0.0.0.0 0.0.0.0 2.1.1.15
d. 配置高可靠性
# 使用两台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] >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
RBM_S[DeviceB-remote-backup-group] quit
# 配置VRRP备份组,并与HA关联。实现HA对VRRP备份组的统一管理和流量引导。
RBM_S[DeviceB] interface gigabitethernet 1/0/1
RBM_S[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 2.1.1.3 standby
RBM_S[DeviceB-GigabitEthernet1/0/1] quit
RBM_S[DeviceB] interface gigabitethernet 1/0/2
RBM_S[DeviceB-GigabitEthernet1/0/2] vrrp vrid 2 virtual-ip 10.1.1.3 standby
RBM_S[DeviceB-GigabitEthernet1/0/2] quit
(7) 配置Host
# 配置Host的默认网关为VRRP备份组2的虚拟IPv4地址10.1.1.3。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置是否生效,HA通道是否建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.1
Remote IP: 10.2.1.2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过执行以下显示命令可查看VRRP备份组的状态信息。
RBM_P[DeviceA] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
RBM control channel is established
VRRP active group status : Master
VRRP standby group status: Master
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
GE1/0/1 1 Master 100 100 None 2.1.1.3
GE1/0/2 2 Master 100 100 None 10.1.1.3
# 在安全域Trust与Untrust的安全策略上开启记录日志功能后,当内网Host与Internet之间有流量经过时,Device A上会有日志生成,而Device B上没有日志生成。
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置是否生效,HA通道是否建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Secondary
Device running status: Standby
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.2
Remote IP: 10.2.1.1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过执行以下显示命令可查看VRRP备份组的状态信息。
RBM_S[DeviceB] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
RBM control channel is established
VRRP active group status : Backup
VRRP standby group status: Backup
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
GE1/0/1 1 Backup 100 100 None 2.1.1.3
GE1/0/2 2 Backup 100 100 None 10.1.1.3
# 在安全域Trust与Untrust的安全策略上开启记录日志功能后,当内网Host与Internet之间有流量经过时,Device A上会有日志生成,而Device B上没有日志生成。
如图1-20所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,同时需要两台Device同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
图1-20 HA联动VRRP三层双主组网图
(1) 确保主备设备的软硬件环境一致
# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。
(2) 配置Switch A
# 在Switch A上创建VLAN 10,并将连接Device A、Device B和Router的接口设置成工作在二层模式,接口链路类型为Access,并将此接口加入VLAN 10。
(3) 配置Switch B
# 在Switch B上创建VLAN 10,并将连接Device A、Device B和Host的接口设置成工作在二层模式,接口链路类型为Access,并将此接口加入VLAN 10。
(4) 配置Router
# 配置接口GigabitEthernet1/0/7的IPv4地址为2.1.1.15/24。
# 配置路由信息,去往一部分内网流量(如Host 1)的下一跳IPv4地址为VRRP备份组1的虚拟IPv4地址2.1.1.3,去往另一部分内网流量(如Host 3)的下一跳IPv4地址为VRRP备份组2的虚拟IPv4地址2.1.1.4,去往Internet流量的下一跳IPv4地址为出接口对端的IPv4地址。
(5) 配置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. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceA-security-zone-Trust] quit
c. 配置静态路由,保证路由可达
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由使设备与内外网之间路由可达。本举例假设到达外网的下一跳IPv4地址为2.1.1.15,实际环境中请以具体组网情况为准,具体配置步骤如下。
[DeviceA] ip route-static 0.0.0.0 0.0.0.0 2.1.1.15
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使10.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ip
[DeviceA-security-policy-ip] rule name trust-untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ip-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-ip-subnet 10.1.1.0 24
[DeviceA-security-policy-ip-3-trust-untrust] action pass
[DeviceA-security-policy-ip-3-trust-untrust] quit
# 配置名称为vrrp的安全策略规则,允许VRRP协议报文通过。当HA通道断开时,使Device A与Device B之间可以交换VRRP报文,进行VRRP角色竞选,保证网络互通。
[DeviceA-security-policy-ip] rule name vrrp1
[DeviceA-security-policy-ip-4-vrrp1] source-zone trust
[DeviceA-security-policy-ip-4-vrrp1] destination-zone local
[DeviceA-security-policy-ip-4-vrrp1] service vrrp
[DeviceA-security-policy-ip-4-vrrp1] action pass
[DeviceA-security-policy-ip-4-vrrp1] quit
[DeviceA-security-policy-ip] rule name vrrp2
[DeviceA-security-policy-ip-5-vrrp2] source-zone local
[DeviceA-security-policy-ip-5-vrrp2] destination-zone trust
[DeviceA-security-policy-ip-5-vrrp2] service vrrp
[DeviceA-security-policy-ip-5-vrrp2] action pass
[DeviceA-security-policy-ip-5-vrrp2] quit
[DeviceA-security-policy-ip] rule name vrrp3
[DeviceA-security-policy-ip-6-vrrp3] source-zone untrust
[DeviceA-security-policy-ip-6-vrrp3] destination-zone local
[DeviceA-security-policy-ip-6-vrrp3] service vrrp
[DeviceA-security-policy-ip-6-vrrp3] action pass
[DeviceA-security-policy-ip-6-vrrp3] quit
[DeviceA-security-policy-ip] rule name vrrp4
[DeviceA-security-policy-ip-7-vrrp4] source-zone local
[DeviceA-security-policy-ip-7-vrrp4] destination-zone untrust
[DeviceA-security-policy-ip-7-vrrp4] service vrrp
[DeviceA-security-policy-ip-7-vrrp4] action pass
[DeviceA-security-policy-ip-7-vrrp4] quit
[DeviceA-security-policy-ip] quit
e. 配置高可靠性
# 使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当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
[DeviceB-remote-backup-group] >gigabitethernet 1/0/3
[DeviceA-remote-backup-group] device-role primary
RBM_P[DeviceA-remote-backup-group] backup-mode dual-active
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
RBM_P[DeviceA-remote-backup-group] delay-time 1
RBM_P[DeviceA-remote-backup-group] quit
# 配置VRRP备份组,并与HA关联。实现HA对VRRP备份组的统一管理和流量引导。
RBM_P[DeviceA] interface gigabitethernet 1/0/1
RBM_P[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 2.1.1.3 active
RBM_P[DeviceA-GigabitEthernet1/0/1] vrrp vrid 2 virtual-ip 2.1.1.4 standby
RBM_P[DeviceA-GigabitEthernet1/0/1] quit
RBM_P[DeviceA] interface gigabitethernet 1/0/2
RBM_P[DeviceA-GigabitEthernet1/0/2] vrrp vrid 3 virtual-ip 10.1.1.3 active
RBM_P[DeviceA-GigabitEthernet1/0/2] vrrp vrid 4 virtual-ip 10.1.1.4 standby
RBM_P[DeviceA-GigabitEthernet1/0/2] quit
f. 配置安全业务
# 以上有关HA的配置部署完成后,可以配置各种安全业务。对于HA支持配置信息备份的功能模块仅需要在此主管理设备上(Device A)进行配置即可。
(6) 配置Device B
a. 配置接口IPv4地址
# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ip address 2.1.1.2 255.255.255.0
[DeviceB-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
b. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceB-security-zone-Trust] quit
c. 配置静态路由,保证路由可达
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由使设备与内外网之间路由可达。本举例假设到达外网的下一跳IPv4地址为2.1.1.15,实际环境中请以具体组网情况为准,具体配置步骤如下。
[DeviceB] ip route-static 0.0.0.0 0.0.0.0 2.1.1.15
d. 配置高可靠性
# 使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当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] >gigabitethernet 1/0/3
[DeviceB-remote-backup-group] device-role secondary
RBM_S[DeviceB-remote-backup-group] backup-mode dual-active
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
RBM_S[DeviceB-remote-backup-group] delay-time 1
RBM_S[DeviceB-remote-backup-group] quit
# 配置VRRP备份组,并与HA关联。实现HA对VRRP备份组的统一管理和流量引导。
RBM_S[DeviceB] interface gigabitethernet 1/0/1
RBM_S[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 2.1.1.3 standby
RBM_S[DeviceB-GigabitEthernet1/0/1] vrrp vrid 2 virtual-ip 2.1.1.4 active
RBM_S[DeviceB-GigabitEthernet1/0/1] quit
RBM_S[DeviceB] interface gigabitethernet 1/0/2
RBM_S[DeviceB-GigabitEthernet1/0/2] vrrp vrid 3 virtual-ip 10.1.1.3 standby
RBM_S[DeviceB-GigabitEthernet1/0/2] vrrp vrid 4 virtual-ip 10.1.1.4 active
RBM_S[DeviceB-GigabitEthernet1/0/2] quit
(7) 配置Host
# 配置一部分Host(如Host 1)的默认网关为VRRP备份组3的虚拟IPv4地址10.1.1.3,配置另一部分Host(如Host 3)的默认网关为VRRP备份组4的虚拟IPv4地址10.1.1.4。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置是否生效,HA通道是否建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.1
Remote IP: 10.2.1.2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过执行以下显示命令可查看VRRP备份组的状态信息。
RBM_P[DeviceA] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
RBM control channel is established
VRRP active group status : Master
VRRP standby group status: Backup
Total number of virtual routers : 4
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
GE1/0/1 1 Master 100 100 None 2.1.1.3
GE1/0/1 2 Backup 100 100 None 2.1.1.4
GE1/0/2 3 Master 100 100 None 10.1.1.3
GE1/0/2 4 Backup 100 100 None 10.1.1.4
# 在安全域Trust与Untrust的安全策略上开启记录日志功能后,当内网Host 1、Host 2与Internet之间有流量经过时,Device A上会有日志生成,而Device B上没有日志生成。当内Host 3与Internet之间有流量经过时,Device B上会有日志生成,而Device A上没有日志生成。
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置是否生效,HA通道是否建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Secondary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.2
Remote IP: 10.2.1.1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过执行以下显示命令可查看VRRP备份组的状态信息。
RBM_S[DeviceB] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
RBM control channel is established
VRRP active group status : Master
VRRP standby group status: Backup
Total number of virtual routers : 4
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
GE1/0/1 1 Backup 100 100 None 2.1.1.3
GE1/0/1 2 Master 100 100 None 2.1.1.4
GE1/0/2 3 Backup 100 100 None 10.1.1.3
GE1/0/2 4 Master 100 100 None 10.1.1.4
# 在安全域Trust与Untrust的安全策略上开启记录日志功能后,当内网Host 1、Host 2与Internet之间有流量经过时,Device A上会有日志生成,而Device B上没有日志生成。当内Host 3与Internet之间有流量经过时,Device B上会有日志生成,而Device A上没有日志生成。
如图1-21所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。Device的上、下行业务接口均为三层接口,上下行连接路由器,Device与路由器之间运行OSPF协议。为提高业务稳定性,使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。
图1-21 HA联动路由三层主备直路组网图
(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. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceA-security-zone-Trust] quit
c. 配置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
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使20.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ip
[DeviceA-security-policy-ip] rule name trust-untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ip-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-ip-subnet 20.1.1.0 24
[DeviceA-security-policy-ip-3-trust-untrust] action pass
[DeviceA-security-policy-ip-3-trust-untrust] quit
# 配置安全策略规则,允许OSPF协议报文通过,保证OSPF邻居的建立和路由的学习。
[DeviceA-security-policy-ip] rule name ospf1
[DeviceA-security-policy-ip-4-ospf1] source-zone trust
[DeviceA-security-policy-ip-4-ospf1] destination-zone local
[DeviceA-security-policy-ip-4-ospf1] service ospf
[DeviceA-security-policy-ip-4-ospf1] action pass
[DeviceA-security-policy-ip-4-ospf1] quit
[DeviceA-security-policy-ip] rule name ospf2
[DeviceA-security-policy-ip-5-ospf2] source-zone local
[DeviceA-security-policy-ip-5-ospf2] destination-zone trust
[DeviceA-security-policy-ip-5-ospf2] service ospf
[DeviceA-security-policy-ip-5-ospf2] action pass
[DeviceA-security-policy-ip-5-ospf2] quit
[DeviceA-security-policy-ip] rule name ospf3
[DeviceA-security-policy-ip-6-ospf3] source-zone untrust
[DeviceA-security-policy-ip-6-ospf3] destination-zone local
[DeviceA-security-policy-ip-6-ospf3] service ospf
[DeviceA-security-policy-ip-6-ospf3] action pass
[DeviceA-security-policy-ip-6-ospf3] quit
[DeviceA-security-policy-ip] rule name ospf4
[DeviceA-security-policy-ip-7-ospf4] source-zone local
[DeviceA-security-policy-ip-7-ospf4] destination-zone untrust
[DeviceA-security-policy-ip-7-ospf4] service ospf
[DeviceA-security-policy-ip-7-ospf4] action pass
[DeviceA-security-policy-ip-7-ospf4] quit
[DeviceA-security-policy-ip] quit
e. 配置高可靠性
# 配置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] >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
f. 配置安全业务
# 以上有关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. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceB-security-zone-Trust] quit
c. 配置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
d. 配置高可靠性
# 配置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] >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的默认网关为20.1.1.1。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.1
Remote IP: 10.2.1.2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过查看Device A的OSPF路由信息,可看到Device A的Cost值小于Device B,上下行流量经过Device A转发。
RBM_P[DeviceA] display ospf interface
OSPF Process 1 with Router ID 2.1.1.1
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
2.1.1.1 Broadcast BDR 1 1 2.1.1.2 2.1.1.1
10.1.1.1 Broadcast DR 1 1 10.1.1.1 10.1.1.2
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Secondary
Device running status: Standby
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.2
Remote IP: 10.2.1.1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过查看Device B的OSPF路由信息,可看到Device A的Cost值小于Device B,上下行流量不经过Device B转发。
RBM_S[DeviceB] display ospf interface
OSPF Process 1 with Router ID 2.1.10.1
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
2.1.10.1 Broadcast BDR 6000 1 2.1.10.2 2.1.10.1
10.1.10.1 Broadcast BDR 6000 1 10.1.10.2 10.1.10.1
如图1-22所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。Device的上、下行业务接口均为三层接口,上下行连接路由器,Device与路由器之间运行OSPF协议。为提高业务稳定性,使用两台Device进行HA组网,同时需要两台Device同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
图1-22 HA联动路由三层双主直路组网图
(1) 确保主备设备的软硬件环境一致
# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。
(2) 配置Router A
# 配置接口GigabitEthernet1/0/7的IPv4地址为2.1.1.2/24。
# 配置接口GigabitEthernet1/0/8的IPv4地址为2.1.10.2/24。
# 配置OSPF路由协议,保证路由可达,具体步骤略。
# 配置IP转发模式为逐流的负载分担方式。
(3) 配置Router B
# 配置接口GigabitEthernet1/0/7的IPv4地址为10.1.1.2/24。
# 配置接口GigabitEthernet1/0/8的IPv4地址为10.1.10.2/24。
# 配置OSPF路由协议,保证路由可达,具体步骤略。
# 配置IP转发模式为逐流的负载分担方式。
(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. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceA-security-zone-Trust] quit
c. 配置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
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使20.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ip
[DeviceA-security-policy-ip] rule name trust-untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ip-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-ip-subnet 20.1.1.0 24
[DeviceA-security-policy-ip-3-trust-untrust] action pass
[DeviceA-security-policy-ip-3-trust-untrust] quit
# 配置安全策略规则,允许OSPF协议报文通过,保证OSPF邻居的建立和路由的学习。
[DeviceA-security-policy-ip] rule name ospf1
[DeviceA-security-policy-ip-4-ospf1] source-zone trust
[DeviceA-security-policy-ip-4-ospf1] destination-zone local
[DeviceA-security-policy-ip-4-ospf1] service ospf
[DeviceA-security-policy-ip-4-ospf1] action pass
[DeviceA-security-policy-ip-4-ospf1] quit
[DeviceA-security-policy-ip] rule name ospf2
[DeviceA-security-policy-ip-5-ospf2] source-zone local
[DeviceA-security-policy-ip-5-ospf2] destination-zone trust
[DeviceA-security-policy-ip-5-ospf2] service ospf
[DeviceA-security-policy-ip-5-ospf2] action pass
[DeviceA-security-policy-ip-5-ospf2] quit
[DeviceA-security-policy-ip] rule name ospf3
[DeviceA-security-policy-ip-6-ospf3] source-zone untrust
[DeviceA-security-policy-ip-6-ospf3] destination-zone local
[DeviceA-security-policy-ip-6-ospf3] service ospf
[DeviceA-security-policy-ip-6-ospf3] action pass
[DeviceA-security-policy-ip-6-ospf3] quit
[DeviceA-security-policy-ip] rule name ospf4
[DeviceA-security-policy-ip-7-ospf4] source-zone local
[DeviceA-security-policy-ip-7-ospf4] destination-zone untrust
[DeviceA-security-policy-ip-7-ospf4] service ospf
[DeviceA-security-policy-ip-7-ospf4] action pass
[DeviceA-security-policy-ip-7-ospf4] quit
[DeviceA-security-policy-ip] quit
e. 配置高可靠性
# 配置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同时处理业务,提高业务处理能力。但是当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
[DeviceB-remote-backup-group] >gigabitethernet 1/0/3
[DeviceA-remote-backup-group] device-role primary
RBM_P[DeviceA-remote-backup-group] backup-mode dual-active
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
RBM_P[DeviceA-remote-backup-group] delay-time 1
# 开启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
f. 配置安全业务
# 以上有关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. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceB-security-zone-Trust] quit
c. 配置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
d. 配置高可靠性
# 配置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同时处理业务,提高业务处理能力。但是当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] >gigabitethernet 1/0/3
[DeviceB-remote-backup-group] device-role secondary
RBM_S[DeviceB-remote-backup-group] backup-mode dual-active
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
RBM_S[DeviceB-remote-backup-group] delay-time 1
# 开启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的默认网关为20.1.1.1。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.1
Remote IP: 10.2.1.2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过查看Device A的OSPF路由信息,可看到Device A的Cost值与Device B相同,上下行流量会在Device A和Device B之间进行负载分担。
RBM_P[DeviceA] display ospf interface
OSPF Process 1 with Router ID 2.1.1.1
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
2.1.1.1 Broadcast BDR 1 1 2.1.1.2 2.1.1.1
10.1.1.1 Broadcast DR 1 1 10.1.1.1 10.1.1.2
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Secondary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.2
Remote IP: 10.2.1.1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过查看Device B的OSPF路由信息,可看到Device B的Cost值与Device A相同,上下行流量会在Device A和Device B之间进行负载分担。
RBM_S[DeviceB] display ospf interface
OSPF Process 1 with Router ID 2.1.10.1
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
2.1.10.1 Broadcast BDR 1 1 2.1.10.2 2.1.10.1
10.1.10.1 Broadcast BDR 1 1 10.1.10.2 10.1.10.1
如图1-23所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet,Device的上、下行业务接口均为二层接口。为提高业务稳定性,使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。
图1-23 HA透明主备直路组网图
(1) 确保主备设备的软硬件环境一致
# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。
(2) 配置Switch A
# 在Switch A上创建VLAN 10,并将连接Device A、Device B和Router的接口设置成工作在二层模式,接口链路类型为Access,并将接口加入VLAN 10。
(3) 配置Switch B
# 在Switch B上创建VLAN 10,并将连接Device A、Device B和Host的接口设置成工作在二层模式,接口链路类型为Access,并将此接口加入VLAN 10。
(4) 配置Device A
a. 配置VLAN
# 使接口GigabitEthernet1/0/1和GigabitEthernet1/0/2工作在二层模式,具体配置步骤如下。
<DeviceA> system-view
[DeviceA] interface range gigabitethernet 1/0/1 to gigabitethernet 1/0/2
[DeviceA-if-range] port link-mode bridge
[DeviceA-if-range] quit
# 根据组网图中规划的信息,创建VLAN 10,并将接口加入VLAN,具体配置步骤如下。
[DeviceA] vlan 10
[DeviceA-vlan10] port gigabitethernet 1/0/1
[DeviceA-vlan10] port gigabitethernet 1/0/2
[DeviceA-vlan10] quit
b. 配置接口IPv4地址
# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] ip address 10.2.1.1 255.255.255.0
[DeviceA-GigabitEthernet1/0/3] quit
c. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1 vlan 10
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2 vlan 10
[DeviceA-security-zone-Trust] quit
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使10.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ip
[DeviceA-security-policy-ip] rule name trust-untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ip-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-ip-subnet 10.1.1.0 24
[DeviceA-security-policy-ip-3-trust-untrust] action pass
[DeviceA-security-policy-ip-3-trust-untrust] quit
[DeviceA-security-policy-ip] quit
e. 配置高可靠性
# 使用两台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] >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监控VLAN 10的状态。
RBM_P[DeviceA-remote-backup-group] track vlan 10
RBM_P[DeviceA-remote-backup-group] quit
f. 配置安全业务
# 以上有关HA的配置部署完成后,可以配置各种安全业务。对于HA支持配置信息备份的功能模块仅需要在此主管理设备上(Device A)进行配置即可。
(5) 配置Device B
a. 配置VLAN
# 使接口GigabitEthernet1/0/1和GigabitEthernet1/0/2工作在二层模式,具体配置步骤如下。
<DeviceB> system-view
[DeviceB] interface range gigabitethernet 1/0/1 to gigabitethernet 1/0/2
[DeviceB-if-range] port link-mode bridge
[DeviceB-if-range] quit
# 根据组网图中规划的信息,创建VLAN 10,并将接口加入VLAN,具体配置步骤如下。
[DeviceB] vlan 10
[DeviceB-vlan10] port gigabitethernet 1/0/1
[DeviceB-vlan10] port gigabitethernet 1/0/2
[DeviceB-vlan10] quit
b. 配置接口IPv4地址
# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。
[DeviceB] interface gigabitethernet 1/0/3
[DeviceB-GigabitEthernet1/0/3] ip address 10.2.1.2 255.255.255.0
[DeviceB-GigabitEthernet1/0/3] quit
c. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1 vlan 10
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2 vlan 10
[DeviceB-security-zone-Trust] quit
d. 配置高可靠性
# 使用两台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] >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监控VLAN 10的状态。
RBM_S[DeviceB-remote-backup-group] track vlan 10
RBM_S[DeviceB-remote-backup-group] quit
(6) 配置Host
# 配置Host的默认网关为10.1.1.1。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.1
Remote IP: 10.2.1.2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Secondary
Device running status: Standby
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.2
Remote IP: 10.2.1.1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
如图1-24所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet,Device的上、下行业务接口均为二层接口。为提高业务稳定性,使用两台Device进行HA组网,同时需要两台Device同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
图1-24 HA透明双主直路组网图
(1) 确保主备设备的软硬件环境一致
# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。
(2) 配置Router A
# 在Router A上配置OSPF功能使流量可以到达Internet和内网主机,同时保证Router A到达内网主机的流量可以在两条链路上进行负载分担。
(3) 配置Router B
# 在Router B上配置OSPF功能使流量可以到达Internet和内网主机,同时保证Router B到达Internet的流量可以在两条链路上进行负载分担。
(4) 配置Device A
a. 配置VLAN
# 使接口GigabitEthernet1/0/1和GigabitEthernet1/0/2工作在二层模式,具体配置步骤如下。
<DeviceA> system-view
[DeviceA] interface range gigabitethernet 1/0/1 to gigabitethernet 1/0/2
[DeviceA-if-range] port link-mode bridge
[DeviceA-if-range] quit
# 根据组网图中规划的信息,创建VLAN 10,并将接口加入VLAN,具体配置步骤如下。
[DeviceA] vlan 10
[DeviceA-vlan10] port gigabitethernet 1/0/1
[DeviceA-vlan10] port gigabitethernet 1/0/2
[DeviceA-vlan10] quit
b. 配置接口IPv4地址
# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] ip address 10.2.1.1 255.255.255.0
[DeviceA-GigabitEthernet1/0/3] quit
c. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1 vlan 10
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2 vlan 10
[DeviceA-security-zone-Trust] quit
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使10.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ip
[DeviceA-security-policy-ip] rule name trust-untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ip-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ip-3-trust-untrust] source-ip-subnet 10.1.1.0 24
[DeviceA-security-policy-ip-3-trust-untrust] action pass
[DeviceA-security-policy-ip-3-trust-untrust] quit
# 配置安全策略规则,允许OSPF协议报文通过,保证OSPF邻居的建立和路由的学习。
[DeviceA-security-policy-ip] rule name ospf1
[DeviceA-security-policy-ip-4-ospf1] source-zone trust
[DeviceA-security-policy-ip-4-ospf1] destination-zone untrust
[DeviceA-security-policy-ip-4-ospf1] service ospf
[DeviceA-security-policy-ip-4-ospf1] action pass
[DeviceA-security-policy-ip-4-ospf1] quit
[DeviceA-security-policy-ip] rule name ospf2
[DeviceA-security-policy-ip-5-ospf2] source-zone untrust
[DeviceA-security-policy-ip-5-ospf2] destination-zone trust
[DeviceA-security-policy-ip-5-ospf2] service ospf
[DeviceA-security-policy-ip-5-ospf2] action pass
[DeviceA-security-policy-ip-5-ospf2] quit
[DeviceA-security-policy-ip] quit
e. 配置高可靠性
# 使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当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] >gigabitethernet 1/0/3
[DeviceA-remote-backup-group] device-role primary
RBM_P[DeviceA-remote-backup-group] backup-mode dual-active
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
RBM_P[DeviceA-remote-backup-group] delay-time 1
# 配置HA监控接口GigabitEthernet1/0/1和GigabitEthernet1/0/2的状态。
RBM_P[DeviceA-remote-backup-group] track interface gigabitethernet 1/0/1
RBM_P[DeviceA-remote-backup-group] track interface gigabitethernet 1/0/2
RBM_P[DeviceA-remote-backup-group] quit
f. 配置安全业务
# 以上有关HA的配置部署完成后,可以配置各种安全业务。对于HA支持配置信息备份的功能模块仅需要在此主管理设备上(Device A)进行配置即可。
(5) 配置Device B
a. 配置VLAN
# 使接口GigabitEthernet1/0/1和GigabitEthernet1/0/2工作在二层模式,具体配置步骤如下。
<DeviceB> system-view
[DeviceB] interface range gigabitethernet 1/0/1 to gigabitethernet 1/0/2
[DeviceB-if-range] port link-mode bridge
[DeviceB-if-range] quit
# 根据组网图中规划的信息,创建VLAN 10,并将接口加入VLAN,具体配置步骤如下。
[DeviceB] vlan 10
[DeviceB-vlan10] port gigabitethernet 1/0/1
[DeviceB-vlan10] port gigabitethernet 1/0/2
[DeviceB-vlan10] quit
b. 配置接口IPv4地址
# 根据组网图中规划的信息,配置各接口的IPv4地址,具体配置步骤如下。
[DeviceB] interface gigabitethernet 1/0/3
[DeviceB-GigabitEthernet1/0/3] ip address 10.2.1.2 255.255.255.0
[DeviceB-GigabitEthernet1/0/3] quit
c. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1 vlan 10
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2 vlan 10
[DeviceB-security-zone-Trust] quit
d. 配置高可靠性
# 使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当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] >gigabitethernet 1/0/3
[DeviceB-remote-backup-group] device-role secondary
RBM_S[DeviceB-remote-backup-group] backup-mode dual-active
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] delay-time 1
RBM_S[DeviceB-remote-backup-group] configuration sync-check interval 12
# 配置HA监控接口GigabitEthernet1/0/1和GigabitEthernet1/0/2的状态。
RBM_S[DeviceB-remote-backup-group] track interface gigabitethernet 1/0/1
RBM_S[DeviceB-remote-backup-group] track interface gigabitethernet 1/0/2
RBM_S[DeviceB-remote-backup-group] quit
(6) 配置Host
# 配置Host的默认网关为10.1.1.1。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.1
Remote IP: 10.2.1.2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Secondary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IP: 10.2.1.2
Remote IP: 10.2.1.1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
如图1-25所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。同时需要在Device上配置动态NAT功能保证内网用户可以访问Internet,该公司拥有2.1.1.1到2.1.1.10十个外网IPv4地址。
图1-25 HA联动VRRP主备模式中接口NAT功能组网图
(1) 配置主备模式的HA组网环境
# 将Device A和Device B组建成主备模式的HA环境,其具体配置步骤请参见“1.22.1 HA联动VRRP三层主备组网典型配置举例”中的相关内容,本举例不再赘述。
(2) 配置动态NAT
在此配置举例中,仅需要在主管理设备Device A上配置NAT的相关配置,Device A上的NAT配置会自动同步到从管理设备Device B。
# 配置NAT地址组1,其地址成员范围为2.1.1.5到2.1.1.10,并与VRRP备份组1绑定。
RBM_P<DeviceA> system-view
RBM_P[DeviceA] nat address-group 1
RBM_P[DeviceA-address-group-1] address 2.1.1.5 2.1.1.10
RBM_P[DeviceA-address-group-1] vrrp vrid 1
RBM_P[DeviceA-address-group-1] quit
# 在接口上配置出方向动态地址转换,允许使用地址组1中的地址进行源地址转换,并在转换过程中使用端口信息。
RBM_P[DeviceA] interface gigabitethernet 1/0/1
RBM_P[DeviceA-GigabitEthernet1/0/1] nat outbound address-group 1
RBM_P[DeviceA-GigabitEthernet1/0/1] quit
# 以上配置完成后,内网主机能够访问Internet。在Device A设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_P[DeviceA] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.10/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/2
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.5/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/1
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:16:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
如图1-26所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
同时需要在Device上配置动态NAT功能保证内网用户可以访问Internet,该公司拥有2.1.1.1到2.1.1.10十个外网IPv4地址。
图1-26 HA联动VRRP双主模式中接口NAT功能组网图
(1) 配置双主模式的HA组网环境
# 将Device A和Device B组建成双主模式的HA环境,其具体配置步骤请参见“1.22.2 HA联动VRRP三层双主组网典型配置举例”中的相关内容,本举例不再赘述。
(2) 配置动态NAT
在此配置举例中,仅需要在主管理设备Device A上配置NAT的相关配置,Device A上的NAT配置会自动同步到从管理设备Device B。
# 配置NAT地址组1,其地址成员范围为2.1.1.5到2.1.1.7,并与VRRP备份组1绑定。
RBM_P<DeviceA> system-view
RBM_P[DeviceA] nat address-group 1
RBM_P[DeviceA-address-group-1] address 2.1.1.5 2.1.1.7
RBM_P[DeviceA-address-group-1] vrrp vrid 1
RBM_P[DeviceA-address-group-1] quit
# 配置NAT地址组2,其地址成员范围为2.1.1.8到2.1.1.10,并与VRRP备份组2绑定。
RBM_P[DeviceA] nat address-group 2
RBM_P[DeviceA-address-group-2] address 2.1.1.8 2.1.1.10
RBM_P[DeviceA-address-group-2] vrrp vrid 2
RBM_P[DeviceA-address-group-2] quit
# 配置ACL 3000,仅允许10.1.1.1/25网段的报文通过;配置ACL 3001,仅允许10.1.1.129/25网段的报文通过。
RBM_P[DeviceA] acl advanced 3000
RBM_P[DeviceA-ipv4-adv-3000] rule permit ip source 10.1.1.1 0.0.0.127
RBM_P[DeviceA-ipv4-adv-3000] quit
RBM_P[DeviceA] acl advanced 3001
RBM_P[DeviceA-ipv4-adv-3001] rule permit ip source 10.1.1.129 0.0.0.127
RBM_P[DeviceA-ipv4-adv-3001] quit
# 在接口上配置出方向动态地址转换,允许使用地址组1中的IPv4地址对匹配ACL 3000的报文进行源地址转换,并在转换过程中使用端口信息;允许使用地址组2中的IPv4地址对匹配ACL 3001的报文进行源地址转换,并在转换过程中使用端口信息。
RBM_P[DeviceA] interface gigabitethernet 1/0/1
RBM_P[DeviceA-GigabitEthernet1/0/1] nat outbound 3000 address-group 1
RBM_P[DeviceA-GigabitEthernet1/0/1] nat outbound 3001 address-group 2
RBM_P[DeviceA-GigabitEthernet1/0/1] quit
# 以上配置完成后,内网主机Host 1能够通过Device A访问Internet。在Device A设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_P[DeviceA] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.100/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/2
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.5/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/1
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:16:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
# 以上配置完成后,内网主机Host 3能够通过Device B访问Internet。在Device B设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_S[DeviceB] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.200/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface:
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.8/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface:
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:17:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
如图1-27所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。同时需要在Device上配置动态NAT功能保证内网用户可以访问Internet,该公司拥有2.1.1.1到2.1.1.10十个外网IPv4地址。
图1-27 HA联动VRRP主备模式中全局NAT功能组网图
(1) 配置主备模式的HA组网环境
# 将Device A和Device B组建成主备模式的HA环境,其具体配置步骤请参见“1.22.1 HA联动VRRP三层主备组网典型配置举例”中的相关内容,本举例不再赘述。
(2) 配置全局NAT
在此配置举例中,仅需要在主管理设备Device A上进行NAT的相关配置,Device A上的NAT配置会自动同步到从管理设备Device B。
# 配置NAT地址组1,其地址成员范围为2.1.1.5到2.1.1.10,并与VRRP备份组1绑定。
RBM_P<DeviceA> system-view
RBM_P[DeviceA] nat address-group 1
RBM_P[DeviceA-address-group-1] address 2.1.1.5 2.1.1.10
RBM_P[DeviceA-address-group-1] vrrp vrid 1
RBM_P[DeviceA-address-group-1] quit
# 创建全局NAT规则,使用地址组1中的地址对内网用户访问Internet的流量进行源地址转换,并在转换过程中使用端口信息。
RBM_P[DeviceA] nat global-policy
RBM_P[DeviceA-nat-global-policy] rule name rule1
RBM_P[DeviceA-nat-global-policy-rule1] source-zone Trust
RBM_P[DeviceA-nat-global-policy-rule1] destination-zone Untrust
RBM_P[DeviceA-nat-global-policy-rule1] source-ip subnet 10.1.1.0 24
RBM_P[DeviceA-nat-global-policy-rule1] action snat address-group 1 vrrp 1
RBM_P[DeviceA-nat-global-policy-rule1] quit
RBM_P[DeviceA-nat-global-policy] quit
# 以上配置完成后,内网主机能够访问Internet。在Device A设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_P[DeviceA] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.10/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/2
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.5/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/1
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:16:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
如图1-28所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
同时需要在Device上配置动态NAT功能保证内网用户可以访问Internet,该公司拥有2.1.1.1到2.1.1.10十个外网IPv4地址。
图1-28 HA联动VRRP双主模式中全局NAT功能组网图
(1) 配置双主模式的HA组网环境
# 将Device A和Device B组建成双主模式的HA环境,其具体配置步骤请参见“1.22.2 HA联动VRRP三层双主组网典型配置举例”中的相关内容,本举例不再赘述。
(2) 配置全局NAT
在此配置举例中,仅需要在主管理设备Device A上进行NAT的相关配置,Device A上的NAT配置会自动同步到从管理设备Device B。
# 配置NAT地址组1,其地址成员范围为2.1.1.5到2.1.1.7,并与VRRP备份组1绑定。
RBM_P<DeviceA> system-view
RBM_P[DeviceA] nat address-group 1
RBM_P[DeviceA-address-group-1] address 2.1.1.5 2.1.1.7
RBM_P[DeviceA-address-group-1] vrrp vrid 1
RBM_P[DeviceA-address-group-1] quit
# 配置NAT地址组2,其地址成员范围为2.1.1.8到2.1.1.10,并与VRRP备份组2绑定。
RBM_P[DeviceA] nat address-group 2
RBM_P[DeviceA-address-group-2] address 2.1.1.8 2.1.1.10
RBM_P[DeviceA-address-group-2] vrrp vrid 2
RBM_P[DeviceA-address-group-2] quit
# 创建全局NAT规则rule1,使用地址组1中的地址对10.1.1.1/25网段用户访问Internet的流量进行源地址转换,并在转换过程中使用端口信息。
RBM_P[DeviceA] nat global-policy
RBM_P[DeviceA-nat-global-policy] rule name rule1
RBM_P[DeviceA-nat-global-policy-rule1] source-zone Trust
RBM_P[DeviceA-nat-global-policy-rule1] destination-zone Untrust
RBM_P[DeviceA-nat-global-policy-rule1] source-ip subnet 10.1.1.1 25
RBM_P[DeviceA-nat-global-policy-rule1] action snat address-group 1 vrrp 1
RBM_P[DeviceA-nat-global-policy-rule1] quit
# 创建全局NAT规则rule2,使用地址组2中的地址对10.1.1.129/25网段用户访问Internet的流量进行源地址转换,并在转换过程中使用端口信息。
RBM_P[DeviceA-nat-global-policy] rule name rule2
RBM_P[DeviceA-nat-global-policy-rule2] source-zone Trust
RBM_P[DeviceA-nat-global-policy-rule2] destination-zone Untrust
RBM_P[DeviceA-nat-global-policy-rule2] source-ip subnet 10.1.1.129 25
RBM_P[DeviceA-nat-global-policy-rule2] action snat address-group 2 vrrp 2
RBM_P[DeviceA-nat-global-policy-rule2] quit
RBM_P[DeviceA-nat-global-policy] quit
# 以上配置完成后,内网主机Host 1能够通过Device A访问Internet。在Device A设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_P[DeviceA] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.100/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/2
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.5/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/1
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:16:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
# 以上配置完成后,内网主机Host 3能够通过Device B访问Internet。在Device B设备上查看如下显示信息,可以看到内网主机访问外网时生成的NAT会话信息。
RBM_S[DeviceB] display nat session verbose
Slot 1:
Initiator:
Source IP/port: 10.1.1.200/52082
Destination IP/port: 202.38.1.10/80
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface:
Source security zone: Trust
Responder:
Source IP/port: 202.38.1.10/80
Destination IP/port: 2.1.1.8/1036
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface:
Source security zone: Untrust
State: TCP_ESTABLISHED
Application: HTTP
Rule ID: 2
Rule name: 3
Start time: 2019-1-29 16:17:59 TTL: 9995s
Initiator->Responder: 551 packets 32547 bytes
Responder->Initiator: 956 packets 1385514 bytes
Total sessions found: 1
如图1-29所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。为提高业务稳定性,使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。
图1-29 HA联动VRRP三层直连主备组网图
(1) 确保主备设备的软硬件环境一致
# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。
(2) 配置Switch A
# 在Switch A上创建VLAN 10,并将连接Device A、Device B和Router的接口设置成工作在二层模式,接口链路类型为Access,并将此接口加入VLAN 10。
(3) 配置Switch B
# 在Switch B上创建VLAN 10,并将连接Device A、Device B和Host的接口设置成工作在二层模式,接口链路类型为Access,并将此接口加入VLAN 10。
(4) 配置Router
# 配置接口GigabitEthernet1/0/7的IPv6地址为3003::15/64。
# 配置路由信息,去往内网流量的下一跳IPv6地址为VRRP备份组1的虚拟IPv6地址3003::3/64,去往Internet流量的下一跳IPv6地址为出接口对端的IPv6地址。
(5) 配置Device A
a. 配置接口IPv6地址
# 根据组网图中规划的信息,配置各接口的IPv6地址,具体配置步骤如下。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ipv6 address 3003::1/64
[DeviceA-GigabitEthernet1/0/1] ipv6 address fe80::3:1 link-local
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] ipv6 address 3001::1/64
[DeviceA-GigabitEthernet1/0/2] ipv6 address fe80::1:1 link-local
[DeviceA-GigabitEthernet1/0/2] undo ipv6 nd ra halt
[DeviceA-GigabitEthernet1/0/2] quit
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] ipv6 address 3005::1/64
[DeviceA-GigabitEthernet1/0/3] ipv6 address auto link-local
[DeviceA-GigabitEthernet1/0/3] quit
b. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceA-security-zone-Trust] quit
c. 配置静态路由,保证路由可达
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由使设备与内外网之间路由可达。本举例假设到达外网的下一跳IPv6地址为3003::15,实际环境中请以具体组网情况为准,具体配置步骤如下。
[DeviceA] ipv6 route-static 0::0 0 3003::15
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使10.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ipv6
[DeviceA-security-policy-ipv6] rule name trust-untrust
[DeviceA-security-policy-ipv6-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ipv6-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ipv6-3-trust-untrust] source-ip-subnet 3001::0 64
[DeviceA-security-policy-ipv6-3-trust-untrust] action pass
[DeviceA-security-policy-ipv6-3-trust-untrust] quit
# 配置安全策略规则,允许VRRP协议报文通过。当HA通道断开时,使Device A与Device B之间可以交换VRRP报文,进行VRRP角色竞选,保证网络互通。
[DeviceA-security-policy-ipv6] rule name vrrp1
[DeviceA-security-policy-ipv6-4-vrrp1] source-zone trust
[DeviceA-security-policy-ipv6-4-vrrp1] destination-zone local
[DeviceA-security-policy-ipv6-4-vrrp1] service vrrp
[DeviceA-security-policy-ipv6-4-vrrp1] action pass
[DeviceA-security-policy-ipv6-4-vrrp1] quit
[DeviceA-security-policy-ipv6] rule name vrrp2
[DeviceA-security-policy-ipv6-5-vrrp2] source-zone local
[DeviceA-security-policy-ipv6-5-vrrp2] destination-zone trust
[DeviceA-security-policy-ipv6-5-vrrp2] service vrrp
[DeviceA-security-policy-ipv6-5-vrrp2] action pass
[DeviceA-security-policy-ipv6-5-vrrp2] quit
[DeviceA-security-policy-ipv6] rule name vrrp3
[DeviceA-security-policy-ipv6-6-vrrp3] source-zone untrust
[DeviceA-security-policy-ipv6-6-vrrp3] destination-zone local
[DeviceA-security-policy-ipv6-6-vrrp3] service vrrp
[DeviceA-security-policy-ipv6-6-vrrp3] action pass
[DeviceA-security-policy-ipv6-6-vrrp3] quit
[DeviceA-security-policy-ipv6] rule name vrrp4
[DeviceA-security-policy-ipv6-7-vrrp4] source-zone local
[DeviceA-security-policy-ipv6-7-vrrp4] destination-zone untrust
[DeviceA-security-policy-ipv6-7-vrrp4] service vrrp
[DeviceA-security-policy-ipv6-7-vrrp4] action pass
[DeviceA-security-policy-ipv6-7-vrrp4] quit
[DeviceA-security-policy-ipv6] quit
e. 配置高可靠性
# 使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。
[DeviceA] remote-backup group
[DeviceA-remote-backup-group] remote-ipv6 3005::2
[DeviceA-remote-backup-group] local-ipv6 3005::1
[DeviceA-remote-backup-group] >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
RBM_P[DeviceA-remote-backup-group] quit
# 配置VRRP备份组,并与HA关联。实现HA对VRRP备份组的统一管理和流量引导。
RBM_P[DeviceA] interface gigabitethernet 1/0/1
RBM_P[DeviceA-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip fe80::3:3 link-local active
RBM_P[DeviceA-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip 3003::3
RBM_P[DeviceA-GigabitEthernet1/0/1] quit
RBM_P[DeviceA] interface gigabitethernet 1/0/2
RBM_P[DeviceA-GigabitEthernet1/0/2] vrrp ipv6 vrid 1 virtual-ip fe80::1:3 link-local active
RBM_P[DeviceA-GigabitEthernet1/0/2] vrrp ipv6 vrid 1 virtual-ip 3001::3
RBM_P[DeviceA-GigabitEthernet1/0/2] quit
f. 配置安全业务
# 以上有关HA的配置部署完成后,可以配置各种安全业务。对于HA支持配置信息备份的功能模块仅需要在此主管理设备上(Device A)进行配置即可。
(6) 配置Device B
a. 配置接口IPv6地址
# 根据组网图中规划的信息,配置各接口的IPv6地址,具体配置步骤如下。
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ipv6 address 3003::2/64
[DeviceB-GigabitEthernet1/0/1] ipv6 address fe80::3:2 link-local
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] ipv6 address 3001::2/64
[DeviceB-GigabitEthernet1/0/2] ipv6 address fe80::1:2 link-local
[DeviceB-GigabitEthernet1/0/2] undo ipv6 nd ra halt
[DeviceB-GigabitEthernet1/0/2] quit
[DeviceB] interface gigabitethernet 1/0/3
[DeviceB-GigabitEthernet1/0/3] ipv6 address 3005::2/64
[DeviceB-GigabitEthernet1/0/3] ipv6 address auto link-local
[DeviceB-GigabitEthernet1/0/3] quit
b. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceB-security-zone-Trust] quit
c. 配置静态路由,保证路由可达
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由使设备与内外网之间路由可达。本举例假设到达外网的下一跳IPv6地址为3003::15,实际环境中请以具体组网情况为准,具体配置步骤如下。
[DeviceB] ipv6 route-static 0::0 0 3003::15
d. 配置高可靠性
# 使用两台Device进行HA组网,Device A作为主设备,Device B作为备设备。当Device A或其链路发生故障时,由Device B接替Device A继续工作,保证业务不中断。
[DeviceB] remote-backup group
[DeviceB-remote-backup-group] remote-ipv6 3005::1
[DeviceB-remote-backup-group] local-ipv6 3005::2
[DeviceB-remote-backup-group] >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
RBM_S[DeviceB-remote-backup-group] quit
# 配置VRRP备份组,并与HA关联。实现HA对VRRP备份组的统一管理和流量引导。
RBM_S[DeviceB] interface gigabitethernet 1/0/1
RBM_S[DeviceB-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip fe80::3:3 link-local standby
RBM_S[DeviceB-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip 3003::3
RBM_S[DeviceB-GigabitEthernet1/0/1] quit
RBM_S[DeviceB] interface gigabitethernet 1/0/2
RBM_S[DeviceB-GigabitEthernet1/0/2] vrrp ipv6 vrid 1 virtual-ip fe80::1:3 link-local standby
RBM_S[DeviceB-GigabitEthernet1/0/2] vrrp ipv6 vrid 1 virtual-ip 3001::3
RBM_S[DeviceB-GigabitEthernet1/0/2] quit
(7) 配置Host
# 配置Host的默认网关为VRRP备份组2的虚拟IPv6地址3001::3。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置是否生效,HA通道是否建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IPv6: 3005::1
Remote IPv6: 3005::2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过执行以下显示命令可查看VRRP备份组的状态信息。
RBM_P[DeviceA] display vrrp ipv6
IPv6 Virtual Router Information:
Running mode : Standard
RBM control channel is established
IPv6 VRRP active group status : Master
IPv6 VRRP standby group status: Master
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
GE1/0/1 1 Master 100 100 None FE80::3:3
GE1/0/2 1 Master 100 100 None FE80::1:3
# 在安全域Trust与Untrust的安全策略上开启记录日志功能后,当内网Host与Internet之间有流量经过时,Device A上会有日志生成,而Device B上没有日志生成。
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置是否生效,HA通道是否建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Active/standby
Device management role: Secondary
Device running status: Standby
Data channel interface: GigabitEthernet1/0/3
Local IPv6: 3005::2
Remote IPv6: 3005::1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过执行以下显示命令可查看VRRP备份组的状态信息。
RBM_S[DeviceB] display vrrp ipv6
IPv6 Virtual Router Information:
Running mode : Standard
RBM control channel is established
IPv6 VRRP active group status : Backup
IPv6 VRRP standby group status: Backup
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
GE1/0/1 1 Backup 100 100 None FE80::3:3
GE1/0/2 1 Backup 100 100 None FE80::1:3
# 在安全域Trust与Untrust的安全策略上开启记录日志功能后,当内网Host与Internet之间有流量经过时,Device A上会有日志生成,而Device B上没有日志生成。
如图1-30所示,某公司以Device作为网络边界安全防护设备,连接公司内部网络和Internet。Device的上、下行业务接口均为三层接口,上下行连接路由器,Device与路由器之间运行OSPFv3协议。为提高业务稳定性,使用两台Device进行HA组网,需要两台Device同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
图1-30 HA联动路由三层双主直路组网图
(1) 确保主备设备的软硬件环境一致
# 在配置HA功能之前,请先保证主/备设备的硬件环境和软件环境的一致性。
(2) 配置Router A
# 配置接口GigabitEthernet1/0/7的IPv6地址为3003::2/64。
# 配置接口GigabitEthernet1/0/8的IPv6地址为3004::2/64。
# 配置OSPFv3路由协议,保证路由可达,具体步骤略。
# 配置IP转发模式为逐流的负载分担方式。
(3) 配置Router B
# 配置接口GigabitEthernet1/0/7的IPv6地址为3001::2/64。
# 配置接口GigabitEthernet1/0/8的IPv6地址为3002::2/64。
# 配置OSPFv3路由协议,保证路由可达,具体步骤略。
# 配置IP转发模式为逐流的负载分担方式。
(4) 配置Device A
a. 配置接口IPv6地址
# 根据组网图中规划的信息,配置各接口的IPv6地址,具体配置步骤如下。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ipv6 address 3003::1/64
[DeviceA-GigabitEthernet1/0/1] ipv6 address auto link-local
[DeviceA-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
b. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceA] security-zone name untrust
[DeviceA-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceA-security-zone-Untrust] quit
[DeviceA] security-zone name trust
[DeviceA-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceA-security-zone-Trust] quit
c. 配置OSPFv3,保证路由可达
# 配置设备上的OSPFv3功能,OSPFv3协议自身的链路开销值建议保持默认配置即可。
[DeviceA] ospfv3 1
[DeviceA-ospfv3-1] router-id 2.1.1.1
[DeviceA-ospfv3-1] quit
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ospfv3 1 area 0
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface GigabitEthernet1/0/2
[DeviceA-GigabitEthernet1/0/2] ospfv3 1 area 0
[DeviceA-GigabitEthernet1/0/2] quit
d. 配置安全策略,允许所需的业务报文通过
此部分安全策略只需在主管理设备配置,HA组网完成后,从管理设备会自动同步这些安全策略配置信息。
# 配置名称为trust-untrust的安全策略规则,使20.1.1.0/24网段的内网用户可以主动访问Internet,但是Internet上的用户不能访问内网,具体配置步骤如下。
[DeviceA] security-policy ipv6
[DeviceA-security-policy-ipv6] rule name trust-untrust
[DeviceA-security-policy-ipv6-3-trust-untrust] source-zone trust
[DeviceA-security-policy-ipv6-3-trust-untrust] destination-zone untrust
[DeviceA-security-policy-ipv6-3-trust-untrust] source-ip-subnet 2001::0 64
[DeviceA-security-policy-ipv6-3-trust-untrust] action pass
[DeviceA-security-policy-ipv6-3-trust-untrust] quit
# 配置安全策略规则,允许OSPF协议报文通过,保证OSPF邻居的建立和路由的学习。
[DeviceA-security-policy-ipv6] rule name ospf1
[DeviceA-security-policy-ipv6-4-ospf1] source-zone trust
[DeviceA-security-policy-ipv6-4-ospf1] destination-zone local
[DeviceA-security-policy-ipv6-4-ospf1] service ospf
[DeviceA-security-policy-ipv6-4-ospf1] action pass
[DeviceA-security-policy-ipv6-4-ospf1] quit
[DeviceA-security-policy-ipv6] rule name ospf2
[DeviceA-security-policy-ipv6-5-ospf2] source-zone local
[DeviceA-security-policy-ipv6-5-ospf2] destination-zone trust
[DeviceA-security-policy-ipv6-5-ospf2] service ospf
[DeviceA-security-policy-ipv6-5-ospf2] action pass
[DeviceA-security-policy-ipv6-5-ospf2] quit
[DeviceA-security-policy-ipv6] rule name ospf3
[DeviceA-security-policy-ipv6-6-ospf3] source-zone untrust
[DeviceA-security-policy-ipv6-6-ospf3] destination-zone local
[DeviceA-security-policy-ipv6-6-ospf3] service ospf
[DeviceA-security-policy-ipv6-6-ospf3] action pass
[DeviceA-security-policy-ipv6-6-ospf3] quit
[DeviceA-security-policy-ipv6] rule name ospf4
[DeviceA-security-policy-ipv6-7-ospf4] source-zone local
[DeviceA-security-policy-ipv6-7-ospf4] destination-zone untrust
[DeviceA-security-policy-ipv6-7-ospf4] service ospf
[DeviceA-security-policy-ipv6-7-ospf4] action pass
[DeviceA-security-policy-ipv6-7-ospf4] quit
[DeviceA-security-policy-ipv6] quit
e. 配置高可靠性
# 配置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同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
[DeviceA] remote-backup group
[DeviceA-remote-backup-group] remote-ipv6 3005::2
[DeviceA-remote-backup-group] local-ipv6 3005::1
[DeviceB-remote-backup-group] >gigabitethernet 1/0/3
[DeviceA-remote-backup-group] device-role primary
RBM_P[DeviceA-remote-backup-group] backup-mode dual-active
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
RBM_P[DeviceA-remote-backup-group] delay-time 1
# 开启HA调整备设备上动态路由协议OSPFv3的开销值功能,并以绝对方式对外通告开销值,绝对值为6000。
RBM_P[DeviceA-remote-backup-group] adjust-cost ospfv3 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
f. 配置安全业务
# 以上有关HA的配置部署完成后,可以配置各种安全业务。对于HA支持配置信息备份的功能模块仅需要在此主管理设备上(Device A)进行配置即可。
(5) 配置Device B
a. 配置接口IPv6地址
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ipv6 address 3004::1/64
[DeviceB-GigabitEthernet1/0/1] ipv6 address auto link-local
[DeviceB-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
b. 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[DeviceB] security-zone name untrust
[DeviceB-security-zone-Untrust] import interface gigabitethernet 1/0/1
[DeviceB-security-zone-Untrust] quit
[DeviceB] security-zone name trust
[DeviceB-security-zone-Trust] import interface gigabitethernet 1/0/2
[DeviceB-security-zone-Trust] quit
c. 配置OSPFv3,保证路由可达
# 配置设备上的OSPFv3功能,OSPFv3协议自身的链路开销值建议保持默认配置即可。
[DeviceB] ospfv3 1
[DeviceB-ospfv3-1] router-id 3.1.1.1
[DeviceB-ospfv3-1] quit
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ospfv3 1 area 0
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface GigabitEthernet1/0/2
[DeviceB-GigabitEthernet1/0/2] ospfv3 1 area 0
[DeviceB-GigabitEthernet1/0/2] quit
d. 配置高可靠性
# 配置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同时处理业务,提高业务处理能力。但是当Device A或其链路发生故障时,Device B可以接替Device A继续工作,保证业务不会中断。
[DeviceB] remote-backup group
[DeviceB-remote-backup-group] remote-ipv6 3005::1
[DeviceB-remote-backup-group] local-ipv6 3005::2
[DeviceB-remote-backup-group] >gigabitethernet 1/0/3
[DeviceB-remote-backup-group] device-role secondary
RBM_S[DeviceB-remote-backup-group] backup-mode dual-active
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
RBM_S[DeviceB-remote-backup-group] delay-time 1
# 开启HA调整备设备上动态路由协议OSPF的开销值功能,并以绝对方式对外通告开销值,绝对值为6000。
RBM_S[DeviceB-remote-backup-group] adjust-cost ospfv3 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的默认网关为2002::1。
(1) Device A
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_P[DeviceA] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Primary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IPv6: 3005::1
Remote IPv6: 3005::2 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过查看Device A的OSPFv3路由信息,可看到Device A的Cost值与Device B相同,上下行流量会在Device A和Device B之间进行负载分担。
RBM_P[DeviceA] display ospfv3 interface
OSPFv3 Process 1 with Router ID 2.1.1.1
Area: 0.0.0.0
-------------------------------------------------------------------------
ID State Cost Pri DR BDR Ins Name
2 DR 1 1 2.1.1.1 1.1.1.1 0 GE1/0/1
3 BDR 1 1 4.1.1.1 2.1.1.1 0 GE1/0/2
(2) Device B
# 以上配置完成后,通过执行以下显示命令可查看HA配置已生效,HA通道已建立。
RBM_S[DeviceB] display remote-backup-group status
Remote backup group information:
Backup mode: Dual-active
Device management role: Secondary
Device running status: Active
Data channel interface: GigabitEthernet1/0/3
Local IPv6: 3005::2
Remote IPv6: 3005::1 Destination port: 60064
Control channel status: Connected
Keepalive interval: 1s
Keepalive count: 10
Configuration consistency check interval: 12 hour
Configuration consistency check result: Not Performed
Configuration backup status: Auto sync enabled
Session backup status: Hot backup enabled
Delay-time: 1 min
Uptime since last switchover: 0 days, 3 hours, 11 minutes
Switchover records:
Time Status change Cause
2021-06-22 13:33:33 Initial to Active Interface status changed
# 以上配置完成后,通过查看Device B的OSPFv3路由信息,可看到Device B的Cost值与Device A相同,上下行流量会在Device A和Device B之间进行负载分担。
RBM_S[DeviceB] display ospfv3 interface
OSPFv3 Process 1 with Router ID 3.1.1.1
Area: 0.0.0.0
-------------------------------------------------------------------------
ID State Cost Pri DR BDR Ins Name
2 DR 1 1 3.1.1.1 1.1.1.1 0 GE1/0/1
3 BDR 1 1 4.1.1.1 3.1.1.1 0 GE1/0/2
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
可以