BFD (bfd)
- レイヤ: アプリケーション・制御
- ヘッダ: 可変長
- 補足: LDP / RSVP-TE / BFD (P2)
下位レイヤからの到達
| 下位レイヤ | 判別フィールド | 値 |
|---|---|---|
udp | dst_port / src_port | 3784 (0x0ec8) |
udp | dst_port / src_port | 4784 (0x12b0) |
udp | dst_port / src_port | 6784 (0x1a80) |
フィールド
| フィールド | 型 | 既定値 | Auto | 説明 |
|---|---|---|---|---|
version | uint(3) | 1 | BFD バージョン(1)。 | |
diag | enum(5) | 0 (no_diagnostic) | 診断コード: ローカルセッションが最後に状態を変えた理由。 | |
state | enum(2) | 1 (down) | セッション状態: 0 AdminDown、1 Down、2 Init、3 Up。 | |
p | uint(1) | 0 | P ビット: Poll(パラメータ変更。相手は F で応答)。 | |
f | uint(1) | 0 | F ビット: Final(Poll への応答)。 | |
c | uint(1) | 0 | C ビット: コントロールプレーン非依存。 | |
a | uint(1) | authentication の要素数 | A ビット: 認証あり(Auto: 認証セクションがあれば 1)。 | |
d | uint(1) | 0 | D ビット: デマンドモード。 | |
m | uint(1) | 0 | M ビット: マルチポイント(0)。 | |
detect_mult | uint(8) | 3 | 検出時間の乗数。 | |
length | uint(8) | ヘッダの長さ (オクテット単位) | 認証セクションを含む制御パケットのオクテット長(Auto)。 | |
my_discriminator | uint(32) | 1 | My Discriminator: 送信側でセッションを一意に表す 0 以外の値。 | |
your_discriminator | uint(32) | 0 | Your Discriminator: 相手の Discriminator(不明な間は 0)。 | |
desired_min_tx_interval | uint(32) | 1000000 | 希望する最小送信間隔(マイクロ秒)。 | |
required_min_rx_interval | uint(32) | 1000000 | 要求する最小受信間隔(マイクロ秒)。 | |
required_min_echo_rx_interval | uint(32) | 0 | 要求する最小エコー受信間隔(マイクロ秒、0 = エコーなし)。 | |
authentication | tlv — length - 24 オクテット | 認証セクション(8 ビット型、ヘッダを含む 8 ビット長): 簡易パスワード、Keyed MD5 / SHA1 とその Meticulous 版。ダイジェスト / ハッシュは手動。 |
diag
| 値 | 名前 |
|---|---|
| 0 | no_diagnostic |
| 1 | control_detection_time_expired |
| 2 | echo_function_failed |
| 3 | neighbor_signaled_session_down |
| 4 | forwarding_plane_reset |
| 5 | path_down |
| 6 | concatenated_path_down |
| 7 | administratively_down |
| 8 | reverse_concatenated_path_down |
| 9 | mis_connectivity_defect |
state
| 値 | 名前 |
|---|---|
| 0 | admin_down |
| 1 | down |
| 2 | init |
| 3 | up |
authentication
- タイプ 8 ビット、長さ 8 ビット。
- 長さはタイプと長さのフィールドも含みます。
- 未知のタイプは値をオクテット列のまま保持します。
| タイプ値 | 名前 | 値のフィールド | 説明 |
|---|---|---|---|
| 1 (0x01) | simple_password | key_id, password | |
| 2 (0x02) | keyed_md5 | key_id, reserved, sequence_number, digest | |
| 3 (0x03) | meticulous_keyed_md5 | key_id, reserved, sequence_number, digest | |
| 4 (0x04) | keyed_sha1 | key_id, reserved, sequence_number, hash | |
| 5 (0x05) | meticulous_keyed_sha1 | key_id, reserved, sequence_number, hash |
authentication › simple_password
| フィールド | 型 | 既定値 | Auto | 説明 |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
password | bytes — PDU の残りすべて |
authentication › keyed_md5
| フィールド | 型 | 既定値 | Auto | 説明 |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
digest | bytes(16) |
authentication › meticulous_keyed_md5
| フィールド | 型 | 既定値 | Auto | 説明 |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
digest | bytes(16) |
authentication › keyed_sha1
| フィールド | 型 | 既定値 | Auto | 説明 |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
hash | bytes(20) |
authentication › meticulous_keyed_sha1
| フィールド | 型 | 既定値 | Auto | 説明 |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
hash | bytes(20) |
制約
| レベル | 規則 |
|---|---|
| 警告 | version が 1 |
| 警告 | detect_mult が 0 以外 |
| 警告 | my_discriminator が 0 以外 |
| エラー | ヘッダが 24 オクテット以上 |
サンプルテンプレート
- interop-bfd-session-up —
templates/interop/bfd-session-up.wpg.yaml - bfd-auth —
templates/protocols/oam/bfd-auth.wpg.yaml - bfd-multihop-ipv6 —
templates/protocols/oam/bfd-multihop-ipv6.wpg.yaml - bfd-single-hop —
templates/protocols/oam/bfd-single-hop.wpg.yaml - micro-bfd —
templates/protocols/oam/micro-bfd.wpg.yaml