OSPF身份驗證配置例項

2021-09-05 01:42:18 字數 2211 閱讀 1267

為了安全的原因,我們可以在相同ospf區域的路由器上啟用身份驗證的功能,只有經過身份驗證的同一區域的路由器才能互相通告路由資訊。

在預設情況下ospf不使用區域驗證。通過兩種方法可啟用身份驗證功能,純文字身份驗證和訊息摘要(md5)身份驗證。純文字身份驗證傳送的身份驗證口令為純文字,它會被網路探測器確定,所以不安全,不建議使用。而訊息摘要(md5)身份驗證在傳輸身份驗證口令前,要對口令進行加密,所以一般建議使用此種方法進行身份驗證。

使用身份驗證時,區域內所有的路由器介面必須使用相同的身份驗證方法。為起用身份驗證,必須在路由器介面配置模式下,為區域的每個路由器介面配置口令。

任務命令

指定身份驗證

area area-id authentication [message-digest]

使用純文字身份驗證

ip ospf authentication-key password

使用訊息摘要(md5)身份驗證

ip ospf message-digest-key keyid md5 key

以下列舉兩種驗證設定的示例,示例的網路分布及位址分配環境與以上基本配置舉例相同,只是在router1和router2的區域0上使用了身份驗證的功能。:

例1.使用純文字身份驗證

router1:

inte***ce ethernet 0

ip address 192.1.0.129 255.255.255.192 !

inte***ce serial 0

ip address 192.200.10.5 255.255.255.252

ip ospf authentication-key cisco !

router ospf 100

network 192.200.10.4 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0.0.0.3 area 0

network 192.1.0.128 0.0.0.63 area 1

area 0 authentication !

router2:

inte***ce ethernet 0

ip address 192.1.0.65 255.255.255.192 !

inte***ce serial 0

ip address 192.200.10.6 255.255.255.252

ip ospf authentication-key cisco !

router ospf 200

network 192.200.10.4 0.0.0.3 area 0

network 192.1.0.64 0.0.0.63 area 2

area 0 authentication !

例2.訊息摘要(md5)身份驗證:

router1:

inte***ce ethernet 0

ip address 192.1.0.129 255.255.255.192

! inte***ce serial 0

ip address 192.200.10.5 255.255.255.252

ip ospf message-digest-key 1 md5 cisco !

router ospf 100

network 192.200.10.4 0.0.0.3 area 0

network 192.1.0.128 0.0.0.63 area 1

area 0 authentication message-digest !

router2:

inte***ce ethernet 0

ip address 192.1.0.65 255.255.255.192 !

inte***ce serial 0

ip address 192.200.10.6 255.255.255.252

ip ospf message-digest-key 1 md5 cisco !

router ospf 200

network 192.200.10.4 0.0.0.3 area 0

network 192.1.0.64 0.0.0.63 area 2

area 0 authentication message-digest !

Forms身份驗證例項

1.web.config配置檔案 forms 配置asp.net使用的安全身份驗證模式,標識傳入使用者。2.login.aspx.cs檔案 在通過資料庫中查詢找到相應項後,建立一含票據的cookie和含相關使用者資訊的cookie info 傳送到客戶端 string cookiekey strin...

Forms 身份驗證

配置應用程式使用 forms 身份驗證 如果應用程式的根目錄中有 web.config 檔案,請開啟該檔案。複製 在system.web元素中,建立乙個authentication元素,並將它的mode屬性設定為 forms,如下面的示例所示 複製 在authentication元素中,建立乙個fo...

WebService身份驗證

web service身份驗證解決方案一 通過通過soap header身份驗證。1.我們實現乙個用於身份驗證的類,檔名mysoapheader.cs mysoapheader類繼承自system.web.services.protocols.soapheader。且定義了兩個成員變數,userna...