【實驗名稱】
【實驗目的】
掌握ospf 的鄰居認證加密配置。
【背景描述】
你是一名高階技術支援工程師,某企業的網路整個的網路環境是ospf。為了安全起見,新加入的路由器要通過認證,請你給予支援。
【實現功能】
完成ospf區域新成員加入的安全認證。
【實驗拓撲】
【實驗裝置】
r2624路由器(2臺)、v35dce(1根)、v35dte(1根)
【實驗步驟】
第一步:基本配置
red-giant>en
red-giant#conf t
red-giant(config)#hostname r1 !更改路由器主機名
r1(config)#int s0
r1(config-if)#ip add 192.168.12.1 255.255.255.0 !為介面配置位址
r1(config-if)#clock rate 64000 ! 設定時鐘速率在dte端不用設定
r1(config-if)#no sh
r1(config)#iint loo 0
r1(config-if)#ip add 1.1.1.1 255.255.255.0 ! 配置loopback介面,保證路由更新的穩定
red-giant>en
red-giant#conf t
red-giant(config)#hostname r2
r2(config)#int s0
r2(config-if)#ip add 192.168.12.2 255.255.255.0
r2(config-if)#no sh
r2(config)#int loo 0
r2(config-if)#ip add 2.2.2.2 255.255.255.0 ! 配置loopback介面,保證路由更新的穩定
驗證測試: ping
r2#ping 192.168.12.1
sending 5, 100-byte icmp echoes to 192.168.12.1, timeout is 2 seconds:
!!!!!
第二步:啟動ospf路由協議
r1(config)#router os 1
r1(config-router)#net 192.168.12.0 0.0.0.255 area 0
r1(config-router)# net 1.1.1.0 0 0.0.0.255 area 2
r1(config-router)#end
r2(config)#router os 1
r2(config-router)#net 192.168.12.0 0.0.0.255 area 0
r2(config-router)#net 2.2.2. 0 0.0.0.255 area 1
r2(config-router)#end
驗證測試:r1# sh ip os nei (以r1為例)
neighbor id pri statedead time address inte***ce
2.2.2.21 full00:00:37 192.168.12.2 serial0
第三步:配置ospf驗證
r1(config)#router os 1
r1(config-router)#area 0 authentication message-digest !配置區域間認證需要加密方式
r1(config)#int s0
r1(config-if)#ip ospf message-digest-key 1 md5 star ! 配置加密認證密碼
r2(config)#router os 1
r2(config-router)#area 0 authentication message-digest
r2(config)#int s0
r2(config-if)#ip ospf message-digest-key 1 md5 star
驗證測試:r2#debug ip os adj
ospf adjacency events debugging is on
r2#ospf:2 way communication to neighbor 1.1.1.1
ospf:send dbd packet to 192.168.12.1 seq 0x172e
ospf:send with youngest key 1
ospf:receive dbd from 1.1.1.1 seq 0x6f9
ospf:receive dbd from 1.1.1.1 seq 0x172e
ospf:nbr negotiation done we are the master
ospf:send dbd packet to 192.168.12.1 seq 0x172f
ospf:send with youngest key 1
ospf:send with youngest key 1
ospf:database request to 1.1.1.1
ospf:sent ls req packet to 192.168.12.1, length 12
ospf:receive dbd from 1.1.1.1 seq 0x172f
ospf:send dbd
packet to 192.168.12.1 seq 0x1730
ospf:send with youngest key 1
ospf:send with youngest key 1
ospf:receive dbd from 1.1.1.1 seq 0x1730
ospf:exchange done with neighbor 1.1.1.1
ospf:synchronized with neighbor 1.1.1.1, state:full
ospf:build router lsa for area 0, router id 2.2.2.2
【注意事項】
● 兩個廣域網介面在一區域裡,驗證的密碼要一致;
● 不要忘記在dce端配置時鐘速率。
【參考配置】
r2#sh run (以r2為例)
building configuration...
current configuration:
!version 6.14(2)
!hostname "r2"
!ip subnet-zero
!inte***ce loopback0
ip address 2.2.2.2 255.255.255.0
!inte***ce fastethernet0
no ip address
shutdown
!inte***ce fastethernet1
no ip address
shutdown
!inte***ce fastethernet2
no ip address
shutdown
!inte***ce fastethernet3
no ip address
shutdown
!inte***ce serial0
ip address 192.168.12.2 255.255.255.0
ip ospf message-digest-key 1 md5 star
!inte***ce serial1
no ip address
shutdown
!router ospf 1
network 192.168.12.0 0.0.0.255 area 0
network 2.2.2.0 0.0.0.255 area 1
area 0 authentication message-digest!
ip classless
!line con 0
line aux 0
line vty 0 4
login
OSPF協議配置
實驗目的 1 了解和掌握ospf的原理 2 熟悉ospf的配置步驟 3 懂得如何配置ospf router id,了解dr bdr選舉過程 4 掌握hello interval的使用 5 學會使用ospf的authentication 實驗拓撲 實驗器材 如上圖,需用到路由器三颱,hub switc...
華為 OSPF協議及配置
今天內容 一 鏈路狀態路由協議原理及ospf相關 屬於此協議的路由協議有ospf is is等。執行此類協議的路由器會在相互學習路由之前,在自己的記憶體中建立乙個拓撲表 鏈路狀態資料庫 然後使用spf演算法從自己的拓撲表裡算出路由。好比開車去目的地前先買乙份地圖。不用看路牌。路壞了,也不用打聽,有地...
實驗九 OSPF基本配置實驗
一 實驗專案名稱 二 實驗環境 packet tracer 模擬器軟體 三 實驗目的和要求 利用packet tracer完成實驗,具體要求如下 1 用若干臺pc和若干臺路由器構成乙個網路 2 規劃pc機及路由器相關介面的ip位址,配置ospf動態路由協議,使pc機之間能相互通訊 3 用show i...