3Com 10014299 Network Router User Manual


 
IP Policy Routing Configuration Example 495
4 Adopt policy aaa in Ethernet interface
[Router-route-policy]interface ethernet 0
[Router-Ethernet0]ip policy route-policy aaa
Configure Policy Routing
Based on Message Size
Router A sends the messages of 64-100 bytes through S0, messages of 101-1000
bytes through S1 and those of other sizes must be routed normally.
Apply IP policy routing lab1 on E0 of Router A. This strategy sets message of
64-100 bytes to 150.1.1.2 as the IP address of next forwarding and set message of
101-1000 bytes to 151.1.1.2 as the IP address of next forwarding. All messages of
other levels must be routed in the method based on the destination address
Figure 161 Networking diagram of configuring policy routing based on message size
1 Configure Router A:
[RouterA]interface ethernet 0
[RouterA-Ethernet0]ip address 192.1.1.1 255.255.255.0
[RouterA-Ethernet0]ip policy route-policy lab1
[RouterA-Ethernet0]interface serial 0
[RouterA-Serial0]ip address 150.1.1.1 255.255.255.0
[RouterA-Serial0]interface serial 1
[RouterA-Serial1]ip address 151.1.1.1 255.255.255.0
[RouterA-Serial1]quit
[RouterA]rip
[RouterA-rip]network 192.1.1.0
[RouterA-rip] network 150.1.1.0
[RouterA-rip] network 151.1.1.0
[RouterA-rip]route-policy lab1 permit 10
[RouterA-route-policy]if-match length 64 100
[RouterA-route-policy] apply ip next-hop 150.1.1.2
[RouterA-route-policy]route-policy lab1 permit 20
[RouterA-route-policy]if-match length 101 1000
[RouterA-route-policy]apply ip next-hop 151.1.1.2
2 Configure Router B:
[RouterB]interface serial 0
[RouterB-Serial0]ip address 150.1.1.2 255.255.255.0
[RouterB-Serial0]interface serial 1
[RouterB-Serial1]ip address 151.1.1.2 255.255.255.0
[RouterB-Serial1]quit
[RouterB]rip
[RouterB-rip]network 150.1.1.0
[RouterB-rip]network 151.1.1.0
Monitor policy routing with debug ip policy command on Router A. Note: the
messages of 64 bytes match the entry item whose serial number 10 as shown in
the routing diagram lab1, therefore they are forwarded to 150.1.1.2.
Router A
Router B
S0
150.1.1.1
S0
150.1.1.2
S1
151.1.1.1
S1
151.1.1.2
Apply strategy on E0
E0
192.1.1.1
64-100bytes
101-1000bytes