1. 程式人生 > >強叔侃牆_出口選路_策略路由_基於源IP地址的策略路由

強叔侃牆_出口選路_策略路由_基於源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  VPN: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  VPN: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)連線的鏈路轉發的,滿足

了優先順序高的流量走高速鏈路,優先順序低的流量走低速鏈路的使用者需求。