概要
Cisco IOS-XRにてOSPF Priorityの設定方法を紹介します。
OSPF DR/BDR選出 Priorityについて
-
OSPF DR/BDR
設定構成図
OSPF Priority 設定方法
1 |
priority PRIORITY |
コマンド引数 | 説明 |
---|---|
PRIORITY | OSPFのプライオリティ(0 〜 255)を指定 |
設定構成図を元に各ルータにPriorityの設定
IOSXR-R1
1 2 3 4 |
router ospf 1 area 0 interface gigabitEthernet 0/0/0/0 priority 255 |
IOSXR-R2
1 2 3 4 |
router ospf 1 area 0 interface gigabitEthernet 0/0/0/0 priority 255 |
IOSXR-R3
1 2 3 4 |
router ospf 1 area 0 interface gigabitEthernet 0/0/0/0 priority 0 |
IOSXR-R4
1 2 3 4 |
router ospf 1 area 0 interface gigabitEthernet 0/0/0/0 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 31 32 33 34 35 36 37 38 |
RP/0/0/CPU0:IOSXR-1#show ospf interface gigabitEthernet 0/0/0/0 Sun Apr 15 10:32:35.244 UTC GigabitEthernet0/0/0/0 is up, line protocol is up Internet Address 192.168.0.1/24, Area 0 Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State DR, Priority 255, MTU 1500, MaxPktSz 1500 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 Hello due in 00:00:01:497 Index 1/1, flood queue length 0 Next 0(0)/0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec LS Ack List: current length 0, high water mark 1 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) Multi-area interface Count is 0 RP/0/0/CPU0:IOSXR-1# RP/0/0/CPU0:IOSXR-2#show ospf interface gigabitEthernet 0/0/0/0 | inc Prio Sun Apr 15 10:33:19.141 UTC Transmit Delay is 1 sec, State BDR, Priority 255, MTU 1500, MaxPktSz 1500 RP/0/0/CPU0:IOSXR-2# RP/0/0/CPU0:IOSXR-3#show ospf interface gigabitEthernet 0/0/0/0 | inc Priori Sun Apr 15 10:33:42.690 UTC Transmit Delay is 1 sec, State DROTHER, Priority 0, MTU 1500, MaxPktSz 1500 RP/0/0/CPU0:IOSXR-3# RP/0/0/CPU0:IOSXR-4#show ospf interface gigabitEthernet 0/0/0/0 | inc Priori Sun Apr 15 10:34:07.119 UTC Transmit Delay is 1 sec, State DROTHER, Priority 1, MTU 1500, MaxPktSz 1500 RP/0/0/CPU0:IOSXR-4# |
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
RP/0/0/CPU0:IOSXR-1#show ospf neighbor Sun Apr 15 10:36:43.597 UTC * Indicates MADJ interface # Indicates Neighbor awaiting BFD session up Neighbors for OSPF 1 Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 255 FULL/BDR 00:00:38 192.168.0.2 GigabitEthernet0/0/0/0 Neighbor is up for 00:22:17 3.3.3.3 0 FULL/DROTHER 00:00:37 192.168.0.3 GigabitEthernet0/0/0/0 Neighbor is up for 00:18:09 4.4.4.4 1 FULL/DROTHER 00:00:31 192.168.0.4 GigabitEthernet0/0/0/0 Neighbor is up for 00:17:30 Total neighbor count: 3 RP/0/0/CPU0:IOSXR-1# RP/0/0/CPU0:IOSXR-2#show ospf neighbor Sun Apr 15 10:36:59.376 UTC * Indicates MADJ interface # Indicates Neighbor awaiting BFD session up Neighbors for OSPF 1 Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 255 FULL/DR 00:00:39 192.168.0.1 GigabitEthernet0/0/0/0 Neighbor is up for 00:22:33 3.3.3.3 0 FULL/DROTHER 00:00:31 192.168.0.3 GigabitEthernet0/0/0/0 Neighbor is up for 00:18:29 4.4.4.4 1 FULL/DROTHER 00:00:35 192.168.0.4 GigabitEthernet0/0/0/0 Neighbor is up for 00:17:51 Total neighbor count: 3 RP/0/0/CPU0:IOSXR-2# RP/0/0/CPU0:IOSXR-3#show ospf neighbor Sun Apr 15 10:37:12.956 UTC * Indicates MADJ interface # Indicates Neighbor awaiting BFD session up Neighbors for OSPF 1 Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 255 FULL/BDR 00:00:37 192.168.0.2 GigabitEthernet0/0/0/0 Neighbor is up for 00:18:42 2.2.2.2 255 FULL/DR 00:00:36 192.168.0.1 GigabitEthernet0/0/0/0 Neighbor is up for 00:18:38 4.4.4.4 1 2WAY/DROTHER 00:00:31 192.168.0.4 GigabitEthernet0/0/0/0 Neighbor is up for 00:17:55 Total neighbor count: 3 RP/0/0/CPU0:IOSXR-3# RP/0/0/CPU0:IOSXR-4#show ospf neighbor Sun Apr 15 10:37:24.325 UTC * Indicates MADJ interface # Indicates Neighbor awaiting BFD session up Neighbors for OSPF 1 Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 255 FULL/BDR 00:00:34 192.168.0.2 GigabitEthernet0/0/0/0 Neighbor is up for 00:18:17 2.2.2.2 255 FULL/DR 00:00:34 192.168.0.1 GigabitEthernet0/0/0/0 Neighbor is up for 00:18:12 3.3.3.3 0 2WAY/DROTHER 00:00:34 192.168.0.3 GigabitEthernet0/0/0/0 Neighbor is up for 00:18:11 Total neighbor count: 3 RP/0/0/CPU0:IOSXR-4# |
スポンサーリンク
Cisco IOS XR 設定方法記事一覧
基本設定
OSPF
- OSPF基本設定
- OSPFコスト設定
- OSPF プライオリティ
- OSPF MD5認証
- OSPF Network( Broadcast / Point-to-Point )
- OSPF スタブエリア
- OSPF トータリースタブエリア
- OSPF NSSA
- OSPF トータリーNSSA
- OSPF 経路集約