BFD (bfd)
- Layer: Application and control
- Header: variable length
- Notes: LDP / RSVP-TE / BFD (P2)
Reached from
| Lower layer | Selector | Value |
|---|---|---|
udp | dst_port / src_port | 3784 (0x0ec8) |
udp | dst_port / src_port | 4784 (0x12b0) |
udp | dst_port / src_port | 6784 (0x1a80) |
Fields
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
version | uint(3) | 1 | BFD version (1). | |
diag | enum(5) | 0 (no_diagnostic) | Diagnostic code: the reason of the last state change of the local session. | |
state | enum(2) | 1 (down) | Session state: 0 AdminDown, 1 Down, 2 Init, 3 Up. | |
p | uint(1) | 0 | P bit: Poll (a parameter change, the peer answers with F). | |
f | uint(1) | 0 | F bit: Final (answer to a Poll). | |
c | uint(1) | 0 | C bit: Control Plane Independent. | |
a | uint(1) | Number of items of authentication | A bit: authentication present (Auto: set when there is an authentication section). | |
d | uint(1) | 0 | D bit: Demand mode. | |
m | uint(1) | 0 | M bit: Multipoint (0). | |
detect_mult | uint(8) | 3 | Detect time multiplier. | |
length | uint(8) | Length of the header in octets | Length of the control packet in octets, including the authentication section (Auto). | |
my_discriminator | uint(32) | 1 | My discriminator: a non-zero value unique to the session on the sender. | |
your_discriminator | uint(32) | 0 | Your discriminator: the peer’s discriminator (0 while unknown). | |
desired_min_tx_interval | uint(32) | 1000000 | Desired minimum TX interval in microseconds. | |
required_min_rx_interval | uint(32) | 1000000 | Required minimum RX interval in microseconds. | |
required_min_echo_rx_interval | uint(32) | 0 | Required minimum echo RX interval in microseconds (0 = no echo). | |
authentication | tlv — length - 24 octets | Authentication section (8-bit type, 8-bit length including the header): simple password, keyed MD5 / SHA1 and their meticulous variants. The digest / hash is Manual. |
diag
| Value | Name |
|---|---|
| 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
| Value | Name |
|---|---|
| 0 | admin_down |
| 1 | down |
| 2 | init |
| 3 | up |
authentication
- Type 8 bits, length 8 bits.
- The length counts the type and length fields too.
- Unknown types are kept as raw value octets.
| Type | Name | Value fields | Description |
|---|---|---|---|
| 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
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
password | bytes — rest of the PDU |
authentication › keyed_md5
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
digest | bytes(16) |
authentication › meticulous_keyed_md5
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
digest | bytes(16) |
authentication › keyed_sha1
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
hash | bytes(20) |
authentication › meticulous_keyed_sha1
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
key_id | uint(8) | 1 | ||
reserved | uint(8) | 0 | ||
sequence_number | uint(32) | |||
hash | bytes(20) |
Constraints
| Level | Rule |
|---|---|
| warning | version = 1 |
| warning | detect_mult ≠ 0 |
| warning | my_discriminator ≠ 0 |
| error | header at least 24 octets |
Sample templates
- 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