Juniper NETSCREEN NSRP典型配置及維護
Juniper NETSCREEN NSRP典型配置及維護之一: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 Untrust
set interface redundant1 ip 100.1.1.4/29 /***VSD0的VSI接口使用物理接口IP地址***/
set interface ethernet1 group redundant1
set interface ethernet2 group redundant1
set interface redundant2 zone trust
set interface redundant2 ip 192.168.1.4/29
set interface redundant2 manage-ip 192.168.2.1
set interface ethernet3 group redundant2
set interface ethernet4 group redundant2
/***配置冗余接口、定義Vsd0 接口IP地址***/
set interface redundant1:1 ip 100.1.1.5/29
set interface redundant2:1 ip 192.168.1.5/29
/***VSD1的VSI接口需手動配置IP地址,冒號后面的1表示該接口屬于VSD1的VSI***/
set interface ethernet7 zone ha
set interface ethernet8 zone ha
set nsrp cluster id 1
set nsrp vsd-group id 0 priority 50
set nsrp vsd-group id 1 /*** VSD1使用缺省配置,優先級為100***/
set nsrp rto-mirror sync
set nsrp monitor interface redundant1
set nsrp monitor interface redundant2
set nsrp secondary-path ethernet2/1
/***定義NSRP備用心跳接口,保證心跳連接信息不會丟失***/
set arp always-on-dest
/***強制采用基于ARP表而不是會話表中的MAC地址轉發封包***/
set vrouter trust-vr route 0.0.0.0/0 interface redundant1 gateway 100.1.1.1
set vrouter trust-vr route 0.0.0.0/0 interface redundant1:1 gateway 100.1.1.1
NS-B(Active):
set interface redundant1 zone Untrust
set interface redundant1 ip 100.1.1.4/29 /***VSD0的VSI接口使用物理接口IP地址***/
set interface ethernet1 group redundant1
set interface ethernet2 group redundant1
set interface redundant2 zone trust
set interface redundant2 ip 192.168.1.4/29
set interface redundant2 manage-ip 192.168.2.2
set interface ethernet3 group redundant2
set interface ethernet4 group redundant2
/***配置冗余接口、定義Vsd0 接口IP地址***/
set interface redundant1:1 ip 100.1.1.5/29
set interface redundant2:1 ip 192.168.1.5/29
set interface ethernet7 zone ha
set interface ethernet8 zone ha
set nsrp cluster id 1
/***定義一致的Cluster ID,自動啟用采用缺省配置的VSD0***/
set nsrp rto-mirror sync
set nsrp vsd-group id 1 priority 50
set nsrp monitor interface redundant1
set nsrp monitor interface redundant2
set nsrp secondary-path ethernet2/1
/***定義NSRP備用心跳接口,保證心跳連接信息不會丟失***/
set arp always-on-dest
/***強制采用基于ARP表而不是會話中的MAC地址轉發封包***/
set vrouter trust-vr route 0.0.0.0/0 interface redundant1 gateway 100.1.1.1
set vrouter trust-vr route 0.0.0.0/0 interface redundant1:1 gateway 100.1.1.1
Juniper NETSCREEN NSRP典型配置及維護之二: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狀態切換信息
#p#
Juniper NETSCREEN NSRP典型配置及維護之三:Netscreen NSRP維護案例
案例1: Netscreen雙機升級步驟
1.使用Tftp備份兩臺防火墻現有配置文件和OS系統文件。
2.升級步驟為先升級備用設備后升級主用設備,如果是Active/Active模式請切換為Active/Passive模式后再 升級備用設備。用筆記本電腦連接NS-B的Console口和MGT口,通過Web界面上對NS-B進行升級,并在Console口上觀察升級過程。
3.NS-B升級后將自動重啟,通過Console口觀察重啟過程。啟動后在console上輸入get system命令,驗證升級后的版本號。輸入get license,驗證license信息是否符合升級要求。輸入get nsrp,驗證此設備處于備機狀態。
4.Session信息應該自動從主機上同步到備機。為進一步確保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口上觀察升級過程。
7.NS-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 all
"Erase all system config, are you sure y / [n]?" Y
Reset
"Configuration modified, save? [y] / n" N
"System reset, are you sure? y / [n]" Y
2、系統重新啟動后配置命令
Set hostname xxxxxx
Set interface mgt ip x.x.x.x/x
Set nsrp cluster id 1
Exec nsrp sync file
Exec nsrp sync global-config run
/***適應于5.1以上版本,5.0中使用Exec nsrp sync global-config save命令,需要重啟設備***/
Set nsrp rto-mirror sync
Save all
3、檢查設備狀態
Nsrp:get nsrp
接口:Get interface
路由:get route
會話:get session
Juniper NETSCREEN NSRP典型配置及維護之四:附錄一 NSRP 缺省設置值
VSD 組信息 | |
VSD group ID: | 0 |
Device priority in the VSD group: | 100 |
Preempt option: | disable |
Preempt hold-down time: | 0 second |
Initial state hold-down time: | 5 second |
Heartbeat interval: | 1000 milliseconds |
Lost heartbeat threshold: | 3 |
Master (Primary) always exist: | no |
RTO 鏡像信息 | |
RTO synchronization: | disable |
Heartbeat interval: | 4 second |
Lost heartbeat threshold: | 16 |
NSRP 鏈接信息 | |
Number of gratuitous ARPs: | 4 |
NSRP encryption: | disable |
NSRP authentication: | disable |
Track IP: | none |
Interfaces monitored: | none |
Secondary path: | none |
HA link probe: | none |
Interval: | 15 |
Threshold: | 5 |
【編輯推薦】