




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、ospf協(xié)議中cost值的計算在ospf協(xié)議屮每個接口根據(jù)其速率不同,都有一個默認的公式計算的cost 值,ospf協(xié)議采用cost值來決定到達tl的地的最佳路徑,如果存在多條到達h 的地的路徑,優(yōu)先選用cost值最低的路徑。cost值的計算是沿fl的地途中所有 轉(zhuǎn)發(fā)數(shù)據(jù)的接口的cost值的總和,下血通過實驗來驗證一下。如下拓撲圖:1729.1 oj/24vlanl:172.19.10.254/24pcipc2192.168.2.0/2419268.1.0.24在rt11上的路由表如下:rt1l#sh ip routecodes: c - connected, s - static, r -
2、rip, m - mobile, b - bgpd - etgrp, ex - etgrp external, 0 - ospf, ta - ospf inter arean1 - ospf nssa external type 1, n2 - ospf nssa external type 2el - ospf external type 1, e2 - ospf external type 2i - is-is, su - is-is summary, li - is-is level-1, l2 - is-is level-2ia - is-is inter area, * - cand
3、idate default, u - per-user static routeo 一 odr, p - periodic downloaded static routegateway of last resort is not set172.19.0. 0/24 is subnetted, 1 subnets0172. 19. 10. 0 110/3 via 10. 1. 1. 6, 00:00:12, fastethernet2/010.0.0.0/30 is subnetted, 2 subnets010. 3.3.4 110/2 via 10. 1. 1.6, 00:00:12, fa
4、stethernet2/0c10.1.1.4 is directly connected, fastethernet2/0c192. 168. 1. 0/24 is directly connected, fastethernet0/0c192. 168.2. 0/24 is directly connected, fastetherneto/1在這臺路由器上到達172. 19. 10. 0的度量值為3,計算方式為:rt11的數(shù)據(jù)轉(zhuǎn)發(fā)接口 f2/0的cost值“1” +rt12的數(shù)據(jù)轉(zhuǎn)發(fā)接口 f2/0的 cost 值 “"+sw2 的目標接口 vlanl 的 cost 值 “ 1&q
5、uot;二3。為了證明,將rt12的數(shù)據(jù)流入接口 f0/0的cost值改為50,數(shù)據(jù)轉(zhuǎn)發(fā)接口 f2/0的cost值改為60, sw2的vlanl的cost改為70,再來看看路由表: rtll#sh ip routecodes: c - connected, s - static, r - rip, m - mobi.le, b - bgp d - eigrp, ex - eigrp external, 0 - ospf, ia - ospf inter arean1 - ospf nssa external type 1, n2 - ospf nssa external type 2el -
6、ospf external type 1, e2 - ospf external type 2i - 1s-is, su - 1s-is summary, li - 1s-1s level-1, l2 - 1s-1s level-2ia - is-is inter area, * - candidate default, u - per-user static routeo 一 odr, p 一 periodic downloaded static routegateway of last resort is not set172.19.0. 0/24 is subnetted, 1 subn
7、ets0172. 19. 10.0 110/131 via 10. 1. 1.6, 00:00:00, fastethernet2/010. 0. 0. 0/30 is subnetted, 2 subnets010. 3. 3. 4 110/61 via 10. 1. 1.6, 00:00:00, fastethernet2/0c10. 1. 1. 4 is directly conncctcd, fastethernet2/0c192. 168. 1. 0/24 is directly connected, fastethernet0/0c192. 168.2.0/24 is direct
8、ly connected, fastetherneto/1這時到達172. 19. 10. 0的度量值為131 t,由1+60+70計算得來,rt12上 的數(shù)據(jù)流入接口 f0/0的cost值沒有參與計算。那么再看從sw1上的路由表:sw2#sh ip routecodes: c - connected, s - static, r - rip, m - mobile, b - bgpd - eigrp, ex - eigrp external, 0 - ospf, ia - ospf inter arean1 - ospf nssa external type 1, n2 - ospf nss
9、a external type 2el - ospf external type 1, e2 - ospf external type 2 i - is-is, su - is-is summary, li - is-is level-1, l2 - is-is level-2 ia - ts-is inter area, * 一 candidate default, u 一 per-user staticrouteo - odr, p - periodic downloaded static routegateway of last resort is not set172. 19. 0.
10、0/24 is subnetted, 1 subnetsc172. 19. 10. 0 is directly connected, vlanl10.0.0.0/30 is subnetted, 2 subnetsc10. 3. 3. 4 is directly connected, vian2010.1.1.4 110/51 via 10. 3. 3.5, 00:00:00, vlan20192. 168. 1. 0/24 110/52 via 10. 3. 3.5, 00:00:00, vlan20192. 168.2.0/24 110/52 via 10. 3. 3.5, 00:00:0
11、0, vlan2從這個路曲表上就更加驗證了 ospf協(xié)議中度量值的計算,從swl到192. 16& 1.0的度量值計算為:swl的數(shù)據(jù)轉(zhuǎn)發(fā)接口 vlan2的cost值“1” +rt12的數(shù)據(jù)轉(zhuǎn)發(fā)接口 f0/0的cost 值 “50” +rt11 的目的接口的 cost 值 =52那么針對重發(fā)布的路由的度量值又是如何計算的呢,在rt11上將兩個直連網(wǎng)絡(luò)192. 168. 1. 0和192. 168. 2. 0改為重發(fā)布:配置命令:access-list 10 permit 192.168.1. 0access-list 20 permit 192. 168. 2. 0 route-map
12、 setmetric permit 10match ip address 10set metric 5iroute-map setmetric permit 20match ip address 20set metric 20 router ospf 100log-adjacency-changcsredistribute connected subnets toutemap setmetrie這樣就將192. 168. 1.0的度量值改為t 5, 192. 168. 2.0的度量值改為了 20,在rtl2和sw1上查看路由表:rt12#sh ip routecodes: c - connec
13、ted, s - static, r - rip, m - mobile, b - bgpd - eigrp, ex - eigrp external, 0 - ospf, ia - ospf inter arean1 - ospf nssa external type 1, n2 - ospf nssa external type 2el - ospf external type 1, e2 - ospf external type 2i - is-is, su - is-is summary, li - is-is level-1, l2 - is-is level-2ia 一 ts_ts
14、 inter area, * 一 candidate defauu 一 peruser staticrouteo 一 odr, p - periodic downloaded static routegateway of last resort is not set172. 19.0.0/24 is subnetted, 1 subnets172.19.10.0 110/130 via 10.3.3.6, 00:04:0& fastethernet2/010. 0-0. 0/30 issubnetted, 2 subnets10. 3.3.4 isdirectly cormcctcd,
15、 fastethcrnet2/010. 1. 1.4 isdirectly connected, fastethernet0/0e2192. 168. 1. 0/24110/5 via 10. 1.1.5, 00:04:0& fastetherneto/oe2192. 168.2. 0/24110/20 via 10. 1.1.5,00:04:08, fastetherneto/0sw2#ship routecodes:c 一 connected, s 一 static, r -rip,m - mobile, b - bgpd - e1grp, ex - e1grp external,
16、ospf,1a - ospf inter arean1 - ospf nssa external type 1,n2 - ospf nssa external type 2routeel - ospf external type 1, e2 - ospf externali 一 is-is, su 一 ists summary, li 一 is-is level-1,ici 一 is-is in ter area, * 一 cam di date defau lt,utype 2l2 - is-is level-2一 per-user statico 一 odr, p - periodic downloaded static routegateway of last resort is not set172. 19. 0. 0/24 is subnetted, 1 subnetsc172. 19.10.0 is directly connected, vlanl10.0. 0. 0/30 is subnetted, 2 subnetsc10. 3.3.4 is directly connected, vian2010.1.1.4 110/51 via 10. 3. 3.5, 00:04:32, v
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年火鍋底料合作協(xié)議書
- 2025年電子用高純氣體項目發(fā)展計劃
- 2025年納迪克酸酐項目發(fā)展計劃
- 2025年湖南省國家綜合性消防救援隊伍消防員招錄考試試題【答案】
- 自我生長構(gòu)建邏輯連貫的學習過程
- 繪本閱讀對重度智力障礙兒童溝通行為影響的深度探究
- 2025年全國精準扶貧知識競賽考試試題(100題)【答案】
- 2025年漁業(yè)捕撈養(yǎng)殖機械項目發(fā)展計劃
- 歌頌祖國演講稿范文4篇
- 礦區(qū)無計劃停電應(yīng)急預案
- 2025至2030中國密織防水透氣紡織品行業(yè)發(fā)展趨勢分析與未來投資戰(zhàn)略咨詢研究報告
- 2025-2030年中國鍋爐水處理化學品行業(yè)市場現(xiàn)狀供需分析及投資評估規(guī)劃分析研究報告
- 高中體育專項化教學對學生身心發(fā)展的促進作用研究論文
- 2024江西現(xiàn)代職業(yè)技術(shù)學院招聘筆試真題及參考答案詳解
- 【蘇州】2025年江蘇財經(jīng)職業(yè)技術(shù)學院第一批公開招聘工作人員26人筆試歷年典型考題及考點剖析附帶答案詳解
- TD/T 1044-2014生產(chǎn)項目土地復墾驗收規(guī)程
- 2024北京重點校高一(下)期末數(shù)學匯編:三角函數(shù)章節(jié)綜合(填空題)
- T/CAAM 0002-2022針灸臨床研究不良事件記錄規(guī)范
- 2025年北京市西城區(qū)中考二模英語試題(含答案)
- DL/T5210.1-2012電力建設(shè)施工質(zhì)量驗收及評定附表全套-
- 2025年化學專業(yè)課程期末考試試題及答案
評論
0/150
提交評論