概要
Cisco NX-OSにてOSPF Priorityの設定方法を紹介します。
OSPF DR/BDR選出 Priorityについて
-
OSPF DR/BDR
設定構成図
OSPF Priority 設定方法
1 |
ip ospf priority PRIORITY |
コマンド引数 | 説明 |
---|---|
PRIORITY | OSPFのプライオリティ(0 〜 255)を指定 |
設定構成図を元に各ルータにPriorityの設定
NXOS-R1
1 2 |
interface ethernet 2/1 ip ospf priority 255 |
NXOS-R2
1 2 |
interface ethernet 2/1 ip ospf priority 255 |
NXOS-R3
1 2 |
interface ethernet 2/1 ip ospf priority 0 |
NXOS-R4
1 2 |
interface ethernet 2/1 ip ospf priority 1 |
スポンサーリンク
OSPF Priority設定確認
OSPFのDR、BDRの選出はプライオリティ値が高いものから選出されます。プライオリティ値が同一の場合はルータIDが高いのが選出されます。従って今回の設定では、IOSXR-R1がDR、IOSXR-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 |
NXOS-1# show ip ospf interface ethernet 2/1 Ethernet2/1 is up, line protocol is up IP address 192.168.0.1/24 Process ID 1 VRF default, area 0.0.0.0 Enabled by interface configuration State DR, Network type BROADCAST, cost 40 Index 1, Transmit delay 1 sec, Router Priority 255 Designated Router ID: 2.2.2.2, address: 192.168.0.1 Backup Designated Router ID: 1.1.1.1, address: 192.168.0.2 3 Neighbors, flooding to 3, adjacent with 3 Timer intervals: Hello 10, Dead 40, Wait 40, Retransmit 5 Hello timer due in 00:00:06 No authentication Number of opaque link LSAs: 0, checksum sum 0 NXOS-1# NXOS-2# show ip ospf interface ethernet 2/1 | inc Prio|State State BDR, Network type BROADCAST, cost 40 Index 1, Transmit delay 1 sec, Router Priority 255 NXOS-2# NXOS-3# show ip ospf interface ethernet 2/1 | inc Prio|State State DROTHER, Network type BROADCAST, cost 40 Index 1, Transmit delay 1 sec, Router Priority 0 NXOS-3# NXOS-4# show ip ospf interface ethernet 2/1 | inc Prio|State State DROTHER, Network type BROADCAST, cost 40 Index 1, Transmit delay 1 sec, Router Priority 1 NXOS-4# |
OSPFのStateはAdjacencyかNeightによって決まってきます。従ってDR,BDRと接続する間は「Full」、DROTHER間は「TWOWAY」の状態になります。
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 |
NXOS-1# show ip ospf neighbors OSPF Process ID 1 VRF default Total number of neighbors: 3 Neighbor ID Pri State Up Time Address Interface 1.1.1.1 255 FULL/BDR 00:11:37 192.168.0.2 Eth2/1 3.3.3.3 0 FULL/DROTHER 00:10:14 192.168.0.3 Eth2/1 4.4.4.4 1 FULL/DROTHER 00:08:34 192.168.0.4 Eth2/1 NXOS-1# NXOS-2# show ip ospf neighbors OSPF Process ID 1 VRF default Total number of neighbors: 3 Neighbor ID Pri State Up Time Address Interface 2.2.2.2 255 FULL/DR 00:12:00 192.168.0.1 Eth2/1 3.3.3.3 0 FULL/DROTHER 00:10:38 192.168.0.3 Eth2/1 4.4.4.4 1 FULL/DROTHER 00:09:03 192.168.0.4 Eth2/1 NXOS-2# NXOS-3# show ip ospf neighbors OSPF Process ID 1 VRF default Total number of neighbors: 3 Neighbor ID Pri State Up Time Address Interface 1.1.1.1 255 FULL/BDR 00:10:54 192.168.0.2 Eth2/1 2.2.2.2 255 FULL/DR 00:10:52 192.168.0.1 Eth2/1 4.4.4.4 1 TWOWAY/DROTHER 00:09:19 192.168.0.4 Eth2/1 NXOS-3# NXOS-4# show ip ospf neighbors OSPF Process ID 1 VRF default Total number of neighbors: 3 Neighbor ID Pri State Up Time Address Interface 1.1.1.1 255 FULL/BDR 00:09:33 192.168.0.2 Eth2/1 2.2.2.2 255 FULL/DR 00:09:27 192.168.0.1 Eth2/1 3.3.3.3 0 TWOWAY/DROTHER 00:09:36 192.168.0.3 Eth2/1 NXOS-4# |
スポンサーリンク