防火墻旁掛在云計算網絡的核心交換機上,通過虛擬系統隔離網絡中的虛擬機業務。同時,防火墻形成雙機熱備狀態,提高業務的可靠性。
方案簡介云計算網絡簡介
隨著云計算的迅猛發展,企業可以便捷地接入云計算網絡,獲取服務器、存儲、應用等資源,減少構建IT基礎設施的投資成本,大大加快了信息化進程。
如圖所示,某個“工業云”為企業用戶提供云計算服務,網絡中的業務包括如下幾種:
企業用戶訪問虛擬機來獲取定制化的資源。
企業用戶訪問Portal系統來進行帳號申請和虛擬機空間管理等操作。
云計算網絡中的管理組件對虛擬機、Portal系統以及網絡設備進行管理。
云計算網絡示意圖
防火墻在云計算網絡中的應用
如圖所示,防火墻旁掛在云計算網絡中的核心交換機上,將虛擬機和Portal系統發布出去供企業用戶訪問,并且對企業用戶訪問虛擬機的業務進行隔離。
防火墻在云計算網絡中的應用示意圖
在云計算網絡中,主要用到了防火墻的如下功能:
雙機熱備
兩臺防火墻之間形成主備備份方式的雙機熱備狀態,提高業務可靠性。
NAT Server
通過NAT Server將虛擬機和Portal系統的公網地址發布出去,供Internet上的企業用戶訪問。
虛擬系統
為每一個虛擬機劃分一個虛擬系統,隔離企業用戶訪問虛擬機的業務;同時還可以在虛擬系統中配置安全策略,實現訪問控制。
方案一:防火墻作為網關典型組網
該云計算網絡中,核心交換機使用CE12800、接入交換機使用CE6800、防火墻使用USG9500,本案例重點關注防火墻上的配置,整體的組網環境如圖所示。
云計算網絡組網圖
云計算網絡中主要有如下幾個需求:
不同的外網企業用戶訪問虛擬機時,相互之間不能影響,業務必須隔離。同時,每個虛擬機業務可使用的帶寬資源也要限制在一定范圍內,避免占用大量資源。
內部網絡中的虛擬機和Portal系統都配置私網地址,要求對外發布兩者的公網地址,使外網企業用戶能夠通過公網地址訪問虛擬機和Portal系統。
對外網企業用戶訪問虛擬機和Portal系統的行為進行控制,僅允許訪問業務的流量通過。
提高設備的可靠性,不能因為一臺設備出現故障而導致業務中斷。
防火墻旁掛在核心交換機CE12800上,使用如下特性來滿足上述需求:
使用虛擬系統隔離外網企業用戶訪問虛擬機的業務,每一個虛擬機都屬于一個虛擬系統,每個虛擬系統中都限制了最大帶寬資源。
使用子接口與CE12800相連,將子接口劃分到虛擬系統和根系統中,虛擬系統中的子接口用來傳輸虛擬機業務,根系統中的子接口用來傳輸Portal系統業務。
使用NAT Server對外發布虛擬機和Portal系統的公網地址,在每個虛擬系統中配置針對虛擬機的NAT Server,在根系統中配置針對Portal系統的NAT Server。
使用安全策略對虛擬機和Portal系統的業務進行訪問控制,在每個虛擬系統中配置針對虛擬機業務的安全策略,在根系統中配置針對Portal系統業務的安全策略。
使用雙機熱備提高可靠性,兩臺防火墻形成主備備份狀態的雙機熱備,當主用防火墻出現故障時,備用防火墻接替其工作,業務不會中斷。
業務規劃
如圖所示,FW旁掛在CE12800上,工作在三層轉發模式。CE12800從邏輯上分為上行、下行兩個部分,上行部分工作在三層轉發(L3)模式,下行部分工作在二層轉發(L2)模式。FW與CE12800的上行部分之間運行OSPF,與CE12800的下行部分之間運行VRRP,FW上VRRP的虛擬IP地址作為虛擬機和Portal系統的網關。外網企業用戶訪問虛擬機和Portal系統的流量經過CE12800的上行部分轉發至FW處理后,再經過CE12800的下行部分轉發至虛擬機和Portal;回程流量則經過CE12800的下行部分轉發至FW處理后,再經過CE12800的上行部分發送出去。
FW旁掛連接示意圖
詳細的規劃情況在下面逐一介紹。
接口和安全區域
下面以FW_A和CE12800_A為例,介紹兩者之間的連接情況。
如圖所示,FW_A上的GE1/0/1接口與CE12800_A上的10GE1/1/0/1接口相連,詳細的連接情況如下:
FW_A上的GE1/0/1接口劃分了多個子接口(此處僅以三個子接口為例進行說明),每個子接口上都配置了IP地址。其中多數的子接口都屬于不同的虛擬系統,劃分到虛擬系統的Untrust區域中;一個子接口屬于根系統,劃分到根系統的Untrust區域中。
CE12800_A上的10GE1/1/0/1接口為Trunk口,允許多個VLAN的報文通過,在每個Vlanif接口上都配置IP地址,邏輯上與FW_A上相應的子接口連接。
FW_A上的GE1/0/1接口連接示意圖
如圖所示,FW_A上的GE1/0/2接口與CE12800_A上的10GE1/1/0/2接口相連,詳細的連接情況如下:
FW_A上的GE1/0/2接口劃分了兩個子接口(也可以根據Portal系統的實際網絡情況劃分多個子接口),每個子接口上都配置了IP地址,每個子接口都劃分到根系統的DMZ區域中。
CE12800_A上的10GE1/1/0/2接口為Trunk口,允許多個VLAN的報文通過。
FW_A上子接口的VRRP虛擬IP地址作為Portal系統的網關,終結VLAN,CE12800_A的作用是二層透傳報文。
FW_A上的GE1/0/2接口連接示意圖
如圖所示,FW_A上的GE1/0/3接口與CE12800_A上的10GE1/1/0/3接口相連,詳細的連接情況如下:
FW_A上的GE1/0/3接口劃分了多個子接口(此處僅以兩個子接口為例進行說明),每個子接口上都配置了IP地址。每個子接口都屬于不同的虛擬系統,劃分到虛擬系統的Trust區域中。
CE12800_A上的10GE1/1/0/3接口為Trunk口,允許多個VLAN的報文通過。
FW_A上子接口的VRRP虛擬IP地址作為虛擬機的網關,終結VLAN,CE12800_A的作用是二層透傳報文。
FW_A上的GE1/0/3接口連接示意圖
FW_B和CE12800_B之間的連接情況與上面的內容相同,此處不再贅述。
虛擬機之間的互訪需求,可以通過訪問各自的公網地址,互訪報文經過CE12800轉發來實現。
配置步驟
前提條件
虛擬系統的License文件已經申請,并在FW_A和FW_B上成功激活。
操作步驟
1.配置接口和安全區域。
在FW_A上創建子接口。
在FW_A上創建子接口。system-view
[FW_A]interfaceGigabitEthernet1/0/1.10
[FW_A-GigabitEthernet1/0/1.10]quit
[FW_A]interfaceGigabitEthernet1/0/1.11
[FW_A-GigabitEthernet1/0/1.11]quit
[FW_A]interfaceGigabitEthernet1/0/1.1000
[FW_A-GigabitEthernet1/0/1.1000]quit
[FW_A]interfaceGigabitEthernet1/0/2.1
[FW_A-GigabitEthernet1/0/2.1]quit
[FW_A]interfaceGigabitEthernet1/0/2.2
[FW_A-GigabitEthernet1/0/2.2]quit
[FW_A]interfaceGigabitEthernet1/0/3.10
[FW_A-GigabitEthernet1/0/3.10]quit
[FW_A]interfaceGigabitEthernet1/0/3.11
[FW_A-GigabitEthernet1/0/3.11]quit
在FW_B上創建子接口。
system-view
[FW_B]interfaceGigabitEthernet1/0/1.10
[FW_B-GigabitEthernet1/0/1.10]quit
[FW_B]interfaceGigabitEthernet1/0/1.11
[FW_B-GigabitEthernet1/0/1.11]quit
[FW_B]interfaceGigabitEthernet1/0/1.1000
[FW_B-GigabitEthernet1/0/1.1000]quit
[FW_B]interfaceGigabitEthernet1/0/2.1
[FW_B-GigabitEthernet1/0/2.1]quit
[FW_B]interfaceGigabitEthernet1/0/2.2
[FW_B-GigabitEthernet1/0/2.2]quit
[FW_B]interfaceGigabitEthernet1/0/3.10
[FW_B-GigabitEthernet1/0/3.10]quit
[FW_B]interfaceGigabitEthernet1/0/3.11
[FW_B-GigabitEthernet1/0/3.11]quit
在FW_A上配置Eth-Trunk接口。
[FW_A]interfaceEth-Trunk1
[FW_A-Eth-Trunk1]ipaddress10.1.1.130
[FW_A-Eth-Trunk1]quit
[FW_A]interfaceGigabitEthernet2/0/1
[FW_A-GigabitEthernet2/0/1]eth-trunk1
[FW_A-GigabitEthernet2/0/1]quit
[FW_A]interfaceGigabitEthernet2/0/2
[FW_A-GigabitEthernet2/0/2]eth-trunk1
[FW_A-GigabitEthernet2/0/2]quit
在FW_B上配置Eth-Trunk接口。
[FW_B]interfaceEth-Trunk1
[FW_B-Eth-Trunk1]ipaddress10.1.1.230
[FW_B-Eth-Trunk1]quit
[FW_B]interfaceGigabitEthernet2/0/1
[FW_B-GigabitEthernet2/0/1]eth-trunk1
[FW_B-GigabitEthernet2/0/1]quit
[FW_B]interfaceGigabitEthernet2/0/2
[FW_B-GigabitEthernet2/0/2]eth-trunk1
[FW_B-GigabitEthernet2/0/2]quit
在FW_A上為根系統接口配置IP地址,并將接口加入根系統的安全區域。
[FW_A]interfaceGigabitEthernet1/0/1.1000
[FW_A-GigabitEthernet1/0/1.1000]ipaddress172.16.9.25224
[FW_A-GigabitEthernet1/0/1.1000]quit
[FW_A]interfaceGigabitEthernet1/0/2.1
[FW_A-GigabitEthernet1/0/2.1]ipaddress10.159.1.25224
[FW_A-GigabitEthernet1/0/2.1]quit
[FW_A]interfaceGigabitEthernet1/0/2.2
[FW_A-GigabitEthernet1/0/2.2]ipaddress10.159.2.25224
[FW_A-GigabitEthernet1/0/2.2]quit
[FW_A]firewallzonetrust
[FW_A-zone-trust]addinterfaceGigabitEthernet1/0/3
[FW_A-zone-trust]quit
[FW_A]firewallzoneuntrust
[FW_A-zone-untrust]addinterfaceGigabitEthernet1/0/1
[FW_A-zone-untrust]addinterfaceGigabitEthernet1/0/1.1000
[FW_A-zone-untrust]quit
[FW_A]firewallzonedmz
[FW_A-zone-dmz]addinterfaceGigabitEthernet1/0/2
[FW_A-zone-dmz]addinterfaceGigabitEthernet1/0/2.1
[FW_A-zone-dmz]addinterfaceGigabitEthernet1/0/2.2
[FW_A-zone-dmz]quit
[FW_A]firewallzonenamehrpzone
[FW_A-zone-hrpzone]setpriority65
[FW_A-zone-hrpzone]addinterfaceEth-Trunk1
[FW_A-zone-hrpzone]quit
在FW_B上為根系統接口配置IP地址,并將接口加入根系統的安全區域。
[FW_B]interfaceGigabitEthernet1/0/1.1000
[FW_B-GigabitEthernet1/0/1.1000]ipaddress172.16.9.25324
[FW_B-GigabitEthernet1/0/1.1000]quit
[FW_B]interfaceGigabitEthernet1/0/2.1
[FW_B-GigabitEthernet1/0/2.1]ipaddress10.159.1.25324
[FW_B-GigabitEthernet1/0/2.1]quit
[FW_B]interfaceGigabitEthernet1/0/2.2
[FW_B-GigabitEthernet1/0/2.2]ipaddress10.159.2.25324
[FW_B-GigabitEthernet1/0/2.2]quit
[FW_B]firewallzonetrust
[FW_B-zone-trust]addinterfaceGigabitEthernet1/0/3
[FW_B-zone-trust]quit
[FW_B]firewallzoneuntrust
[FW_B-zone-untrust]addinterfaceGigabitEthernet1/0/1
[FW_B-zone-untrust]addinterfaceGigabitEthernet1/0/1.1000
[FW_B-zone-untrust]quit
[FW_B]firewallzonedmz
[FW_B-zone-dmz]addinterfaceGigabitEthernet1/0/2
[FW_B-zone-dmz]addinterfaceGigabitEthernet1/0/2.1
[FW_B-zone-dmz]addinterfaceGigabitEthernet1/0/2.2
[FW_B-zone-dmz]quit
[FW_B]firewallzonenamehrpzone
[FW_B-zone-hrpzone]setpriority65
[FW_B-zone-hrpzone]addinterfaceEth-Trunk1
[FW_B-zone-hrpzone]quit
2.配置虛擬系統。
在FW_A上開啟虛擬系統功能。
[FW_A]vsysenable
在FW_B上開啟虛擬系統功能。
[FW_B]vsysenable
在FW_A上配置資源類。
[FW_A]resource-classvfw1_car
[FW_A-resource-class-vfw1_car]resource-item-limitbandwidth100entire
[FW_A-resource-class-vfw1_car]quit
[FW_A]resource-classvfw2_car
[FW_A-resource-class-vfw2_car]resource-item-limitbandwidth100entire
[FW_A-resource-class-vfw2_car]quit
在FW_B上配置資源類。
[FW_B]resource-classvfw1_car
[FW_B-resource-class-vfw1_car]resource-item-limitbandwidth100entire
[FW_B-resource-class-vfw1_car]quit
[FW_B]resource-classvfw2_car
[FW_B-resource-class-vfw2_car]resource-item-limitbandwidth100entire
[FW_B-resource-class-vfw2_car]quit
在FW_A上創建虛擬系統,并為虛擬系統分配資源。
[FW_A]vsysnamevfw1
[FW_A-vsys-vfw1]assignresource-classvfw1_car
[FW_A-vsys-vfw1]assigninterfaceGigabitEthernet1/0/1.10
[FW_A-vsys-vfw1]assigninterfaceGigabitEthernet1/0/3.10
[FW_A-vsys-vfw1]assignglobal-ip118.1.1.1118.1.1.1exclusive
[FW_A-vsys-vfw1]quit
[FW_A]vsysnamevfw2
[FW_A-vsys-vfw2]assignresource-classvfw2_car
[FW_A-vsys-vfw2]assigninterfaceGigabitEthernet1/0/1.11
[FW_A-vsys-vfw2]assigninterfaceGigabitEthernet1/0/3.11
[FW_A-vsys-vfw2]assignglobal-ip118.1.1.2118.1.1.2exclusive
[FW_A-vsys-vfw2]quit
在FW_B上創建虛擬系統,并為虛擬系統分配資源。
[FW_B]vsysnamevfw1
[FW_B-vsys-vfw1]assignresource-classvfw1_car
[FW_B-vsys-vfw1]assigninterfaceGigabitEthernet1/0/1.10
[FW_B-vsys-vfw1]assigninterfaceGigabitEthernet1/0/3.10
[FW_B-vsys-vfw1]assignglobal-ip118.1.1.1118.1.1.1exclusive
[FW_B-vsys-vfw1]quit
[FW_B]vsysnamevfw2
[FW_B-vsys-vfw2]assignresource-classvfw2_car
[FW_B-vsys-vfw2]assigninterfaceGigabitEthernet1/0/1.11
[FW_B-vsys-vfw2]assigninterfaceGigabitEthernet1/0/3.11
[FW_B-vsys-vfw2]assignglobal-ip118.1.1.2118.1.1.2exclusive
[FW_B-vsys-vfw2]quit
在FW_A上的虛擬系統vfw1中配置接口的IP地址,并將接口加入安全區域。
[FW_A]switchvsysvfw1
system-view
[FW_A-vfw1]interfaceGigabitEthernet1/0/1.10
[FW_A-vfw1-GigabitEthernet1/0/1.10]ipaddress172.16.10.25224
[FW_A-vfw1-GigabitEthernet1/0/1.10]quit
[FW_A-vfw1]interfaceGigabitEthernet1/0/3.10
[FW_A-vfw1-GigabitEthernet1/0/3.10]ipaddress10.159.10.25224
[FW_A-vfw1-GigabitEthernet1/0/3.10]quit
[FW_A-vfw1]firewallzoneuntrust
[FW_A-vfw1-zone-untrust]addinterfaceGigabitEthernet1/0/1.10
[FW_A-vfw1-zone-untrust]quit
[FW_A-vfw1]firewallzonetrust
[FW_A-vfw1-zone-trust]addinterfaceGigabitEthernet1/0/3.10
[FW_A-vfw1-zone-trust]quit
[FW_A-vfw1]quit
quit
參考上述步驟,在FW_A上的虛擬系統vfw2中配置接口的IP地址,并將接口加入安全區域。
在FW_B上的虛擬系統vfw1中配置接口的IP地址,并將接口加入安全區域。
[FW_B]switchvsysvfw1
system-view
[FW_B-vfw1]interfaceGigabitEthernet1/0/1.10
[FW_B-vfw1-GigabitEthernet1/0/1.10]ipaddress172.16.10.25324
[FW_B-vfw1-GigabitEthernet1/0/1.10]quit
[FW_B-vfw1]interfaceGigabitEthernet1/0/3.10
[FW_B-vfw1-GigabitEthernet1/0/3.10]ipaddress10.159.10.25324
[FW_B-vfw1-GigabitEthernet1/0/3.10]quit
[FW_B-vfw1]firewallzoneuntrust
[FW_B-vfw1-zone-untrust]addinterfaceGigabitEthernet1/0/1.10
[FW_B-vfw1-zone-untrust]quit
[FW_B-vfw1]firewallzonetrust
[FW_B-vfw1-zone-trust]addinterfaceGigabitEthernet1/0/3.10
[FW_B-vfw1-zone-trust]quit
[FW_B-vfw1]quit
quit
參考上述步驟,在FW_B上的虛擬系統vfw2中配置接口的IP地址,并將接口加入安全區域。
3.配置路由。
在FW_A上配置根系統的路由。
[FW_A]iproute-static0.0.0.00.0.0.0172.16.9.251
[FW_A]iproute-static117.1.1.132NULL0
[FW_A]iproute-static117.1.1.232NULL0
[FW_A]ospf1000
[FW_A-ospf-1000]import-routestatic
[FW_A-ospf-1000]area0
[FW_A-ospf-1000-area-0.0.0.0]network172.16.9.00.0.0.255
[FW_A-ospf-1000-area-0.0.0.0]quit
[FW_A-ospf-1000]quit
在FW_B上配置根系統的路由。
[FW_B]iproute-static0.0.0.00.0.0.0172.16.9.251
[FW_B]iproute-static117.1.1.132NULL0
[FW_B]iproute-static117.1.1.232NULL0
[FW_B]ospf1000
[FW_B-ospf-1000]import-routestatic
[FW_B-ospf-1000]area0
[FW_B-ospf-1000-area-0.0.0.0]network172.16.9.00.0.0.255
[FW_B-ospf-1000-area-0.0.0.0]quit
[FW_B-ospf-1000]quit
在FW_A上配置虛擬系統的路由。
[FW_A]ipvpn-instancevfw1
[FW_A-vpn-instance-vfw1]route-distinguisher10:1
[FW_A-vpn-instance-vfw1]quit
[FW_A]ipvpn-instancevfw2
[FW_A-vpn-instance-vfw2]route-distinguisher11:1
[FW_A-vpn-instance-vfw2]quit
[FW_A]ospf1vpn-instancevfw1
[FW_A-ospf-1]import-routestatic
[FW_A-ospf-1]area0
[FW_A-ospf-1-area-0.0.0.0]network172.16.10.00.0.0.255
[FW_A-ospf-1-area-0.0.0.0]quit
[FW_A-ospf-1]quit
[FW_A]ospf2vpn-instancevfw2
[FW_A-ospf-2]import-routestatic
[FW_A-ospf-2]area0
[FW_A-ospf-2-area-0.0.0.0]network172.16.11.00.0.0.255
[FW_A-ospf-2-area-0.0.0.0]quit
[FW_A-ospf-2]quit
[FW_A]switchvsysvfw1
system-view
[FW_A-vfw1]iproute-static0.0.0.00.0.0.0172.16.10.251
[FW_A-vfw1]iproute-static118.1.1.132NULL0
[FW_A-vfw1]quit
quit
[FW_A]switchvsysvfw2
system-view
[FW_A-vfw2]iproute-static0.0.0.00.0.0.0172.16.11.251
[FW_A-vfw2]iproute-static118.1.1.232NULL0
[FW_A-vfw2]quit
quit
在FW_B上配置虛擬系統的路由。
[FW_B]ipvpn-instancevfw1
[FW_B-vpn-instance-vfw1]route-distinguisher10:1
[FW_B-vpn-instance-vfw1]quit
[FW_B]ipvpn-instancevfw2
[FW_B-vpn-instance-vfw2]route-distinguisher11:1
[FW_B-vpn-instance-vfw2]quit
[FW_B]ospf1vpn-instancevfw1
[FW_B-ospf-1]import-routestatic
[FW_B-ospf-1]area0
[FW_B-ospf-1-area-0.0.0.0]network172.16.10.00.0.0.255
[FW_B-ospf-1-area-0.0.0.0]quit
[FW_B-ospf-1]quit
[FW_B]ospf2vpn-instancevfw2
[FW_B-ospf-2]import-routestatic
[FW_B-ospf-2]area0
[FW_B-ospf-2-area-0.0.0.0]network172.16.11.00.0.0.255
[FW_B-ospf-2-area-0.0.0.0]quit
[FW_B-ospf-2]quit
[FW_B]switchvsysvfw1
system-view
[FW_B-vfw1]iproute-static0.0.0.00.0.0.0172.16.10.251
[FW_B-vfw1]iproute-static118.1.1.132NULL0
[FW_B-vfw1]quit
quit
[FW_B]switchvsysvfw2
system-view
[FW_B-vfw2]iproute-static0.0.0.00.0.0.0172.16.11.251
[FW_B-vfw2]iproute-static118.1.1.232NULL0
[FW_B-vfw2]quit
quit
4.配置雙機熱備。
在FW_A上配置VGMP組監控上行GE1/0/1接口。
[FW_A]hrptrackinterfaceGigabitEthernet1/0/1
在FW_A上配置根據VGMP狀態調整OSPF Cost值功能。
[FW_A]hrpadjustospf-costenable
在FW_A上配置VRRP備份組,并將其狀態設置為Active。
[FW_A]interfaceGigabitEthernet1/0/3.10
[FW_A-GigabitEthernet1/0/3.10]vlan-typedot1q10
[FW_A-GigabitEthernet1/0/3.10]vrrpvrid10virtual-ip10.159.10.254active
[FW_A-GigabitEthernet1/0/3.10]quit
[FW_A]interfaceGigabitEthernet1/0/3.11
[FW_A-GigabitEthernet1/0/3.11]vlan-typedot1q11
[FW_A-GigabitEthernet1/0/3.11]vrrpvrid11virtual-ip10.159.11.254active
[FW_A-GigabitEthernet1/0/3.11]quit
[FW_A]interfaceGigabitEthernet1/0/2.1
[FW_A-GigabitEthernet1/0/2.1]vlan-typedot1q1
[FW_A-GigabitEthernet1/0/2.1]vrrpvrid1virtual-ip10.159.1.254active
[FW_A-GigabitEthernet1/0/2.1]quit
[FW_A]interfaceGigabitEthernet1/0/2.2
[FW_A-GigabitEthernet1/0/2.2]vlan-typedot1q2
[FW_A-GigabitEthernet1/0/2.2]vrrpvrid2virtual-ip10.159.2.254active
[FW_A-GigabitEthernet1/0/2.2]quit
在FW_A上指定心跳口并啟用雙機熱備功能。
[FW_A]hrpinterfaceEth-Trunk1remote10.1.1.2
[FW_A]hrpenable
在FW_B上配置VGMP組監控上行GE1/0/1接口。
[FW_B]hrptrackinterfaceGigabitEthernet1/0/1
在FW_B上配置根據VGMP狀態調整OSPF Cost值功能。
[FW_B]hrpadjustospf-costenable
在FW_B上配置VRRP備份組,并將其狀態設置為Standby。
[FW_B]interfaceGigabitEthernet1/0/3.10
[FW_B-GigabitEthernet1/0/3.10]vlan-typedot1q10
[FW_B-GigabitEthernet1/0/3.10]vrrpvrid10virtual-ip10.159.10.254standby
[FW_B-GigabitEthernet1/0/3.10]quit
[FW_B]interfaceGigabitEthernet1/0/3.11
[FW_B-GigabitEthernet1/0/3.11]vlan-typedot1q11
[FW_B-GigabitEthernet1/0/3.11]vrrpvrid11virtual-ip10.159.11.254standby
[FW_B-GigabitEthernet1/0/3.11]quit
[FW_B]interfaceGigabitEthernet1/0/2.1
[FW_B-GigabitEthernet1/0/2.1]vlan-typedot1q1
[FW_B-GigabitEthernet1/0/2.1]vrrpvrid1virtual-ip10.159.1.254standby
[FW_B-GigabitEthernet1/0/2.1]quit
[FW_B]interfaceGigabitEthernet1/0/2.2
[FW_B-GigabitEthernet1/0/2.2]vlan-typedot1q2
[FW_B-GigabitEthernet1/0/2.2]vrrpvrid2virtual-ip10.159.2.254standby
[FW_B-GigabitEthernet1/0/2.2]quit
在FW_B上指定心跳口并啟用雙機熱備功能。
[FW_B]hrpinterfaceEth-Trunk1remote10.1.1.1
[FW_B]hrpenable
5.配置安全策略。
在FW_A上的根系統中配置安全策略。
HRP_M[FW_A]security-policy
HRP_M[FW_A-policy-security]rulenamesec_portal
HRP_M[FW_A-policy-security-rule-sec_portal]source-zoneuntrust
HRP_M[FW_A-policy-security-rule-sec_portal]destination-zonedmz
HRP_M[FW_A-policy-security-rule-sec_portal]destination-address10.159.0.016
HRP_M[FW_A-policy-security-rule-sec_portal]actionpermit
HRP_M[FW_A-policy-security-rule-sec_portal]profileavdefault
HRP_M[FW_A-policy-security-rule-sec_portal]profileipsdefault
HRP_M[FW_A-policy-security-rule-sec_portal]quit
HRP_M[FW_A-policy-security]rulenamesec_ospf
HRP_M[FW_A-policy-security-rule-sec_ospf]source-zoneuntrustlocal
HRP_M[FW_A-policy-security-rule-sec_ospf]destination-zonelocaluntrust
HRP_M[FW_A-policy-security-rule-sec_ospf]serviceospf
HRP_M[FW_A-policy-security-rule-sec_ospf]actionpermit
HRP_M[FW_A-policy-security-rule-sec_ospf]quit
HRP_M[FW_A-policy-security]quit
在FW_A上的虛擬系統vfw1中配置安全策略。
HRP_M[FW_A]switchvsysvfw1
HRP_Msystem-view
HRP_M[FW_A-vfw1]security-policy
HRP_M[FW_A-vfw1-policy-security]rulenamesec_vm1
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]source-zoneuntrust
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]destination-zonetrust
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]destination-address10.159.10.024
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]profileavdefault
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]profileipsdefault
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]actionpermit
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]quit
HRP_M[FW_A-vfw1-policy-security]rulenamesec_vm1_ospf
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1_ospf]source-zoneuntrustlocal
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1_ospf]destination-zonelocaluntrust
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1_ospf]serviceospf
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1_ospf]actionpermit
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1_ospf]quit
HRP_M[FW_A-vfw1-policy-security]quit
HRP_M[FW_A-vfw1]quit
HRP_Mquit
參考上述步驟,在FW_A上的虛擬系統vfw2中配置安全策略。
雙機熱備狀態形成后,FW_A上的配置會自動同步到FW_B上,因此無需在FW_B上手動配置安全策略。
6.配置策略備份加速。
當策略數量較多時(比如超過100條),為了提升策略加速期間的匹配效率,需要開啟備份加速功能。但是開啟該功能后,新配置的策略需要等待策略備份加速完成后才能生效。
HRP_M[FW-A]policyacceleratestandbyenable
雙機熱備狀態形成后,FW_A上的配置會自動同步到FW_B上,因此無需在FW_B上手動配置策略備份加速。
7.配置NAT Server。
說明:
此處給出的NAT Server配置命令僅作為示例,實際網絡環境中會在管理組件上配置NAT Server,管理組件將配置數據下發給FW。
在FW_A上的根系統中配置NAT Server。
HRP_M[FW_A]natservernat_server_portal1global117.1.1.1inside10.159.1.100
HRP_M[FW_A]natservernat_server_portal2global117.1.1.2inside10.159.2.100
在FW_A上的虛擬系統vfw1中配置NAT Server。
HRP_M[FW_A]switchvsysvfw1
HRP_Msystem-view
HRP_M[FW_A-vfw1]natservernat_server_vm1global118.1.1.1inside10.159.10.100
HRP_M[FW_A-vfw1]quit
HRP_Mquit
參考上述步驟,在FW_A上的虛擬系統vfw2中配置NAT Server。
雙機熱備狀態形成后,FW_A上的配置會自動同步到FW_B上,因此無需在FW_B上手動配置NAT Server。
8.配置其它網絡設備。
案例中重點介紹FW上的配置,其它網絡設備上的配置請關注以下幾個配置項:
上行路由器上要配置去往虛擬機和Portal系統的Global地址的路由,下一跳為CE12800。
在CE12800上配置OSPF時,在OSPF進程中要配置default-route-advertise always命令。
CE6800二層透傳報文,配置二層轉發即可。
結果驗證
在FW_A和FW_B上使用display hrp state命令查看當前HRP的狀態,可以看到HRP狀態正常。
Internet上的企業用戶可以正常訪問虛擬機業務。
Internet上的企業用戶可以正常訪問Portal系統。
FW_A的GE1/0/2.1接口上執行shutdown命令,模擬鏈路故障,發現主備正常倒換,業務不會中斷。
方案二:交換機作為網關典型組網
該云計算網絡中,核心交換機使用CE12800、接入交換機使用CE6800、防火墻使用USG9500,本案例重點關注防火墻上的配置,整體的組網環境如圖所示。
云計算網絡組網圖
云計算網絡中主要有如下幾個需求:
不同的外網企業用戶訪問虛擬機時,相互之間不能影響,業務必須隔離。同時,每個虛擬機業務可使用的帶寬資源也要限制在一定范圍內,避免占用大量資源。
內部網絡中的虛擬機和Portal系統都配置私網地址,要求對外發布兩者的公網地址,使外網企業用戶能夠通過公網地址訪問虛擬機和Portal系統。
對外網企業用戶訪問虛擬機和Portal系統的行為進行控制,僅允許訪問業務的流量通過。
提高設備的可靠性,不能因為一臺設備出現故障而導致業務中斷。
防火墻旁掛在核心交換機CE12800上,使用如下特性來滿足上述需求:
使用虛擬系統隔離外網企業用戶訪問虛擬機的業務,每一個虛擬機都屬于一個虛擬系統,每個虛擬系統中都限制了最大帶寬資源。
使用子接口與CE12800相連,將子接口劃分到虛擬系統和根系統中,虛擬系統中的子接口用來傳輸虛擬機業務,根系統中的子接口用來傳輸Portal系統業務。
使用NAT Server對外發布虛擬機和Portal系統的公網地址,在每個虛擬系統中配置針對虛擬機的NAT Server,在根系統中配置針對Portal系統的NAT Server。
使用安全策略對虛擬機和Portal系統的業務進行訪問控制,在每個虛擬系統中配置針對虛擬機業務的安全策略,在根系統中配置針對Portal系統業務的安全策略。
使用雙機熱備提高可靠性,兩臺防火墻形成主備備份狀態的雙機熱備,當主用防火墻出現故障時,備用防火墻接替其工作,業務不會中斷。
業務規劃
如圖所示,FW旁掛在CE12800上,工作在三層轉發模式。CE12800上配置VRF功能,虛擬成連接上行的交換機(根交換機Public)和連接下行的交換機(多個虛擬交換機VRF)。FW與CE12800的根交換機Public和虛擬交換機VRF之間都運行VRRP,CE12800上VRRP的虛擬IP地址作為虛擬機和Portal系統的網關。外網企業用戶訪問虛擬機和Portal系統的流量經過CE12800的根交換機Public轉發至FW處理后,再經過CE12800的虛擬交換機VRF轉發至虛擬機和Portal;回程流量則經過CE12800的虛擬交換機VRF轉發至FW處理后,再經過CE12800的根交換機Public發送出去。
FW旁掛連接示意圖
詳細的規劃情況在下面逐一介紹。
接口和安全區域
下面以FW_A和CE12800_A為例,介紹兩者之間的連接情況。
如圖所示,FW_A上的GE1/0/1接口與CE12800_A上的10GE1/1/0/1接口相連,詳細的連接情況如下:
FW_A上的GE1/0/1接口劃分了多個子接口(此處僅以三個子接口為例進行說明),每個子接口上都配置了IP地址。其中多數的子接口都屬于不同的虛擬系統,劃分到虛擬系統的Untrust區域中;一個子接口屬于根系統,劃分到根系統的Untrust區域中。
CE12800_A上的10GE1/1/0/1接口為Trunk口,允許多個VLAN的報文通過,在每個Vlanif接口上都配置IP地址,邏輯上與FW_A上相應的子接口連接。
FW_A上的GE1/0/1接口連接示意圖
如圖所示,FW_A上的GE1/0/2接口與CE12800_A上的10GE1/1/0/2接口相連,詳細的連接情況如下:
FW_A上的GE1/0/2接口劃分了兩個子接口(也可以根據Portal系統的實際網絡情況劃分多個子接口),每個子接口上都配置了IP地址,每個子接口都劃分到根系統的DMZ區域中。
CE12800_A上的10GE1/1/0/2接口為Trunk口,允許兩個VLAN的報文通過,在每個Vlanif接口上都配置IP地址,邏輯上與FW_A上相應的子接口連接。
FW_A上的GE1/0/2接口連接示意圖
如圖所示,FW_A上的GE1/0/3接口與CE12800_A上的10GE1/1/0/3接口相連,詳細的連接情況如下:
FW_A上的GE1/0/3接口劃分了多個子接口(此處僅以兩個子接口為例進行說明),每個子接口上都配置了IP地址。每個子接口都屬于不同的虛擬系統,劃分到虛擬系統的Trust區域中。
CE12800_A上的10GE1/1/0/3接口為Trunk口,允許多個VLAN的報文通過,在每個Vlanif接口上都配置IP地址,邏輯上與FW_A上相應的子接口連接。
FW_A上的GE1/0/3接口連接示意圖
FW_B和CE12800_B之間的連接情況與上面的內容相同,只是IP地址有所區別,此處不再贅述。
虛擬機之間的互訪需求,可以通過訪問各自的公網地址,互訪報文經過CE12800轉發來實現。
配置步驟
前提條件
虛擬系統的License文件已經申請,并在FW_A和FW_B上成功激活。
操作步驟
1.配置接口和安全區域。
在FW_A上創建子接口。
system-view
[FW_A]interfaceGigabitEthernet1/0/1.10
[FW_A-GigabitEthernet1/0/1.10]quit
[FW_A]interfaceGigabitEthernet1/0/1.11
[FW_A-GigabitEthernet1/0/1.11]quit
[FW_A]interfaceGigabitEthernet1/0/1.1000
[FW_A-GigabitEthernet1/0/1.1000]quit
[FW_A]interfaceGigabitEthernet1/0/2.1
[FW_A-GigabitEthernet1/0/2.1]quit
[FW_A]interfaceGigabitEthernet1/0/2.2
[FW_A-GigabitEthernet1/0/2.2]quit
[FW_A]interfaceGigabitEthernet1/0/3.10
[FW_A-GigabitEthernet1/0/3.10]quit
[FW_A]interfaceGigabitEthernet1/0/3.11
[FW_A-GigabitEthernet1/0/3.11]quit
在FW_B上創建子接口。
system-view
[FW_B]interfaceGigabitEthernet1/0/1.10
[FW_B-GigabitEthernet1/0/1.10]quit
[FW_B]interfaceGigabitEthernet1/0/1.11
[FW_B-GigabitEthernet1/0/1.11]quit
[FW_B]interfaceGigabitEthernet1/0/1.1000
[FW_B-GigabitEthernet1/0/1.1000]quit
[FW_B]interfaceGigabitEthernet1/0/2.1
[FW_B-GigabitEthernet1/0/2.1]quit
[FW_B]interfaceGigabitEthernet1/0/2.2
[FW_B-GigabitEthernet1/0/2.2]quit
[FW_B]interfaceGigabitEthernet1/0/3.10
[FW_B-GigabitEthernet1/0/3.10]quit
[FW_B]interfaceGigabitEthernet1/0/3.11
[FW_B-GigabitEthernet1/0/3.11]quit
在FW_A上配置Eth-Trunk接口。
[FW_A]interfaceEth-Trunk1
[FW_A-Eth-Trunk1]ipaddress10.1.1.130
[FW_A-Eth-Trunk1]quit
[FW_A]interfaceGigabitEthernet2/0/1
[FW_A-GigabitEthernet2/0/1]eth-trunk1
[FW_A-GigabitEthernet2/0/1]quit
[FW_A]interfaceGigabitEthernet2/0/2
[FW_A-GigabitEthernet2/0/2]eth-trunk1
[FW_A-GigabitEthernet2/0/2]quit
在FW_B上配置Eth-Trunk接口。
[FW_B]interfaceEth-Trunk1
[FW_B-Eth-Trunk1]ipaddress10.1.1.230
[FW_B-Eth-Trunk1]quit
[FW_B]interfaceGigabitEthernet2/0/1
[FW_B-GigabitEthernet2/0/1]eth-trunk1
[FW_B-GigabitEthernet2/0/1]quit
[FW_B]interfaceGigabitEthernet2/0/2
[FW_B-GigabitEthernet2/0/2]eth-trunk1
[FW_B-GigabitEthernet2/0/2]quit
在FW_A上為根系統接口配置IP地址,并將接口加入根系統的安全區域。
[FW_A]interfaceGigabitEthernet1/0/1.1000
[FW_A-GigabitEthernet1/0/1.1000]ipaddress172.16.9.25224
[FW_A-GigabitEthernet1/0/1.1000]quit
[FW_A]interfaceGigabitEthernet1/0/2.1
[FW_A-GigabitEthernet1/0/2.1]ipaddress10.159.1.25224
[FW_A-GigabitEthernet1/0/2.1]quit
[FW_A]interfaceGigabitEthernet1/0/2.2
[FW_A-GigabitEthernet1/0/2.2]ipaddress10.159.2.25224
[FW_A-GigabitEthernet1/0/2.2]quit
[FW_A]firewallzonetrust
[FW_A-zone-trust]addinterfaceGigabitEthernet1/0/3
[FW_A-zone-trust]quit
[FW_A]firewallzoneuntrust
[FW_A-zone-untrust]addinterfaceGigabitEthernet1/0/1
[FW_A-zone-untrust]addinterfaceGigabitEthernet1/0/1.1000
[FW_A-zone-untrust]quit
[FW_A]firewallzonedmz
[FW_A-zone-dmz]addinterfaceGigabitEthernet1/0/2
[FW_A-zone-dmz]addinterfaceGigabitEthernet1/0/2.1
[FW_A-zone-dmz]addinterfaceGigabitEthernet1/0/2.2
[FW_A-zone-dmz]quit
[FW_A]firewallzonenamehrpzone
[FW_A-zone-hrpzone]setpriority65
[FW_A-zone-hrpzone]addinterfaceEth-Trunk1
[FW_A-zone-hrpzone]quit
在FW_B上為根系統接口配置IP地址,并將接口加入根系統的安全區域。
[FW_B]interfaceGigabitEthernet1/0/1.1000
[FW_B-GigabitEthernet1/0/1.1000]ipaddress172.16.9.25324
[FW_B-GigabitEthernet1/0/1.1000]quit
[FW_B]interfaceGigabitEthernet1/0/2.1
[FW_B-GigabitEthernet1/0/2.1]ipaddress10.159.1.25324
[FW_B-GigabitEthernet1/0/2.1]quit
[FW_B]interfaceGigabitEthernet1/0/2.2
[FW_B-GigabitEthernet1/0/2.2]ipaddress10.159.2.25324
[FW_B-GigabitEthernet1/0/2.2]quit
[FW_B]firewallzonetrust
[FW_B-zone-trust]addinterfaceGigabitEthernet1/0/3
[FW_B-zone-trust]quit
[FW_B]firewallzoneuntrust
[FW_B-zone-untrust]addinterfaceGigabitEthernet1/0/1
[FW_B-zone-untrust]addinterfaceGigabitEthernet1/0/1.1000
[FW_B-zone-untrust]quit
[FW_B]firewallzonedmz
[FW_B-zone-dmz]addinterfaceGigabitEthernet1/0/2
[FW_B-zone-dmz]addinterfaceGigabitEthernet1/0/2.1
[FW_B-zone-dmz]addinterfaceGigabitEthernet1/0/2.2
[FW_B-zone-dmz]quit
[FW_B]firewallzonenamehrpzone
[FW_B-zone-hrpzone]setpriority65
[FW_B-zone-hrpzone]addinterfaceEth-Trunk1
[FW_B-zone-hrpzone]quit
2.配置虛擬系統。
在FW_A上開啟虛擬系統功能。
[FW_A]vsysenable
在FW_B上開啟虛擬系統功能。
[FW_B]vsysenable
在FW_A上配置資源類。
[FW_A]resource-classvfw1_car
[FW_A-resource-class-vfw1_car]resource-item-limitbandwidth100entire
[FW_A-resource-class-vfw1_car]quit
[FW_A]resource-classvfw2_car
[FW_A-resource-class-vfw2_car]resource-item-limitbandwidth100entire
[FW_A-resource-class-vfw2_car]quit
在FW_B上配置資源類。
[FW_B]resource-classvfw1_car
[FW_B-resource-class-vfw1_car]resource-item-limitbandwidth100entire
[FW_B-resource-class-vfw1_car]quit
[FW_B]resource-classvfw2_car
[FW_B-resource-class-vfw2_car]resource-item-limitbandwidth100entire
[FW_B-resource-class-vfw2_car]quit
在FW_A上創建虛擬系統,并為虛擬系統分配資源。
[FW_A]vsysnamevfw1
[FW_A-vsys-vfw1]assignresource-classvfw1_car
[FW_A-vsys-vfw1]assigninterfaceGigabitEthernet1/0/1.10
[FW_A-vsys-vfw1]assigninterfaceGigabitEthernet1/0/3.10
[FW_A-vsys-vfw1]assignglobal-ip118.1.1.1118.1.1.1exclusive
[FW_A-vsys-vfw1]quit
[FW_A]vsysnamevfw2
[FW_A-vsys-vfw2]assignresource-classvfw2_car
[FW_A-vsys-vfw2]assigninterfaceGigabitEthernet1/0/1.11
[FW_A-vsys-vfw2]assigninterfaceGigabitEthernet1/0/3.11
[FW_A-vsys-vfw2]assignglobal-ip118.1.1.2118.1.1.2exclusive
[FW_A-vsys-vfw2]quit
在FW_B上創建虛擬系統,并為虛擬系統分配資源。
[FW_B]vsysnamevfw1
[FW_B-vsys-vfw1]assignresource-classvfw1_car
[FW_B-vsys-vfw1]assigninterfaceGigabitEthernet1/0/1.10
[FW_B-vsys-vfw1]assigninterfaceGigabitEthernet1/0/3.10
[FW_B-vsys-vfw1]assignglobal-ip118.1.1.1118.1.1.1exclusive
[FW_B-vsys-vfw1]quit
[FW_B]vsysnamevfw2
[FW_B-vsys-vfw2]assignresource-classvfw2_car
[FW_B-vsys-vfw2]assigninterfaceGigabitEthernet1/0/1.11
[FW_B-vsys-vfw2]assigninterfaceGigabitEthernet1/0/3.11
[FW_B-vsys-vfw2]assignglobal-ip118.1.1.2118.1.1.2exclusive
[FW_B-vsys-vfw2]quit
在FW_A上的虛擬系統vfw1中配置接口的IP地址,并將接口加入安全區域。
[FW_A]switchvsysvfw1
system-view
[FW_A-vfw1]interfaceGigabitEthernet1/0/1.10
[FW_A-vfw1-GigabitEthernet1/0/1.10]ipaddress172.16.10.25224
[FW_A-vfw1-GigabitEthernet1/0/1.10]quit
[FW_A-vfw1]interfaceGigabitEthernet1/0/3.10
[FW_A-vfw1-GigabitEthernet1/0/3.10]ipaddress10.159.10.25224
[FW_A-vfw1-GigabitEthernet1/0/3.10]quit
[FW_A-vfw1]firewallzoneuntrust
[FW_A-vfw1-zone-untrust]addinterfaceGigabitEthernet1/0/1.10
[FW_A-vfw1-zone-untrust]quit
[FW_A-vfw1]firewallzonetrust
[FW_A-vfw1-zone-trust]addinterfaceGigabitEthernet1/0/3.10
[FW_A-vfw1-zone-trust]quit
[FW_A-vfw1]quit
quit
參考上述步驟,在FW_A上的虛擬系統vfw2中配置接口的IP地址,并將接口加入安全區域。
在FW_B上的虛擬系統vfw1中配置接口的IP地址,并將接口加入安全區域。
[FW_B]switchvsysvfw1
system-view
[FW_B-vfw1]interfaceGigabitEthernet1/0/1.10
[FW_B-vfw1-GigabitEthernet1/0/1.10]ipaddress172.16.10.25324
[FW_B-vfw1-GigabitEthernet1/0/1.10]quit
[FW_B-vfw1]interfaceGigabitEthernet1/0/3.10
[FW_B-vfw1-GigabitEthernet1/0/3.10]ipaddress10.159.10.25324
[FW_B-vfw1-GigabitEthernet1/0/3.10]quit
[FW_B-vfw1]firewallzoneuntrust
[FW_B-vfw1-zone-untrust]addinterfaceGigabitEthernet1/0/1.10
[FW_B-vfw1-zone-untrust]quit
[FW_B-vfw1]firewallzonetrust
[FW_B-vfw1-zone-trust]addinterfaceGigabitEthernet1/0/3.10
[FW_B-vfw1-zone-trust]quit
[FW_B-vfw1]quit
quit
參考上述步驟,在FW_B上的虛擬系統vfw2中配置接口的IP地址,并將接口加入安全區域。
3.配置路由。
在FW_A上配置根系統的路由。
[FW_A]iproute-static0.0.0.00.0.0.0172.16.9.251
[FW_A]iproute-static117.1.1.132NULL0
[FW_A]iproute-static117.1.1.232NULL0
[FW_A]iproute-static10.160.1.02410.159.1.251
[FW_A]iproute-static10.160.2.02410.159.2.251
在FW_B上配置根系統的路由。
[FW_B]iproute-static0.0.0.00.0.0.0172.16.9.251
[FW_B]iproute-static117.1.1.132NULL0
[FW_B]iproute-static117.1.1.232NULL0
[FW_B]iproute-static10.160.1.02410.159.1.251
[FW_B]iproute-static10.160.2.02410.159.2.251
在FW_A上配置虛擬系統的路由。
[FW_A]switchvsysvfw1
system-view
[FW_A-vfw1]iproute-static0.0.0.00.0.0.0172.16.10.251
[FW_A-vfw1]iproute-static118.1.1.132NULL0
[FW_A-vfw1]iproute-static10.160.10.02410.159.10.251
[FW_A-vfw1]quit
quit
[FW_A]switchvsysvfw2
system-view
[FW_A-vfw2]iproute-static0.0.0.00.0.0.0172.16.11.251
[FW_A-vfw2]iproute-static118.1.1.232NULL0
[FW_A-vfw2]iproute-static10.160.11.02410.159.11.251
[FW_A-vfw2]quit
quit
在FW_B上配置虛擬系統的路由。
[FW_B]switchvsysvfw1
system-view
[FW_B-vfw1]iproute-static0.0.0.00.0.0.0172.16.10.251
[FW_B-vfw1]iproute-static118.1.1.132NULL0
[FW_B-vfw1]iproute-static10.160.10.02410.159.10.251
[FW_B-vfw1]quit
quit
[FW_B]switchvsysvfw2
system-view
[FW_B-vfw2]iproute-static0.0.0.00.0.0.0172.16.11.251
[FW_B-vfw2]iproute-static118.1.1.232NULL0
[FW_B-vfw2]iproute-static10.160.11.02410.159.11.251
[FW_B-vfw2]quit
quit
4.配置雙機熱備。
在FW_A上配置VRRP備份組,并將其狀態設置為Active。
[FW_A]interfaceGigabitEthernet1/0/1.10
[FW_A-GigabitEthernet1/0/1.10]vlan-typedot1q10
[FW_A-GigabitEthernet1/0/1.10]vrrpvrid10virtual-ip172.16.10.254active
[FW_A-GigabitEthernet1/0/1.10]quit
[FW_A]interfaceGigabitEthernet1/0/1.11
[FW_A-GigabitEthernet1/0/1.11]vlan-typedot1q11
[FW_A-GigabitEthernet1/0/1.11]vrrpvrid11virtual-ip172.16.11.254active
[FW_A-GigabitEthernet1/0/1.11]quit
[FW_A]interfaceGigabitEthernet1/0/1.1000
[FW_A-GigabitEthernet1/0/1.1000]vlan-typedot1q9
[FW_A-GigabitEthernet1/0/1.1000]vrrpvrid9virtual-ip172.16.9.254active
[FW_A-GigabitEthernet1/0/1.1000]quit
[FW_A]interfaceGigabitEthernet1/0/3.10
[FW_A-GigabitEthernet1/0/3.10]vlan-typedot1q10
[FW_A-GigabitEthernet1/0/3.10]vrrpvrid110virtual-ip10.159.10.254active
[FW_A-GigabitEthernet1/0/3.10]quit
[FW_A]interfaceGigabitEthernet1/0/3.11
[FW_A-GigabitEthernet1/0/3.11]vlan-typedot1q11
[FW_A-GigabitEthernet1/0/3.11]vrrpvrid111virtual-ip10.159.11.254active
[FW_A-GigabitEthernet1/0/3.11]quit
[FW_A]interfaceGigabitEthernet1/0/2.1
[FW_A-GigabitEthernet1/0/2.1]vlan-typedot1q1
[FW_A-GigabitEthernet1/0/2.1]vrrpvrid1virtual-ip10.159.1.254active
[FW_A-GigabitEthernet1/0/2.1]quit
[FW_A]interfaceGigabitEthernet1/0/2.2
[FW_A-GigabitEthernet1/0/2.2]vlan-typedot1q2
[FW_A-GigabitEthernet1/0/2.2]vrrpvrid2virtual-ip10.159.2.254active
[FW_A-GigabitEthernet1/0/2.2]quit
在FW_A上指定心跳口并啟用雙機熱備功能。
[FW_A]hrpinterfaceEth-Trunk1remote10.1.1.2
[FW_A]hrpenable
在FW_B上配置VRRP備份組,并將其狀態設置為Standby。
[FW_B]interfaceGigabitEthernet1/0/1.10
[FW_B-GigabitEthernet1/0/1.10]vlan-typedot1q10
[FW_B-GigabitEthernet1/0/1.10]vrrpvrid10virtual-ip172.16.10.254standby
[FW_B-GigabitEthernet1/0/1.10]quit
[FW_B]interfaceGigabitEthernet1/0/1.11
[FW_B-GigabitEthernet1/0/1.11]vlan-typedot1q11
[FW_B-GigabitEthernet1/0/1.11]vrrpvrid11virtual-ip172.16.11.254standby
[FW_B-GigabitEthernet1/0/1.11]quit
[FW_B]interfaceGigabitEthernet1/0/1.1000
[FW_B-GigabitEthernet1/0/1.1000]vlan-typedot1q9
[FW_B-GigabitEthernet1/0/1.1000]vrrpvrid9virtual-ip172.16.9.254standby
[FW_B-GigabitEthernet1/0/1.1000]quit
[FW_B]interfaceGigabitEthernet1/0/3.10
[FW_B-GigabitEthernet1/0/3.10]vlan-typedot1q10
[FW_B-GigabitEthernet1/0/3.10]vrrpvrid110virtual-ip10.159.10.254standby
[FW_B-GigabitEthernet1/0/3.10]quit
[FW_B]interfaceGigabitEthernet1/0/3.11
[FW_B-GigabitEthernet1/0/3.11]vlan-typedot1q11
[FW_B-GigabitEthernet1/0/3.11]vrrpvrid111virtual-ip10.159.11.254standby
[FW_B-GigabitEthernet1/0/3.11]quit
[FW_B]interfaceGigabitEthernet1/0/2.1
[FW_B-GigabitEthernet1/0/2.1]vlan-typedot1q1
[FW_B-GigabitEthernet1/0/2.1]vrrpvrid1virtual-ip10.159.1.254standby
[FW_B-GigabitEthernet1/0/2.1]quit
[FW_B]interfaceGigabitEthernet1/0/2.2
[FW_B-GigabitEthernet1/0/2.2]vlan-typedot1q2
[FW_B-GigabitEthernet1/0/2.2]vrrpvrid2virtual-ip10.159.2.254standby
[FW_B-GigabitEthernet1/0/2.2]quit
在FW_B上指定心跳口并啟用雙機熱備功能。
[FW_B]hrpinterfaceEth-Trunk1remote10.1.1.1
[FW_B]hrpenable
5.配置安全策略。
在FW_A上的根系統中配置安全策略。
HRP_M[FW_A]security-policy
HRP_M[FW_A-policy-security]rulenamesec_portal
HRP_M[FW_A-policy-security-rule-sec_portal]source-zoneuntrust
HRP_M[FW_A-policy-security-rule-sec_portal]destination-zonedmz
HRP_M[FW_A-policy-security-rule-sec_portal]destination-address10.160.0.016
HRP_M[FW_A-policy-security-rule-sec_portal]actionpermit
HRP_M[FW_A-policy-security-rule-sec_portal]profileavdefault
HRP_M[FW_A-policy-security-rule-sec_portal]profileipsdefault
HRP_M[FW_A-policy-security-rule-sec_portal]quit
HRP_M[FW_A-policy-security]quit
在FW_A上的虛擬系統vfw1中配置安全策略。
HRP_M[FW_A]switchvsysvfw1
HRP_Msystem-view
HRP_M[FW_A-vfw1]security-policy
HRP_M[FW_A-vfw1-policy-security]rulenamesec_vm1
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]source-zoneuntrust
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]destination-zonetrust
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]destination-address10.160.10.024
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]profileavdefault
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]profileipsdefault
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]actionpermit
HRP_M[FW_A-vfw1-policy-security-rule-sec_vm1]quit
HRP_M[FW_A-vfw1-policy-security]quit
HRP_M[FW_A-vfw1]quit
HRP_Mquit
參考上述步驟,在FW_A上的虛擬系統vfw2中配置安全策略。
雙機熱備狀態形成后,FW_A上的配置會自動同步到FW_B上,因此無需在FW_B上手動配置安全策略。
6.配置策略備份加速。
當策略數量較多時(比如超過100條),為了提升策略加速期間的匹配效率,需要開啟備份加速功能。但是開啟該功能后,新配置的策略需要等待策略備份加速完成后才能生效。HRP_M[FW-A] policy accelerate standby enable
雙機熱備狀態形成后,FW_A上的配置會自動同步到FW_B上,因此無需在FW_B上手動配置策略備份加速。
7.配置NAT Server。
說明:此處給出的NAT Server配置命令僅作為示例,實際網絡環境中會在管理組件上配置NAT Server,管理組件將配置數據下發給FW。
在FW_A上的根系統中配置NAT Server。
HRP_M[FW_A]natservernat_server_portal1global117.1.1.1inside10.160.1.100
HRP_M[FW_A]natservernat_server_portal2global117.1.1.2inside10.160.2.100
在FW_A上的虛擬系統vfw1中配置NAT Server。
HRP_M[FW_A]switchvsysvfw1
HRP_Msystem-view
HRP_M[FW_A-vfw1]natservernat_server_vm1global118.1.1.1inside10.160.10.100
HRP_M[FW_A-vfw1]quit
HRP_Mquit
參考上述步驟,在FW_A上的虛擬系統vfw2中配置NAT Server。
雙機熱備狀態形成后,FW_A上的配置會自動同步到FW_B上,因此無需在FW_B上手動配置NAT Server。
8.配置其它網絡設備。
本案例中重點介紹FW上的配置,其它網絡設備上的配置請關注以下幾個配置項:
上行路由器與CE12800之間運行OSPF路由協議,通過OSPF學習到去往虛擬機和Portal系統的公網地址的路由,下一跳為CE12800。
CE12800上配置多個虛擬交換機VRF,并將vlanif與相應的VRF綁定,然后在vlanif上配置VRRP。另外,CE12800上還需要在根交換機Pulic中配置去往虛擬機和Portal系統的公網地址的靜態路由,下一跳指向FW上的VRRP虛擬IP地址;在各個虛擬交換機VRF中配置缺省路由,下一跳也指向FW上相應的VRRP虛擬IP地址。
CE6800二層透傳報文,配置二層轉發即可。
結果驗證
在FW_A和FW_B上使用display hrp state命令查看當前HRP的狀態,可以看到HRP狀態正常。
Internet上的企業用戶可以正常訪問虛擬機業務。
Internet上的企業用戶可以正常訪問Portal系統。
FW_A的GE1/0/1.10接口上執行shutdown命令,模擬鏈路故障,發現主備正常倒換,業務不會中斷。
方案總結與建議FW上配置了虛擬系統特性,每一個虛擬系統對應一個虛擬機業務。通過虛擬系統對虛擬機進行隔離,還可以在虛擬系統中配置安全策略,實現訪問控制。
FW與CE12800相連的接口數量有限,因此創建了多個子接口。子接口被劃分到根系統和虛擬系統中,使用比較靈活。
方案一中,在FW上配置OSPF時,由于虛擬系統中無法直接配置OSPF,所以必須在根系統中配置OSPF綁定虛擬系統對應的VPN實例。
方案二中,CE12800上要配置VRF功能,虛擬成連接上行的交換機(根交換機Public)和連接下行的交換機(多個虛擬交換機VRF)。FW與CE12800的根交換機Public和虛擬交換機VRF之間都運行VRRP。
審核編輯:郭婷
-
云計算
+關注
關注
38文章
7447瀏覽量
135855 -
交換機
+關注
關注
19文章
2460瀏覽量
95791 -
虛擬機
+關注
關注
1文章
864瀏覽量
27468
原文標題:防火墻在云計算安全方案中的應用,兩種方案提供選擇
文章出處:【微信號:網絡技術干貨圈,微信公眾號:網絡技術干貨圈】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
評論