
52
[Router]
interface GigabitEthernet 0/0/1
[Router-GigabitEthernet0/0/1]
traffic-policy test inbound
[Router-GigabitEthernet0/0/1]
quit
[Router]
interface GigabitEthernet 0/0/2
[Router-GigabitEthernet0/0/2]
traffic-policy test inbound
[Router-GigabitEthernet0/0/2]
quit
Apply the traffic policy to egress router interfaces connecting to the core switches.
After PBR is configured, intranet users on the network segment 192.168.10.0 access
the Internet through GE0/0/0, and intranet users on the network segment
192.168.20.0 access the Internet through GE1/0/0 using PPPoE dial-up.
For details on PBR configuration and commands, see "PBR Configuration" and
configuration examples in the corresponding
Configuration Guide - IP Unicast Routing
based on the version of the device.
[Router]
traffic policy test
[Router-trafficpolicy-test]
classifier c0 behavior b0
[Router-trafficpolicy-test]
classifier c1 behavior b1
[Router-trafficpolicy-test]
classifier c2 behavior b2
[Router-trafficpolicy-test]
quit
Configure a traffic policy and bind traffic classifiers to traffic behavior in the traffic
policy.
11
12
Configure traffic behavior to not redirect traffic exchanged between internal users, to
redirect traffic from the internal network segment 192.168.10.0 to the next hop
address 1.1.1.1, and to redirect traffic from the internal network segment 192.168.20.0
to the outbound interface Dialer 0.
[Router]
traffic behavior b0
[Router-behavior-b0]
permit
[Router-behavior-b0]
quit
[Router]
traffic behavior b1
[Router-behavior-b1]
redirect ip-nexthop 1.1.1.1
[Router-behavior-b1]
quit
[Router]
traffic behavior b2
[Router-behavior-b2]
redirect interface Dialer 0
[Router-behavior-b2]
quit
10
[Router]
traffic classifier c0
[Router-classifier-c0]
if-match acl 3000
[Router-classifier-c0]
quit
[Router]
traffic classifier c1
[Router-classifier-c1]
if-match acl 3001
[Router-classifier-c1]
quit
[Router]
traffic classifier c2
[Router-classifier-c2]
if-match acl 3002
[Router-classifier-c2]
quit
Configure traffic classifiers
c0
,
c1
, and
c2
, and configure matching rules based on
ACL 3000, ACL 3001, and ACL 3002 in the traffic classifiers, respectively.
9