route map应用策略路由(下)
生活随笔
收集整理的這篇文章主要介紹了
route map应用策略路由(下)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
四、根據數據包的大小來做策略路由走向:
2、在R4上show route-map 看一下:
3、我現在在R5上用擴展ping
4、再到R4上看一下route-map
5、同樣在R6上用擴展ping 700看一下會走哪里?
6、再次show route-map
7、我在R6上traceroute ,因為traceroute 過去的話也會小于700
1、我先把R4上的pbr1下再做一個match:
| R4(config)#route-map pbr1 permit 1 R4(config-route-map)#match length 0 600 (匹配一個最小為0 ,最大為600的數據包) ? R4(config)#route-map pbr2 permit 2 R4(config-route-map)#match length 0 800 ?(匹配一個最小為601,最大為800的數據包) |
| R4(config)#do sho route-map route-map pbr1, permit, sequence 1 ? Match clauses: ? Set clauses: ??? ip next-hop 192.168.34.3 ? Policy routing matches: 0 packets, 0 bytes 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 |
| R5#ping ip??? Target IP address: 1.1.1.1 Repeat count [5]: 5 Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source address or interface: 5.5.5.5 Type 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 |
| 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 |
| R6#ping ip???????? Target IP address: 1.1.1.1 Repeat count [5]: 5 Datagram size [100]: 700 Timeout in seconds [2]: Extended commands [n]: y Source address or interface: 6.6.6.6 Type 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 |
| 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) |
| R6#traceroute ip???? ? Target IP address: 1.1.1.1 Source address: 6.6.6.6 Numeric 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? ? 1 192.168.46.4 84 msec 128 msec 92 msec ? 2 192.168.24.2 188 msec 220 msec 280 msec ? 3 192.168.12.1 216 msec *? 260 msec?????????? (小于700,所以就走左邊鏈路了) |
轉載于:https://blog.51cto.com/supercisco/250068
總結
以上是生活随笔為你收集整理的route map应用策略路由(下)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 万手哥是什么意思
- 下一篇: 云蚁物联摄像头怎么重置(云平台基本概念)