|
OSPF - 認証 -
OSPFではネイバーを確立する際にやり取りされるHelloパケットに[
Authentication ]が含まれています。
デフォルトの状態でネイバー認証を行いませんが、認証の設定を行うことで、ネイバー認証を行ってから
認証された場合のみネイバーを確立して、セキュアなルーティング情報のやりとりをすることができます。
OSPFでの認証設定は、インターフェースごとの認証、エリア全体に対する認証の2パターンがあります。
エリア全体に対して認証設定を行った場合、全てのインターフェースでネイバー認証が行われる事になり
OSPFのルーティング情報を交換したい全インターフェースで認証用パスワードを設定する必要があります。
OSPF - インターフェース認証 -
インターフェースごとに認証設定を行う場合、インターフェースごとに認証とパスワードを設定する必要が
あります。認証モードには、平分認証 ( text
) とMessage Digest認証 ( md5 ) の2パターンがあります。
以下は、R1とR2の間のインターフェース間で[
text認証 ]を行い、R1とR3の間で[ MD5認証 ]しています。

― インターフェース認証 ( text ) ―
R1(config)# router ospf 1
R1(config-router)# network 172.16.0.1 0.0.0.0
area 0
R1(config)# interface FastEthernet 0/0
R1(config-if)# ip ospf authentication
R1(config-if)# ip ospf authentication-key
cisco
|
R2(config)# router ospf 1
R2(config-router)# network 172.16.0.2 0.0.0.0 area 0
R2(config)# interface FastEthernet 0/1
R2(config-if)# ip ospf authentication
R2(config-if)# ip ospf authentication-key
cisco
|
― インターフェース認証 ( MD5 ) ―
R1(config)# router ospf 1
R1(config-router)# network 172.17.0.1 0.0.0.0 area 10
R1(config)# interface FastEthernet 0/1
R1(config-if)# ip ospf authentication message-digest
R1(config-if)# ip ospf message-digest-key 1 md5 cisco
|
R3(config)# router ospf 1
R3(config-router)# network 172.17.0.2 0.0.0.0 area 10
R3(config)# interface FastEthernet 0/1
R3(config-if)# ip ospf authentication message-digest
R3(config-if)# ip ospf message-digest-key 1 md5 cisco |
OSPF - エリア認証 -
エリア認証を定義した場合、そのエリアに所属するすべてのI/F上で認証設定が有効になります。つまり
エリア認証にした場合、各I/Fに認証を定義する必要がなくります。I/F認証同様にエリア認証にも2種類
( text認証、md5認証 ) の認証方式があります。以下ではエリア0をtext認証として、エリア10をmd5認証
として定義しています。I/F認証で紹介したコンフィグと同じようにR1のコンフィグは分割して紹介します。

― エリア認証 ( text ) ―
R1(config)# router ospf 1
R1(config-router)# network 172.16.0.1 0.0.0.0
area 0
R1(config-router)# area 0 authentication
R1(config)# interface FastEthernet 0/0
R1(config-if)# ip ospf authentication-key
cisco
|
R2(config)# router ospf 1
R2(config-router)# network 172.16.0.2 0.0.0.0 area 0
R2(config-router)# area 0 authentication
R2(config)# interface FastEthernet 0/1
R2(config-if)# ip ospf authentication-key
cisco
|
― エリア認証 ( MD5 ) ―
R1(config)# router ospf 1
R1(config-router)# network 172.17.0.1 0.0.0.0 area 10
R1(config-router)# area 10 authenticationmessage-digest
R1(config)# interface FastEthernet 0/1
R1(config-if)# ip ospf message-digest-key
1 md5 cisco
|
R3(config)# router ospf 1
R3(config-router)# network 172.17.0.2 0.0.0.0 area 10
R3(config-router)# area 10 authenticationmessage-digest
R3(config)# interface FastEthernet 0/1
R3(config-if)# ip ospf message-digest-key
1 md5 cisco
|
OSPF - バーチャルリンク上での認証 -
R1( ABR )のエリア 0で認証がイネーブルとなり、もう一方のエリアがトランジットエリアでバーチャルリンクが
確立されていた場合は、バーチャルリンク上でも認証設定が必要になります。その場合はインターフェースに
ではなく、Virtual-linkに対してパスワードを設定する必要があります。また、このケースではエリア0に属して
いないR2に対しても、エリア0認証の設定が必要になります。今回も同様に2種類の認証方式を紹介します。

― バーチャルリンク上でのエリア認証 ( text
) ―
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# area 10 virtual-link 2.2.2.2
authentication-key cisco
R1(config-router)# area 0 authentication
R1(config-router)# network 172.16.0.1 0.0.0.0
area 0
R1(config-router)# network 172.17.0.1 0.0.0.0
area 10
R1(config)# interface FastEthernet 0/1
R1(config-if)# ip ospf authentication-key
cisco
|
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# area 10 virtual-link 1.1.1.1
authentication-key cisco
R2(config-router)# area 0 authentication R2(config-router)# network 172.17.0.2 0.0.0.0
area 10
|

― バーチャルリンク上でのエリア認証 ( MD5
) ―
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# area 10 virtual-link 2.2.2.2
message-digest-key 1 md5 cisco
R1(config-router)# area 0 authentication message-digest
R1(config-router)# network 172.16.0.1 0.0.0.0
area 0
R1(config-router)# network 172.17.0.1 0.0.0.0
area 10
R1(config)# interface FastEthernet 0/1
R1(config-if)# ip ospf message-digest-key
1 md5 cisco
|
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# area 10 virtual-link 1.1.1.1
message-digest-key 1 md5 cisco
R2(config-router)# area 0 authentication
message-digest R2(config-router)# network 172.17.0.2 0.0.0.0
area 10
|
※ バーチャルリンクのステータスは debug
ip ospf adj, show ip ospf virtual-links,
show ip ospf neighbor で確認出来ます。
※ [ area 0 authentication ] の代わりに
[ area 10 virtual-link 1.1.1.1 authentication
message-digest ]の設定もできます。
Resource : Routing TCP/IP Volume 1 BSCI 試験認定テキスト 第2版 バーチャルリンクでのOSPF認証 OSPF認証の設定例
|