R4(config)#do sho route-maproute-map pbr1, permit, sequence 1? Match clauses:? Set clauses:??? ip next-hop 192.168.34.3? Policy routing matches: 0 packets, 0 bytesroute-map pbr2, permit, sequence 2? Match clauses:??? ip address (access-lists): 2 ??? length 601 800? Set clauses:??? ip next-hop 192.168.34.3? Policy routing matches: 0 packets, 0 bytes
3、我現(xiàn)在在R5上用擴展ping
R5#ping ip??? Target IP address: 1.1.1.1Repeat count [5]: 5Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: ySource address or interface: 5.5.5.5Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:Packet sent with a source address of 5.5.5.5 !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 216/325/404
4、再到R4上看一下route-map
route-map pbr1, permit, sequence 1? Match clauses:??? length 0 600? Set clauses:??? ip next-hop 192.168.24.2? Policy routing matches: 5 packets, 520 bytes?? (走這條鏈路了是520bytes)route-map pbr2, permit, sequence 2? Match clauses:??? ip address (access-lists): 2 ??? length 601 800? Set clauses:??? ip next-hop 192.168.34.3? Policy routing matches: 0 packets, 0 bytes
5、同樣在R6上用擴展ping 700看一下會走哪里?
R6#ping ip???????? Target IP address: 1.1.1.1Repeat count [5]: 5Datagram size [100]: 700Timeout in seconds [2]: Extended commands [n]: ySource address or interface: 6.6.6.6Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort.Sending 5, 700-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:Packet sent with a source address of 6.6.6.6 !!!!!Success rat
6、再次show route-map
R4#? show route-map route-map pbr1, permit, sequence 1? Match clauses:??? length 0 600? Set clauses:??? ip next-hop 192.168.24.2? Policy routing matches: 5 packets, 520 bytes?? (這里還是520bytes)route-map pbr2, permit, sequence 2? Match clauses:??? ip address (access-lists): 2 ??? length 601 800? Set clauses:??? ip next-hop 192.168.34.3? Policy routing matches: 5 packets, 3520 bytes(這里卻到了3520bytes)
7、我在R6上traceroute ,因為traceroute 過去的話也會小于700
R6#traceroute ip????
?
Target IP address: 1.1.1.1Source address: 6.6.6.6Numeric display [n]: Timeout in seconds [3]: Probe count [3]: Minimum Time to Live [1]: Maximum Time to Live [30]: Port Number [33434]: Loose, Strict, Record, Timestamp, Verbose[none]: Type escape sequence to abort.Tracing the route to 1.1.1.1