NSRP各种部署和应用(有详细命令).doc_第1页
NSRP各种部署和应用(有详细命令).doc_第2页
NSRP各种部署和应用(有详细命令).doc_第3页
NSRP各种部署和应用(有详细命令).doc_第4页
NSRP各种部署和应用(有详细命令).doc_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

NETSCREEN NSRP典型配置及维护一、NSRP工作原理NSRP(NetScreen Redundant Protocol)是Juniper公司基于VRRP协议规范自行开发的设备冗余协议。防火墙作为企业核心网络中的关键设备,需要为所有进出网络的信息流提供安全保护,为满足客户不间断业务访问需求,要求防火墙设备必须具备高可靠性,能够在设备、链路及互连设备出现故障的情况下,提供网络访问路径无缝切换。NSRP冗余协议提供复杂网络环境下的冗余路径保护机制。NSRP主要功能有:1、在高可用群组成员之间同步配置信息;2、提供活动会话同步功能,以保证发生路径切换情况下不会中断网络连接;3、采用高效的故障切换算法,能够在短短几秒内迅速完成故障检测和状态切换。NSRP集群两种工作模式:一、Active/Passive模式:通过对一个冗余集群中的两台安全设备进行电缆连接和配置,使其中一台设备作为主用设备,另一台作为备用设备。主用设备负责处理所有网络信息流,备用设备处于在线备份状态。主设备将其网络和配置命令及当前会话信息传播到备用设备,备用设备始终保持与主用设备配置信息和会话连接信息的同步,并跟踪主用设备状态,一旦主设备出现故障,备份设备将在极短时间内晋升为主设备并接管信息流处理。二、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会话同步,数据链路用于在两防火墙间必要时传输数据流量。NS-A(主用):Set hostname NS-A /*定义主机名*/Set interface ethernet1 zone untrustSet interface ethernet1 ip /29Set interface ethernet1 routeSet interface ethernet2 zone trustSet interface ethernet2 ip /29Set interface ethernet2 routeSet interface mgt ip /24 /*通过管理口远程管理NS-A*/*配置接口:Untrust/Trust Layer3 路由模式*/Set interface ethernet3 zone HASet interface ethernet4 zone HA/*Eth3和Eth4口用于HA互连,用于同步配置文件、会话信息和跟踪设备状态信息*/set nsrp cluster id 1set nsrp rto-mirror syncset nsrp vsd-group id 0 priority 50 /*缺省值为100,低值优先成为主用设备*/set nsrp monitor interface ethernet2set nsrp monitor interface ethernet1/*配置NSRP:Vsd-group缺省为0,VSI使用物理接口IP地址,非抢占模式*/NS-B(备用):Set hostname NS-B /*定义主机名*/Set interface ethernet1 zone UntrustSet interface ethernet1 ip /29Set interface ethernet1 routeSet interface ethernet2 zone trustSet interface ethernet2 ip /29Set interface ethernet2 routeSet interface mgt ip /24 /*通过管理口远程管理NS-A*/*配置接口:Untrust/Trust Layer3 路由模式*/Set interface ethernet3 zone HASet interface ethernet4 zone HA/*Eth3和Eth4口用于HA互连,用于同步配置文件、会话信息和跟踪设备状态信息*/set nsrp cluster id 1set nsrp rto-mirror syncset nsrp vsd-group id 0 priority 100set nsrp monitor interface ethernet2set nsrp monitor interface ethernet1/*Vsd-group缺省为0,VSI使用物理接口IP地址,备用设备:优先级100,成为非抢占模式*/2、Layer3 Fullmesh A/P组网模式Layer3 Fullmesh连接A/P组网使用全交叉网络连接模式,容许在同一设备上提供链路级冗余,发生链路故障时,由备用链路接管网络流量,防火墙间无需进行状态切换。仅在上行或下行两条链路同时发生故障情况下,防火墙才会进行状态切换,Fullmesh连接进一步提高了业务的可靠性。该组网模式在提供设备冗余的同时提供链路级冗余,成为很多企业部署关键业务时的最佳选择。NS-A(Active):Set hostname NS-A /*定义主机名*/Set interface mgt ip /24 /*通过管理口远程管理NS-A*/Set interface red1 zone Untrust /*创建冗余接口1*/Set interface e1 zone nullSet interface e1 group red1Set interface e2 zone nullSet interface e2 group red1Set interface red1 ip /29Set interface red2 zone trustSet interface e3 zone nullSet interface e3 group red2Set interface e4 zone nullSet interface e4 group red2Set interface red2 ip /29/*配置接口:Untrust/Trust Layer3 路由模式*/Set interface ethernet7 zone haSet interface ethernet8 zone haset nsrp cluster id 1set nsrp rto-mirror sync /*容许会话信息自动同步*/set nsrp vsd-group id 0 priority 50set nsrp monitor interface ethernet2set nsrp monitor interface ethernet1/*配置NSRP:Vsd-group缺省为0,VSI使用物理接口IP地址,优先级为50,非抢占模式*/NS-B(Backup):Set hostname NS-B /*定义主机名*/Set interface mgt ip /24 /*通过管理口远程管理NS-A*/Set interface red1 zone Untrust /*创建冗余接口*/Set interface e1 zone nullSet interface e1 group red1 /*将该物理接口放置到冗余接口中*/Set interface e2 zone nullSet interface e2 group red1Set interface red1 ip /29Set interface red2 zone trustSet interface e3 zone nullSet interface e3 group red2Set interface e4 zone nullSet interface e4 group red2Set interface red2 ip /29/*配置接口:Untrust/Trust Layer3 路由模式*/Set interface ethernet7 zone haSet interface ethernet8 zone haset nsrp cluster id 1set nsrp rto-mirror sync /*容许会话信息自动同步*/set nsrp vsd-group id 0 priority 100set nsrp monitor interface ethernet2set nsrp monitor interface ethernet1/*Vsd-group缺省为0,VSI使用物理接口IP地址,备用设备*/3、Layer3 Fullmesh连接A/A组网模式Layer3 Fullmesh连接A/A结构提供了一种更为灵活的组网方式,在保证网络高可靠性的同时提升了网络的可用性。A/A结构中两台防火墙同时作为主用设备并提供互为在线备份,各自独立处理信息流量并共享连接会话信息。一旦发生设备故障另一台设备将负责处理所有进出网络流量。Fullmesh连接A/A组网模式对网络环境要求较高,要求网络维护人员具备较强技术能力,防火墙发生故障时,接管设备受单台设备容量限制,可能会导致会话连接信息丢失,采用A/A模式组网时,建议每台防火墙负责处理的会话连接数量不超过单台设备容量的50,以确保故障切换时不会丢失会话连接。配置说明:定义VSD0和VSD1虚拟安全设备组(创建Cluster ID时将自动创建VSD0),其中NS-A为VSD0主用设备和VSD1备用设备,NS-B为VSD1主用设备和VSD0备用设备;创建冗余接口实现两物理接口动态冗余;配置交换机路由指向来引导网络流量经过哪个防火墙。NS-A(Active):set interface redundant1 zone Untrustset interface redundant1 ip /29 /*VSD0的VSI接口使用物理接口IP地址*/set interface ethernet1 group redundant1set interface ethernet2 group redundant1set interface redundant2 zone trustset interface redundant2 ip /29set interface redundant2 manage-ip set interface ethernet3 group redundant2 set interface ethernet4 group redundant2/*配置冗余接口、定义Vsd0 接口IP地址*/set interface redundant1:1 ip /29 set interface redundant2:1 ip /29 /*VSD1的VSI接口需手动配置IP地址,冒号后面的1表示该接口属于VSD1的VSI*/set interface ethernet7 zone haset interface ethernet8 zone haset nsrp cluster id 1set nsrp vsd-group id 0 priority 50set nsrp vsd-group id 1 /* VSD1使用缺省配置,优先级为100*/set nsrp rto-mirror syncset nsrp monitor interface redundant1set nsrp monitor interface redundant2set nsrp secondary-path ethernet2/1 /*定义NSRP备用心跳接口,保证心跳连接信息不会丢失*/set arp always-on-dest/*强制采用基于ARP表而不是会话表中的MAC地址转发封包*/set vrouter trust-vr route /0 interface redundant1 gateway set vrouter trust-vr route /0 interface redundant1:1 gateway NS-B(Active):set interface redundant1 zone Untrustset interface redundant1 ip /29 /*VSD0的VSI接口使用物理接口IP地址*/set interface ethernet1 group redundant1set interface ethernet2 group redundant1set interface redundant2 zone trustset interface redundant2 ip /29set interface redundant2 manage-ip set interface ethernet3 group redundant2 set interface ethernet4 group redundant2/*配置冗余接口、定义Vsd0 接口IP地址*/set interface redundant1:1 ip /29 set interface redundant2:1 ip /29 set interface ethernet7 zone haset interface ethernet8 zone haset nsrp cluster id 1 /*定义一致的Cluster ID,自动启用采用缺省配置的VSD0*/set nsrp rto-mirror syncset nsrp vsd-group id 1 priority 50set nsrp monitor interface redundant1set nsrp monitor interface redundant2set nsrp secondary-path ethernet2/1 /*定义NSRP备用心跳接口,保证心跳连接信息不会丢失*/set arp always-on-dest/*强制采用基于ARP表而不是会话中的MAC地址转发封包*/set vrouter trust-vr route /0 interface redundant1 gateway set vrouter trust-vr route /0 interface redundant1:1 gateway 三、NSRP常用维护命令1、get license-key 查看防火墙支持的feature,其中NSRPA/A模式包含了A/P模式,A/P模式不支持A/A模式。Lite版本是简化版,支持设备和链路冗余切换,不支持配置和会话同步。2、exec nsrp sync global-config check-sum 检查双机配置命令是否同步3、exec nsrp sync global-config save 如双机配置信息没有自动同步,请手动执行此同步命令,需重启系统。4、get nsrp 查看NSRP集群中设备状态、主备关系、会话同步以及参数开关信息。5、Exec nsrp sync rto all from peer手动执行RTO信息同步,使双机保持会话信息一致6、exec nsrp vsd-group 0 mode backup手动进行主备状态切换时,在主用设备上执行该切换命令,此时该主用设备没有启用抢占模式。7、exec nsrp vsd-group 0 mode ineligible手动进行主备状态切换时,在主用设备上执行该切换命令,此时该主用设备已启用抢占模式。8、get alarm event检查设备告警信息,其中将包含NSRP状态切换信息四、Netscreen NSRP维护案例案例1: Netscreen双机升级步骤1使用Tftp备份两台防火墙现有配置文件和OS系统文件。2升级步骤为先升级备用设备后升级主用设备,如果是Active/Active模式请切换为Active/Passive模式后再升级备用设备。用笔记本电脑连接NS-B的Console口和MGT口,通过Web界面上对NS-B进行升级,并在Console口上观察升级过程。3NS-B升级后将自动重启,通过Console口观察重启过程。启动后在console上输入get system命令,验证升级后的版本号。输入get license,验证license信息是否符合升级要求。输入get nsrp,验证此设备处于备机状态。4Session信息应该自动从主机上同步到备机。为进一步确保Session信息同步,在NS-B上执行exec nsrp syn rto all from peer,手工同步Session信息。5主备双机进行状态切换。用笔记本接NS-A的Console口,输入exec nsrp vsd-group 0 mode backup命令,将状态切换。使用get nsrp命令,验证设备状态已切换完成,此时NS-A为备机,NS-B为主机。6在Web界面上对NS-A进行升级,在Console口上观察升级过程。7NS-A升级后会自动重起,在Console口上观察重起过程。启动后在console上输入get system命令,验证升级后的版本号。输入get license,验证license信息是否满足升级需求。输入get nsrp验证此台设备为备机状态。8恢复原先的主备状态:在NS-B上执行exec nsrp vsd-group 0 mode backup命令,将状态切换。验证设备状态已切换完成,此时NS-A为主机,NS-B为备机。9在设备NS-A上执行exec nsrp syn vsd-group 0 global-config checksum,验证两台设备的配置同步。如双机配置文件没有同步,请执行exec nsrp syn vsd-group 0 global-config save 手动进行配置同步。10观察两台防火墙的日志,验证是否存在异常告警信息。案例2:快速配置NSRP集群备用设备Netscreen提供快速配置NSRP集群中备用设备的方法,适用于创建NSRP集群双机配置和备用设备出现故障时用备件进行替换。1、清空备机配置命令Unset allErase all system config, are you sure y / n? YResetConfiguration modified, save? y / n NSystem reset, are you sure? y / n Y2、系统重新启动后配置命令Set hostname xxxxxxSet interface mgt ip x.x.x.x/xSet nsrp cluster id 1Exec nsrp sync fileExec nsrp sync global-config run /*适应于5.1以上版本,5.0中使用Exec nsrp sync global-config save命令,需要重启设备*/Set nsrp rto-mirror syncSave all3、检查设备状态Nsrp:get nsrp接口:Get interface路由:get route会话:get session附录一 NSRP 缺省设置值VSD 组信息l VSD group ID: 0l Device priority in the VSD group: 100l Preempt option: disablel Preempt hold-down time: 0 secondl Initial state hold-down time: 5 secondl Heartbeat interval: 1000 milliseconds l Lost heartbeat threshold: 3l Master (Primary) always exist: noRTO 镜像信息l RTO synchronization: disablel Heartbeat interval: 4 secondl Lost heartbeat threshold: 16NSRP 链接信息l Number of gratuitous ARPs: 4l NSRP encryption: disablel NSRP authentication: disablel Track IP: nonel Interfaces monitored: nonel Secondary path: nonel HA link probe: nonel Interval: 15l Threshold: 5juniper防火墙主动/被动全网状NSRP配置实例以下为Juniper ISG-2000防火墙相关配置:一、物理接口配置情况:l NS2000_M(M)- get intl A - Active, I - Inactive, U - Up, D - Down, R - Readyl Interfaces in vsys Root:Name IP Address Zone MAC VLAN State VSDmgt /24 MGT 0010.dbbf.0c80 - D -eth1/1 /0 Untrust 0010.dbff.4070 - U 0eth1/2 /0 Untrust 0010.dbff.4080 - U 0eth2/1 /0 Trust 0010.dbff.4150 - U 0eth2/2 /0 Trust 0010.dbff.4160 - U 0eth3/1 /29 DMZ 0010.dbff.41d0 - U 0eth3/2 /0 Null 0010.dbff.41e0 - D 0eth4/1 /0 HA 0010.dbbf.0ca5 - U -eth4/2 /0 HA 0010.dbbf.0ca6 - U -eth4/3 /0 Null 0010.dbff.4270 - D 0eth4/4 /0 IDP 0010.dbff.4280 - U 0eth4/4.200 42/28 IDP 0010.dbff.4280 200 U 0red1 /29 Trust 0010.dbff.4400 - U 0red2 7/29 Untrust 0010.dbff.4410 - U 0vlan1 /0 VLAN 0010.dbff.40f0 1 D 0null /0 Null N/A - U 0l NS2000_B(B)- get intl A - Active, I - Inactive, U - Up, D - Down, R - Readyl Interfaces in vsys Root:Name IP Address Zone MAC VLAN State VSDmgt /24 MGT 0010.dbbf.0c00 - D -eth1/1 /0 Untrust 0010.dbff.4070 - I 0eth1/2 /0 Untrust 0010.dbff.4080 - I 0eth2/1 /0 Trust 0010.dbff.4150 - I 0eth2/2 /0 Trust 0010.dbff.4160 - I 0eth3/1 /29 DMZ 0010.dbff.41d0 - I 0eth3/2 /0 Null 0010.dbff.41e0 - I 0eth4/1 /0 HA 0010.dbbf.0c25 - U -eth4/2 /0 HA 0010.dbbf.0c26 - U -eth4/3 /0 Null 0010.dbff.4270 - I 0eth4/4 /0 IDP 0010.dbff.4280 - I 0eth4/4.200 42/28 IDP 0010.dbff.4280 200 I 0red1 /29 Trust 0010.dbff.4400 - I 0red2 7/29 Untrust 0010.dbff.4410 - I 0vlan1 /0 VLAN 0010.dbff.40f0 1 I 0null /0 Null N/A - U 0二、HA配置NS2000_M(M)- get config | in ethernet4/1set interface ethernet4/1 zone HANS2000_M(M)- get config | in ethernet4/2set interface ethernet4/2 zone HANS2000_B(B)- get config | in ethernet4/1set interface ethernet4/1 zone HANS2000_B(B)- get config | in ethernet4/2set interface ethernet4/2 zone HA三、冗余接口配置NS2000_M(M)- get config | in redundant1set interface id 64 redundant1 zone Trustset interface ethernet2/1 group redundant1set interface ethernet2/2 group redundant1set interface redundant1 ip /29set interface redundant1 routeset interface redundant1 manage-ip unset interface redundant1 ip manageableNS2000_B(B)- get config | in redundant1set interface id 64 redundant1 zone Trustset interface ethernet2/1 group redundant1set interface ethernet2/2 group redundant1set interface redundant1 ip /29set interface redundant1 routeset interface redundant1 manage-ip unset interface redundant1 ip manageable四、NSRP配置NS2000_M(M)- get config | in nsrpset nsrp cluster id 2set nsrp rto-mirror syncset nsrp rto-mirror session ageout-ackset nsrp vsd-group id 0 priority 50set nsrp vsd-group id 0 preempt hold-down 1set nsrp monitor interface redundant1set nsrp monitor interface redundant2set nsrp monitor interface ethernet3/1set nsrp ha-link probeNS2000_B(B)- get config | in nsrpset nsrp cluster id 2set nsrp rto-mirror syncset nsrp rto-mirror session ageout-ackset nsrp vsd-group id 0 priority 100set nsrp monitor interface redundant1set nsrp monitor interface redundant2set nsrp monitor interface ethernet3/1set nsrp ha-link probe以下为华为交换机S8512相关配置:一、VLAN配置情况disp vlan 80VLAN ID: 80VLAN Type: staticRoute Interface: configuredIP Address: Subnet Mask: 48Description: NetScreenName: VLAN 0080Tagged Ports: GigabitEthernet5/1/24 GigabitEthernet8/1/22 Untagged Ports: GigabitEthernet5/1/23 GigabitEthernet8/1/21disp vlan 80VLAN ID: 80VLAN Type: staticRoute Interface: configuredIP Address: Subnet Mask: 48Description: VLAN 0080Name: VLAN 0080Tagged Ports: GigabitEthernet5/1/24 GigabitEthernet8/1/22Untagged Ports: GigabitEthernet5/1/23 GigabitEthernet8/1/21二、VLAN起三层接口配置情况disp cur | be interface Vlan-interface80interface Vlan-interface80description NetScreenip address 48vrrp vrid 80 virtual-ip vrrp vrid 80 priority 200vrrp vrid 80 preempt-mode timer delay 3disp cur | be interface Vlan-interface80interface Vlan-interface80description NetScreenip addres

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论