資源描述:
《策略路由和nat實(shí)現(xiàn)負(fù)載均衡實(shí)例(華為防火墻)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、一、組網(wǎng)需求:1.正常情況下10.0.0.2從出口12.12.12.0NAT轉(zhuǎn)化成100.0.0.0的地址,20.0.0.2從出口13.13.13.0NAT轉(zhuǎn)化成200.0.0.0的地址,實(shí)現(xiàn)負(fù)載均衡。2.FW雙出口的某一條鏈路down,所有用戶NAT成同一地址段出去,實(shí)現(xiàn)鏈路冗余。二、實(shí)驗(yàn)組網(wǎng)四、關(guān)鍵配置USG5360(V100R003C01SPC007):?ipaddress-set100and200typeobjectaddress010.0.0.0mask24address120.0.0.0mask24#ipaddress-set10.
2、0.0.2typeobjectaddress010.0.0.0mask24#ipaddress-set20.0.0.2typeobjectaddress020.0.0.0mask24#aclnumber3001rule0permitipsource10.0.0.00.255.255.255aclnumber3002rule0permitipsource20.0.0.00.255.255.255#nataddress-group100NAT1100.0.0.1100.0.0.100nataddress-group200NAT2200.0.0.12
3、00.0.0.100#trafficclassifier12if-matchacl3001trafficclassifier13if-matchacl3002#trafficbehavior12remarkip-nexthop12.12.12.2output-interfaceGigabitEthernet0/0/0trafficbehavior13remarkip-nexthop13.13.13.2output-interfaceGigabitEthernet0/0/1#qospolicyreclassifier12behavior12cla
4、ssifier13behavior13#interfaceGigabitEthernet0/0/0ipaddress12.12.12.1255.255.255.252#interfaceGigabitEthernet0/0/1ipaddress13.13.13.1255.255.255.252#interfaceGigabitEthernet0/0/2ipaddress20.0.0.1255.255.255.0#interfaceGigabitEthernet0/0/3ipaddress10.0.0.1255.255.255.0#??firew
5、allzonelocal?setpriority100#firewallzonetrustsetpriority85qosapplypolicyreoutboundaddinterfaceGigabitEthernet0/0/2addinterfaceGigabitEthernet0/0/3#firewallzoneuntrustsetpriority5#firewallzonenamet100setpriority10addinterfaceGigabitEthernet0/0/0#firewallzonenamet200setpriorit
6、y11addinterfaceGigabitEthernet0/0/1#nat-policyinterzonetrustuntrustoutbound#nat-policyinterzonetrustt100outboundpolicy0actionsource-natpolicysourceaddress-set100and200address-groupNAT1#nat-policyinterzonetrustt200outboundpolicy0actionsource-natpolicysourceaddress-set100and20
7、0address-groupNAT2??#?iproute-static0.0.0.00.0.0.013.13.13.2iproute-static0.0.0.00.0.0.012.12.12.2#?五、實(shí)現(xiàn)原理按照實(shí)驗(yàn)要求,如果我們用傳統(tǒng)的NAT,將10.0.0.2nat成100.0.0.0/24網(wǎng)段,將20.0.0.2nat成200.0.0.0/24網(wǎng)段,這種方法是實(shí)現(xiàn)不了當(dāng)FW雙線上連線路任意斷掉一條業(yè)務(wù)不斷的實(shí)驗(yàn)要求。那么我們應(yīng)如何解決這個(gè)問(wèn)題呢?首先我們要了解防火墻的處理流程,如下圖:NAT實(shí)際上在防火墻中也屬于域間策略的一種,即從上
8、圖中我們可以知道NAT是在路由選路后進(jìn)行的,而NAT的配置很簡(jiǎn)單,只是將匹配的地址(acl)進(jìn)行一個(gè)地址轉(zhuǎn)換的操作(如果不選no-pat方式還包括端口