305
Packet type-based interface PBR configuration example
Network requirements
As shown in
, configure PBR on Router A to forward all TCP packets received on Ethernet 1/1
to the next hop 1.1.2.2. Router A forwards other packets according to the routing table.
Figure 78
Network diagram
Configuration procedure
1.
Configure Router A:
# Configure the IP addresses of the serial interfaces.
<RouterA> system-view
[RouterA] interface serial 2/0
[RouterA-Serial2/0] ip address 1.1.2.1 24
[RouterA-Serial2/0] quit
[RouterA] interface serial 2/1
[RouterA-Serial2/1] ip address 1.1.3.1 24
[RouterA-Serial2/1] quit
# Configure ACL 3101 to match TCP packets.
[RouterA] acl number 3101
[RouterA-acl-adv-3101] rule permit tcp
[RouterA-acl-adv-3101] quit
# Configure Node 5 for policy
aaa
to forward TCP packets to next hop 1.1.2.2.
[RouterA] policy-based-route aaa permit node 5
[RouterA-pbr-aaa-5] if-match acl 3101
[RouterA-pbr-aaa-5] apply next-hop 1.1.2.2
[RouterA-pbr-aaa-5] quit
# Configure interface PBR by applying policy
aaa
to Ethernet 1/1.
Router A
Eth1/1
10.110.0.10/24
S2/0
1.1.2.1/24
S2/1
1.1.3.1/24
Subnet
10.110.0.0/24
S2/0
1.1.2.2/24
S2/1
1.1.3.2/24
Router B
Router C
Host A
Host B
10.110.0.20/24
Gateway: 10.110.0.10