"Topology and Software"
The switch used in this paper is the H3C simulator, the download address is as follows:
Http://forum.h3c.com/forum.php?
mod=viewthread&tid=109740&highlight=h3c%e6%a8%a1%e6%
8b%9f%e5%99%a8 interested friends can download on the forum
"Networking Requirements"
Running dynamic routing between R1,R2,R3,R4
Packets coming in from R1 's S0/6/3
A 1-63-length walk 192.168.12.2
A 64-10000-length walk 192.168.13.2
Other lengths of message lookup by routing table
"Configuration Information"
R1:
Interface serial0/6/0
Link-protocol PPP
IP address 192.168.12.1 255.255.255.0
#
Interface SERIAL0/6/1
Link-protocol PPP
IP address 192.168.13.1 255.255.255.0
#
Interface SERIAL0/6/2
Link-protocol PPP
#
Interface SERIAL0/6/3
Link-protocol PPP
IP address 172.16.15.1 255.255.255.0
IP Policy-based-route LAB1
#
#
OSPF 1
Area 0.0.0.0
Network 192.168.12.0 0.0.0.255
Network 192.168.13.0 0.0.0.255
Network 172.16.15.0 0.0.0.255
#
Policy-based-route LAB1 Permit Node 10
If-match Packet-length 1 63
Apply Ip-address next-hop 192.168.12.2
Policy-based-route LAB1 Permit Node 20
If-match Packet-length 64 10000
Apply Ip-address next-hop 192.168.13.2
#
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Network/lyjs/
R2:
Interface serial0/6/0
Link-protocol PPP
IP address 192.168.12.2 255.255.255.0
#
Interface SERIAL0/6/1
Link-protocol PPP
IP address 192.168.24.1 255.255.255.0
#
OSPF 1
Area 0.0.0.0
Network 192.168.24.0 0.0.0.255
Network 192.168.12.0 0.0.0.255
R3:
Interface serial0/6/0
Link-protocol PPP
IP address 192.168.34.1 255.255.255.0
#
Interface SERIAL0/6/1
Link-protocol PPP
IP address 192.168.13.2 255.255.255.0
#
OSPF 1
Area 0.0.0.0
Network 192.168.13.0 0.0.0.255
Network 192.168.34.0 0.0.0.255
#
R4:
#
Interface serial0/6/0
Link-protocol PPP
IP address 192.168.34.2 255.255.255.0
#
Interface SERIAL0/6/1
Link-protocol PPP
IP address 192.168.24.2 255.255.255.0
#
Interface NULL0
#
Interface LoopBack0
IP address 10.1.1.1 255.255.255.255
#
OSPF 1
Area 0.0.0.0
Network 192.168.24.0 0.0.0.255
Network 192.168.34.0 0.0.0.255
Network 10.1.1.1 0.0.0.0
#
R5:
#
Interface SERIAL0/6/3
Link-protocol PPP
IP address 172.16.15.2 255.255.255.0
IP route-static 0.0.0.0 0.0.0.0 172.16.15.1
Authentication
Ping 10.1.1.1 on R5 to open debugging information on R1
<r5>ping 10.1.1.1
PING 10.1.1.1:56 Data bytes, press Ctrl_c to
Break
Reply from 10.1.1.1:bytes=56 sequence=1 ttl=253
Time=4 ms
Reply from 10.1.1.1:bytes=56 sequence=2 ttl=253
Time=4 ms
Reply from 10.1.1.1:bytes=56 sequence=3 ttl=253
Time=10 ms
Reply from 10.1.1.1:bytes=56 sequence=4 ttl=253
Time=10 ms
Request Time Out
---10.1.1.1 ping statistics---
5 packet (s) transmitted
4 packet (s) received
20.00% Packet Loss
Round-trip Min/avg/max = 4/7/10 ms
<R1>
*feb 19:51:51:578 2013 R1 Pbr/7/policy-routing:ip
Policy based Routing Success:policy_routemap:
LAB1, Node:20, next-hop:192.168.13.2
*feb 19:51:51:781 2013 R1 Pbr/7/policy-routing:ip
Policy based Routing Success:policy_routemap:
LAB1, Node:20, next-hop:192.168.13.2
*feb 19:51:51:984 2013 R1 Pbr/7/policy-routing:ip
Policy based Routing Success:policy_routemap:
LAB1, Node:20, next-hop:192.168.13.2
*feb 19:51:52:187 2013 R1 Pbr/7/policy-routing:ip
Policy based Routing Success:policy_routemap:
LAB1, Node:20, next-hop:192.168.13.2
*feb 19:51:52:406 2013 R1 Pbr/7/policy-routing:ip
Policy based Routing Success:policy_routemap:
LAB1, Node:20, next-hop:192.168.13.2
<R5>
As above, if you follow the R1 routing table, you should go to 192.168.12.2, but because of the policy route, the next hop points to the 192.168.13.2 experiment complete
<r1>dis IP ro
Routing Tables:public
Destinations:14 routes:15
Destination/mask Proto Pre cost Nexthop Interface
10.1.1.1/32 OSPF 3124 192.168.12.2 s0/6/0
OSPF 3124 192.168.13.2 S0/6/1
This article is from the "It Positive Energy" blog, please be sure to keep this source http://kuangweidong.blog.51cto.com/3272922/1142736