路由器配置——基於鏈路的OSPF的MD5口令認證


 一、實驗目的:掌握基於鏈路的OSPFMD5口令認證

二、拓撲圖:

 

三、具體步驟配置:

(1)R1路由器的配置

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R1

R1(config)#interface s0/0/0

R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)#clock rate 64000

R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down

R1(config-if)#exit

R1(config)#interface l0 

R1(config-if)#ip address 1.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#router ospf 1

R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 192.168.1.0 0.0.0.255 area 0

R1(config-router)#network 1.1.1.0 0.0.0.255 area 0

R1(config-router)#interface s0/0/0

R1(config-if)#ip ospf authentication message-digest

R1(config-if)#ip ospf message-digest-key 1 md5 123

R1(config-if)#end

(2)R2路由器的配置

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R2

R2(config)#interface s0/0/0

R2(config-if)#ip address 192.168.1.2 255.255.255.0

R2(config-if)#clock rate 64000

This command applies only to DCE interfaces

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#interface l0

R2(config-if)#ip address 2.2.2.2 255.255.255.0

R2(config-if)#no shutdown 

R2(config-if)#exit 

R2(config)#router ospf 1

R2(config-router)#router-id 2.2.2.2

R2(config-router)#network 192.168.1.0 0.0.0.255 area 0

R2(config-router)#network 2.2.2.0 0.0.0.255 area 0

R2(config-router)#interface s0/0/0

R2(config-if)#ip ospf authentication message-digest

R2(config-if)#ip ospf message-digest-key 1 md5 123

R2(config-if)#end

四、驗證要求:

(1)檢查端口是否啟用了MD5 認證,密鑰為多少

紅色標記處表示該端口啟用了MD5 認證,而且密鑰ID 為1。

 

(2)如果R1 的s0/0/0 啟動MD5 認證,而R2s0/0/0 啟動簡單口令認證,則R2 上出現
下面的信息:
*Feb 10 11:08:13.075: OSPF: Rcv pkt from 192.168.12.1, Serial0/0/0 : Mismatch
Authentication type. Input packet specified type 2, we use type 1
(3)如果R1 和R2 的s0/0/0 都啟動MD5 認證,但是R2 的接口下沒有配置key ID 和密
碼,則R2 上出現下面的信息:
*Feb 10 11:31:13.078: OSPF: Rcv pkt from 192.168.12.1, Serial0/0/0 : Mismatch
Authentication Key - No message digest key 1 on interface

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM