Dell Networking SONiC:最初に最短パスを開く(OSPF)
Сводка: この記事では、Dell Networking SONiCのOpen Shortest Path First(OSPF)について説明します。この記事では、Dell SONiC 4.1を実行しているスイッチを使用します。
Инструкции
|
必要条件
標準インターフェイスの命名は、概念を示すために使用されます。Dellの記事202172:「Dell Networking Sシリーズ:基本のインターフェイス設定 – SONIC 4.0」を参照してください。インターフェイスの命名の詳細については、「Dell Networking Sシリーズ:基本のインターフェイス構成 - SONiC 4.0」を参照してください。
|
索引
最初に最短パス
を開くOSPFv2
の有効化インターフェイス
でのOSPFの有効化OSPF ルーター ID
の設定OSPF エリア レベル認証タイプの
設定OSPFインターフェイス レベルの認証タイプとキー
の構成OSPFパッシブ インターフェイス
の構成OSPF仮想リンク
の構成OSPFエリアのショートカット
の設定OSPF RFC互換性
の構成OSPF 隣接関係ロギン
グの設定OSPF LSA タイマー
の設定OSPF SPF スロットル タイマー
の設定OSPF 最大メトリック アドバタイズ
メントの設定OSPF ルート距離
の設定OSPF 自動コスト参照帯域幅
の設定OSPF スタブ領域とそのパラメータ
の設定OSPF エリア間サマリー ルート フィルタ
の設定OSPF ルート再配布
の設定OSPF デフォルト ルート オリジネーション
の設定OSPF インターフェイス パラメータ
の設定OSPF 運用データ表示コマンド
OSPFv2 グレースフル リスタート
最初に最短パスを開く
Open Shortest Path First Protocol(OSPF)は、RFC2328で説明するように、リンクステート内部ゲートウェイ ルーティング プロトコル(IGRP)です。
OSPFは、リンクステートアドバタイズメント(LSA)と呼ばれるメッセージにリンクステート情報を記述し、フラッディングと呼ばれるプロセスによってリンクステートルーティングドメイン内の他のすべてのルータに伝播されます。したがって、各OSPFルータは、すべてのリンクステートメッセージのリンクステートデータベース(LSDB)を構築します。LSDB 内の LSA のこのコレクションから、各ルータは、Edgar Djikstras Shortest Path First アルゴリズムを使用して、共通のメトリックに基づいて、他のルータへの最短パスを計算できます。
Enterprise SONiCは、ルーティング プロトコルの実行にFRRパッケージを使用します。OSPFv2 も、カスタマイズされた FRR ソフトウェア パッケージから採用されています。OPSFv2ルーティング デーモンは、BGPや静的ルートなどの他のルーティング プロトコル デーモンとともに、BGP Dockerコンテナ内に存在します。
サポートされるOSPFv2機能:
- Ethernet、ループバック、VLAN、およびポートチャネルIPv4インターフェイスでのOSPF設定
- デフォルト VRF およびユーザ定義 VRF での OSPFv2 設定
- 複数のOSPFエリアとスタブエリア
- タイプ 1 からタイプ 5 の LSA
- 仮想リンクとパッシブ インターフェイス
- OSPFインターフェイス セッションでのBFD
- プレーンテキストとメッセージダイジェスト(MD)パスワード暗号化
- タイプ 3 サマリー LSA プレフィックスのフィルタリングと置換
- ルート タイプBGP、スタティック、接続済み、カーネル、デフォルト ルートからOSPFv2へのルート再配布
- ルート再配布におけるルートマップベースのフィルタリング
- OSPF ECMPルート
- 50Kの外部ルートと5Kの内部ルート プレフィックス
OSPFv2 の有効化
VRF 内で OSPF ルータを設定して、OSPFv2 を有効にします。VRF 内で OSPFv2 を設定するには、このコマンドを使用します。OSPF を設定すると、モードが OSPF ルータ コンフィギュレーション モードに変更されます。
OSPFをグローバルに有効にするには、デフォルトのvrfを使用します。
DELLSONiC(conf)# router ospf |
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(conf)# router ospf |
または、OSPF(デフォルト以外のvrf)を有効にします。
DELLSONiC(conf)# router ospf vrf Vrf-name |
- Vrf-name:VRF名文字列
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(conf)# router ospf vrf Vrf-blue |
OSPFルーターの詳細を表示します。
DELLSONiC# show ip ospf
VRF Name: default
OSPF Routing Process, Router ID: 10.10.201.1
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Graceful-Restart is disabled
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm last executed 1d2h7m51s ago
Last SPF duration 23 usecs
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 1000 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Maximum multiple paths(ECMP) supported 256
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 1
Area ID: 0.0.0.0 (Backbone)
Number of interfaces in this area: Total: 1 , Active: 1
Number of fully adjacent neighbors in this area: 1
Area has no authentication
SPF algorithm executed 4 times
Number of LSA 3
Number of router LSA 2. Checksum Sum 0x0000ec6e
Number of network LSA 1. Checksum Sum 0x00001a25
Number of summary LSA 0. Checksum Sum 0x00000000
Number of ASBR summary LSA 0. Checksum Sum 0x00000000
Number of NSSA LSA 0. Checksum Sum 0x00000000
Number of opaque link LSA 0. Checksum Sum 0x00000000
Number of opaque area LSA 0. Checksum Sum 0x00000000 DELLSONiC# show ip ospf vrf Vrf-Blue
VRF Name: Vrf-Blue
OSPF Routing Process, Router ID: 0.0.0.0
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
{output truncated} |
インターフェイスでのOSPFの有効化
インターフェイスで OSPF を有効にする前に、IP アドレスを使用して IPv4 インターフェイスを設定し、インターフェイスを必要な VRF にバインドします。IPv4 インターフェイスで OSPF を有効にするには、OSPF エリア ID をインターフェイスに関連付ける必要があります。OSPFは、Ethernet、VLAN、ポート チャネル、およびループバック インターフェイスで有効にできます。
2台のOSPFルーターを接続するインターフェイスでOSPFを有効にして、2台のOSPFルーター間のOSPFセッションを有効にします。このような接続インターフェイスは、OSPF ルータが設定されている VRF 内に存在し、同じエリア ID に属している必要があります。
interface mode コマンドを使用して、IPv4 インターフェイスで OSPF を有効または無効にします。エリア ID は、任意の 32 ビット符号なし整数、10 進数形式、またはドット区切り Ipv4 のような形式で指定できます。
次の 2 つの設定タイプを使用して、インターフェイスで OSPF を有効にします。
インターフェイス コンフィギュレーション モードで OSPF エリアを設定します。
DELLSONiC(config-if-Vlan100)# ip ospf area area-id |
- area-id:10進数またはドット形式のOSPFエリアID - A.B.C.D または 0..4294967295
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Vlan 100
DELLSONiC(config-if-Vlan100)# ip ospf area 0
or
DELLSONiC(config-if-Vlan100)# ip ospf area 0.0.0.0 |
OSPFv2 ルータ コンフィギュレーション モードでインターフェイスのネットワーク アドレスを OSPF エリアにバインドまたは関連付けることで、次のことが可能になります。
DELLSONiC(config-router-ospf)# network network-prefix area area-id |
- network-prefix - A.B.C.D/mask
- area-id:10進数またはドット形式のOSPFエリアID - A.B.C.D または 0..4294967295
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# network 10.10.150.0/24 area 0.0.0.0
or
DELLSONiC(config-router-ospf)# network 10.10.150.0/24 area 0 |
VRF 内では、ユーザは上記の設定タイプのいずれかを使用するか、つまり、VRF 内で両方の設定を一度に許可することはできません。
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Vlan 100
DELLSONiC(config-if-Vlan100)# ip vrf forwarding Vrf-Blue
DELLSONiC(config-if-Vlan100)# ip ospf area 0
or
DELLSONiC(config-if-Vlan100)# ip ospf area 0.0.0.0
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf vrf Vrf-Blue
DELLSONiC(config-router-ospf)# network 10.10.150.0/24 area 0.0.0.0
DELLSONiC(config-router-ospf)# network 10.10.150.0/24 area 0 |
OSPFセッションの表示
DELLSONiC# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL 10.10.150.2 1 Full/DR 32.346s 10.10.150.2 Vlan100:10.10.150.1 0 0 0 |
OSPF ルーター ID の設定
VRF 内のすべての OSPF ルータに対して OSPFv2 ルータ識別子を明示的に設定します。ルータ ID の設定はオプションです。ルータ ID を設定すると、そのルータ ID が OSPF ルータ ID として選択されます。
ルーターIDが設定されていない場合、ルーターIDの選択は次の設定に従って行われます。
- 最近使用されたルーターID値。(これは、ユーザーがルーターIDの設定を解除した場合に発生する可能性があります)。
- ルーターIDのFRR推奨値。FRR は、次の順序でルータ ID を選択します。
- FRRグローバル モードが設定されたルーターID値(存在する場合)。
- SONiCの物理およびループバック インターフェイスのIPv4アドレスの中で最大のIPv4アドレス値。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# ospf router-id router-id |
削除するには:
DELLSONiC(config-router-ospf)# no ospf router-id router-id |
- router-id:10進数またはドット形式のOSPFルーターID
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# ospf router-id 1.1.1.1 |
OSPF エリア レベル認証タイプの設定
OSPFv2 認証タイプは、エリアごとに設定できます。認証が設定されている場合、そのエリア内で構成されているすべてのインターフェイスは、設定されている認証タイプを使用します。インターフェイス モード認証タイプが設定されている場合は、そのインターフェイス モード認証タイプがエリア レベルの設定よりも優先されます。
認証タイプは、ユーザーによって構成されていない場合は「なし」です。ユーザーは、プレーン テキスト認証タイプまたはメッセージ ダイジェスト タイプの認証を有効にすることができます。エリアに認証タイプが設定されている場合は、そのエリアに属するすべてのOSPFインターフェイスに対応する認証キー(パスワード)を設定する必要があります。
エリアの OSPF 認証を設定または設定解除するには、この router mode コマンドを使用します。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# area area-id authentication [message-digest] |
削除するには:
DELLSONiC(config-router-ospf)# no area area-id authentication [message-digest] |
- area-id:10進数またはドット形式のOSPFエリアID - A.B.C.D または 0..4294967295
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# area 0 authentication
or
DELLSONiC(config-router-ospf)# area 0 authentication message-digest |
OSPFインターフェイス レベルの認証タイプとキーの構成
個々の OSPF インターフェイスの OSPFv2 認証タイプと認証キーまたはパスワードを設定します。ユーザーによって構成されていない場合、認証タイプはnoneです。ユーザーは、プレーン テキスト認証タイプまたはメッセージ ダイジェスト タイプの認証を有効にすることができます。インターフェイスに認証タイプが設定されるたびに、ユーザはそのOSPFインターフェイスに対応する認証キー(パスワード)を設定する必要があります。
プレーン テキスト認証の長さは最大8文字です。Message Digest (MD5)認証キーは、最大16文字です。MD5認証タイプは、インターフェイスおよびインターフェイスIPごとに最大255個の認証キーを受け入れることができます。すべての MD5 認証キーは、値の範囲が 1 から 255 の認証キー ID によって一意に識別されます。認証キーは暗号化された形式で保存されます。
OSPFメッセージ認証を構成または構成解除するには、このインターフェイス モード コマンドを使用します。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf authentication [null | message-digest] [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# ip ospf authentication-key key [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# ip ospf message-digest-key key-id md5 key [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf authentication [null | message-digest] [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# no ip ospf authentication-key [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# no ip ospf message-digest-key key-id md5 [if-ip-addr] |
- key - 認証キーのパスワード (最大 8 文字または 16 文字の文字列)
- key-id - MD5 認証キー識別子 (1 から 255)
- if-ip-addr - インターフェイス IP アドレス - A.B.C.D
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth 1/47
DELLSONiC(config-if-Eth1/47)# ip ospf authentication
DELLSONiC(config-if-Eth1/47)# ip ospf authentication-key dellospfpswrd
DELLSONiC(config-if-Eth1/47)# ip ospf authentication 10.10.3.2
DELLSONiC(config-if-Eth1/47)# ip ospf authentication-key dellospfpswrd 10.10.3.2
DELLSONiC(config-if-Eth1/47)# ip ospf authentication message-digest
DELLSONiC(config-if-Eth1/47)# ip ospf message-digest-key 1 md5 dellospfpswrd
DELLSONiC(config-if-Eth1/47)# ip ospf message-digest-key 2 md5 dellospfpswrd
DELLSONiC(config-if-Eth1/47)# ip ospf authentication null |
OSPFパッシブ インターフェイスの構成
ルータ モード設定を使用して OSPFv2 パッシブ インターフェイスを設定します。パッシブ インターフェイスでは、OSPF は OSPF hello をトリガーせず、OSPF セッションを開始しません。パッシブ インターフェイスは、ルータ LSA のスタブ リンクとしてアドバタイズされます。すべてのOSPFインターフェイスをデフォルトでパッシブ インターフェイスとして設定するには、passive-interface defaultオプションを入力します。すべてまたは指定したインターフェイスを再アクティブ化するには、no passive-interface コマンドを使用します。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# passive-interface {default | Eth | Loopback | PortChannel | Vlan } [if-ip-addr] |
削除するには:
DELLSONiC(config-router-ospf)# no passive-interface {default | Eth | Loopback | PortChannel | Vlan } [if-ip-addr] |
- ETHの |ループバック |ポートチャネル |Vlan:インターフェイス名
- if-ip-addr - インターフェイス IP アドレス - A.B.C.D
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# passive-interface default
DELLSONiC(config-router-ospf)# no passive-interface Eth 1/47 |
OSPF仮想リンクの構成
OSPFv2 仮想リンクは、非バックボーン エリア全体でバックボーン ルータを接続するために使用されます。仮想リンクが設定されるエリア(トランジットエリアと呼ばれる)には、完全なルーティング情報が必要です。トランジット エリアをスタブ エリアにすることはできません。仮想リンクは、両端バックボーン ルータで設定する必要があります。
次のように、OSPFルーター モード設定を使用して仮想リンクを設定します。単一の仮想リンク コマンドには、仮想リンクに関連するすべてのパラメーターを設定するためのオプションがあります。仮想リンクには、クリア テキストのパスワード、メッセージ ダイジェスト ベースのパスワード、またはパスワードをまったく設定しないことができます。クリア テキストとメッセージ ダイジェスト パスワードが設定されている場合は、対応するauthentication-keyまたはmessage-digest-keyパラメータを設定する必要があります。認証キー(パスワード)は、構成に暗号化された形式で保存されます。ユーザーは、認証キーを設定する際、常に実際のパスワードを提供するものとします。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# area area-id virtual-link remote-id [ authentication [ null | message-digest ] | authentication-key key | message-digest-key key-id md5 key | dead-interval time-value | hello-interval time-value | retransmit-interval time-value | transmit-delay time-value ] |
削除するには:
DELLSONiC(config-router-ospf)# no area area-id virtual-link remote-id [ authentication [ null | message-digest ] | authentication-key key | message-digest-key key-id md5 key | dead-interval time-value | hello-interval time-value | retransmit-interval time-value | transmit-delay time-value ] |
- area-id:10進数またはドット形式のOSPFエリアID - A.B.C.D または 0..4294967295
- remote-id:ドット形式のリモートルータID - A.B.C.D
- key - 認証キーのパスワード (最大 8 文字または 16 文字の文字列)
- key-id:MD5 認証キー識別子 (1 から 255)
- time-value - 秒単位の時間間隔値 (1 から 65535)
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 authentication
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 authentication-key dellospfpswrd
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 authentication
message-digest
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9
message-digest-key 19 md5 dellospfpswrd
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 authentication null
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 dead-interval 60
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 hello-interval 20
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 retransmit-interval 15
DELLSONiC(config-router-ospf)# area 19 virtual-link 1.1.1.9 transmit-delay 10 |
OSPF ABR タイプの設定
OSPF ルータ ABR のタイプは、Cisco、IBM、ショートカット、または標準です。「Cisco」タイプと「IBM」タイプは同等です。ABR 動作の OSPF 標準では、バックボーンへのリンクがダウンしている場合、接続された非バックボーン エリアにバックボーンに到達できる他の ABR がある場合でも、ABR が非バックボーン エリアを通過するルートを考慮することはできません。
このリリースのデフォルトである「Cisco」または「IBM」ABR タイプでは、この制限が解除され、ABR は非バックボーン エリアを介して他の ABR から学習したサマリーを考慮できるため、バックボーン リンクがダウンした場合にのみ、最後の手段として非バックボーン エリアを介してルーティングできます。
ospf abr-type コマンドは、次のように ABR タイプを設定または設定解除するために使用されます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# ospf abr-type [ cisco | ibm | shortcut | standard ] |
削除するには:
DELLSONiC(config-router-ospf)# no ospf abr-type [ cisco | ibm | shortcut | standard ] |
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# ospf abr-type standard |
OSPFエリアのショートカットの設定
OSPF バックボーン エリアは、非バックボーン エリア間のルーティング配信を担当します。バックボーン領域は連続している必要がありますが、必ずしも物理的な隣接関係を意味するわけではありません。仮想接続を使用して、バックボーン エリア ルーター接続を実現できます。
ショートカット タイプを設定することで、バックボーン エリアへのショートカット ルートを有効または無効にできます。ショートカット タイプがデフォルトの場合、ABRにバックボーン エリアへのリンクがない場合、またはこのリンクが失われた場合のみ、エリアがショートカットに使用されます。ショートカットタイプが「有効」の場合、そのエリアは、通過するルートが安価になるたびにショートカットに使用されます。ショートカット タイプが「無効」の場合、そのエリアはルート ショートカットに ABR によって使用されることはありません。
OSPF ルータ コンフィギュレーション モードで OSPFv2 エリア ショートカット タイプを設定または設定解除します。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# area area-id shortcut {default | enable | disable} |
削除するには:
DELLSONiC(config-router-ospf)# no area area-id shortcut |
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# area 1 shortcut enable |
OSPF RFC互換性の構成
RFC1583 の後継である OSPFv2 RFC2328は、セクション 16.4 のセクション G.2(変更)に従って、古いバージョンの OSPFv2 で発生していたルーティング ループを防止するパス優先アルゴリズムの変更を提案しています。具体的には、エリア間パスとエリア内バックボーンパスが同等に優先されるようになりますが、それでも両方が外部パスよりも優先されます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# compatible rfc1583 |
削除するには:
DELLSONiC(config-router-ospf)# no compatible rfc1583 |
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# compatible rfc1583 |
OSPF 隣接関係ロギングの設定
隣接関係ログを設定して、OSPFv2 隣接関係状態ログを有効にします。オプションの detail 引数を使用すると、隣接関係ステータスのすべての変更が表示されます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# log-adjacency-changes [detail] |
削除するには:
DELLSONiC(config-router-ospf)# no log-adjacency-changes |
Example:
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# router ospf DELLSONiC(config-router-ospf)# log-adjacency-changes detail |
OSPF LSA タイマーの設定
OSPFv2 LSA リフレッシュ間隔、最小間隔、およびスロットル タイマー
を設定します。
DELLSONiC(config-router-ospf)# refresh timer refresh-time
DELLSONiC(config-router-ospf)# timers lsa min-arrival min-arr-time
DELLSONiC(config-router-ospf)# timers throttle lsa all throttle-time |
削除するには:
DELLSONiC(config-router-ospf)# no refresh timer DELLSONiC(config-router-ospf)# no timers lsa min-arrival DELLSONiC(config-router-ospf)# no timers throttle lsa all |
- refresh-time - リフレッシュ時間 (10 から 1800 秒)
- min-arr-time - 最小到着時間 (0 から 600000 ミリ秒)
- throttle-time - スロットル時間 (0 から 5000 ミリ秒)
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# router ospf DELLSONiC(config-router-ospf)# refresh timer 40 DELLSONiC(config-router-ospf)# timers lsa min-arrival 30 DELLSONiC(config-router-ospf)# timers throttle lsa all 150 |
OSPF SPF スロットル タイマーの設定
OSPFv2 SPF アルゴリズム スロットル タイマーは、SPF が計算されてから計算がトリガーされたイベントとの間の initial-delay、initial-hold-time、および maximum-hold-time を設定します。時間はミリ秒単位で指定し、0 から 600000 ミリ秒の範囲でなければなりません。
initial-delay は、SPF 計算を遅延する最小時間を指定します。したがって、以前のSPF計算のホールド時間外に発生したイベントの後にSPF計算が遅延する時間に影響し、最小ホールドタイムとしても機能します。
連続したSPF計算は、常に少なくとも「ホールドタイム」ミリ秒で区切られます。ホールドタイムは適応型で、初期値は throttle コマンドで設定された初期ホールドタイムに設定されます。前の SPF 計算のホールドタイム内に発生したイベントにより、hold-time は throttle コマンドで設定された maximum-hold-time によって制限された initial-hold-time だけ増加します。SPF トリガー イベントが発生しないままアダプティブ ホールドタイムが経過すると、現在のホールドタイムは初期ホールドタイムにリセットされます。現在のホールドタイムは、show ip ospf コマンドを使用して表示でき、initial-hold-time の乗数として
表されます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# timers throttle spf initial-delay initial-hold-time max-hold-time |
削除するには:
DELLSONiC(config-router-ospf)# no timers throttle spf |
- initial-delay — 時間値 (0 から 600000 ミリ秒)
- initial-hold-time — 時間値 (0 から 600000 ミリ秒)
- max-hold-time — 時間値 (0 〜 600000 ミリ秒)
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# timers throttle spf 200 400 10000 |
上記の例では、initial-delay は 200 ミリ秒、initial-hold-time は 400 ミリ秒、maximum-hold-time は 10 秒に設定されています。したがって、イベント(SPF計算が必要)とSPF計算の間には、常に少なくとも200ミリ秒があります。さらに、連続したSPF計算は常に400msから10秒間隔で行われ、前のSPF計算のホールドタイム内でSPFトリガーイベントが発生するたびにホールドタイムが400msずつ増加します。
OSPF 最大メトリック アドバタイズメントの設定
OSPFv2 は、RFC 313 に従って、ルータ LSA のトランジット リンクを無限距離(最大メトリック)を持つものとして記述しているため、他のルータはルータを介してネットワークに到達できるように、ルータを通過するトランジット パスの計算を回避します。
このサポートは、管理上(つまり、無期限に)または条件付きで有効にすることができます。最大メトリック ルータ LSA の条件付きイネーブルは、起動後数秒間有効にすることができます。
起動後にこれを有効にすると、他のルータで使用される既存のルートに影響を与えることなく、OSPFが最初に完全に収束し、接続されたスタブリンクや再配布されたルートに到達できるようになります。
この機能を管理上有効にすると、理由の如何を問わず、管理者の介入が無期限に許可されます。設定が保存されると、この管理形式の stub-router コマンドも保存されることに注意してください。システムまたはDockerを後で再起動した場合、コマンドは手動で構成解除されるまで有効になります。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# max-metric router-lsa administrative
DELLSONiC(config-router-ospf)# max-metric router-lsa on-startup time-value |
削除するには:
DELLSONiC(config-router-ospf)# no max-metric router-lsa administrative
DELLSONiC(config-router-ospf)# no max-metric router-lsa on-startup |
- time-value - 時間値 (5 〜 86400 秒)
Example:
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# router ospf DELLSONiC(config-router-ospf)# max-metric router-lsa administrative DELLSONiC(config-router-ospf)# max-metric router-lsa on-startup 60 |
OSPF ルート距離の設定
OSPFv2 で計算されたルートと、ルータ内のユーザ設定のルーティング距離を割り当てます。距離値は、OSPFv2 で生成されたすべてのルートで設定できます。距離値の設定は、現在のルータに対するエリア内ルート、エリア間ルート、外部ルートなど、OSPFルートの送信元に基づいて行うこともできます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# distance distance-value
DELLSONiC(config-router-ospf)# distance ospf intra-area distance-value
DELLSONiC(config-router-ospf)# distance ospf inter-area distance-value
DELLSONiC(config-router-ospf)# distance ospf external distance-value |
削除するには:
DELLSONiC(config-router-ospf)# no distance
DELLSONiC(config-router-ospf)# no distance ospf intra-area
DELLSONiC(config-router-ospf)# no distance ospf inter-area
DELLSONiC(config-router-ospf)# no distance ospf external |
- distance-value - すべてのタイプのルートの距離値 (1...255)
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# router ospf DELLSONiC(config-router-ospf)# distance 25 DELLSONiC(config-router-ospf)# distance ospf intra-area 30 DELLSONiC(config-router-ospf)# distance ospf inter-area 30 DELLSONiC(config-router-ospf)# distance ospf external 60 |
OSPF 自動コスト参照帯域幅の設定
OSPFv2 は、OSPF インターフェイス コストに基づいてルート コストを計算します。インターフェイス コストは、手動で構成することも、自動的に計算することもできます。手動で設定されたインターフェイス コストは、自動計算されたインターフェイス コストよりも優先されます。
インターフェイス コストの自動計算は、基準帯域幅とインターフェイス/リンク帯域幅を考慮して行われます。基準帯域幅のコストはコスト 1 であると見なされます。デフォルトの基準帯域幅は100ギガバイトです。リンク帯域幅は、設定されたリンク帯域幅、リンクの実際の速度、またはデフォルトのリンク帯域幅(10G)の優先順で選択されます。リンク コストは次のように計算されます。
リンク コスト = (参照帯域幅) / (リンク帯域幅 + 0.5)
計算されたリンク コストは 1 未満にすることができます。このような場合は、常にリンク コスト 1 に丸められます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# auto-cost reference-bandwidth ref-bandwidth |
削除するには:
DELLSONiC(config-router-ospf)# no auto-cost reference-bandwidth |
- ref-bandwidth - 基準帯域幅 (1 から 4294967 メガビット)
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# auto-cost reference-bandwidth 10000 |
OSPF スタブ領域とそのパラメータの設定
OSPFv2 エリアは、集約ルートの有無にかかわらずスタブ エリアとして設定します。スタブ エリアは、ルータが OSPF の外部からルートを発信しないエリアです。したがって、これは、すべての外部ルートが ABR を介して到達可能と見なされるエリアです。したがって、このようなエリアの ABR は、AS 外部 LSA または ASBR サマリー LSA をエリアに渡す必要はありません。このようなエリアには、デフォルト ルート サマリーとともに、ネットワーク集約 LSA だけを渡す必要があります。サマリー スタブ エリアがないため、ABR は指定されたスタブ エリアにエリア間サマリーを挿入することさえできません。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# area area-id stub [no-summary]
DELLSONiC(config-router-ospf)# area area-id default-cost cost-value |
削除するには:
DELLSONiC(config-router-ospf)# no area area-id stub [no-summary]
DELLSONiC(config-router-ospf)# no area area-id default-cost |
- area-id:10進数またはドット形式のOSPFエリアID - A.B.C.D または 0..4294967295
- コスト バリュー - 既定のコスト (0 から 16777215)
Example:
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# router ospf DELLSONiC(config-router-ospf)# area 1 stub DELLSONiC(config-router-ospf)# area 2 stub no-summary DELLSONiC(config-router-ospf)# area 2 default-cost 30 |
OSPF エリア間サマリー ルート フィルタの設定
プレフィックス リストと範囲リストを使用して、ABR での OSPFv2 エリア間サマリー LSA ルート伝搬を管理します。
入力プレフィックス リストを使用して、ABR のエリアへの着信ルートをフィルタリングします。同様に、out プレフィックス リストを使用して、エリアからの発信ルートを除外します。
範囲リストは、エリアからのプレフィックスのアドバタイズを管理するためにも使用できます。範囲リストを使用すると、アドバタイズするプレフィックス、コスト、またはルートプレフィックスを変更できます。このオプションは、指定されたエリアからのエリア内パスを、他のエリアにアナウンスされた 1 つのタイプ 3 サマリー LSA に集約します。この設定は ABR でのみ使用でき、ルータ LSA とネットワーク LSA だけを集約できます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# area area-id filter-list prefix prefix-list in
DELLSONiC(config-router-ospf)# area area-id filter-list prefix prefix-list out
DELLSONiC(config-router-ospf)# area area-id range ip-prefix
DELLSONiC(config-router-ospf)# area area-id range ip-prefix not-advertise
DELLSONiC(config-router-ospf)# area area-id range ip-prefix cost cost-value
DELLSONiC(config-router-ospf)# area area-id range ip-prefix advertise cost cost-value
DELLSONiC(config-router-ospf)# area area-id range ip-prefix substitute sub-ip-prefix |
削除するには:
DELLSONiC(config-router-ospf)# no area area-id filter-list prefix in
DELLSONiC(config-router-ospf)# no area area-id filter-list prefix out
DELLSONiC(config-router-ospf)# no area area-id range ip-prefix
DELLSONiC(config-router-ospf)# no area area-id range ip-prefix not-advertise
DELLSONiC(config-router-ospf)# no area area-id range ip-prefix cost
DELLSONiC(config-router-ospf)# no area area-id range ip-prefix advertise cost
DELLSONiC(config-router-ospf)# no area area-id range ip-prefix substitute |
- area-id:10進数またはドット形式のOSPFエリアID - A.B.C.D または 0..4294967295
- prefix-list:IPv4 プレフィックス リスト名
- ip-prefix:集約ルート アドレス範囲プレフィックス - A.B.C.D/mask
- cost-value - コスト値 - <0..16777215>
- sub-ip-prefix:アドレスプレフィックス - A.B.C.D/mask
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# area 0 filter-list prefix arealistin in
DELLSONiC(config-router-ospf)# area 0 filter-list prefix arealistout out |
OSPF ルート再配布の設定
OSPFv2 は、外部ルートを OSPF ルーティング ドメインに再配布できます。BGPルート、スタティック ルート、接続ルート、カーネル ルートをOSPFルーティング ドメインに再配布します。明示的に指定されたコストとメトリック タイプに加えて、ルート マップを使用してルートの再配布を管理します。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# redistribute {kernel | connected | static| bgp} [metric metric-value| metric-type metric-type-value | route-map rmap-name}
DELLSONiC(config-router-ospf)# default-metric metric-value |
削除するには:
DELLSONiC(config-router-ospf)# no redistribute {kernel | connected | static | bgp} [metric | metric-type | route-map}
DELLSONiC(config-router-ospf)# no default-metric |
- metric-value - ルートに適用されるルートコスト (0 から 16777214)
- metric-type-value - メトリック タイプ (1 と 2)
- rmap-name:ルートに適用されるルート マップの名前
Example:
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# router ospf DELLSONiC(config-router-ospf)# redistribute bgp DELLSONiC(config-router-ospf)# redistribute static metric 20 metric-type 1 DELLSONiC(config-router-ospf)# redistribute bgp route-map ospf-rmap DELLSONiC(config-router-ospf)# redistribute bgp metric 20 metric-type 1 route-map ospfrmap DELLSONiC(config-router-ospf)# default-metric 30 |
OSPF デフォルト ルート発信の設定
デフォルト ルートは、OSPFルーティング ドメインから発信できます。このオプションは、指定されたメトリックとメトリック タイプのすべての外部ルーティング対応エリアへのデフォルト ルートを記述する AS-External LSA を発信します。「always」オプションが指定されている場合、ルーティングテーブルにデフォルトルートが存在しない場合でも、デフォルトルートは常にアドバタイズされます。
構成するには、次の手順を実行します。
DELLSONiC(config-router-ospf)# default-information originate [{ always | metric metric-value| metric-type metric-type-value | route-map rmap-name }] |
削除するには:
DELLSONiC(config-router-ospf)# no default-information originate [{ always | metric | metric-type | route-map }] |
- metric-value - ルートに適用されるルートコスト (0 から 16777214)
- metric-type-value - メトリック タイプ (1 と 2)
- rmap-name:ルートに適用されるルート マップの名前
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# router ospf
DELLSONiC(config-router-ospf)# default-information originate
DELLSONiC(config-router-ospf)# default-information originate always
DELLSONiC(config-router-ospf)# default-information originate route-map ospf-rmap
DELLSONiC(config-router-ospf)# default-information originate metric 20 metric-type 1 route-map ospfrmap |
OSPFインターフェイス パラメーターの構成
SONiCインターフェイス構成モードでOSPFインターフェイス パラメーターを設定します。インターフェイスの構成には、次のものが含まれます。
- インターフェイスへのエリアの関連付け
- インターフェイス タイプ、MTU
- メッセージ認証パラメーター
- セッション タイマー間隔パラメーター
- Bfd
インターフェイス パラメーターは、インターフェイスIPv4アドレスを指定することによって、インターフェイスの特定のインターフェイス アドレスに関連付けることもできます。インターフェイス アドレスが指定されている場合、このような構成パラメーターは、対応するインターフェイス アドレスに関連付けられている OSPF セッションにのみ適用できます。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf area area-id [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf area area-id [if-ip-addr] |
- area-id:10進数またはドット形式のOSPFエリアID - A.B.C.D または 0..4294967295
- if-ip-addr:インターフェイス IP アドレス
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# int Eth 1/47
DELLSONiC(config-if-Eth1/47)# ip ospf area 10
DELLSONiC(config-if-Eth1/47)# ip ospf area 0.0.0.0 10.3.1.2 |
OSPFインターフェイス コンフィギュレーション モードで、OSPFv2インターフェイスのネットワーク タイプを設定します。OSPFインターフェイス ネットワークは、デフォルトでネットワーク タイプ ブロードキャストになっています。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf network {broadcast | point-to-point} |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf network {broadcast | point-to-point} |
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# int Eth 1/47
DELLSONiC(config-if-Eth1/47)# ip ospf network broadcast
DELLSONiC(config)# int Eth 1/8
DELLSONiC(config-if-Eth1/8)# ip ospf network point-to-point |
OSPF インターフェイス コンフィギュレーション モードで OSPFv2 インターフェイス セッション プライオリティ パラメータを設定します。プライオリティが最も高いルータは、指定ルータになる資格があります。値を 0 に設定すると、ルータは指定ルータになる資格がなくなります。デフォルト値は 1 です。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf priority priority-value [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf priority [if-ip-addr] |
- priority-value - セッション優先度 (0 から 255)
- if-ip-addr:インターフェイス IP アドレス
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# int Eth 1/47
DELLSONiC(config-if-Eth1/47)# ip ospf priority 10 |
OSPFインターフェイス コンフィギュレーション モードでOSPFv2インターフェイス セッション認証パラメータを設定します。
DELLSONiC(config-if-Eth1/47)# ip ospf authentication [null | message-digest] [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# ip ospf authentication-key key [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# ip ospf message-digest-key key-id md5 key [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf authentication [null | message-digest] [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# no ip ospf authentication-key [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# no ip ospf message-digest-key key-id md5 [if-ip-addr] |
- if-ip-addr:インターフェイス IPv4 アドレス
- key - 認証キーのパスワード (最大 8 文字または 16 文字)
- key-id - MD5 認証キー識別子 (1 から 255)
- if-ip-addr:インターフェイス IP アドレス
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf authentication
DELLSONiC(config-if-Eth1/1)# ip ospf authentication-key ospfpswd
DELLSONiC(config)# interface Eth1/2
DELLSONiC(config-if-Eth1/2)# ip ospf authentication 10.10.3.2
DELLSONiC(config-if-Eth1/2)# ip ospf authentication-key ospfpswd 10.10.3.2
DELLSONiC(config)# interface Eth1/3
DELLSONiC(config-if-Eth1/3)# ip ospf authentication message-digest
DELLSONiC(config-if-Eth1/3)# ip ospf message-digest-key 1 md5 ospfpswd1
DELLSONiC(config-if-Eth1/3)# ip ospf message-digest-key 2 md5 ospfpswd2
DELLSONiC(config-if-Eth1/3)# ip ospf message-digest-key 9 md5 ospfpswd9
DELLSONiC(config)# interface Eth1/4
DELLSONiC(config-if-Eth1/4)# ip ospf authentication null |
OSPF インターフェイス コンフィギュレーション モードで OSPFv2 インターフェイス セッション BFD を設定します。OSPFインターフェイスBFDはデフォルトで無効になっています。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf bfd |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf bfd |
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf bfd |
OSPF インターフェイス コンフィギュレーション モードで OSPFv2 インターフェイス コストを設定します。コスト値はルータ LSA のメトリック フィールドに設定され、SPF の計算に使用されます。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf cost cost-value [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf cost [if-ip-addr] |
- if-ip-addr:インターフェイス IP アドレス
- cost-value - インターフェイス コスト (1 から 65535)
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf cost 50 |
OSPF インターフェイス コンフィギュレーション モードで、OSPFv2 インターフェイス セッションの MTU 無視を設定します。MTUはデフォルトでは無視されません。MTU無視が設定されていない場合、OSPFセッション インターフェイス終了のMTU値は一致します。多数のOSPFルートプレフィックスが存在し、ルータLSAメッセージがMTUサイズ内に対応できない場合、MTU無視を設定してもセッションの確立は保証されません。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf mtu-ignore [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf mtu-ignore [if-ip-addr] |
- if-ip-addr:インターフェイス IP アドレス
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf mtu-ignore |
OSPF インターフェイス コンフィギュレーション モードで OSPFv2 インターフェイス セッションの hello タイマーを設定します。設定すると、指定されたインターフェイスでタイマー値秒ごとに Hello パケットが送信されます。この値は、共通ネットワークに接続されているすべてのルーターで同じである必要があります。デフォルト値は 10 秒です。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf hello-interval time-interval [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf hello-interval [if-ip-addr] |
- if-ip-addr:インターフェイス IP アドレス
- time-interval - タイマー値 (1 〜 65535 秒)
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf hello-interval 15 |
OSPF インターフェイス コンフィギュレーション モードで、OSPFv2 インターフェイス セッション送信遅延タイマーを設定します。設定する場合、LSA の経過時間は、送信時にこの値だけインクリメントする必要があります。デフォルト値は 1 秒です。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf transmit-delay time-interval [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf transmit-delay [if-ip-addr] |
- if-ip-addr:インターフェイス IP アドレス
- time-interval:タイマー値(1〜65535秒)
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf transmit-delay 20 |
OSPF インターフェイス コンフィギュレーション モードで OSPFv2 インターフェイス セッション再送信インターバル タイマーを設定します。この値は、データベースの説明パケットとリンク状態要求パケットを再送信するときに使用されます。デフォルト値は5秒です。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf retransmit-interval time-interval [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf retransmit-interval [if-ip-addr] |
- if-ip-addr:インターフェイス IP アドレス
- time-interval:タイマー値(2〜65535秒)
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf retransmit-interval 25 |
OSPF インターフェイス コンフィギュレーション モードで OSPFv2 インターフェイスのデッド インターバルを設定します。OSPFルーターのデッド インターバル タイマー値は、セッション待機または非アクティブ タイマーに使用されます。この値は、共通ネットワークに接続されているすべてのルーターで同じである必要があります。デフォルト値は 40 秒です。明示的な待機時間の代わりに「最小」が指定されている場合、デッド インターバルは 1 秒に設定され、hello 乗数を指定する必要があります。hello-multiplier は、毎秒送信する Hello の数を指定します。乗数の値は、1(500 ミリ秒ごと)から 10(50 ミリ秒ごと)です。したがって、OSPFの収束時間は1秒です。この形式が指定されている場合、Hello パケットでアドバタイズされる hello-interval は 0 に設定され、受信した Hello パケットの hello-interval はチェックされないため、hello 乗数は共通リンク上の複数のルータ間で同じである必要はありません。
構成するには、次の手順を実行します。
DELLSONiC(config-if-Eth1/47)# ip ospf dead-interval time-interval [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# ip ospf dead-interval minimal hello-multiplier multiplier [if-ip-addr] |
削除するには:
DELLSONiC(config-if-Eth1/47)# no ip ospf dead-interval [if-ip-addr]
DELLSONiC(config-if-Eth1/47)# no ip ospf dead-interval minimal hello-multiplier [if-ip-addr] |
- if-ip-addr:インターフェイス IP アドレス
- time-interval:タイマー値(1〜65535秒)
- multiplier:デッド インターバル hello 乗数値(1 〜 10 秒)
Example:
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure terminal
DELLSONiC(config)# interface Eth1/1
DELLSONiC(config-if-Eth1/1)# ip ospf dead-interval 60
DELLSONiC(config-if-Eth1/1)# ip ospf dead-interval minimal hello-multiplier 4 |
OSPF 運用データ表示コマンド
SONiCには、OSPFルーター、OSPFセッション、OSPFインターフェイスの動作ステータスを表示する表示コマンドが用意されています。
OSPFルーター情報の表示
show ip ospf [vrf vrf-name] |
- vrf-name:VRF名
Example:
DELLSONiC# show ip ospf
OSPF Routing Process, Router ID: 1.1.1.1
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is enabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
time is 92031756
SPF algorithm last executed 1065d4h22m ago
Last SPF duration 0.0s
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 1000 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Number of external LSA 0. Checksum Sum 0x0
Number of opaque AS LSA 0. Checksum Sum 0x0
Number of areas attached to this router: 2
Area ID: 0.0.0.0 (Backbone)
Number of interfaces in this area: Total: 1 , Active: 1
Number of fully adjacent neighbors in this area: 1
Area has no authentication
SPF algorithm executed 8 times
Number of LSA 3
Number of router LSA 2. Checksum Sum 0x40f64b4000000000
Number of network LSA 1. Checksum Sum 0x40d5adc000000000
Number of summary LSA 0. Checksum Sum 0x0
Number of ASBR summary LSA 0. Checksum Sum 0x0
Number of NSSA LSA 0. Checksum Sum 0x0
Number of opaque link LSA . Checksum Sum 0x
Number of opaque area LSA 0. Checksum Sum 0x0
Area ID: 0.0.0.1
Number of interfaces in this area: Total: 1 , Active: 1
Number of fully adjacent neighbors in this area: 0
Area has no authentication
SPF algorithm executed 1 times
Number of LSA 2
Number of router LSA 0. Checksum Sum 0x0
Number of network LSA 0. Checksum Sum 0x0
Number of summary LSA 2. Checksum Sum 0x40f1f61000000000
Number of ASBR summary LSA 0. Checksum Sum 0x0
Number of NSSA LSA 0. Checksum Sum 0x0
Number of opaque link LSA . Checksum Sum 0x
Number of opaque area LSA 0. Checksum Sum 0x0 |
OSPFネイバー情報の表示
show ip ospf [vrf vrf-name ] neighbor [detail | if-name | nbr-ip ] |
- vrf-name:VRF名
- if-name - OSPF インターフェイス名
- nbr-ip - ネイバー ルータ ID
Example:
DELLSONiC# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface RXmtL
RqstL DBsmL
10.59.142.247 1 Full/Backup 37.343s 64.1.1.2 Eth 1/2:64.1.1.1 0
0 0
DELLSONiC# show ip ospf neighbor Eth1/3 | no-more
Neighbor ID Pri State Dead Time Address Interface RXmtL
RqstL DBsmL
2.2.2.2 1 Full/Backup 38.245s 64.1.1.2 Eth 1/4:64.1.1.1 0
0 0
DELLSONiC# show ip ospf neighbor detail
Neighbor 10.59.142.247, interface address 64.1.1.2
In the area 0.0.0.0 via interface Eth 1/2
Neighbor priority is 1, State is Full, 6 state changes
Most recent state change statistics:
Progressive change 7h3m25s ago
DR is 64.1.1.1, BDR is 64.1.1.2
Options 2 *|-|-|-|-|-|E|-
Dead timer due in 30.687s
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Thread Inactivity Timer on
Thread Database Description Retransmission off
Thread Link State Request Retransmission on
Thread Link State Update Retransmission on
Leaf1# show ip ospf neighbor 2.2.2.2
Neighbor 2.2.2.2, interface address 64.1.1.2
In the area 0.0.0.0 via interface Eth 1/2
Neighbor priority is 1, State is Full, 5 state changes
Most recent state change statistics:
Progressive change 0h1m11s ago
DR is 64.1.1.1, BDR is 64.1.1.2
Options 2 *|-|-|-|-|-|E|-
Dead timer due in 33.203s
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Thread Inactivity Timer on
Thread Database Description Retransmision off
Thread Link State Request Retransmission on
Thread Link State Update Retransmission on |
OSPFインターフェイス情報の表示
show ip ospf interface [if-name | traffic ] |
- if-name - OSPF インターフェイス名
Example:
DELLSONiC# show ip ospf interface
VRF Name: default
Eth 1/2 is up
ifindex 128, MTU 9100 bytes, BW 25000 Mbit UP,BROADCAST,RUNNING,MULTICAST
Internet Address 64.1.1.1/24, Broadcast 64.1.1.255, Area 0.0.0.0
MTU mismatch detection: enabled
Router ID 10.59.143.131, Network Type BROADCAST, Cost: 4
Transmit Delay is 1 sec, State DR, Priority 1
Backup Designated Router (ID) 10.59.142.247, Interface Address 64.1.1.2
Saved Network-LSA sequence number 0x8000000f
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
Hello due in 9.023s
Neighbor Count is 1, Adjacent neighbor count is 1
DELLSONiC# show ip ospf interface Eth 1/3
VRF Name: default
Eth 1/4 is up
ifindex 926, MTU 9100 bytes, BW 25000 Mbit UP,BROADCAST,RUNNING,MULTICAST
Internet Address 65.1.1.1/24, Broadcast 65.1.1.255, Area 0.0.0.1
MTU mismatch detection: enabled
Router ID 1.1.1.1, Network Type BROADCAST, Cost: 4
Transmit Delay is 1 sec, State DR, Priority 1
Backup Designated Router (ID) 2.2.2.2, Interface Address 65.1.1.2
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
Hello due in 7.957s
Neighbor Count is 1, Adjacent neighbor count is 1
DELLSONiC# show ip ospf interface traffic
Interface HELLO DB-Desc LS-Req LS-Update LS-Ack
Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx
-----------------------------------------------------------------------------------------
---
Eth 1/2 2563/2563 3/3 1/1 17/30 29/16
Leaf1# show ip ospf interface traffic Eth1/3
Interface HELLO DB-Desc LS-Req LS-Update LS-Ack
Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx
-----------------------------------------------------------------------------------------
Eth1/3 19/22 2/3 1/1 3/3 2/2 |
OSPFデータベース情報の表示
show ip ospf [vrf vrf-name ] database [asbr-summary | external | network | router | summary | opaque-link] |
- vrf-name:VRF名
Example:
DELLSONiC# show ip ospf database
VRF Name: default
OSPF Router with ID (5.5.5.5)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
3.3.3.3 3.3.3.3 988 0x80000003 0x04ec 1
5.5.5.5 5.5.5.5 988 0x80000008 0x6f6b 1
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
10.10.10.2 5.5.5.5 988 0x80000002 0xcc38
Link-Local Opaque-LSA (Area 0.0.0.0)
Opaque-Type/Id ADV Router Age Seq# CkSum
3.0.0.0 3.3.3.3 89 0x80000001 0x4a24
DELLSONiC# show ip ospf database network
VRF Name: default
OSPF Router with ID (10.59.143.131)
Net Link States (Area 0.0.0.0)
LS age: 1602
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x3
LS Type: network-LSA
Link State ID: 64.1.1.1 (address of Designated Router)
Advertising Router: 10.59.143.131
LS Seq Number: 8000000f
Checksum: 0x1c70
Length: 32
Network Mask: /24
Attached Router: 10.59.142.247
Attached Router: 10.59.143.131
DELLSONiC# show ip ospf database summary
VRF Name: default
OSPF Router with ID (1.1.1.1)
Summary Link States (Area 0.0.0.0)
LS age: 468
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x11
LS Type: summary-LSA
Link State ID: 65.1.1.0 (summary Network Number)
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x0e04
Length: 28
Network Mask: /24
TOS: 0 Metric: 4
LS age: 429
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
LS Type: summary-LSA
Link State ID: 65.1.1.0 (summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000002
Checksum: 0xed1f
Length: 28
Network Mask: /24
TOS: 0 Metric: 4
Summary Link States (Area 0.0.0.1)
LS age: 468
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x11
LS Type: summary-LSA
Link State ID: 64.1.1.0 (summary Network Number)
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x1bf7
Length: 28
Network Mask: /24
TOS: 0 Metric: 4
LS age: 429
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
LS Type: summary-LSA
Link State ID: 64.1.1.0 (summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000002
Checksum: 0xfa13
Length: 28
Network Mask: /24
TOS: 0 Metric: 4
DELLSONiC# show ip ospf database asbr-summary
VRF Name: default
OSPF Router with ID (1.1.1.1)
ASBR-Summary Link States (Area 0.0.0.0)
LS age: 38
Options: 0x2 : *|-|-|-|-|-|E|-
LS Type: summary-LSA
Link State ID: 2.2.2.2 (AS Boundary Router address)
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x0b41
Length: 28
Network Mask: /0
TOS: 0 Metric: 4
DELLSONiC# show ip ospf database external
VRF Name: default
OSPF Router with ID (1.1.1.1)
AS External Link States
LS age: 52
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
LS Type: AS-external-LSA
Link State ID: 25.1.1.1 (External Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x0892
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
DELLSONiC# show ip ospf database self-originate
VRF Name: default
OSPF Router with ID (1.1.1.1)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
1.1.1.1 1.1.1.1 777 0x80000004 0x7b42 1
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
64.1.1.1 1.1.1.1 777 0x80000001 0x8581
Summary Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Route
65.1.1.0 1.1.1.1 816 0x80000001 0x0e04 65.1.1.0/24
ASBR-Summary Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
2.2.2.2 1.1.1.1 360 0x80000001 0x0b41
Router Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# CkSum Link count
1.1.1.1 1.1.1.1 776 0x80000004 0x8d2e 1
Net Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# CkSum
65.1.1.1 1.1.1.1 776 0x80000001 0x788d
Summary Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# CkSum Route
64.1.1.0 1.1.1.1 816 0x80000001 0x1bf7 64.1.1.0/24
DELLSONiC# show ip ospf database network adv-router 1.1.1.1
VRF Name: default
OSPF Router with ID (1.1.1.1)
Net Link States (Area 0.0.0.0)
LS age: 886
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x3
LS Type: network-LSA
Link State ID: 64.1.1.1 (address of Designated Router)
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x8581
Length: 32
Network Mask: /24
Attached Router: 1.1.1.1
Attached Router: 2.2.2.2
Net Link States (Area 0.0.0.1)
LS age: 886
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x3
LS Type: network-LSA
Link State ID: 65.1.1.1 (address of Designated Router)
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x788d
Length: 32
Network Mask: /24
Attached Router: 1.1.1.1
Attached Router: 2.2.2.2
DELLSONiC# show ip ospf database opaque-link
VRF Name: default
OSPF Router with ID (5.5.5.5)
Link-Local Opaque-LSA (Area 0.0.0.0)
LS age: 94
Options: 0x66 : *|O|-|-|-|-|E|-
LS Flags: 0x6
LS Type: Link-Local Opaque-LSA
Link State ID: 3.0.0.0 (Link-Local Opaque-Type/ID)
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0x4a24
Length: 44 |
OSPFルート情報の表示
show ip ospf [ vrf vrf-name ] route |
- vrf-name:VRF名
Example:
DELLSONiC# show ip ospf vrf Vrf1 route | no-more
VRF Name: Vrf1
============ OSPF network routing table ============
N 101.1.1.0/24 [10] area: 0.0.0.0
directly attached to Vlan101
============ OSPF router routing table =============
============ OSPF external routing table =========== |
OSPFv2グレースフル リスタート
OSPF に参加しているルータが再起動されると、ルータがオンラインに戻り、ルートを再学習するまで、トラフィックが失われる期間があります。
RFC 3623では、OSPFのグレースフル リスタートの機能拡張を次のように規定しています。
- グレースフル リスタートを試みるルータは、リンクローカルの不透明 LSA(Grace-LSA)を発信し、指定された時間または猶予期間内にグレースフル リスタートを実行する意図をアナウンスします。
- 猶予期間中、ネイバーは、ネットワーク トポロジが静的なままである(つまり、LS タイプ 1 〜 5 のリンクステート データベース内の LSA の内容が変更されない)場合に限り、LSA 内の再起動ルータをアナウンスし続けます(つまり、LS タイプ 1 〜 5 および 7 のリンクステート データベース内の LSA の内容は変更されません)。 定期的な更新は許可されます)。
グレースフル リスタートでは、再起動するルータが再起動することをネイバーに通知できます。ネイバーは、この状態を通知されると、再起動中のノードにトラフィックを転送し続けます。正常な再起動中に再起動するノードの転送テーブルが保持されるため、トラフィックの損失が回避されます。
計画停止
Enterprise SONiCは、計画的なアウテージに対してのみOSPFグレースフル リスタートをサポートします。
グレースフル リスタートはOSPFインスタンスに対して有効になっています。システムのウォーム リスタートは、warm-rebootコマンドを使用してトリガーされます。
ヘルパー ノードの再起動
グレースフル リスタートでは、OSPF ネットワークに参加するデバイスには 2 つのタイプがあります。これらは、ヘルパー ノードを再起動しています。
再起動するノードは、トラフィックを失うことなく正常に再起動するデバイスです。再起動するノードがグレースフル リスタートを実行すると、すべての OSPF インターフェイスでリンクローカルの不透明な LSA(grace-LSA)がフラッディングされます。これらの猶予 LSA は、ネイバーが再起動しようとしていることをヘルパー ルータに通知します。
ヘルパー ノードは、トラフィックの損失が発生しないように、再起動中のノードを支援します。ヘルパー ノードは、トポロジの変更についてネットワークを監視します。ネットワークに変更がない場合、ヘルパーは、再起動するノードが継続的なOSPF動作のままであるかのように、LSAをアドバタイズし続けます。ヘルパー LSA は、再起動するノードの同期状態に関係なく、ネットワーク セグメントを介して再起動するノードへの隣接関係を一覧表示し続けます。
OSPFv2 グレースフル リスタートの設定
正常な再起動を設定するには、次の手順を実行します
。1.グレースフル リスタートを有効にします。
DELLSONiC(config-router-ospf)# graceful-restart [grace-period grace-period] |
- grace-period - ネイバーまたはヘルパーが再起動中のノードが停止していると見なすまでの猶予期間。範囲は 1 から 1800 秒からです。デフォルトの猶予期間は120秒です
2.OSPFv2 不透明機能を設定して、再起動中のルータが猶予 LSA を開始できるようにします。
DELLSONiC (config-router-ospf)# capability opaque |
3.OSPFv2 グレースフル リスタート ヘルパーをシステムで設定し、すべてまたは特定のルータ ID を使用します。ルーターの再起動を支援するために使用しているすべてのノードでこれを行います。
DELLSONiC (config-router-ospf)# graceful-restart helper enable [router-id] |
- router-id:ルータIDを使用して、特定のネイバーに対するグレースフルリスタートヘルパーサポートを設定します。
4.(オプション)ヘルパー ノードで猶予期間を設定します。この構成により、ヘルパーが正常な再起動をサポートする期間が決まります。
DELLSONiC (config-router-ospf)# graceful-restart helper supported-grace-time grace-time |
- grace-time:猶予時間を設定します。範囲は 10 から 1800 秒からです。デフォルト値は 120 秒です。
5.(オプション)ヘルパー ノードで厳密なLSAチェックを構成します。このコマンドが設定されている場合、LSA の変更が発生したときにヘルパーはグレースフル リスタートをキャンセルし、再起動するルータに影響を与えます。デフォルトでは、厳密な LSA チェックが有効になっています。
DELLSONiC (config-router-ospf)# graceful-restart helper strict-lsa-checking |
6.(オプション)計画された再起動のみのヘルパー サポートを構成します。
DELLSONiC (config-router-ospf)# graceful-restart helper planned-only |
OSPFv2グレースフル リスタート情報の表示
グレースフル リスタート ヘルパー情報を表示するには、次のコマンドを使用します。
グレースフル リスタートや不透明な機能が有効になっているかどうかなど、一般的なOSPF情報を表示します。
sonic# show ip ospf
VRF Name: default
OSPF Routing Process, Router ID: 1.1.1.2
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is enabled
Graceful-Restart is enabled
Stub router advertisement is configured
Enabled for 600s after start-up
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm last executed 19h39m37s ago
Last SPF duration 72320 usecs
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 0 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Maximum multiple paths(ECMP) supported 256
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 1
Area ID: 0.0.0.0 (Backbone)
Number of interfaces in this area: Total: 224 , Active: 224
Number of fully adjacent neighbors in this area: 32
Area has simple password authentication
SPF algorithm executed 247 times
Number of LSA 6068
Number of router LSA 6. Checksum Sum 0x00020692
Number of network LSA 62. Checksum Sum 0x001ab353
Number of summary LSA 6000. Checksum Sum 0x0bc36229
Number of ASBR summary LSA 0. Checksum Sum 0x00000000
Number of NSSA LSA 0. Checksum Sum 0x00000000
Number of opaque link LSA 0. Checksum Sum 0x00000000
Number of opaque area LSA 0. Checksum Sum 0x00000000 |
OSPFネイバー情報とグレースフル リスタート ヘルパーの詳細を表示します。
sonic# show ip ospf neighbor detail
Neighbor 13.13.13.13, interface address 192.168.10.1
In the area 0.0.0.0 via interface Ethernet64
Neighbor priority is 1, State is Full, 6 state changes
Most recent state change statistics:
Progressive change 17h32m19s ago
DR is 192.168.10.1, BDR is 192.168.10.2
Options 66 *|O|-|-|-|-|E|-
Dead timer due in 0.717s
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Thread Inactivity Timer on
Thread Database Description Retransmision off
Thread Link State Request Retransmission on
Thread Link State Update Retransmission on
Graceful restart Helper info:
Graceful Restart HELPER Status: Inprogress
Graceful Restart grace period time: 250 (seconds).
Graceful Restart reason: Software restart |
OSPF グレースフル リスタート ヘルパー情報を表示します。
sonic# show ip ospf graceful-restart helper
VRF Name: default
OSPF Router with ID (14.14.14.14)
Graceful restart helper support enabled.
Strict LSA check is enabled.
Helper supported for planned restarts only.
Supported Graceful restart interval: 1600(in seconds).
Enable Router List:
['13.13.13.13'] |
OSPFのグレースフル リスタート ヘルパーの詳細情報を表示します。
sonic# show ip ospf graceful-restart helper detail
VRF Name: default
OSPF Router with ID (14.14.14.14)
Graceful restart helper support enabled.
Strict LSA check is enabled.
Helper supported for planned restarts only.
Supported Graceful restart interval: 1600(in seconds).
Enable Router List:
['13.13.13.13']
Number of Active neighbours in graceful restart: 4
Neighbour 1:
Address: 192.168.10.1
Routerid: 13.13.13.13
Received Grace period: 250(in seconds).
Actual Grace period: 250(in seconds).
Remaining GraceTime: 245(in seconds).
Graceful Restart reason: Software restart.
Neighbour 2:
Address: 192.168.20.1
Routerid: 13.13.13.13
Received Grace period: 250(in seconds).
Actual Grace period: 250(in seconds).
Remaining GraceTime: 245(in seconds).
Graceful Restart reason: Software restart.
Neighbour 3:
Address: 192.168.30.1
Routerid: 13.13.13.13
Received Grace period: 250(in seconds).
Actual Grace period: 250(in seconds).
Remaining GraceTime: 245(in seconds).
Graceful Restart reason: Software restart.
Neighbour 4:
Address: 192.168.40.1
Routerid: 13.13.13.13
Received Grace period: 250(in seconds).
Actual Grace period: 250(in seconds).
Remaining GraceTime: 245(in seconds).
Graceful Restart reason: Software restart. |