三、NSRP典型结构与配置(A)
 
1.Layer3 口型A/P组网模式 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

       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-无。
 
一、命令行配置方式
 
1、主防火墙配置,(移动公司在线使用的Netscreen-204 防火墙)
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
 
 
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 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)-> 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
 
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
 
 
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 区域绑定一起

配置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
 
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
 
 
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.
 
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 防火墙的冗余配置结束。
 
------------------------------------------------------------------------------------
 
 
二、图形界面下的配置步骤
 
1、登陆防火墙的图形管理界面
选择network>Interface> Ethernet4 > edit
 
将Ethernet4 端口的Zone name 选择HA ,将Ethernet4 端口的IP 地址全部删除
 
NSRP 设置
选择Network > Redundancy >Settings
在Cluster ID 中输入1,选择NSRP RTO Mirror Synchronization
 
选择Monitor Port > Edit > 选择Ethernet 1 和ethernet3
 
VSD 设置
选择Network > Redundancy > VSD Group > New
 
在Group ID 中输入0,在Prority 中输入优先权值100
 
同样的步骤配置备份的防火墙。
 
 
2、同步配置
    该步骤将主防火墙的配置和备份防火墙的配置进行同步,(强调一点,设置前请先将主防火墙的配置备份一次)。
? 使用超级终端登陆备份防火墙的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 防火墙的冗余配置结束。