334
Figure 79
Network diagram
Configuration procedure
1.
Configure Router A:
# Configure IP addresses for the interfaces.
<RouterA> system-view
[RouterA] interface gigabitethernet 1/0
[RouterA-GigabitEthernet1/0] ip address 1.1.2.1 24
[RouterA-GigabitEthernet1/0] quit
[RouterA] interface gigabitethernet2/0
[RouterA-GigabitEthernet2/0] ip address 1.1.3.1 24
[RouterA-GigabitEthernet2/0] 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 GigabitEthernet 3/0.
[RouterA] interface gigabitethernet 3/0
[RouterA-GigabitEthernet3/0] ip address 10.110.0.10 24
[RouterA-GigabitEthernet3/0] ip policy-based-route aaa
[RouterA-GigabitEthernet3/0] quit
2.
Configure Router B:
# Configure an IP address for the interface.
Router A
GE3/0
10.110.0.10/24
GE1/0
1.1.2.1/24
GE2/0
1.1.3.1/24
Subnet
10.110.0.0/24
GE1/0
1.1.2.2/24
GE2/0
1.1.3.2/24
Router B
Router C
Host A
Host B
10.110.0.20/24
Gateway: 10.110.0.10