Lesson Contents
This packet capture contains a single OSPFv3 Hello packet protected by the OSPFv3 Authentication Trailer (RFC 7166). The original OSPFv3 specification had no authentication of its own and relied on IPsec AH or ESP. The Authentication Trailer brings back OSPFv2-style HMAC authentication: a key ID, a sequence number and a hash appended after the OSPF packet. No IPsec security associations needed.
You can see three things in this packet: the AT bit in the options that announces the trailer, the trailer itself, and how the IPv6 payload length gives away that there’s more data than the OSPF packet length says. The OSPFv3 authentication and encryption lesson covers the IPsec method for comparison. More captures are in the Packet Capture Library.
Want to open this capture in Wireshark yourself? The pcap file is free with a NetworkLessons account. Your free account also unlocks all our free lessons and every capture in the Packet Capture Library.
Create a free account to download the pcap
Already have an account? Log in and the download button appears here.
Capture overview
| File | ospfv3-authentication-trailer-hello.pcapng |
| Packets | 1 |
| Protocol | OSPFv3 (RFC 5340) with Authentication Trailer (RFC 7166), HMAC-SHA-1 |
| Transport | IPv6, next header 89, from link-local to ff02::5 (AllSPFRouters), hop limit 1 |
| Devices | Cisco IOS router with router ID 1.1.1.1, area 0, neighbor 2.2.2.2 |
| Wireshark filter | ospf.v3.options.at == 1 or ospf |
Packet walkthrough
Internet Protocol Version 6, Src: fe80::f816:3eff:fe6d:82a3, Dst: ff02::5
0110 .... = Version: 6
Payload Length: 76
Next Header: OSPF IGP (89)
Hop Limit: 1
Open Shortest Path First
OSPF Header
Version: 3
Message Type: Hello Packet (1)
Packet Length: 40
Source OSPF Router: 1.1.1.1
Area ID: 0.0.0.0 (Backbone)
Checksum: 0x0000 (None)
Instance ID: Base IPv6 Unicast AF (0)
Reserved: 00
OSPF Hello Packet
Interface ID: 3
Router Priority: 1
Options: 0x000413, AT, R, E, V6
.... .... .... .1.. .... .... = AT: Set
.... .... .... ..0. .... .... = L: Not set
.... .... .... ...0 .... .... = AF: Not set
.... .... .... .... ..0. .... = DC: Not set
.... .... .... .... ...1 .... = R: Set
.... .... .... .... .... 0... = N: Not set
.... .... .... .... .... .0.. = MC: Not set
.... .... .... .... .... ..1. = E: Set
.... .... .... .... .... ...1 = V6: Set
Hello Interval [sec]: 10
Router Dead Interval [sec]: 40
Designated Router: 2.2.2.2
Backup Designated Router: 1.1.1.1
Active Neighbor: 2.2.2.2
OSPF Authentication Trailer
Authentication Type: HMAC Cryptographic Authentication (1)
Authentication Data Length: 36
Reserved: 0x0000
Security Association Identifier (SA ID): 0x0001
Cryptographic Sequence Number: 6799965765475762176
Authentication Data: 819ab4e22bc66c044af832cf8bb887051a1ccaf9
How the trailer is announced
- AT bit set in the options: the AT (Authentication Trailer) bit tells the neighbor that a trailer follows the OSPFv3 packet. RFC 7166 requires it in Hellos and Database Description packets. A router that expects authentication drops Hellos without the AT bit and a valid trailer. A router without authentication ignores the trailer, but it drops the packet anyway because the OSPFv3 checksum is 0. Either way, the adjacency doesn’t come up.
- Packet Length 40 vs. Payload Length 76: the OSPF packet length covers only the Hello itself (40 bytes). The IPv6 payload is 76 bytes, so 36 bytes follow the OSPF packet. Those 36 bytes are the trailer. The trailer sits outside the OSPF packet length, just like the authentication data in OSPFv2 with cryptographic authentication.
- Checksum 0x0000: with the Authentication Trailer, RFC 7166 skips the OSPFv3 checksum and sets it to 0. Integrity comes from the HMAC in the trailer instead.
- ff02::5, hop limit 1, link-local source: normal OSPFv3 Hello addressing. The trailer doesn’t change anything at the IPv6 layer. That’s the big difference with IPsec, which adds an AH or ESP header between IPv6 and OSPF.
The Authentication Trailer
- Authentication Type 1: HMAC cryptographic authentication. It’s the only type RFC 7166 defines.
- Authentication Data Length 36: a 16-byte trailer header plus 20 bytes of authentication data. A 20-byte digest means HMAC-SHA-1. HMAC-SHA-256 would give 32 bytes and a length of 48.
- Security Association ID 1: identifies which key the sender used, comparable to the key ID in OSPFv2. On Cisco, it’s the key number in the key chain. This is what makes hitless key rollover possible: routers can accept several key IDs during a change.
- Cryptographic Sequence Number: a 64-bit counter that only goes up. A receiver drops any packet whose sequence number is not higher than the last one it accepted from that neighbor for the same packet type, so an attacker can’t record an old Hello and replay it later.
- Authentication Data: the HMAC-SHA-1 digest over the OSPFv3 packet, the trailer header and the IPv6 source address. Including the source address prevents an attacker from replaying the packet from another address. The shared key itself is never sent.
Trailer vs. IPsec
With IPsec, every OSPFv3 packet gets an AH or ESP header, and you configure SPIs and keys per interface or area. The Authentication Trailer works like OSPFv2 MD5/SHA authentication: a key chain, a key ID and a hash at the end of the packet. It only authenticates and doesn’t encrypt, so the Hello fields are still readable, as you can see above. If you need encryption, you still need ESP.