Configuring interface pbr based on packet type, Network requirements, Configuration procedure – H3C Technologies H3C S10500 Series Switches User Manual

Page 392

Advertising
background image

377

Telnet uses TCP, and ping uses ICMP. The preceding results show that all TCP packets of Switch A are

forwarded to next hop 1.1.2.2, and other packets are forwarded via VLAN-interface 20. The PBR

configuration is effective.

Configuring interface PBR based on packet type

Network requirements

As shown in

Figure 120

, configure PBR on Switch A, so that TCP packets arriving on VLAN-interface 11

are forwarded to next hop 1.1.2.2 and other packets are forwarded according to the routing table.

Figure 120 Network diagram for interface PBR based on packet type

Configuration procedure

NOTE:

In this example, static routes are configured to ensure the reachability among devices.

1.

Configure Switch A.

# Define ACL 3101 to match TCP packets.

<SwitchA> system-view

[SwitchA] acl number 3101

[SwitchA-acl-adv-3101] rule permit tcp

[SwitchA-acl-adv-3101] quit

# Configure Node 5 of policy aaa to forward TCP packets to next hop 1.1.2.2.

[SwitchA] policy-based-route aaa permit node 5

[SwitchA-pbr-aaa-5] if-match acl 3101

[SwitchA-pbr-aaa-5] apply ip-address next-hop 1.1.2.2

[SwitchA-pbr-aaa-5] quit

# Apply the policy aaa to VLAN-interface 11.

Advertising