交换机重定向-策略路由
假如内网有两个网段,172.16.1.0和172.16.2.0 ,希望172.16.1.0的用户走电信(3.3.3.3),172.16.2.0的用户走联通(4.4.4.4)
[Quidway]acl 3000
[Quidway-acl-adv-3000]rule 0 permit ip source 172.16.1.0 0.0.0.255 —-配置acl
[Quidway-acl-adv-3000]q
[Quidway]acl 3001
[Quidway-acl-adv-3001]rule 0 permit ip source 172.16.2.0 0.0.0.255 —-配置acl
[Quidway-acl-adv-3001]q
[Quidway]traffic classifier 1
[Quidway-classifier-1]if-match acl 3000
[Quidway-classifier-1]q
[Quidway]traffic classifier2
[Quidway-classifier-2]if-match acl 3001
[Quidway-classifier-2]q
[Quidway]traffic behavior 1
[Quidway-behavior-1]redirect ip-nexthop 3.3.3.3 ——-重定向到电信网关
[Quidway-behavior-1]q
redirect ip-nexthop dialer 0
[Quidway]traffic behavior 2
[Quidway-behavior-2]redirect ip-nexthop 4.4.4.4 ——-重定向到联通网关
[Quidway-behavior-2]q
[Quidway]traffic policy 1
[Quidway-trafficpolicy-1]classifier 1 behavior 1 ——-将分类和行为绑定
[Quidway-trafficpolicy-1]classifier 2 behavior 2
[Quidway-trafficpolicy-1]q
[Quidway]int Ethernet 0/0/1——一定要在接内网入方向下发策略
[Quidway- Ethernet 0/0/1]traffic-policy i inbound