RFC 7949

OSPFv3 over IPv4 for IPv6 Transition

πŸ“… published August 2016, from ietf

RFC 7949: OSPFv3 over IPv4 for IPv6 Transition πŸ¦‹

Okay bestie, here's the deets πŸ’… This is RFC 7949, titled OSPFv3 over IPv4 for IPv6 Transition. It's from the IETF (Internet Engineering Task Force) and was written by I. Chen (Ericsson), A. Lindem (Cisco), and R. Atkinson (Consultant). It's on the Internet Standards Track, ISSN 2070-1721, dated August 2016, and it updates RFC 5838 πŸŽ€

Abstract ✨

So basically, this doc defines a way to use IPv4 to carry OSPFv3 packets πŸš€ Running OSPFv3 over IPv4 with the existing OSPFv3 Address Family extension can make the glow-up from an OSPFv2 IPv4-only routing domain to an OSPFv3 dual-stack one way smoother 🌈 It also updates RFC 5838 so virtual links work in the IPv4 unicast address family when you're running OSPFv3 over IPv4. Iconic πŸ‘‘

Status of This Memo πŸ“‹

This is an Internet Standards Track document πŸ’œ It's a product of the IETF and represents the consensus of the IETF community. It got public review and was approved for publication by the IESG (Internet Engineering Steering Group). If you want more on Internet Standards, check Section 2 of RFC 7841 🫢

For info on the current status, any errata, and how to send feedback, go to http://www.rfc-editor.org/info/rfc7949 πŸ”—

Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved πŸ’–

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stand on the publication date. Please read these carefully, because they spell out your rights and restrictions for this document πŸ“œ Code Components pulled out of this doc must include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as the Simplified BSD License describes 🧚


Table of Contents πŸ—‚οΈ

   1. Introduction ....................................................2
      1.1. IPv4-Only Use Case .........................................3
   2. Requirements Language ...........................................4
   3. Encapsulation in IPv4 ...........................................4
      3.1. Source Address .............................................6
      3.2. Destination Address ........................................6
      3.3. OSPFv3 Header Checksum .....................................6
      3.4. Operation over Virtual Links ...............................7
   4. Management Considerations .......................................7
      4.1. Coexistence with OSPFv2 ....................................7
   5. Security Considerations .........................................8
   6. References ......................................................8
      6.1. Normative References .......................................8
      6.2. Informative References .....................................9
   Acknowledgments ...................................................10
   Authors' Addresses ................................................11

1. Introduction ✨

Okay so, you can run OSPFv3 [RFC5340] over IPv4 [RFC791] using the existing OSPFv3 address family extension, and it can seriously simplify the move from an IPv4-only routing domain to an IPv6 [RFC2460] or dual-stack one πŸ¦‹ Dual-stack routing protocols like the Border Gateway Protocol [RFC4271] have an edge during the transition, because both the IPv4 and IPv6 address families can be advertised over either IPv4 or IPv6 transport 🌈 Some IPv4-specific and IPv6-specific routing protocols have packet formats and signaling that are so similar that it's trivial to deploy an initial IPv6 routing domain by carrying the routing protocol over IPv4. That lets you deploy and test IPv6 routing domains before you retire IPv4 and move to an IPv6-only network πŸ’…

Now for the Open Shortest Path First (OSPF) interior gateway routing protocol (IGP) πŸ’œ OSPFv2 [RFC2328] is the IGP deployed over IPv4, and OSPFv3 [RFC5340] is the IGP deployed over IPv6. OSPFv3 also supports multiple address families [RFC5838], including both the IPv6 unicast and IPv4 unicast address families πŸŽ€ So, it's possible to deploy OSPFv3 over IPv4 with zero changes to either OSPFv3 or IPv4. Main character energy πŸ‘‘ During the IPv6 transition, future OSPF extensions can focus on OSPFv3, and OSPFv2 can move into maintenance mode 🫢

This doc specifies how to use IPv4 to carry OSPFv3 packets πŸš€ The trick is that OSPFv2 and OSPFv3 share the same IP protocol number, which is 89 πŸ”₯ Also, the OSPF packet header for both OSPFv2 and OSPFv3 has the OSPF header version field (the bit that tells an OSPFv2 packet apart from an OSPFv3 packet) in the same spot, meaning the same offset from the start of the header 🧚

If the IPv4 and IPv6 topologies aren't identical, the most likely reason is that some parts of the network haven't been upgraded to support both IPv4 and IPv6 yet πŸ™ˆ If the IPv4 deployment is a superset of the IPv6 deployment, OSPFv3 packets are expected to be carried over IPv4 until the rest of the network gets upgraded to support IPv6 alongside IPv4. If the IPv6 deployment is a superset of the IPv4 deployment, OSPFv3 is expected to be carried over IPv6 🌸

Quick terminology check πŸ“ Throughout this doc, "OSPF" is used when the text applies to both OSPFv2 and OSPFv3. "OSPFv2" or "OSPFv3" shows up when the text is specific to one version. Same vibe with "IP," which covers either version of the Internet Protocol, and "IPv4" or "IPv6," which are used when the text only applies to one version πŸ’–

1.1. IPv4-Only Use Case 🌍

OSPFv3 only needs IPv6 link-local addresses to form adjacencies. It doesn't need IPv6 global-scope addresses to set up an IPv6 routing domain πŸ’… BUT, IPv6 over Ethernet [RFC2464] uses a different EtherType (0x86dd) from IPv4 (0x0800) and from the Address Resolution Protocol (ARP) (0x0806) [RFC826] that's used with IPv4 😭

Some deployed link-layer equipment only supports IPv4 and ARP πŸ’€ That equipment has hardware filters keyed on the EtherType field of the Ethernet frame, and those filters decide which frames the link-layer gear accepts. Since IPv6 uses a different EtherType, IPv6 framing for OSPFv3 just won't work with that equipment πŸ™…β€β™€οΈ In other cases, Point-to-Point Protocol (PPP) might run over a serial interface, but again, only IPv4 over PPP might be supported on that interface. It's hoped that equipment with these limits will eventually get upgraded or replaced 🩷

Now, in some locations, especially ones with less communications infrastructure, satellite communications (SATCOM) are used to cut deployment costs for data networking πŸ›°οΈ SATCOM is often cheaper to deploy than running new copper or optical cables over long distances to reach remote areas. And in a wide range of places, including ones with great communications infrastructure, Very Small Aperture Terminals (VSATs) are often used by banks and retailers to connect their branches and stores to a central location 🏦

Some widely deployed VSAT equipment has either (A) Ethernet interfaces that only support the Ethernet Address Resolution Protocol (ARP) and IPv4, or (B) serial interfaces that only support IPv4 and PPP packets πŸ“‘ Those deployments and that equipment can still deploy and use OSPFv3 over IPv4 today, then migrate to OSPFv3 over IPv6 later once the equipment is upgraded or replaced ✨ This can come with lower operational costs than running OSPFv2 and then attempting a flag-day switch to OSPFv3 πŸŽ€ By running OSPFv3 over IPv4 now, the eventual move to dual-stack and then to IPv6-only can be orchestrated πŸ‘‘

2. Requirements Language 🎯

Here's the requirements vibe: the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] 🫢

3. Encapsulation in IPv4 πŸ“¦

So an OSPFv3 packet can be directly encapsulated inside an IPv4 packet as the payload, without an IPv6 packet header, as shown in Figure 1 🧚 For OSPFv3 transported over IPv4, the IPv4 packet has an IPv4 protocol type of 89, which tells you the payload is an OSPF packet. The payload of the IPv4 packet is an OSPFv3 packet, starting with the OSPF packet header, and its OSPF version field is set to 3 πŸ’œ

An OSPFv3 packet followed by an OSPF link-local signaling (LLS) extension data block [RFC5613], encapsulated in an IPv4 packet, is shown in Figure 2 🌈

Here's the size tea β˜• An IPv4 header without options is only 20 octets long, and it's shorter than an IPv6 header. So an OSPFv3 packet wrapped in a 20-octet IPv4 header is shorter than an OSPFv3 packet wrapped in an IPv6 header πŸ™Œ That means the link MTU for IPv6 is enough to carry an OSPFv3 packet in a 20-octet IPv4 header πŸ’– If the link MTU isn't enough to carry an OSPFv3 packet in IPv4, then OSPFv3 can rely on IP fragmentation and reassembly [RFC791] πŸ› οΈ

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
|   4   |  IHL  |Type of Service|          Total Length         |  ^
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
|         Identification        |Flags|      Fragment Offset    |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
|  Time to Live | Protocol (89) |         Header Checksum       | IPv4
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Header
|                       Source Address                          |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
|                    Destination Address                        |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
|                    Options                    |    Padding    |  v
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
|       3       |     Type      |         Packet length         |  ^
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
|                         Router ID                             | OSPFv3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Header
|                          Area ID                              |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
|          Checksum             |  Instance ID  |      0        |  v
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
|                        OSPFv3 Body ...                        |

3. Encapsulation in IPv4 πŸŽ€

           Note: "IHL" stands for Internet Header Length.

       Figure 1: An IPv4 Packet Encapsulating an OSPFv3 Packet

                      +---------------+
                      | IPv4 Header   |
                      +---------------+
                      | OSPFv3 Header |
                      |...............|
                      |               |
                      | OSPFv3 Body   |
                      |               |
                      +---------------+
                      |               |
                      | LLS Data      |
                      |               |
                      +---------------+

     Figure 2: The IPv4 Packet Encapsulating an OSPFv3 Packet with
            a Trailing OSPF Link-Local Signaling Data Block

3.1. Source Address πŸ’–

Okay so, for OSPFv3 over IPv4, the source address is the primary IPv4 address for the interface the packet goes out on ✨ All the OSPFv3 routers on the link should share the same IPv4 subnet so IPv4 transport actually works πŸŽ€

While OSPFv2 operates on a subnet, OSPFv3 operates on a link πŸ¦‹ [RFC5340]. So an OSPFv3 router implementation MAY support adjacencies with OSPFv3 neighbors on different IPv4 subnets πŸ’… If it does, the IPv4 data plane MUST resolve IPv4 addresses to Layer 2 addresses using ARP on multi-access networks, and point-to-point over LAN [RFC5309] for direct next hops on different IPv4 subnets. Ngl that's a lot of MUST 😭

When OSPFv3 adjacencies on different IPv4 subnets are supported, Bidirectional Forwarding Detection (BFD) [RFC5881] cannot be used for adjacency loss detection, since BFD is restricted to a single subnet πŸ™ˆ

3.2. Destination Address πŸ¦‹

As defined in OSPFv2, the IPv4 destination address of an OSPF protocol packet is either an IPv4 multicast address or the IPv4 unicast address of an OSPFv2 neighbor. Two well-known link-local multicast addresses are assigned to OSPFv2: the AllSPFRouters address (224.0.0.5) and the AllDRouters address (224.0.0.6). The multicast address used depends on the OSPF packet type, the OSPF interface type, and the OSPF router's role on multi-access networks ✨

So, for an OSPFv3-over-IPv4 packet to be sent to AllSPFRouters, the destination address field in the IPv4 packet MUST be 224.0.0.5. For an OSPFv3-over-IPv4 packet to be sent to AllDRouters, the destination address field in the IPv4 packet MUST be 224.0.0.6 πŸ’…

When an OSPF router sends a unicast OSPF packet over a connected interface, the destination of that IP packet is the address assigned to the receiving interface. Thus, a unicast OSPFv3 packet transported in an IPv4 packet would specify the OSPFv3 neighbor's IPv4 address as the destination address 🌸

3.3. OSPFv3 Header Checksum 🧚

For IPv4 transport, the pseudo-header used in the checksum calculation contains the IPv4 source and destination addresses, the OSPFv3 protocol ID, and the OSPFv3 length from the OSPFv3 header (Appendix A.3.1 of [RFC5340]). It's giving UDP pseudo-header vibes, as described in [RFC768], and it's illustrated in Figure 3 🌈

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Source Address                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Destination Address                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     0         | Protocol (89) |     OSPFv3 Packet Length      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Figure 3: Pseudo-header for OSPFv3 over IPv4

When an OSPF router sends an OSPF packet over a virtual link, the receiving router might not be directly connected to the sending router πŸ™ˆ So the destination IP address of the IP packet must be a reachable unicast IP address for the virtual link endpoint. Because IPv6 is the presumed Internet protocol and an IPv4 destination is not routable, the OSPFv3 address family extension [RFC5838] specifies that only virtual links in the IPv6 address family are supported.

As illustrated in Figure 1, this document specifies OSPFv3 transport over IPv4. As a result, OSPFv3 virtual links can be supported with IPv4 address families by simply setting the IPv4 destination address to a reachable IPv4 unicast address for the virtual link endpoint πŸ¦‹ So the restriction in Section 2.8 of RFC 5838 [RFC5838] is relaxed, since virtual links can now be supported for IPv4 address families as long as the transport is also IPv4. If IPv4 transport, as specified herein, is used for IPv6 address families, virtual links cannot be supported. Hence, in OSPF routing domains that require virtual links, the IP transport MUST match the address family (IPv4 or IPv6) πŸ’…


4. Management Considerations 🌸

4.1. Coexistence with OSPFv2 🫢

Since OSPFv2 [RFC2328] and OSPFv3 over IPv4, as described herein, use exactly the same protocol and IPv4 addresses, OSPFv2 packets may be delivered to the OSPFv3 process and vice versa 😭 When this happens, the mismatched protocol packets will be dropped due to validation of the version in the first octet of the OSPFv2/OSPFv3 protocol header. Note that this will not prevent the packets from being delivered to the correct protocol process, as standard socket implementations will deliver a copy to each socket matching the selectors ✨

Implementations of OSPFv3 over IPv4 transport SHOULD implement separate counters for a protocol mismatch, and SHOULD provide means to suppress the ospfIfRxBadPacket and ospfVirtIfRxBadPacket SNMP notifications, as described in [RFC4750]. They should also suppress the ospfv3IfRxBadPacket and ospv3VirtIfRxBadPacket SNMP notifications, as described in [RFC5643], when an OSPFv2 packet is received by the OSPFv3 process or vice versa πŸŽ€


5. Security Considerations πŸ”₯

OSPFv3 [RFC5340] relies on IPsec [RFC4301] for authentication and confidentiality. "Authentication/Confidentiality in OSPFv3" [RFC4552] specifies how IPsec is used with OSPFv3 over IPv6 transport. To use OSPFv3 with IPv4 transport as specified herein, further work such as "Authentication/Confidentiality in OSPFv2" [IPsec-OSPF] would be required πŸ’€

An optional OSPFv3 Authentication Trailer [RFC7166] has also been defined as an alternative to using IPsec. The calculation of the authentication data in the Authentication Trailer includes the source IPv6 address, to protect an OSPFv3 router from man-in-the-middle attacks πŸ” For IPv4 encapsulation as described herein, the IPv4 source address should be placed in the first 4 octets of Apad, followed by the hexadecimal value 0x878FE1F3 repeated (L-4)/4 times, where L is the length of the hash measured in octets. Bestie, this part is serious 😭

The processing of the optional Authentication Trailer is contained entirely within the OSPFv3 protocol. In other words, each OSPFv3 router instance is responsible for the authentication, without involvement from IPsec or any other IP-layer function. Consequently, except for calculation of the Apad value, transporting OSPFv3 packets using IPv4 does not change the generation or validation of the optional OSPFv3 Authentication Trailer 🧚


6. References ✨

6.1. Normative References πŸ“š

6.2. Informative References 🌈

Acknowledgments ✨

okay so the authors wanted to give some major shoutouts 🫢 first, Alexander Okonnikov gave a super thorough review with really valuable feedback, bestie, iconic πŸ‘‘. then Suresh Krishnan pointed out that the pseudo-header used in the OSPFv3 packet checksum calculation needed a clear specification, and honestly that's such a sharp catch πŸ”₯. last but not least, Wenhu Lu acted as document shepherd, which is basically the person who keeps the whole process moving πŸ’…. the authors are so grateful, no cap 🌸

Authors' Addresses πŸ¦‹

Ing-Wher Chen πŸ’– Ericsson Email: ichen@kuatrotech.com


Acee Lindem πŸŽ€ Cisco Email: acee@cisco.com


RJ Atkinson 🧚 Consultant Email: rja.lists@gmail.com

πŸ“¦ where this page comes from