337
[RouterB-rip-1] network 10.0.0.0
[RouterB-rip-1] network 150.1.0.0
[RouterB-rip-1] network 151.1.0.0
[RouterB-rip-1] quit
Verifying the configuration
# Execute the
debugging ip policy-based-route
command on Router A.
<RouterA> debugging ip policy-based-route
<RouterA> terminal logging level 7
<RouterA> terminal monitor
# Ping Loopback 0 of Router B from Host A, and set the data length to 64 bytes.
C:\>ping –n 1 -l 64 10.1.1.1
Pinging 10.1.1.1 with 64 bytes of data:
Reply from 10.1.1.1: bytes=64 time=1ms TTL=64
Ping statistics for 10.1.1.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
The debugging information about PBR displayed on Router A is as follows:
<RouterA>
*Jun 26 12:04:33:519 2012 RouterA PBR4/7/PBR Forward Info: -MDC=1; Policy:lab1, Node:
10,match succeeded.
*Jun 26 12:04:33:519 2012 RouterA PBR4/7/PBR Forward Info: -MDC=1; apply next-hop
150
.1.1.2.
The output shows that Router A sets the next hop for the received packets to 150.1.1.2 according
to PBR. The packets are forwarded through GigabitEthernet 1/0.
# Ping Loopback 0 of Router B from Host A, and set the data length to 200 bytes.
C:\> ping –n 1 -l 200 10.1.1.1
Pinging 10.1.1.1 with 200 bytes of data:
Reply from 10.1.1.1: bytes=200 time=1ms TTL=64
Ping statistics for 10.1.1.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
The debugging information about PBR displayed on Router A is as follows:
<RouterA>
*Jun 26 12:20:33:610 2012 RouterA PBR4/7/PBR Forward Info: -MDC=1; Policy:lab1, Node:
20,match succeeded.
*Jun 26 12:20:33:610 2012 RouterA PBR4/7/PBR Forward Info: -MDC=1; apply next-hop
151
.1.1.2.