华为双wan口防火墙 (华为防火墙支持sdwan吗)

用户有两条PPPOE线路分属两个营运商,一台出口防火墙,想充分利用出口带宽。

拓扑图

华为怎么关闭防火墙,华为防火墙出口流量

配置方法:

互联网部分基础配置

AR3

interface GigabitEthernet0/0/1

ip address 13.0.0.3 255.255.255.0

interface GigabitEthernet0/0/2

ip address 23.0.0.3 255.255.255.0

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

ip ip-prefix di index 10 permit 1.1.1.1 32

route-policy di permit node 10

if-match ip-prefix di

ospf 1

import-route direct type 1 route-policy di

area 0.0.0.0

network 13.0.0.3 0.0.0.0

ospf 2

import-route direct type 1 route-policy di

area 0.0.0.0

network 23.0.0.3 0.0.0.0

//配置两个OSPF进程分别对应两个营运商线路,

//引入互联网服务器1.1.1.1

ISP1配置

ip pool pool1

gateway-list 10.0.0.2

network 10.0.0.0 mask 255.255.255.0

interface Virtual-Template1

ppp authentication-mode chap

remote address pool pool1

ip address 10.0.0.2 255.255.255.0

interface GigabitEthernet0/0/0

ip address 13.0.0.1 255.255.255.0

interface GigabitEthernet0/0/1

pppoe-server bind Virtual-Template 1

ospf 1

area 0.0.0.0

network 10.0.0.2 0.0.0.0

network 13.0.0.1 0.0.0.0

//配置PPPOE server和公网OSPF协议

ISP2配置

ip pool pool1

gateway-list 20.0.0.2

network 20.0.0.0 mask 255.255.255.0

interface Virtual-Template1

ppp authentication-mode chap

remote address pool pool1

ip address 20.0.0.2 255.255.255.0

interface GigabitEthernet0/0/0

ip address 23.0.0.2 255.255.255.0

interface GigabitEthernet0/0/2

pppoe-server bind Virtual-Template 1

ospf 2

area 0.0.0.0

network 20.0.0.2 0.0.0.0

network 23.0.0.2 0.0.0.0

出口防火墙配置

sys

sys FW

dhcp enable

ip pool 10

gateway-list 192.168.10.1

network 192.168.10.0 mask 255.255.255.0

ip pool 20

gateway-list 192.168.20.1

network 192.168.20.0 mask 255.255.255.0

interface GigabitEthernet1/0/3

ip address 192.168.10.1 255.255.255.0

dhcp select global

interface GigabitEthernet1/0/4

ip address 192.168.20.1 255.255.255.0

dhcp select global

firewall zone trust

add interface GigabitEthernet1/0/3

add interface GigabitEthernet1/0/4

//内网配置,DHCP方式分配地址

dialer-rule 10 ip permit

interface dialer 1

ppp chap user pu

ppp chap password cipher aaa

ip address ppp-negotiate

dialer user pu

dialer-group 10

dialer bundle 1

dialer number 1 autodial

quit

interface GigabitEthernet1/0/1

pppoe-client dial-bundle-number 1 ipv4

firewall zone name isp1

set priority 6

add interface Dialer1

add interface GigabitEthernet1/0/1

interface dialer 2

ppp chap user pu

ppp chap password cipher aaa

ip address ppp-negotiate

dialer user pu

dialer-group 10

dialer bundle 2

dialer number 1 autodial

quit

interface GigabitEthernet1/0/2

pppoe-client dial-bundle-number 2 ipv4

firewall zone name isp2

set priority 7

add interface Dialer2

add interface GigabitEthernet1/0/2

//出口PPPOE拨号配置

ip route-static 0.0.0.0 0.0.0.0 Dialer1

ip route-static 0.0.0.0 0.0.0.0 Dialer2

//配置默认路由

nat-policy

rule name isp

source-zone trust

egress-interface Dialer1

egress-interface Dialer2

source-address 192.168.0.0 mask 255.255.0.0

action source-nat easy-ip

//配置NAT easy IP方式

security-policy

default action permit

y

//简化调试,安全策略放行所有

配置完成检查效果:

PC1流量路径

华为怎么关闭防火墙,华为防火墙出口流量

PC2流量路径

华为怎么关闭防火墙,华为防火墙出口流量

注:由于华为防火墙多出口场景下,当设备上存在等价路由时,IP报文默认按照逐流负载分担模式进行转发,使用源IP地址和目的IP地址进行HASH计算选择出接口。

实验的流量走向,由于获取的IP不同负载路径可能与图示不同

知识点:

firewall load-balance

命令功能

firewall load-balance命令用来配置多出口场景下IP报文转发的负载分担方式。

命令格式

firewall load-balance { flow [ hash { destination-ip | destination-port | source-ip | source-port } * ] | packet }

参数说明

参数

参数说明

取值

flow

表示多出口场景下按流进行负载分担。

-

hash { destination-ip | destination-port | source-ip | source-port } *

表示HASH算法。

  • destination-ip :目的IP地址
  • destination-port :目的端口号
  • source-ip :源IP地址
  • source-port :源端口号

缺省是基于源IP地址和目的IP地址的HASH算法。

packet

表示多出口场景下按包进行负载分担。

-

使用指南

多出口场景下,当设备上存在等价路由时,IP报文默认按照逐流负载分担模式进行转发,使用源IP地址和目的IP地址进行HASH计算选择出接口。

当多条链路的负载不均衡时,可能需要配置HASH计算的参数为源IP地址、源端口、目的IP地址和目的端口。

使用实例

# 配置IP报文转发的负载分担方式为逐流负载分担,使用源IP地址、源端口号、目的IP地址和目的端口号进行HASH计算。

<FW> system-view
[FW] firewall load-balance flow hash source-ip source-port destination-ip destination-port