Open Shortest Path First for IPv6

| Main Article
| Discussion
| Related Articles  [?]
| Bibliography  [?]
| External Links  [?]
| Citable Version  [?]

|
|
|
|
|
|
|
|

This editable Main Article is under development and subject to a disclaimer.

[edit intro]

## Contents

* 1 Terminology changes
* 1.1 Generalizing identifiers
* 1.2 Generalizing links
* 2 OSPF packets
* 2.1 Packet header
* 2.2 Packet type
* 2.2.1 Hello packet
* 2.2.2 Database description
* 2.2.3 Link state request
* 2.2.4 Link state update
* 2.2.5 Link state acknowledgement
* 3 Link state advertisements
* 3.1 LSA header
* 3.2 IP prefix representation and options
* 3.3 LSA types
* 4 Deployment
* 4.1 Cisco
* 4.2 Juniper
* 4.3 Nortel
* 4.4 Quagga
* 5 References

A standard IP routing protocol, Open Shortest Path First, has been issued in a major new version,[1] which can handle both Internet Protocol version 4 and Internet Protocol version 6. Familiarity with basic Open Shortest Path First (OSPF) and link state routing terminology is assumed in this article.

OSPF for IPv6 cleaned up a number of problems with OSPFv2, and is overall a better protocol. Nevertheless, although it is extensible to carry IPv4 routing information, as well as traffic engineering extensions for MPLS and Generalized MPLS, known implementations are IPv4 only. This may be a concern that there would be compatibility problems with OSPFv2 only routers.

In some respects, readers will find that OSPF packets are simpler, in that this protocol allows IPv6 headers to do a number of things that previous OSPF did itself, occasionally duplicating IPv4 functionality. The packet headers do not contain source and destination addresses. Another simplification of the header is that OSPF-specific authentication has been removed, since the Authentication Header and Encapsulating Security Payload headers of IPv6 provide a quite adequate authentication function.

It remains true that most OSPF packets consist of a general-purpose header, and, in most packets, a variable number of Link State Advertisements. The most striking difference, however, is that the headers, and most of the LSAs, do not carry addresses, but a more compact identifier -- which also gets around the problem of determining the type of address carried in an LSA. Actual addresses, IPv4 and IPv6, are only carried in Link State Updates.

## Terminology changes[edit]

Due to the need to carry more than one kind of address, some of which will be quite long, terminology often has been generalized. Some data structures also have become less dependent on IPv4 conventions: where OSPFv2 encoded subnet identifications as a 32-bit address and a 32-bit subnet mask, the new version has the prefix, but uses the CIDR convention of an integer for prefix length rather than a mask. Since discontiguous masks have not been used in years, the /length notation is more readable and more general, but also more compact in storage.

### Generalizing identifiers[edit]

There are many places, in all OSPF versions, where fields are 32 bits long. Simply because a field is 32 bits long, and may even be displayed in the format of an IPv4 address, does not mean that the field has to be a valid IPv4 address. Since OSPF for IPv6 continues to retain 32-bit identifiers in many places, even though all its actual addressing is IPv6, getting into the habit of thinking "identifier" rather than "address" will enormously simplify OSPF for IPv6 deployment.

### Generalizing links[edit]

Some places in OSPFv2 used addresses when all that was needed by an identifier. That consumed address space, but could also lead to ambiguities. The need for address uniqueness was one reason that a single "link" could belong to only one OSPF instance.

Previous OSPF flooded information in what it called "networks", which were actually IPv4 subnets. OSPF for v6 floods on links, which may contain multiple subnets; note that from the IP standpoint, virtual local area networks (VLAN) are different links.

## OSPF packets[edit]

There remain five OSPF packet types, with a header, and, in four of the five cases, a variable number of link state advertisements (LSA). This is still true, but the header and LSAs often have been both simplified and generalized.

To review relationships, Hellos are used in interface initialization, learning about the other routers on the common link, and to detect router failures. Database description are means of initializing the topology information.

Link state request, link state update, and link state acknowledgement work together as parts of the same function: efficiently propagating confirmed information about topology changes, both announcement and withdrawal of elements of the topology.

### Packet header[edit]

This is much the same as in earlier versions, but simpler, with such things as addresses and authentication removed because IPv6 adequately performs their functions.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Version #   |     Type      |         Packet length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Router ID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Area ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Checksum             |  Instance ID  |      0        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Instance ID is new; it relaxes the requirement for unique area and router identifiers and allows multiple instances of OSPF to coexist (i.e., multiple independent OSPF routing domains.

### Packet type[edit]

#### Hello packet[edit]

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      3        |       1       |         Packet Length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Router ID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Area ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Checksum             | Instance ID   |     0         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Interface ID                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Rtr Priority  |             Options                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        HelloInterval          |       RouterDeadInterval      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Designated Router ID                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Backup Designated Router ID                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Neighbor ID                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        ...

#### Database description[edit]

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|      3        |       2       |        Packet Length           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|                           Router ID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|                             Area ID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|           Checksum            |  Instance ID  |      0         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|       0       |               Options                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|        Interface MTU          |      0        |0|0|0|0|0|I|M|MS|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|                    DD sequence number                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|                                                                |
+-                                                              -+
|                                                                |
+-                     An LSA Header                            -+
|                                                                |
+-                                                              -+
|                                                                |
+-                                                              -+
|                                                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|                       ...                                      |

#### Link state request[edit]

In the link state request/update procedure, the requesting router has learned that some of its information is outdated, and it wants to get the most recent instance of information about the topologic element.

Each LSA requested is specified by its LS type, Link State ID, and
Advertising Router.  This uniquely identifies the LSA without
specifying its instance.  Link State Request packets are understood
to be requests for the most recent instance of the specified LSAs.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      3        |       3       |        Packet Length          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Router ID                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Area ID                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Checksum             |  Instance ID  |      0        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              0                |        LS Type                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Link State ID                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Advertising Router                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                 ...                           |

#### Link state update[edit]

This is the only type of OSPF packet that now carries complete topology informtion information, although the common information here is not address-dependent. The address-dependent information is in an LSA.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      3        |       4       |         Packet Length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Router ID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Area ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Checksum             |  Instance ID  |      0        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           # LSAs                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+-                                                            +-+
|                            LSAs                               |
+-                                                            +-+
|                             ...                               |

#### Link state acknowledgement[edit]

## Link state advertisements[edit]

New LSAs are more general. While they now can carry IPv4 or IPv6 information, there is no reason they cannot handle additional types of addresses.

### LSA header[edit]

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           LS Age              |           LS Type             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Link State ID                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Advertising Router                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    LS Sequence Number                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        LS Checksum            |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

### IP prefix representation and options[edit]

Within OSPF, IPv6 address prefixes are always represented by a combination of three fields

1. PrefixLength
2. PrefixOptions
3. Address Prefix. Address Prefix is not identical to the 128-bit address itself, but an encoding of it, as an even multiple of 32-bit words, padding with zero bits as necessary. This encoding consumes ((PrefixLength + 31) / 32) 32-bit words.

Each prefix is advertised along with an 8-bit field of capabilities.
These serve as input to the various routing calculations.  For
example, they can indicate that prefixes are to be ignored in some
cases or are to be marked as not readvertisable in others.

0  1  2  3  4  5  6  7
+--+--+--+--+--+-+--+--+
|  |  |  |DN| P|x|LA|NU|
+--+--+--+--+--+-+--+--+

The PrefixOptions Field
NU-bit
The "no unicast" capability bit.  If set, the prefix should be
excluded from IPv6 unicast calculations.  If not set, it should be
included.

LA-bit
The "local address" capability bit.  If set, the prefix is
actually an IPv6 interface address of the Advertising Router.  An implementation MAY also set the LA-bit for
prefixes advertised with a host PrefixLength (128).

x-bit
This bit was previously defined as a "multicast" capability bit.
However, the use was never adequately specified and has been
deprecated for OSPFv3.  The bit should be set to 0 and ignored
when received.  It may be reassigned in the future.

P-bit
The "propagate" bit.  Set on NSSA area prefixes that should be
readvertised by the translating NSSA area border [NSSA].

DN-bit
This bit controls an inter-area-prefix-LSAs or AS-external-LSAs
re-advertisement in a VPN environment

### LSA types[edit]

The LS field has subfields that define how to handle unrecognized LSA types, the flooding scope, and the specific function of this LSA: Request, Update, or Acknowledgement.

0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|U |S2|S1|           LSA Function Code          |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

LSA Type Field

The high-order U-bit tells the router how to process an unrecognized code. A 1 value means to store and flood the LSA as if it were understood; this is comparable to the transitive attribute bit in the Border Gateway Protocol (BGP). The next two bits, S1 and S2, define scope of flooding:

S2  S1   Flooding Scope

-
0  0    Link-Local Scoping - Flooded only on originating link
0  1    Area Scoping - Flooded only in originating area
1  0    AS Scoping - Flooded throughout AS
1  1    Reserved

There are several new codes, and one old but deprecated code Type 6 was used for OSPF multicast, which is deprecated. The LSA type also infers values for U, S1, and S2 bits

Note that the LSA names and numbers differ from those in OSPFv2

OSPF for IPv6 LSA types Name  | Function code  | LS type

|
|

Router-LSA  | 1  | 0x2001
Network-LSA  | 2  | 0x2003
Inter-area-prefix-LSA  | 3  | 0x2003
Inter-area-router-LSA  | 4  | 0x2004
AS-External-LSA  | 5  | 0x2001
Deprecated; may be reassigned  | 6  | 0x2006
NSSA-LSA  | 7  | 0x2007
Router-LSA  | 8  | 0x0008
Intra-area-prefix LSA  | 9  | 0x2009

## Deployment[edit]

### Cisco[edit]

[2]

### Juniper[edit]

Juniper supports core functions of OSPF for IPv6, although some features in OSPFv2 are not currently support the following features in OSPF for IPv6. Some of the unsupported features are traditional in OSPFv2, but not necessarily the best practice even there.[3]

1. Virtual link
2. Not-so-stubby-area (NSSA)
3. Nonbroadcast multiaccess (NBMA)
4. Remote neighbor
5. Traffic engineering extensions
6. SNMP traps
7. Features specified in "OSPF as the PE/CE Protocol in BGP/MPLS IP VPNs" (draft-ietf-l3vpn-ospf-2547)

### Nortel[edit]

### Quagga[edit]

Quagga has limited RFC2740 support. It does not implement areas.[4]

## References[edit]

1. ↑ R. Coltun, D. Ferguson, J. Moy, A. Lindem (July 2008), OSPF for IPv6, RFC5340
2. ↑ Cisco Systems, Implementing OSPF for IPv6
3. ↑ Juniper Networks, Configuring OSPF: Features
4. ↑ Quagga Routing Software Suite