NSRP(NetScreen Redundant Protocol)是Juniper公司基于VRRP协议规范自行开发的冗余协议。作为企业核心网络中的关键,需要为所有进出网络的信息流提供安全保护,为满足客户不间断业务访问需求,要求设备必须具备高可靠性,能够在设备、链路及互连设备出现故障的情况下,提供网络访问路径无缝切换。NSRP冗余协议提供复杂网络环境下的冗余路径保护机制。NSRP主要功能有:1、在高可用群组成员之间同步信息;2、提供活动会话同步功能,以保证发生路径切换情况下不会中断网络连接;3、采用高效的故障切换算法,能够在短短几秒内迅速完成故障检测和状态切换。
二、NSRP集群两种工作模式:
1、Active/Passive模 式:通过对一个冗余集群中的两台安全设备进行电缆连接和配置,使其中一台设备作为主用设备,另一台作为备用设备。主用设备负责处理所有网络信息流,备用设 备处于在线备份状态。主设备将其网络和配置命令及当前会话信息传播到备用设备,备用设备始终保持与主用设备配置信息和会话连接信息的同步,并跟踪主用设备 状态,一旦主设备出现故障,备份设备将在极短时间内晋升为主设备并接管信息流处理。
2、Active/Active模式:在NSRP中创建两个虚拟安全设备 (VSD) 组,每个组都具有自己的虚拟安全接口(VSI),通过VSI接口与网络进行通信。设备A充当VSD组1的主设备和VSD 组2的备份设备。设备B充当VSD组2的主设备和VSD组1的备份设备。Active/Active模式中两台防火墙同时进行信息流的处理并彼此互为备份。在双主动模式中不存在任何单一故障点。如下图所示,通过调整防火墙上下行路由/交换设备到网络的路由指向,HostA通过左侧路径访问ServerA,HostB通过右侧路径访问ServerB,网络中任一设备或链路出现故障时,NSRP集群均能够做出正确的路径切换。
NSRP集群技术优势主要体现于:
1、消除防火墙及前后端设备单点故障,提供网络高可靠性。即使在骨干网络中两类核心设备同时出现故障,也能够保证业务安全可靠运行。
2、根据客户网络环境和业务可靠性需要,提供灵活多样的可靠组网方式。NSRP双机集群能够提供1、Active-Passive模式Layer2/3多虚拟路由器多虚拟系统和口型/交叉型组网方式;2、Active-Active模式Layer2/3多虚拟路由器多虚拟系统和口型/Fullmesh交叉型组网方式。为用户提供灵活的组网选择。
3、NSRP双机结构便于网络维护管理,通过将流量在双机间的灵活切换,在防火墙软件升级、前后端网络结构优化改造及故障排查时,双机结构均能够保证业务的不间断运行。
4、结合Netscreen虚拟系统和虚拟路由器技术,部署一对NSRP集群防火墙,可以为企业更多的应用提供灵活可靠的安全防护,减少企业防火墙部署数量和维护成本。
三、NSRP典型结构与配置
1、Layer3 口型A/P组网模式
Layer3 口型A/P组网模式是当前很多企业广泛采用的HA模式,该模式具有对网络环境要求不高,无需网络结构做较大调整,具有较好冗余性、便于管理维护等优点。缺点是Netscreen防火墙利用率不高,同一时间只有一台防火墙处理网络流量;冗余程度有限,仅在一侧链路和设备出现故障时提供冗余切换。Layer3 口型组网A/P模式具有较强冗余性、低端口成本和网络结构简单、便于维护管理等角度考虑,成为很多企业选用该组网模式的标准。
配置说明:两台Netscreen设备采用相同硬件型号和软件版本,组成Active/Passive冗余模式,两台防火墙均使用一致的Ethernet接口编号连接到网络。通过双HA端口或将2Ethernet接口放入HA区段,其中控制链路用于NSRP心跳信息、配置信息和Session会话同步,数据链路用于在两防火墙间必要时传输数据流量。
2、Layer3 Fullmesh A/P组网模式
Layer3 Fullmesh连接A/P组网使用全交叉网络连接模式,容许在同一设备上提供链路级冗余,发生链路故障时,由备用链路接管网络流量,防火墙间无需进行状态切换。仅在上行或下行两条链路同时发生故障情况下,防火墙才会进行状态切换,Fullmesh连接进一步提高了业务的可靠性。该组网模式在提供设备冗余的同时提供链路级冗余,成为很多企业部署关键业务时的最佳选择。
3、Layer3 Fullmesh A/A组网模式:
Layer3 Fullmesh
三、NSRP典型结构与配置(A)
1.Layer3 口型A/P组网模式
Layer3 口型A/P组网模式是当前很多企业广泛采用的HA模式,该模式具有对网络环境要求不高,无需网络结构做较大调整,具有较好冗余性、便于管理维护等优点。缺点是Netscreen防火墙利用率不高,同一时间只有一台防火墙处理网络流量;冗余程度有限,仅在一侧链路和设备出现故障时提供冗余切换。Layer3 口型组网A/P模式具有较强冗余性、低端口成本和网络结构简单、便于维护管理等角度考虑,成为很多企业选用该组网模式的标准。
配置说明:两台Netscreen设备采用相同硬件型号和软件版本,组成Active/Passive冗余模式,两台防火墙均使用一致的Ethernet接口编号连接到网络。通过双HA端口或将2Ethernet接口放入HA区段,其中控制链路用于NSRP心跳信息、配置信息和Session会话同步,数据链路用于在两防火墙间必要时传输数据流量。
HA 注意事項:
必須在Backup 那一台清空配置,然後只需要配置HA port HA 配置, Hostname , manager IPand MGT port IP , IOS 版本相同。
网络拓扑结构图:
设置步骤:
1、 将两台防火墙的第四个端口连接在一起,我们设置将原有防火墙设置为主防火墙,新增加的防火墙
为备份的防火墙,备份的防火墙只连接第四个端口,其他的端口将在防火墙配置完毕后才连接上
2、 使用终端线缆连接到防火墙的Console 口,超级终端参数设置为9600-8-无-1-无。
为备份的防火墙,备份的防火墙只连接第四个端口,其他的端口将在防火墙配置完毕后才连接上
2、 使用终端线缆连接到防火墙的Console 口,超级终端参数设置为9600-8-无-1-无。
一、命令行配置方式
1、主防火墙配置,(移动公司在线使用的Netscreen-204 防火墙)
ns204>unset interface e4 ip 将端口4 的IP 地址删除,
ns204>set interface e4 zone ha 将端口4 和HA 区域绑定一起
ns204>unset interface e4 ip 将端口4 的IP 地址删除,
ns204>set interface e4 zone ha 将端口4 和HA 区域绑定一起
配置NSRP
ns204-> get nsrp 查看NSRP 配置信息
nsrp version: 2.0
cluster info:
cluster id not set: nsrp is inactive 默认的情况下NSRP 没有击活
VSD group info:
init hold time: 5
heartbeat lost threshold: 3
heartbeat interval: 1000(ms)
group priority preempt holddown inelig master PB other members
total number of vsd groups: 0
Total iteration=3808,time=2721060,max=880,min=286,average=714
RTO mirror info:
run time object sync: disabled
ping session sync: enabled
coldstart sync done
nsrp link info:
no nsrp link has been defined yet
NSRP encryption: disabled
--- more ---
NSRP authentication: disabled
NSRP monitor interface: none
number of gratuitous arps: 4 (default)
track ip: disabled
run time object sync: disabled
ping session sync: enabled
coldstart sync done
nsrp link info:
no nsrp link has been defined yet
NSRP encryption: disabled
--- more ---
NSRP authentication: disabled
NSRP monitor interface: none
number of gratuitous arps: 4 (default)
track ip: disabled
ns204-> set nsrp cluster id 1 设置cluster 组号
ns204(M)-> set nsrp vsd id 0 设置VSD 的组号,这条命令可以不用输入,因为Netscreen 防火墙的默认的虚拟安全数据库(VSD)的值是0。
ns204(M)-> set nsrp vsd-group id 0 priority 50 设置NSRP 主设备的优先权值,priority 值越小,优先权越高。
ns204(M)-> set nsrp vsd id 0 设置VSD 的组号,这条命令可以不用输入,因为Netscreen 防火墙的默认的虚拟安全数据库(VSD)的值是0。
ns204(M)-> set nsrp vsd-group id 0 priority 50 设置NSRP 主设备的优先权值,priority 值越小,优先权越高。
ns204(M)-> set nsrp rto syn 设置配置同步
ns204(M)-> set nsrp vsd-group id 0 monitor interface ethernet3 设置防火墙监控的端口,假设端口3 出现故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
ns204(M)-> set nsrp vsd-group id 0 monitor interface ethernet1 设置防火墙监控的端口,假设端口1 出现故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
注:如没有监控端口2,端口2 出现故障或连接网络出现故障,将不会激活防火墙工作状态切换
ns204(M)-> set nsrp vsd-group id 0 monitor interface ethernet3 设置防火墙监控的端口,假设端口3 出现故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
ns204(M)-> set nsrp vsd-group id 0 monitor interface ethernet1 设置防火墙监控的端口,假设端口1 出现故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
注:如没有监控端口2,端口2 出现故障或连接网络出现故障,将不会激活防火墙工作状态切换
ns204(M)-> get nsrp
nsrp version: 2.0
cluster info:
cluster id: 1, no name
local unit id: 5609296
active units discovered:
index: 0, unit id: 5609296, total number of units: 1
VSD group info:
init hold time: 5
heartbeat lost threshold: 3
heartbeat interval: 1000(ms)
group priority preempt holddown inelig master PB other members
0 50no 3 no myself none (备份防火墙还没有配置,因此主设备上没有
监测到Backup 防火墙的状态)
total number of vsd groups: 2
Total iteration=4682,time=4184162,max=18848,min=286,average=893
nsrp version: 2.0
cluster info:
cluster id: 1, no name
local unit id: 5609296
active units discovered:
index: 0, unit id: 5609296, total number of units: 1
VSD group info:
init hold time: 5
heartbeat lost threshold: 3
heartbeat interval: 1000(ms)
group priority preempt holddown inelig master PB other members
0 50no 3 no myself none (备份防火墙还没有配置,因此主设备上没有
监测到Backup 防火墙的状态)
total number of vsd groups: 2
Total iteration=4682,time=4184162,max=18848,min=286,average=893
RTO mirror info:
run time object sync: disabled
ping session sync: enabled
nsrp link info:
no nsrp link has been defined yet
NSRP encryption: disabled
NSRP authentication: disabled
NSRP monitor interface: ethernet1
ethernet3
number of gratuitous arps: 4 (default)
track ip: disabled
ns204(M)->
设置NSRP 心跳信息
ns204(M)->
ns204(M)-> set nsrp vsd-group hb-interval 200 设置心跳信息每隔200 秒将发出问候信息
ns204(M)-> set nsrp vsd-group hb-threshold 3 设置心跳信息总共发出3 次问候信息
ns204(M)-> save
run time object sync: disabled
ping session sync: enabled
nsrp link info:
no nsrp link has been defined yet
NSRP encryption: disabled
NSRP authentication: disabled
NSRP monitor interface: ethernet1
ethernet3
number of gratuitous arps: 4 (default)
track ip: disabled
ns204(M)->
设置NSRP 心跳信息
ns204(M)->
ns204(M)-> set nsrp vsd-group hb-interval 200 设置心跳信息每隔200 秒将发出问候信息
ns204(M)-> set nsrp vsd-group hb-threshold 3 设置心跳信息总共发出3 次问候信息
ns204(M)-> save
2.备份防火墙的配置:(新增加的防火墙)
ns204>unset all 将新增防火墙的原有配置清除,恢复出厂状态
Erase all system config, are you sure y/[n] ? y
ns204> reset
Configuration modified, save? [y]/n n
System reset, are you sure? y/[n] y
In reset ...
.................................................................
.................................................................
ns204>set interface e4 zone ha 将端口4 和HA 区域绑定一起
Erase all system config, are you sure y/[n] ? y
ns204> reset
Configuration modified, save? [y]/n n
System reset, are you sure? y/[n] y
In reset ...
.................................................................
.................................................................
ns204>set interface e4 zone ha 将端口4 和HA 区域绑定一起
配置NSRP
ns204-> set nsrp cluster id 1 设置cluster 组号
ns204(B)-> set nsrp vsd id 0 设置VSD 的组号,这条命令可以不用输入,因为Netscreen 防火墙的默认
的虚拟安全数据库(VSD)的值是0。
ns204(B)-> set nsrp vsd-group id 0 priority 100 设置NSRP 主设备的优先权值,priority 值越小,优先权
越高。
ns204(B)-> set nsrp rto syn 设置配置同步
ns204(B)-> set nsrp vsd-group id 0 monitor interface ethernet3 设置防火墙监控的端口,假设端口3 出现
故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
ns204(B)-> set nsrp vsd-group id 0 monitor interface ethernet1 设置防火墙监控的端口,假设端口1 出现
故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
注:如没有监控端口2,端口2 出现故障或连接网络出现故障,将不会激活防火墙工作状态切换
ns204(B)-> get nsrp
nsrp version: 2.0
cluster info:
cluster id: 1, no name
local unit id: 5609745
active units discovered:
index: 0, unit id: 5609745, total number of units: 1
VSD group info:
init hold time: 5
heartbeat lost threshold: 3
heartbeat interval: 1000(ms)
group priority preempt holddown inelig master PB other members
0 50 no 3 no 5609296(主设备) myself
ns204(B)-> set nsrp vsd id 0 设置VSD 的组号,这条命令可以不用输入,因为Netscreen 防火墙的默认
的虚拟安全数据库(VSD)的值是0。
ns204(B)-> set nsrp vsd-group id 0 priority 100 设置NSRP 主设备的优先权值,priority 值越小,优先权
越高。
ns204(B)-> set nsrp rto syn 设置配置同步
ns204(B)-> set nsrp vsd-group id 0 monitor interface ethernet3 设置防火墙监控的端口,假设端口3 出现
故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
ns204(B)-> set nsrp vsd-group id 0 monitor interface ethernet1 设置防火墙监控的端口,假设端口1 出现
故障或所连接的交换机出现故障,防火墙的工作状态将切换到备份防火墙上。
注:如没有监控端口2,端口2 出现故障或连接网络出现故障,将不会激活防火墙工作状态切换
ns204(B)-> get nsrp
nsrp version: 2.0
cluster info:
cluster id: 1, no name
local unit id: 5609745
active units discovered:
index: 0, unit id: 5609745, total number of units: 1
VSD group info:
init hold time: 5
heartbeat lost threshold: 3
heartbeat interval: 1000(ms)
group priority preempt holddown inelig master PB other members
0 50 no 3 no 5609296(主设备) myself
total number of vsd groups: 2
Total iteration=4682,time=4184162,max=18848,min=286,average=893
RTO mirror info:
run time object sync: disabled
ping session sync: enabled
nsrp link info:
no nsrp link has been defined yet
NSRP encryption: disabled
NSRP authentication: disabled
NSRP monitor interface: ethernet1
ethernet3
number of gratuitous arps: 4 (default)
track ip: disabled
ns204(B)->
设置NSRP 心跳信息
ns204(B)->
ns204(B)-> set nsrp vsd-group hb-interval 200 设置心跳信息每隔200 秒将发出问候信息
ns204(B)-> set nsrp vsd-group hb-threshold 3 设置心跳信息总共发出3 次问候信息
ns204(B)-> save
Total iteration=4682,time=4184162,max=18848,min=286,average=893
RTO mirror info:
run time object sync: disabled
ping session sync: enabled
nsrp link info:
no nsrp link has been defined yet
NSRP encryption: disabled
NSRP authentication: disabled
NSRP monitor interface: ethernet1
ethernet3
number of gratuitous arps: 4 (default)
track ip: disabled
ns204(B)->
设置NSRP 心跳信息
ns204(B)->
ns204(B)-> set nsrp vsd-group hb-interval 200 设置心跳信息每隔200 秒将发出问候信息
ns204(B)-> set nsrp vsd-group hb-threshold 3 设置心跳信息总共发出3 次问候信息
ns204(B)-> save
3.同步配置
该步骤将主防火墙的配置和备份防火墙的配置进行同步,(强调一点,设置前请先将主防火墙的配置备
份一次,具体步骤请参考《维护文档》)。
使用超级终端登陆备份防火墙的console 端口。
使用一下命令:
ns204(B)-> exec nsrp sync global-config check-sum (将两台设备的配
置进行校检,如有不同,备份的设备将会在重启后把主设备上的配置导入备份主机中)
ns204(B)-> exec nsrp sync global-config save (如有不同,备份的设
备将会在重启后把主设备上的配置导入备份主机中)
以下信息只有在超级终端上才有显示:
ns204(B)-> configuration in sync (local checksum 789579268 ==
remote checksum 789579268)
sync all files from peer done
Received all run-time-object from peer.
份一次,具体步骤请参考《维护文档》)。
使用超级终端登陆备份防火墙的console 端口。
使用一下命令:
ns204(B)-> exec nsrp sync global-config check-sum (将两台设备的配
置进行校检,如有不同,备份的设备将会在重启后把主设备上的配置导入备份主机中)
ns204(B)-> exec nsrp sync global-config save (如有不同,备份的设
备将会在重启后把主设备上的配置导入备份主机中)
以下信息只有在超级终端上才有显示:
ns204(B)-> configuration in sync (local checksum 789579268 ==
remote checksum 789579268)
sync all files from peer done
Received all run-time-object from peer.
configuration in sync (local checksum 789579268 == remote
checksum 789579268)
load peer system config to save
Save global configuration successfully.
Save local configuration successfully.
done.
Please reset your box to let cluster configuration take
effect!
重启备份防火墙,在重启的过程中,备份的防火墙将会从主设备上同步配置
ns204(B)-> reset
Netscreen 防火墙的冗余配置结束。
checksum 789579268)
load peer system config to save
Save global configuration successfully.
Save local configuration successfully.
done.
Please reset your box to let cluster configuration take
effect!
重启备份防火墙,在重启的过程中,备份的防火墙将会从主设备上同步配置
ns204(B)-> reset
Netscreen 防火墙的冗余配置结束。
------------------------------------------------------------------------------------
二、图形界面下的配置步骤
1、登陆防火墙的图形管理界面
选择network>Interface> Ethernet4 > edit
选择network>Interface> Ethernet4 > edit
将Ethernet4 端口的Zone name 选择HA ,将Ethernet4 端口的IP 地址全部删除
NSRP 设置
选择Network > Redundancy >Settings
在Cluster ID 中输入1,选择NSRP RTO Mirror Synchronization
选择Network > Redundancy >Settings
在Cluster ID 中输入1,选择NSRP RTO Mirror Synchronization
选择Monitor Port > Edit > 选择Ethernet 1 和ethernet3
VSD 设置
选择Network > Redundancy > VSD Group > New
选择Network > Redundancy > VSD Group > New
在Group ID 中输入0,在Prority 中输入优先权值100
同样的步骤配置备份的防火墙。
2、同步配置
该步骤将主防火墙的配置和备份防火墙的配置进行同步,(强调一点,设置前请先将主防火墙的配置备份一次)。
使用超级终端登陆备份防火墙的console 端口。
使用一下命令:
该步骤将主防火墙的配置和备份防火墙的配置进行同步,(强调一点,设置前请先将主防火墙的配置备份一次)。
使用超级终端登陆备份防火墙的console 端口。
使用一下命令:
ns204(B)-> exec nsrp sync global-config check-sum (将两台设备的配置进行校检,如有不同,备份的设备将会在重启后把主设备上的配置导入备份主机中)
ns204(B)-> exec nsrp sync global-config save (如有不同,备份的设备将会在重启后把主设备上的配置导入备份主机中)
以下信息只有在超级终端上才有显示:
ns204(B)-> configuration in sync (local checksum 789579268 ==remote checksum 789579268)
sync all files from peer done
Received all run-time-object from peer.
configuration in sync (local checksum 789579268 == remote checksum 789579268)
load peer system config to save
Save global configuration successfully.
Save local configuration successfully.
done.
Please reset your box to let cluster configuration take effect!
重启备份防火墙,在重启的过程中,备份的防火墙将会从主设备上同步配置
ns204(B)-> reset
ns204(B)-> exec nsrp sync global-config save (如有不同,备份的设备将会在重启后把主设备上的配置导入备份主机中)
以下信息只有在超级终端上才有显示:
ns204(B)-> configuration in sync (local checksum 789579268 ==remote checksum 789579268)
sync all files from peer done
Received all run-time-object from peer.
configuration in sync (local checksum 789579268 == remote checksum 789579268)
load peer system config to save
Save global configuration successfully.
Save local configuration successfully.
done.
Please reset your box to let cluster configuration take effect!
重启备份防火墙,在重启的过程中,备份的防火墙将会从主设备上同步配置
ns204(B)-> reset
Netscreen 防火墙的冗余配置结束。