一、拓扑图场景介绍:
两条ISP线路分别接入SSG5的E0/0和E0/1口
VLAN1:172.16.1.0/24的流量要求走E0/0口
VLAN2:172.16.2.0/24的流量要求走E0/1口
二、定义ACL(在路由配置模式下)
set vrouter "trust-vr"set access-list extended 10 src-ip 172.16.1.0/24 dst-ip 0.0.0.0/0 src-port 1-65535 dst-port 1-65535 protocol any entry 10set access-list extended 10 src-ip 172.16.1.0/24 dst-ip 0.0.0.0/0 protocol icmp entry 20set access-list extended 20 src-ip 172.16.2.0/24 dst-ip 0.0.0.0/0 src-port 1-65535 dst-port 1-65535 protocol any entry 10set access-list extended 20 src-ip 172.16.2.0/24 dst-ip 0.0.0.0/0 protocol icmp entry 20exit
三、定义match group(在路由配置模式下)
set vrouter "trust-vr"set match-group name group_10set match-group group_10 ext-acl 10 match-entry 10set match-group name group_20set match-group group_20 ext-acl 20 match-entry 10exit
四、定义action group(在路由配置模式下)
set vrouter "trust-vr"set action-group name action_10set action-group action_10 next-interface ethernet0/0 action-entry 10set action-group name action_20set action-group action_20 next-interface ethernet0/1 action-entry 10exit
五、定义policy(在路由配置模式下)
set vrouter "trust-vr"set pbr policy name pbr_trustset pbr policy pbr_trust match-group group_10 action-group action_10 10set pbr policy pbr_trust match-group group_20 action-group action_20 20exit
六、配置policy binding(在配置模式下)
set pbr pbr_trustset zone Trust pbr pbr_trustset interface bgroup0 pbr pbr_trustset interface bgroup1 pbr pbr_trustset interface bgroup2 pbr pbr_trustset interface bgroup3 pbr pbr_trust