强叔侃墙_出口选路_策略路由_基于源IP地址的策略路由
FW1为企业出口网关,通过不同ISP的两条链路连接到internet,其中经过AR1的链路带宽速率较高,假设为10Mbit/s,经过AR2的链路带宽速率较小,为2Mbit/s。为保证企业管理者访问Internet的用户体检,让其访问流量经过AR1链路进行转发,而员工的访问流量经过AR2的链路转发。
示例(防火墙用USG5500)
防火墙FW1作为企业出口网关,通过两条链路连接到Internet,其中经过AR1为isp1,经过AR2为isp2,访问10.10.11.11从AR1走,访问10.10.10.10从AR2走。
步骤
1、根据报文目的地址设置匹配条件
#acl number 3002
rule 5 permit ip source 192.168.1.0 0.0.0.255
#
acl number 3003
rule 5 permit ip source 192.168.10.0 0.0.0.255
#
2、配置策略路由
policy-based-route boss permit node 10
if-match acl 3003
apply ip-address next-hop 10.1.1.2
policy-based-route employee permit node 10
if-match acl 3002
apply ip-address next-hop 10.1.2.2
3、应用策略路由
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
ip policy-based-route employee
#
interface GigabitEthernet0/0/4
ip address 192.168.10.1 255.255.255.0
ip policy-based-route boss
注意事项
1、增加两个安全区域
#
firewall zone name isp1
set priority 10
add interface GigabitEthernet0/0/2
#
firewall zone name isp2
set priority 20
add interface GigabitEthernet0/0/3
#
2、配置trust到isp1和isp2区域出方向安全策略
policy interzone trust isp1 outbound
policy 1
action permit
policy source 192.168.10.0 0.0.0.255
#
policy interzone trust isp2 outbound
policy 1
action permit
policy source 192.168.1.0 0.0.0.255
#
3、将g0/0/1和g0/0/4端口增加到trust区域
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/4
#
4、FW1,AR1,AR2,AR3,之间用静态路由实现互通。
验证
PC1 和PC2 ping 10.10.10.10,查看防火墙上的会话信息。
<FW1>display firewall session table verbose
icmp v*n:public --> public
Zone: trust--> isp2 TTL: 00:00:20 Left: 00:00:01
Interface: GigabitEthernet0/0/3 NextHop: 10.1.2.2 MAC: 00-e0-fc-59-1d-dd
<--packets:3 bytes:276 -->packets:6 bytes:552
192.168.1.2:1632-->10.10.10.10:2048
icmp v*n:public --> public
Zone: trust--> isp1 TTL: 00:00:20 Left: 00:00:13
Interface: GigabitEthernet0/0/2 NextHop: 10.1.1.2 MAC: 00-e0-fc-f8-13-51
<--packets:3 bytes:276 -->packets:5 bytes:460
192.168.10.2:4448-->10.10.10.10:2048
管理者(192.168.10.2)访问server2的流量从AR1(10.1.1.2)连接的链路转发的,而员工(192.168.1.2)从AR2(10.1.2.2)连接的链路转发的,满足
了优先级高的流量走高速链路,优先级低的流量走低速链路的用户需求。