R3102-R3103-HP 6600/HSR6600 Routers Layer 3 - IP Routing Configuration Guide

284
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 86 Network diagram
Configuration procedure
1. Configure Router A:
# Configure RIP.
<RouterA> system-view
[RouterA] rip
[RouterA-rip-1] network 192.1.1.0
[RouterA-rip-1] network 150.1.0.0
[RouterA-rip-1] network 151.1.0.0
[RouterA-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.
[RouterA] policy-based-route lab1 permit node 10
[RouterA-pbr-lab1-10] if-match packet-length 64 100
[RouterA-pbr-lab1-10] apply ip-address next-hop 150.1.1.2
[RouterA-pbr-lab1-10] quit
[RouterA] policy-based-route lab1 permit node 20
[RouterA-pbr-lab1-20] if-match packet-length 101 1000
[RouterA-pbr-lab1-20] apply ip-address next-hop 151.1.1.2
[RouterA-pbr-lab1-20] quit
# Configure interface PBR by applying policy lab1 to GigabitEthernet 2/1/1.
[RouterA] interface GigabitEthernet 2/1/1
[RouterA-GigabitEthernet2/1/1] ip address 192.1.1.1 255.255.255.0
[RouterA-GigabitEthernet2/1/1] ip policy-based-route lab1
[RouterA-GigabitEthernet2/1/1] quit
# Configure the IP addresses of the serial interfaces.
[RouterA] interface serial 2/2/0
[RouterA-Serial2/2/0] ip address 150.1.1.1 255.255.255.0
[RouterA-Serial2/2/0] quit
[RouterA] interface serial 2/2/1
[RouterA-Serial2/2/1] ip address 151.1.1.1 255.255.255.0
[RouterA-Serial2/2/1] return
2. Configure Router B: