版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、cisco ip路由 分解實驗1. 在路由表中查找特定的路由條目routershow ip route 5routing entry for /24known via ospf 55, distance 110, metric 11, type inter arearedistributing via ospf 55last update from on ethernet0, 2d12h agorouting descriptor blocks:* , from , 2d12h ago
2、, via ethernet0 route metric is 11, traffic share count is 1注釋路由器在路由表中查找路由條目的原則是最長匹配,所以例子中雖然查找的是5但是由于沒有這條特定的路由,顯示的結(jié)果是最長匹配的/24。如果沒有任何一條匹配只能使用缺省路由,會出現(xiàn)下面信息router show ip route % network not in table注意的是這里都是無類路由,如果有類的就不一樣了2. 在路由表中查找相同類型的路由條目router show ip route static
3、/32 is subnetted, 1 subnetss 1/0 via 還有一個更有用的命令router show ip route summaryip routing table name is default-ip-routing-table(0)route sourcenetworkssubnetsoverheadmemory (bytes)connected03328432static1064144ospf5513256576intra-area: 1 inter-area: 2 external-1: 1 extern
4、al-2: 0nssa external-1: 0 nssa external-2: 0internal22328total466483480注釋通過顯示路由表的統(tǒng)計情況來了解當前路由器的路由條目,也可以用來以后的比對3. 配置靜態(tài)路由router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#ip route 55 ethernet0( permanent選項可以使此條目一直存在于路由表中,而不管下一跳的可達
5、性)router(config)#ip route 2router(config)#endrouter#( permanent )也可以給路由條目打上標簽router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#ip route 2 tag 36291router(config)#endrouter#注釋在類似以太網(wǎng)這種多路訪
6、問的網(wǎng)絡(luò)中建議使用下一跳為地址而不是接口。正常情況下路由器對靜態(tài)路由的下一跳有效性的檢查是一分鐘,在以對此時間進行調(diào)整router(config)#iproutestatic12.3(10)以后增加了下面的命令可adjust-time30。對靜態(tài)路由打tag用于路由再發(fā)布時的區(qū)分4. 當動態(tài)路由出問題的時候使用靜態(tài)路由作為備份router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#ip route 172.16.1.
7、1 190(下一跳也可以觸發(fā)一個撥號接口)router(config)#endrouter#注釋通過調(diào)整管理距離的方式來進行路由備份,不過要注意的是管理距離只適合在相同路由的情況下,路由條目的最長匹配是第一位的。另外在不同廠商設(shè)備互聯(lián)的時候,調(diào)整管理距離一定要設(shè)置合理。5. 根據(jù)源地址的不同選擇不同的路徑router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#access-list 1 permit 55router(
8、config)#access-list 2 permit 55router(config)#interface ethernet0router(config-if)#ip address router(config-if)#ip policy route-map engineersrouter(config-if)#ip route-cache policyrouter(config-if)#exitrouter(config)#route-map engineers permit 10router(confi
9、g-route-map)#match ip address 1router(config-route-map)#set ip next-hop router(config-route-map)#exitrouter(config)#route-map engineers permit 20router(config-route-map)#match ip address 2router(config-route-map)#set interface ethernet1router(config-route-map)#endrouter#注釋缺省情況下route map的最后
10、一句都是deny all,這樣不符合route map規(guī)則的數(shù)據(jù)包都會按照正常的路由表進行轉(zhuǎn)發(fā)。set ip next-hop verify-availability命令提供了對下一跳的驗證, 不過是基于cdp的,所以如果使用此命令需要打開cdp,最好同時調(diào)整時長,畢竟缺省是180 秒。在使用策略路由時會在排錯時增加難度,因為缺省對于本路由器發(fā)出的數(shù)據(jù)包可以繞過route map這樣會造成錯覺。6. 根據(jù)不同的應(yīng)用來選擇不同的路徑router#configure terminalenter configuration commands, one per line.end with cntl/z
11、.router(config)#access-list 101 deny tcp 55 any eq wwwrouter(config)#access-list 101 permit tcp any any eq wwwrouter(config)#interface ethernet0router(config-if)#ip address router(config-if)#ip policy route-map websurfersrouter(config-if)#ip route-cache poli
12、cyrouter(config-if)#exitrouter(config)#route-map websurfers permit 10router(config-route-map)#match ip address 101router(config-route-map)#set ip next-hop router(config-route-map)#exitrouter(config)#route-map websurfers permit 20router(config-route-map)#set ip default next-hop ro
13、uter(config-route-map)#endrouter#對于本設(shè)備的發(fā)出的數(shù)據(jù)包也使用策略路由router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#ip local policy route-map dlswtrafficrouter(config)#access-list 103 permit tcp any any eq 2065router(config)#access-list 103 permit tcp any eq 2065 a
14、nyrouter(config)#route-map dlswtraffic permit 10router(config-route-map)#match ip address 103router(config-route-map)#set ip next-hop router(config-route-map)#endrouter#注釋正常情況下如果所有定義的下一跳都不存在的情況下會使用路由表來查詢,如果路由表沒有此定義會使用缺省路由,這時候你可以使用set ip default next-hop來定義一個不同的缺省路由7. 檢查所應(yīng)用的策略路由routershow i
15、p policyinterfacelocalethernet0serial0routershow route-maproute mapdlswtrafficwebsurfershigh-priorityroute-map high-priority, permit, sequence 10match clauses:ip address (access-lists): 101set clauses:ip next-hop policy routing matches: 0 packets, 0 bytesroute-map websurfers, permit, seque
16、nce 10match clauses:ip address (access-lists): 102set clauses:ip next-hop policy routing matches: 0 packets, 0 bytesroute-map websurfers, permit, sequence 20match clauses:set clauses:ip default next-hop policy routing matches: 4 packets, 531 bytesroute-map dlswtraffic, permit, se
17、quence 10match clauses:ip address (access-lists): 103set clauses:ip next-hop policy routing matches: 5 packets, 500 bytes注釋也可以通過show access-list 103命令看到更多的匹配信息8. 調(diào)整學(xué)到的外部網(wǎng)絡(luò)的缺省管理距離router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#router riprou
18、ter(config-route)#network router(config-route)#distance 15 router(config-route)#distance 200 55router(config-route)#distance 255router(config-route)#endrouter#router#configure terminalenter configuration commands, one per line.end with cntl/z.route
19、r(config)#router eigrp 111router(config-route)#network router(config-route)#distance eigrp 55 200router(config-route)#endrouter#router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#router ospf 66router(config-route)#distance ospf inter-area 1
20、15router(config-route)#distance ospf intra-area 105router(config-route)#distance ospf external 125router(config-route)#endrouter#router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#router bgp 65520router(config-route)#distance bgp 115 220 50router(confi
21、g-route)#endrouter#注釋管理距離只是針對自己的,通過調(diào)整這些外部路由的管理距離來調(diào)整自己路由表的結(jié)構(gòu)9. 限制路由器到達同一目的地的路徑數(shù)目router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#router ospf 65510router(config-router)#maximum-paths 2router(config-router)#endrouter#ios 12.2t以后對 bgp增加了下面的命令router#confi
22、gure terminalenter configuration commands, one per line.end with cntl/z.router(config)#router bgp 65511router(config-router)#maximum-paths 2router(config-router)#maximum-paths ibgp 3router(config-router)#endrouter#注釋 缺省情況下靜態(tài)路由可以有 6 條冗余,bgp只有一條最佳路徑, 其他路由協(xié)議為 4 條。使用上述命令在 12.3(2)t 之前可以調(diào)整最大為 6 條, 12.3(2)
23、t 之后可以最大為 16 條10. 在某個端口當?shù)舻惹闆r下才啟用特定的靜態(tài)路由router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#track 10 interface serial0/0 line-protocolrouter(config-track)#delay down 5 up 30router(config-track)#exitrouter(config)#ip route 10.3.
24、12.26 track 10 router(config)#endrouter#router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#track 11 ip route reachabilityrouter(config-track)#delay down 5 up 5router(config-track)#exitrouter(config)#ip route 6 track 11router(config)#endrouter#router#configure terminalenter configuration commands, one per line.end with cntl/z.router(config)#track 12 list boolean androuter(config-track)#object 10 notrouter(config-track)#object 11router(config-track)#exitrouter(config)#ip route 1
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 化工設(shè)備培訓(xùn)制度
- 學(xué)生奶培訓(xùn)管理制度
- 電廠生技部培訓(xùn)制度
- 口腔診所護士培訓(xùn)制度
- 急救人員教育培訓(xùn)制度
- 湖南公務(wù)員待崗培訓(xùn)制度
- 防雷檢測人員培訓(xùn)制度
- 醫(yī)院護士培訓(xùn)相關(guān)制度
- 婦科護士教學(xué)培訓(xùn)制度
- 法國住院醫(yī)生培訓(xùn)制度
- 2026屆福建省寧德市三校高三上學(xué)期1月月考歷史試題(含答案)
- 2026年冀教版初一地理上冊期末真題試卷+解析及答案
- 2026年孝昌縣供水有限公司公開招聘正式員工備考題庫及答案詳解參考
- 2025年文化產(chǎn)業(yè)版權(quán)保護與運營手冊
- 四川省樂山市高中高三上學(xué)期第一次調(diào)查研究考試數(shù)學(xué)試題【含答案詳解】
- 《創(chuàng)新創(chuàng)業(yè)基礎(chǔ)》課件-項目1:創(chuàng)新創(chuàng)業(yè)基礎(chǔ)認知
- 2026年初一寒假體育作業(yè)安排
- 物流行業(yè)運輸司機安全駕駛與效率績效評定表
- 2026北京市通州區(qū)事業(yè)單位公開招聘工作人員189人筆試重點基礎(chǔ)提升(共500題)附帶答案詳解
- 2025~2026學(xué)年山東省菏澤市牡丹區(qū)第二十一初級中學(xué)八年級上學(xué)期期中歷史試卷
- 2026國家統(tǒng)計局儀征調(diào)查隊招聘輔助調(diào)查員1人(江蘇)考試參考試題及答案解析
評論
0/150
提交評論