F3215-HP Load Balancing Module Network Management Configuration Guide-6PW101
327
Interface PBR based on packet length configuration example
Network requirements
As shown in Figure 184, configure interface PBR to guide the forwarding of packets received on
GigabitEthernet 0/3 of LB as follows:
• Forwards packets with a length of 64 to 100 bytes to the next hop 150.1.1.2/24.
• Forwards packets with a length of 101 t o 10 0 0 t o t h e n e x t h o p 151.1.1. 2 / 24 .
All other packets are forwarded according to the routing table.
Figure 184 Network diagram
Configuration procedure
1. Configure LB:
# Configure RIP.
<LB> system-view
[LB] rip
[LB-rip-1] network 192.1.1.0
[LB-rip-1] network 150.1.0.0
[LB-rip-1] network 151.1.0.0
[LB-rip-1] quit
# Configure Node 10 for policy lab1 to forward packets with a length of 64 to 100 bytes to the
next hop 150.1.1.2, and packets with a length of 101 to 1000 bytes to the next hop 151.1.1.2.
[LB] policy-based-route lab1 permit node 10
[LB-pbr-lab1-10] if-match packet-length 64 100
[LB-pbr-lab1-10] apply ip-address next-hop 150.1.1.2
[LB-pbr-lab1-10] quit
[LB] policy-based-route lab1 permit node 20
[LB-pbr-lab1-20] if-match packet-length 101 1000
[LB-pbr-lab1-20] apply ip-address next-hop 151.1.1.2
[LB-pbr-lab1-20] quit
# Configure interface PBR by applying policy lab1 to GigabitEthernet 0/3.
[LB] interface gigabitethernet 0/3
[LB-GigabitEthernet0/3] ip address 192.1.1.1 255.255.255.0
[LB-GigabitEthernet0/3] ip policy-based-route lab1
[LB-GigabitEthernet0/3] quit
# Configure the IP addresses of the GigabitEthernet interfaces.
[LB] interface gigabitethernet 0/1