OSPFv2 (ospfv2)
- Layer: L3 (network)
- Header: 24 octets (fixed)
- Notes: Routing protocols
Reached from
| Lower layer | Selector | Value |
|---|---|---|
ipv4 | protocol | 89 (0x59) |
Fields
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
version | uint(8) | 2 | OSPF version (2 = OSPFv2, 3 = OSPFv3). | |
type | enum(8) | 1 (hello) | Protocol number of the next layer (see Next layer) | OSPF packet type (Hello / DB Description / LS Request / LS Update / LS Ack; Auto from the next layer). |
packet_length | uint(16) | Length of the header and payload in octets | Length of the OSPF packet including the header, in octets (Auto). | |
router_id | ipv4 | 192.0.2.1 | Router ID of the sending router. | |
area_id | ipv4 | 0.0.0.0 | Area the packet belongs to (0.0.0.0 = backbone). | |
checksum | uint(16) | Internet checksum over the header and everything after it; authentication counted as zero | Internet checksum over the OSPF packet without the authentication field (Auto). | |
au_type | enum(16) | 0 (null) | Authentication type (0 = null, 1 = simple password, 2 = cryptographic). | |
authentication | bytes(8) | 00 00 00 00 00 00 00 00 | 64-bit authentication field (password, or key id / sequence for cryptographic auth). |
type
| Value | Name |
|---|---|
| 1 (0x01) | hello |
| 2 (0x02) | db_description |
| 3 (0x03) | ls_request |
| 4 (0x04) | ls_update |
| 5 (0x05) | ls_ack |
au_type
| Value | Name |
|---|---|
| 0 (0x0000) | null |
| 1 (0x0001) | simple_password |
| 2 (0x0002) | cryptographic |
Next layer
The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.
| Value | Protocol | Note |
|---|---|---|
| 1 (0x01) | ospfv2_hello | |
| 2 (0x02) | ospfv2_dbd | |
| 3 (0x03) | ospfv2_lsr | |
| 4 (0x04) | ospfv2_lsu | |
| 5 (0x05) | ospfv2_lsack |
Constraints
| Level | Rule |
|---|---|
| warning | version = 2 |
Sample templates
- interop-ospfv2-hello-2way —
templates/interop/ospfv2-hello-2way.wpg.yaml - ospfv2-dbd —
templates/protocols/routing/ospfv2-dbd.wpg.yaml - ospfv2-hello —
templates/protocols/routing/ospfv2-hello.wpg.yaml - ospfv2-lsack —
templates/protocols/routing/ospfv2-lsack.wpg.yaml - ospfv2-lsr —
templates/protocols/routing/ospfv2-lsr.wpg.yaml - ospfv2-lsu-ext-link-sr —
templates/protocols/routing/ospfv2-lsu-ext-link-sr.wpg.yaml - ospfv2-lsu-ext-prefix-sr —
templates/protocols/routing/ospfv2-lsu-ext-prefix-sr.wpg.yaml - ospfv2-lsu-external-lsa —
templates/protocols/routing/ospfv2-lsu-external.wpg.yaml - ospfv2-lsu-network-lsa —
templates/protocols/routing/ospfv2-lsu-network.wpg.yaml - ospfv2-lsu-ri-sr —
templates/protocols/routing/ospfv2-lsu-ri-sr.wpg.yaml - ospfv2-lsu-router-lsa —
templates/protocols/routing/ospfv2-lsu-router.wpg.yaml - ospfv2-lsu-summary-lsa —
templates/protocols/routing/ospfv2-lsu-summary.wpg.yaml - ospfv2-lsu-te-lsa —
templates/protocols/routing/ospfv2-lsu-te-lsa.wpg.yaml