概要
Cisco IOSにてOSPF Priorityの設定方法を紹介します。
OSPF DR/BDR選出 Priorityについて
-
OSPF DR/BDR
設定構成図
OSPF Priority 設定方法
1 |
ip ospf priority PRIORITY |
コマンド引数 | 説明 |
---|---|
PRIORITY | OSPFのプライオリティ(0 〜 255)を指定 |
設定構成図を元に各ルータにPriorityの設定
IOS-R1
1 2 |
interface GigabitEthernet0/1 ip ospf priority 255 |
IOS-R2
1 2 |
interface GigabitEthernet0/1 ip ospf priority 255 |
IOS-R3
1 2 |
interface GigabitEthernet0/1 ip ospf priority 0 |
IOS-R4
1 2 |
interface GigabitEthernet0/1 ip ospf priority 1 |
スポンサーリンク
OSPF Priority設定確認
OSPFのDR、BDRの選出はプライオリティ値が高いものから選出されます。プライオリティ値が同一の場合はルータIDが高いのが選出されます。従って今回の設定では、IOS-R1がDR、IOS-R2がBDR、残りがDROTHERになります。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
IOS-R1#show ip ospf interface gigabitEthernet 0/1 GigabitEthernet0/1 is up, line protocol is up Internet Address 192.168.0.1/24, Area 0, Attached via Network Statement Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State DR, Priority 255 Designated Router (ID) 2.2.2.2, Interface address 192.168.0.1 Backup Designated router (ID) 1.1.1.1, Interface address 192.168.0.2 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:00 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1/1, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0) Last flood scan length is 0, maximum is 2 Last flood scan time is 0 msec, maximum is 1 msec Neighbor Count is 3, Adjacent neighbor count is 3 Adjacent with neighbor 1.1.1.1 (Backup Designated Router) Adjacent with neighbor 3.3.3.3 Adjacent with neighbor 4.4.4.4 Suppress hello for 0 neighbor(s) IOS-R1# IOS-R2#show ip ospf interface | inc Prio Transmit Delay is 1 sec, State BDR, Priority 255 IOS-R2# IOS-R3#show ip ospf interface | inc Prio Transmit Delay is 1 sec, State DROTHER, Priority 0 IOS-R3# IOS-R4#show ip ospf interface | inc Prio Transmit Delay is 1 sec, State DROTHER, Priority 1 IOS-R4# |
OSPFのStateはAdjacencyかNeightによって決まってきます。従ってDR,BDRと接続する間は「Full」、DROTHER間は「2WAY」の状態になります。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
IOS-R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 255 FULL/BDR 00:00:39 192.168.0.2 GigabitEthernet0/1 3.3.3.3 0 FULL/DROTHER 00:00:37 192.168.0.3 GigabitEthernet0/1 4.4.4.4 1 FULL/DROTHER 00:00:36 192.168.0.4 GigabitEthernet0/1 IOS-R1# IOS-R2#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 255 FULL/DR 00:00:38 192.168.0.1 GigabitEthernet0/1 3.3.3.3 0 FULL/DROTHER 00:00:36 192.168.0.3 GigabitEthernet0/1 4.4.4.4 1 FULL/DROTHER 00:00:34 192.168.0.4 GigabitEthernet0/1 IOS-R2# IOS-R3#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 255 FULL/BDR 00:00:32 192.168.0.2 GigabitEthernet0/1 2.2.2.2 255 FULL/DR 00:00:33 192.168.0.1 GigabitEthernet0/1 4.4.4.4 1 2WAY/DROTHER 00:00:30 192.168.0.4 GigabitEthernet0/1 IOS-R3# IOS-R4#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 255 FULL/BDR 00:00:39 192.168.0.2 GigabitEthernet0/1 2.2.2.2 255 FULL/DR 00:00:39 192.168.0.1 GigabitEthernet0/1 3.3.3.3 0 2WAY/DROTHER 00:00:39 192.168.0.3 GigabitEthernet0/1 IOS-R4# |
スポンサーリンク
Cisco IOS 設定方法記事一覧
基本設定
インターネット接続
PPPoE
- PPPoE Server/Clinet (ローカル認証)
- PPPoE Server/Clinet (RADIUS認証)端末型払い出し(固定IP)
- PPPoE Server/Clinet (RADIUS認証)LAN型払い出し(固定Prefix)
DS-Lite
OSPF
- OSPF基本設定
- OSPFコスト設定
- OSPF プライオリティ
- OSPF MD5認証
- OSPF Network( Broadcast / Point-to-Point )
- OSPF スタブエリア
- OSPF トータリースタブ
- OSPF NSSA
- OSPF トータリーNSSA
- OSPF 経路集約
下記はOSPFのプロトコル解説
-
ネットワーク解説 OSPF (Open Shortest Path First)
BGP
下記はBGPのプロトコル解説
-
ネットワーク解説 BGP ( Border Gateway Protocol )