1. Configuration Requirements
Define the policy path for policy aaa to control all TCP packets received from the E3/0/0 interface of the Ethernet port, and send the packets to other packets using the serial serial1/0/0 port, the route table is still forwarded by searching the route table.
Node 5 indicates that Ethernet packets matching acl 3101 will be sent to the serial port serial1/0/0;
Node 10, indicating that no packets matching acl 3102 are processed by policy routing;
Packets from Ethernet3/0/0 attempt to match the if-match clause of node 5 and node 10 in sequence. If the node matches the permit statement, execute the apply clause. If the node matches the deny statement, exit the routing rule.
2. Networking Diagram
Figure 12-1 configure source address-Based Policy Routing networking
3. configuration steps
# Set the default Firewall Filtering Method to "forbidden ".
[H3C] firewall default deny
# Define the access control list.
[H3C] acl number 3101
A [H3C-acl-adv-3101] rule permit tcp
[H3C-acl-adv-3101] quit
[H3C] acl number 3102
[H3C-acl-adv-3102] rule permit ip soure 192.168.1.1
[H3C-acl-adv-3102] quit
# Define node 5 so that any TCP packet that matches acl 3101 is sent to the serial port serial 1/0/0.
[H3C] route-policy aaa permit node 5
[H3C-route-policy] if-match acl 3101
[H3C-route-policy] apply output-interface serial 1/0/0
[H3C-route-policy] quit
# Define node 10, indicating that packets matching acl 3102 are not processed by a policy route.
[H3C] route-policy aaa deny node 10
[H3C-route-policy] if-match acl 3102
[H3C-route-policy] quit
# Apply the policy aaa on the Ethernet port.
[H3C] interface ethernet 3/0/0
[H3C-Ethernet3/0/0] ip policy route-policy aaa