レス
前レス元トピ次レス
タイトル
Re: 問題ID:7188 OSPF DRの選出
フォーラム
最強WEB問題集CCNA
投稿ユーザ(投稿日)
(2021/7/4)
本文
あれ、もしかしてここで誤解がありそう?

-----引用(始)-----

上記の解説について、DRの選出において、別エリアに属しているポートのIPアドレスも、ルータIDの選出に入ってくるということでしょうか。

-----引用(終)-----

「DRの選出」と「ルータIDの選出」は別の話だとひとつ上の返信でお話しました。

-----引用(始)-----

ルータIDの選出=自ルータ内で判定
DR/BDR/DROTHERの選出=各OSPFが有効なインターフェースで他のルータからの情報(申告してきたルータID)を元に判定

-----引用(終)-----


大前提としてですが、「OSPFが動作するためには自身のルータIDが確定している必要がある」というものがあります。なので、DR選出がどうとかいう前にルータIDの選出が行われなければなりません。

実機でやってみるとわかるのですが、以下のようにOSPF未設定、インターフェースアドレスは設定済みだがshutdown状態の場合
[code]
Router#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.1.1 YES manual administratively down down
GigabitEthernet0/1 192.168.2.1 YES manual administratively down down
GigabitEthernet0/2 unassigned YES unset administratively down down
GigabitEthernet0/3 unassigned YES unset administratively down down
Router#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)
[/code]
OSPFを有効にしようとすると「一意なルータIDを割り当てできないためOSPFが有効にならない」というエラーになります。
[code]
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 1
Router(config-router)#
*Jul 7 13:14:23.180: %OSPF-4-NORTRID: OSPF process 1 failed to allocate unique router-id and cannot start ←エラーになっている
[/code]
このとき、OSPFの設定は存在しますがルータIDは未設定の状態になります。この場合OSPFプロセスが正しく動作できません。
[code]
Router(config-router)#do show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)

Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 0.0.0.0 ←ここ
Number of areas in this router is 0. 0 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 110)
[/code]
この状態でインターフェースをshutdownしたままで各インターフェースに対してエリアを設定してもルータIDは決まりません。
[code]
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 192.168.2.0 0.0.0.255 area 1
Router(config-router)#do show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)

Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 0.0.0.0 ←ここ
Number of areas in this router is 0. 0 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.1.0 0.0.0.255 area
192.168.2.0 0.0.0.255 area
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 110)
[/code]
逆に、インターフェースが属するエリアの情報を削除して各インターフェースをUp/Upにすると、ルータIDが決まるのでOSPFプロセスが動作するようになります。ただしOSPFが有効なインターフェースは存在しないのでDR選出などは動作しません。
[code]
Router(config-router)#no network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#no network 192.168.2.0 0.0.0.255 area 1
Router(config-router)#do show ip ospf interface brief
%OSPF: Router process 1 is not running, please configure a router-id ←ルータID未設定なのでOSPFプロセスが動作していない。
Router(config-router)#int g0/0
Router(config-if)#no shut
Router(config-if)#int g0/1
Router(config-if)#no shut
Router(config-if)#
*Jul 7 13:22:09.807: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up
*Jul 7 13:22:10.807: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
*Jul 7 13:22:12.041: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
*Jul 7 13:22:13.041: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to updo show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)

Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.1.1 ←先にUpになったG0/0のアドレスがルータIDになった
Number of areas in this router is 0. 0 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 110)

Router(config-if)#do show ip ospf interface brief ←OSPFが有効なインターフェースは存在しない
Router(config-if)#
[/code]
OSPFプロセスが動作するようになってから初めてDR選出などの動作に移ることができるようになります。

ですので

-----引用(始)-----

エリア分けを行っても、各エリアごとのDRが生まれないのではないでしょうか

-----引用(終)-----

エリアごとのDRは、エリアごとできちんと選出されます。その際の判断基準は「各ルータのルータID」です。そしてルータIDは「どのエリアに所属しているかいないかに関わらず、ルータIDとして利用可能なアドレス」が採用されます。
エリアに接しているインターフェースのIPアドレスがそのままDR選出に使われるわけではないことに注意してください。

レス一覧

前レス元トピ次レス


Ping-tモバイルTOP

Copyright (c) 2010
Ping-t All rights reserved.