ciscoIP路由分解實驗_第1頁
ciscoIP路由分解實驗_第2頁
ciscoIP路由分解實驗_第3頁
已閱讀5頁,還剩2頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、分解實驗c i s c o I P 路 由1. 在路由表中查找特定的路由條目Known via "ospf 55", distance 110, metric 11, type inter areaRedistributing via ospf 55Routing Descriptor Blocks:Route metric is 11, traffic share count is 1% Network not in table注意的是這里都是無類路由,如果有類的就不一樣了2. 在路由表中查找相同類型的路由條目Router> show ip route static

2、subnetted, 1 subnetsS還有一個更有用的命令Router> show ip route summaryIP routing table name is Default-IP-Routing-Table(0)Route Source Networks Subnets Overhead Memory (bytes) connected 0 3 328 432 static 1 0 64 144 ospf55 1 3 256 576Intra-area: 1 Inter-area: 2 External-1: 1 External-2: 0NSSA External-1: 0

3、 NSSA External-2: 0internal 2 2328Total 4 6 648 3480注釋 通過顯示路由表的統(tǒng)計情況來了解當(dāng)前路由器的路由條目,也可以用來以后的比對3. 配置靜態(tài)路由Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#也可以給路由條目打上標(biāo)簽Router#configure terminalEnter configuration commands, one per line. End with

4、CNTL/Z.Router(config)#endRouter#注釋 在類似以太網(wǎng)這種多路訪問的網(wǎng)絡(luò)中建議使用下一跳為地址而不是接口。 正常情況下路由器對靜態(tài)路由的下一跳有效性的檢查是一分鐘,在 12.3(10) 以后增加了下面的命令可以對此時間進(jìn)行調(diào)整 Router(config)#ip route static adjust-time 30。對靜態(tài)路由打 tag 用于路由再發(fā)布時的區(qū)分4. 當(dāng)動態(tài)路由出問題的時候使用靜態(tài)路由作為備份Router#configure terminalEnter configuration commands, one per line. End with CN

5、TL/Z.Router(config)#endRouter#注釋 通過調(diào)整管理距離的方式來進(jìn)行路由備份, 不過要注意的是管理距離只適合在相同路由的情況下,路由條目的最長匹配是第一位的。另外在不同廠商設(shè)備互聯(lián)的時候,調(diào)整管 理距離一定要設(shè)置合理。5. 根據(jù)源地址的不同選擇不同的路徑Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface Ethernet0Router(config-if)#ip policy route-map Eng

6、ineersRouter(config-if)#ip route-cache policyRouter(config-if)#exitRouter(config)#route-map Engineers permit 10Router(config-route-map)#match ip address 1Router(c on fig-route-map)#exitRouter(c on fig)#route-map Engin eers permit 20Router(c on fig-route-map)#match ip address 2Router(c on fig-route-m

7、ap)#set in terface Ether net1Router(c on fig-route-map)#e ndRouter#注釋 缺省情況下route map的最后一句都是 deny all ,這樣不符合route map規(guī)則的數(shù)據(jù)包都會按照正常的路由表進(jìn)行轉(zhuǎn)發(fā)。set ip next-hop verify-availability命令提供了對下一跳的驗證,不過是基于CDP的,所以如果使用此命令需要打開CDP最好同時調(diào)整時長,畢竟缺省是180秒。在使用策略路由時會在排錯時增加難度,因為缺省對于本路由器發(fā)出 的數(shù)據(jù)包可以繞過route map這樣會造成錯覺。6. 根據(jù)不同的應(yīng)用來選擇不

8、同的路徑Router#c on figure term inalEn ter con figurati on comma nds, one per line. End with CNTL/Z.Router(c on fig)#access-list 101 permit tcp any any eq wwwRouter(c on fig)# in terface Ether netORouter(c on fig-if)#ip policy route-map WebsurfersRouter(c on fig-if)#ip route-cache policyRouter(c on fig-

9、if)#exitRouter(c on fig)#route-map Websurfers permit 10Router(c on fig-route-map)#match ip address 101Router(c on fig-route-map)#exitRouter(c on fig)#route-map Websurfers permit 20Router(c on fig-route-map)#e ndRouter#對于本設(shè)備的發(fā)出的數(shù)據(jù)包也使用策略路由Router#c on figure term inalEn ter con figurati on comma nds, o

10、ne per line. End with CNTL/Z.Router(c on fig)#ip local policy route-map dlswtrafficRouter(c on fig)#access-list 103 permit tcp any any eq 2065Router(c on fig)#access-list 103 permit tcp any eq 2065 anyRouter(c on fig)#route-map dlswtraffic permit 10Router(c on fig-route-map)#match ip address 103Rout

11、er(config-route-map)#endRouter#如果路由表沒有此定注釋 正常情況下如果所有定義的下一跳都不存在的情況下會使用路由表來查詢, 義會使用缺省路由,這時候你可以使用 set ip default next-hop 來定義一個 不同的缺省路由7. 檢查所應(yīng)用的策略路由 Router>show ip policy Interface Route map local dlswtrafficEthernet0 WebsurfersSerial0 High-priorityRouter>show route-map route-map High-priority, p

12、ermit, sequence 10Match clauses:ip address (access-lists): 101Set clauses:Policy routing matches: 0 packets, 0 bytes route-map Websurfers, permit, sequence 10Match clauses:ip address (access-lists): 102Set clauses:Policy routing matches: 0 packets, 0 bytes route-map Websurfers, permit, sequence 20Ma

13、tch clauses:Set clauses:Policy routing matches: 4 packets, 531 bytes route-map dlswtraffic, permit, sequence 10Match clauses:ip address (access-lists): 103Set clauses:Policy routing matches: 5 packets, 500 bytes 注釋 也可以通過 show access-list 103 命令看到更多的匹配信息8. 調(diào)整學(xué)到的外部網(wǎng)絡(luò)的缺省管理距離Router#configure terminalEnt

14、er configuration commands, one per line. End with CNTL/Z.Router(config)#router ripRouter(config-route)#distance 255Router(config-route)#endRouter#Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router eigrp 111Router(config-route)#distance eigrp 55

15、 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 115Router(config-route)#distance ospf intra-area 105Router(config-route)#distance ospf external 125Router

16、(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(config-route)#endRouter#注釋 管理距離只是針對自己的,通過調(diào)整這些外部路由的管理距離來調(diào)整自己路由表的結(jié)構(gòu)9. 限制路由器到達(dá)同一目的地的路徑數(shù)目Router#configure termin

17、alEnter 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#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router bgp 655

18、11Router(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)T 之后可以最大為 16條10. 在某個端口當(dāng)?shù)舻惹闆r下才啟用特定的靜態(tài)路由Router#configure terminalEnter configuration commands, one per line. E

19、nd with CNTL/Z.Router(config)#track 10 interface Serial0/0 line-protocolRouter(config-track)#delay down 5 up 30Router(config-track)#exitRouter(config)#endRouter#Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config-track)#delay down 5 up 5Router(config-tr

20、ack)#exitRouter(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 not Router(config-track)#object 11 Router(config-track)#exitRouter(config)#endRouter#注釋 從 12.3T 和 12.4 以后開始 IOS 提供了一種 track 的特性,可以定義跟蹤不同的狀態(tài)??梢允褂?show track 命令來查看跟蹤的狀態(tài)。跟蹤狀態(tài)也可以進(jìn)行組合,使用 and or 邏輯運 算或者百分比,權(quán)重等增加靈活度,很好玩,不過別把自己繞進(jìn)去了<!-if !supportLists->5.12. &

溫馨提示

  • 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論