




已閱讀5頁(yè),還剩52頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
計(jì)算機(jī)系 鄒瑞源,計(jì)算機(jī)網(wǎng)絡(luò)互聯(lián)技術(shù),ospf簡(jiǎn)介,ospf是一種典型的鏈路狀態(tài)路由協(xié)議。采用ospf的路由器彼此交換并保存整個(gè)網(wǎng)絡(luò)的鏈路信息,從而掌握全網(wǎng)的拓?fù)浣Y(jié)構(gòu),獨(dú)立計(jì)算路由。 ospf作為一種內(nèi)部網(wǎng)關(guān)協(xié)議(interior gateway protocol,igp),用于在同一個(gè)自治域(as)中的路由器之間發(fā)布路由信息。區(qū)別于距離矢量協(xié)議(rip),ospf具有支持大型網(wǎng)絡(luò)、路由收斂快、占用網(wǎng)絡(luò)資源少等優(yōu)點(diǎn),在目前應(yīng)用的路由協(xié)議中占有相當(dāng)重要的地位。,ospf簡(jiǎn)介,開(kāi)放的國(guó)際標(biāo)準(zhǔn) shortest path first (spf最短路徑優(yōu)先) 算法 鏈路狀態(tài)路由協(xié)議,ospf 概述,通過(guò)交換hello數(shù)據(jù)包來(lái)創(chuàng)建鄰居關(guān)系 以傳播lsa( link-state advertisements )代替路由表更新. 鏈路(link):路由器接口 狀態(tài)(state):描述接口以及它與鄰居路由器的關(guān)系 lsas 泛洪到區(qū)域中的所有ospf路由器,而不僅僅是直連路由器 收集由ospf路由器生成的所有l(wèi)sa以創(chuàng)建ospf鏈路狀態(tài)數(shù)據(jù)庫(kù). 使用spf算法計(jì)算到每個(gè)目的地的最短距離,并將其置于路由表中.,ospf術(shù)語(yǔ),shortest path first algorithm,將每臺(tái)路由器放置在樹(shù)的根節(jié)點(diǎn),并根據(jù)累計(jì)開(kāi)銷(xiāo)計(jì)算到達(dá)每個(gè)目的地的最短路徑 開(kāi)銷(xiāo)(cost) = 參考帶寬(108)/接口帶寬 (bps),ospf特點(diǎn)詳介,ospfopen shortest path first 使用cost(成本)作為其路由度量值,其默認(rèn)成本基于介質(zhì)的傳輸帶寬來(lái)度量,ospf特點(diǎn)詳介,三大優(yōu)越性: 1、收斂時(shí)間快 2、支持vlsm和cidr 3、網(wǎng)絡(luò)的擴(kuò)展性強(qiáng) 對(duì)跳數(shù)基本沒(méi)有限制,對(duì)于跳數(shù)過(guò)多的網(wǎng)絡(luò)可通過(guò)層次化的設(shè)計(jì),將達(dá)的ospf網(wǎng)絡(luò)化分成小的、易管理的ospf域,ospf 層級(jí)示列,區(qū)域和自治系統(tǒng) 盡量減少路由表?xiàng)l目 使拓?fù)渥兓瘍H影響本區(qū)域內(nèi)部,ospf數(shù)據(jù)包類(lèi)型(ospf packet types),ospf 的五種分組類(lèi)型,類(lèi)型1,問(wèn)候(hello)分組。 類(lèi)型2,數(shù)據(jù)庫(kù)描述(database description)分組。 類(lèi)型3,鏈路狀態(tài)請(qǐng)求(link state request)分組。 類(lèi)型4,鏈路狀態(tài)更新(link state update)分組, 用洪泛法對(duì)全網(wǎng)更新鏈路狀態(tài)。 類(lèi)型5,鏈路狀態(tài)確認(rèn)(link state acknowledgment) 分組。,ospf操作,1. 建立鄰接關(guān)系 2. 必要的進(jìn)行dr選舉 3. 發(fā)現(xiàn)路由 4. 選擇相應(yīng)的路由 5. 維護(hù)路由信息,建立鄰接關(guān)系,*標(biāo)記的在鄰居路由器上必須匹配,ospf網(wǎng)絡(luò)類(lèi)型,frame relay x.25,廣播broadcast multiaccess,非廣播nonbroadcast multiaccess,點(diǎn)到點(diǎn)point-to-point,點(diǎn)到多點(diǎn)point-to-multipoint,點(diǎn)到點(diǎn)鏈路(point-to-point links),不進(jìn)行dr選舉 ospf自動(dòng)檢測(cè)這種接口類(lèi)型,廣播型多路訪問(wèn)網(wǎng)絡(luò),進(jìn)行dr選舉 鄰居只與dr和dbr形成鄰接關(guān)系,必要時(shí)進(jìn)行dr選舉,dr與bdr的選舉取決于路由器的優(yōu)先級(jí) 可通過(guò)接口配置模式 ip ospf priority 命令修改該路由器的優(yōu)先級(jí) 如果優(yōu)先級(jí)相同,則比較router id。 router id: 默認(rèn)值:ospf過(guò)程啟動(dòng)時(shí)活動(dòng)接口上的最高ip地址 可以使用環(huán)回接口覆蓋:環(huán)回接口的最高ip地址(次優(yōu)先) 可以使用router-id命令手動(dòng)設(shè)置(最優(yōu)先),選舉dr和bdr,最高接口優(yōu)先級(jí)的路由器被選成dr 最高路由器id的路由器被選舉成dr dr選舉不具有搶占性,建立雙向通信,建立雙向通信,建立雙向通信,建立雙向通信,查找網(wǎng)絡(luò)路由,查找網(wǎng)絡(luò)路由,增加鏈路狀態(tài)條目,增加鏈路狀態(tài)條目,增加鏈路狀態(tài)條目,維護(hù)路由信息,路由器用224.0.0.6通知dr,維護(hù)路由信息,dr利用組播地址224.0.0.5通知其它路由器,維護(hù)路由信息,維護(hù)路由信息,配置單區(qū)域的ospf,router(config-router)# network address wildcard-mask area area-id,將網(wǎng)絡(luò)分配到ospf 區(qū)域,router(config)# router ospf process-id,將 ospf定義為 ip 路由協(xié)議,ospf 配置示列,ospf配置實(shí)例,驗(yàn)證ospf 配置,router# show ip protocols,檢驗(yàn)是否已配置ospf,router# show ip route,顯示路由器所學(xué)習(xí)到的所有路由,router# show ip route codes: i - igrp derived, r - rip derived, o - ospf derived, c - connected, s - static, e - egp derived, b - bgp derived, e2 - ospf external type 2 route, n1 - ospf nssa external type 1 route, n2 - ospf nssa external type 2 route gateway of last resort is 10.119.254.240 to network 10.140.0.0 o e2 10.110.0.0 160/5 via 10.119.254.6, 0:01:00, ethernet2 e 10.67.10.0 200/128 via 10.119.254.244, 0:02:22, ethernet2 o e2 10.68.132.0 160/5 via 10.119.254.6, 0:00:59, ethernet2 o e2 10.130.0.0 160/5 via 10.119.254.6, 0:00:59, ethernet2 e 10.128.0.0 200/128 via 10.119.254.244, 0:02:22, ethernet2 . . .,router# show ip ospf,驗(yàn)證ospf 配置,顯示ospf路由器、計(jì)時(shí)器和統(tǒng)計(jì)信息,router# show ip ospf routing process “ospf 1“ with id 172.16.6.1 start time: 00:38:41.540, time elapsed: 00:00:25.860 supports only single tos(tos0) routes supports opaque lsa supports link-local signaling (lls) supports area transit capability router is not originating router-lsas with maximum metric initial spf schedule delay 5000 msecs area backbone(0) (inactive) number of interfaces in this area is 1 area has no authentication spf algorithm last executed 00:00:07.368 ago spf algorithm executed 1 times ,router# show ip ospf interface,驗(yàn)證ospf 配置,顯示區(qū)域 id 和鄰接信息,router# show ip ospf interface ethernet 0 ethernet 0 is up, line protocol is up internet address 192.168.254.202, mask 255.255.255.0, area 0.0.0.0 as 201, router id 192.168.99.1, network type broadcast, cost: 10 transmit delay is 1 sec, state other, priority 1 designated router id 192.168.254.10, interface address 192.168.254.10 backup designated router id 192.168.254.28, interface addr 192.168.254.28 timer intervals configured, hello 10, dead 60, wait 40, retransmit 5 hello due in 0:00:05 neighbor count is 8, adjacent neighbor count is 2 adjacent with neighbor 192.168.254.28 (backup designated router) adjacent with neighbor 192.168.254.10 (designated router),驗(yàn)證ospf 配置,router# show ip ospf neighbor,顯示每個(gè)接口上的ospf鄰居信息,router# show ip ospf neighbor id pri state dead time address interface 10.199.199.137 1 full/dr 0:00:31 192.168.80.37 ethernet0 172.16.48.1 1 full/drother 0:00:33 172.16.48.1 fddi0 172.16.48.200 1 full/drother 0:00:33 172.16.48.200 fddi0 10.199.199.137 5 full/dr 0:00:33 172.16.48.189 fddi0,驗(yàn)證ospf 配置,router# show ip ospf neighbor 10.199.199.137 neighbor 10.199.199.137, interface address 192.168.80.37 in the area 0.0.0.0 via interface ethernet0 neighbor priority is 1, state is full options 2 dead timer due in 0:00:32 link state retransmission due in 0:00:04 neighbor 10.199.199.137, interface address 172.16.48.189 in the area 0.0.0.0 via interface fddi0 neighbor priority is 5, state is full options 2 dead timer due in 0:00:32 link state retransmission due in 0:00:03 router# show ip ospf neighbor detail neighbor 192.168.5.2, interface address 10.225.200.28 in the area 0 via interface gigabitethernet1/0/0 neighbor priority is 1, state is full, 6 state changes dr is 10.225.200.28 bdr is 10.225.200.30 options is 0x42 lls options is 0x1 (lr), last oob-resync 00:03:08 ago dead timer due in 00:00:36 neighbor is up for 00:09:46 index 1/1, retransmission queue length 0, number of retransmission 1 first 0x0(0)/0x0(0) next 0x0(0)/0x0(0) last retransmission scan length is 1, maximum is 1 last retransmission scan time is 0 msec, maximum is 0 msec,ospf 調(diào)試命令,router# debug ip ospf events ospf:hello with invalid timers on interface ethernet0 hello interval received 10 configured 10 net mask received 255.255.255.0 configured 255.255.255.0 dead interval received 40 configured 30 router# debug ip ospf packet ospf: rcv. v:2 t:1 l:48 rid:200.0.0.117 aid:0.0.0.0 chk:6ab2 aut:0 auk: router# debug ip ospf packet ospf: rcv. v:2 t:1 l:48 rid:200.0.0.116 aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x0,實(shí)驗(yàn)環(huán)境,a,b,192.168.1.64/27,192.168.1.32/27,192.168.1.104/29,ospf的基本配置,router_a#config terminal router_a(config)# router_a(config)#router ospf 1 /啟動(dòng)ospf協(xié)議,其進(jìn)程為1 router_a(config-router)#network 192.168.1.32 0.0.0.31 area 0 router_a(config-router)#network 192.168.1.64 0.0.0.31 area 0,router_b#config terminal router_b(config)# router_b(config)#router ospf 1 /啟動(dòng)ospf協(xié)議,其進(jìn)程為1 router_b(config-router)#network 192.168.1.32 0.0.0.31 area 0 router_b(config-router)#network 192.168.1.104 0.0.0.7 area 0,ospf身份驗(yàn)證,ospf支持以下幾種類(lèi)型的身份驗(yàn)證: -空(無(wú)身份驗(yàn)證) -明文(或簡(jiǎn)單)口令身份驗(yàn)證 -md5身份驗(yàn)證 路由器生成并檢查每個(gè)ospf數(shù)據(jù)包。 路由器驗(yàn)證接收到的每個(gè)路由更新數(shù)據(jù)包的來(lái)源。 配置“密鑰”(口令):每個(gè)參與的鄰居都必須配置相同的密鑰。,配置ospf身份驗(yàn)證,步驟一:設(shè)定驗(yàn)證的口令 1、設(shè)定明文口令 router(config-if)# ip ospf authentication-key password 分配用于鄰居路由器的口令(最長(zhǎng)8個(gè)字符) 2、設(shè)定md5加密的口令 router(config-if)# ip ospf message-digest-key id md5 password 分配用于鄰居路由器的口令(md5加密,最長(zhǎng)16個(gè)字符),配置ospf身份驗(yàn)證,步驟二:?jiǎn)⒂胦spf身份驗(yàn)證并指定驗(yàn)證類(lèi)型 方法1:在接口上直接指定(12.0版本以上提供) router(config-if)# ip ospf authentication message-digest | null 指定接口的身份驗(yàn)證類(lèi)型 message-digest :md5加密口令 null :空口令 方法2:整個(gè)ospf 區(qū)域指定驗(yàn)證類(lèi)型 router(config-router)# area area-id authentication message-digest message-digest :md5加密口令,使用ospf配置負(fù)載均衡,ospf負(fù)載均衡 路徑必須為等價(jià)路徑 默認(rèn)情況下,最多可在路由表中加入4條等價(jià)路徑 通過(guò)更改配置,最多可以配置16條等價(jià)路徑 -(config-router)# maximum-paths 可更改鏈路的開(kāi)銷(xiāo)以確保路徑等價(jià)進(jìn)行負(fù)載均衡 -(config-if)# ip ospf cost ,修改鏈路成本,router# router#config terminal router(config)#interface f0/0 router(config-if)#ip ospf cost number /number為1到65535之間的值,internet互聯(lián)網(wǎng),局域網(wǎng): 內(nèi)部使用ospf 接入互聯(lián)網(wǎng)使用默認(rèn)路由 內(nèi)部計(jì)算機(jī)如何使用默認(rèn)路由?,?,默認(rèn)路由,默認(rèn)路由發(fā)布到ospf區(qū)域,將默認(rèn)路由發(fā)布到ospf區(qū)域中,使用以下命令: router(config-router)# default-information originate,課堂作業(yè),e0,e0,s0,s0,思考題(questions),1. ospf是一種典型的_路由協(xié)議。 2. ospf路由協(xié)議的管理距離是_。 3. ospf路由協(xié)議采用_作為度量標(biāo)準(zhǔn)。 4. ospf路由器利用_算法,獨(dú)立地計(jì)算出到達(dá)任意目的地的路由。 5. 默認(rèn)情況下,快速以太網(wǎng)的開(kāi)銷(xiāo)是_。 6. ospf將網(wǎng)絡(luò)劃分為四種類(lèi)型:_、_、_、_。 7. ethernet的hello interval為_(kāi)秒,dead interval為_(kāi)秒。 8. nbma網(wǎng)絡(luò)的hello int
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 車(chē)輛抵押貸款風(fēng)險(xiǎn)評(píng)估協(xié)議書(shū)
- 車(chē)輛銷(xiāo)售代理與傭金結(jié)算合同
- 餐飲行業(yè)品牌授權(quán)合同協(xié)議
- 光伏發(fā)電項(xiàng)目投資建設(shè)合同
- 展覽館場(chǎng)地租賃及使用權(quán)轉(zhuǎn)讓合同范本
- 車(chē)輛抵押擔(dān)保金融服務(wù)合同范本
- 2024-2025學(xué)年山東省煙臺(tái)市高一下學(xué)期期中語(yǔ)文試題及答案
- 2024-2025學(xué)年河北省保定市六校協(xié)作體高一下學(xué)期期中地理試題及答案
- 養(yǎng)殖品種選育技術(shù)考核試卷
- 戶外廣告牌切割與焊接技術(shù)的市場(chǎng)細(xì)分與目標(biāo)客戶定位考核試卷
- 濕疹護(hù)理課件教學(xué)課件
- 相關(guān)方需求和期望表
- 胃腸內(nèi)鏡護(hù)士進(jìn)修匯報(bào)
- 23J916-1 住宅排氣道(一)
- 生物基復(fù)合材料的LCA(生命周期評(píng)估)
- 【核心素養(yǎng)目標(biāo)】人教版物理九年級(jí) 13.1分子熱運(yùn)動(dòng) 教案
- 第四課 拗音 課件初中日語(yǔ)人教版七年級(jí)第一冊(cè)
- 廣東省廣州市天河區(qū)2023-2024學(xué)年八年級(jí)下學(xué)期期末物理模擬試卷
- 甲乙方施工合同范本
- 嬰幼兒配方乳粉市場(chǎng)銷(xiāo)售管理規(guī)范
- 教科版四年級(jí)下冊(cè)科學(xué)期末測(cè)試卷含完整答案(各地真題)
評(píng)論
0/150
提交評(píng)論