OSPFv3
OSPF is an IGP used to distribute routing information between routers of a single autonomous system. OSPF is based on link-state technology, described briefly in the "Overview" section. The IPv4 version is specified in RFC 2328.
Routers running OSPF advertise link state, link prefix/mask, link weight, and other local connectivity parameters in link-state advertisements (LSAs). These LSAs are flooded reliably to other routers in the network to ensure that every OSPF router has a complete and consistent view of the topology.
On broadcast and Non-Broadcast Multiple Access (NBMA) networks, a designated router (DR), elected during neighboring relationship establishment (Hello protocol) can help reduce the amount of control traffic necessary for this operation, by acting as a relay between OSPF routers for LSAs. A backup designated router (BDR) is also elected. The BDR picks up the functions of a failed DR with no need of a new election process.
OSPF allows sets of networks to be grouped together into regions called areas. A router maintains a topology database for each area it participates in, and the topology of an area is hidden from the rest of the autonomous system. Areas constitute a useful concept that enables a two-level routing hierarchy, a concept that helps improve scalability. Routers do not need to maintain a topology database for areas they do not belong to, which leads to significant reduction in routing traffic. Route summarization can occur on the area borders, another way to reduce the routing traffic.
For securing routing distribution and installation, OSPFv2 defines fields AuType and Authentication in its protocol header (RFC 2328).
Finally, OSPF has built-in support for classless interdomain routing (CIDR). (Each route distributed by OSPF has a destination and mask.)
Support for IPv6
OSPFv3 extends OSPF to provide support for IPv6, as specified in RFC 2740. The basic mechanisms already used by OSPFv2, such as flooding, DR election, area support, SPF calculations, and so on, remain applicable to OSPFv3. Neighboring routers are still identified by the 32-bit router ID in OSPFv3. However, changes in protocol semantics between IPv4 and IPv6, as well as changes in the address format, have led to significant changes in OSPFv3 compared to OSPFv2.
The two versions of the OSPF protocol operate independently of each other, on disjoint databases. There is no backward compatibility from OSPFv3 to OSPFv2.
Extensions have been proposed to adapt OSPFv3 as an "integrated model," where OSPFv3 would be extended to calculate IPv4 routes. This is still a work in progress at the IETF. Two proposals are being discussed: "Multi-topology routing in OSPFv3" and "Support of address families in OSPFv3". A Cisco implementation is already available that provides a unified command-line interface (CLI), as shown in Example-6.
Example 4-6. Unified OSPF Configuration Exampleinterface serial0 ipv6 ospf 1 area 0 ipv6 ospf cost 12 ospfv3 2 area 0 instance 64 address-family ipv4 ospfv3 instance 64 cost 22
A main goal of OSPFv3 was to create a routing protocol independent of any specific network layer. To achieve this, OSPFv3's inter-router messages have been redesigned, and addressing semantics have been removed from OSPF packets and from the basic LSAs. In OSPFv3, LSAs such as router LSAs and network LSAs only carry topology information. The following LSAs have been created to carry IPv6 addresses and prefixes:
- Link LSAs announce the router's IPv6 link-local address to neighbors on the link, inform these neighbors of a list of IPv6 addresses to associate with the link, and announce the set of options.
- Intra-area prefix LSAs carry all IPv6 prefix information to all OSPFv3 routers within an area. (This information in IPv4 is carried by the router and network LSAs.)
The following LSAs have been modified:
- Router link state advertisements and network LSAs no longer carry prefix information. In OSPFv3, these LSAs only carry topology information, making them network-protocol independent.
- Inter-area prefix replaces the network summary or type 3 LSA. An inter-area prefix LSA advertises internal networks to routers in other areas. With IPv6, those LSAs are expressed as <prefix, prefix length> rather than <prefix, mask>.
- Inter-area router replaces the Autonomous System Boundary Router (ASBR) summary LSA (type 4). It advertises the location of an ASBR.
OSPFv3 runs on a per-link basis rather than on a perIP subnet basis as in OSPFv2. When OSPF peering occurs over a physical link, OSPF packets are sent using the interface link-local unicast address as source. The flooding scope for LSAs has been generalized. Authentication has been removed from the OSPF protocol itself, instead relying on IPv6's Authentication Header (AH) and Encapsulating Security Payload (ESP). Most packets in OSPF for IPv6 are almost as compact as those in OSPF for IPv4, even with the larger IPv6 addresses.
OSPFv3 supports the ability to run multiple OSPF protocol instances on a single link. The OSPFv3 packet header includes an 8-bit instance ID used to demultiplex the protocol packets. Each OSPFv3 process sets its configured instance value in the OSPFv3 packets that it sends, and ignores received packets with instance values from other OSPFv3 processes.
Instance IDs can control communication between routers sharing a physical network and OSPF area, without relying on complex authentication schemes or access lists, as needed in the past. It enables the providers to run separate OSPF routing domains even though they have one or more physical network segments in common.
Configuration Example
Configuring OSPFv3 on Cisco routers on a broadcast network is straightforward. It requires just enabling OSPF on each interface participating in the OSPF area, as illustrated in Example-7.
Example-7. OSPF Configuration Exampleinterface Ethernet1/0 ipv6 address 2001:200::2/64 ipv6 ospf 100 area 1 end
On NBMA interfaces, the neighbor is explicitly configured.
Example-8. OSPF Configuration on InterfaceInterface Serial1/0 ipv6 enable ipv6 ospf 100 area 0 encapsulation frame-relay frame-relay map ipv6 FE80::A8BB:CCFF:FE00:C01 120 ipv6 ospf neighbor FE80::A8BB:CCFF:FE00:C01
In addition, if the OSPF router does not have an IPv4 address configured, a router ID must be configured. This is done under IPv6 router mode.
Other useful options can be configured under IPv6 router mode, such as enabling routes summarization at an area boundary or enabling authentication for an OSPF area, as illustrated in Example-9.
Example-9. OSPF OptionsInterface Serial1/0 ipv6 enable ipv6 ospf 100 area 0 encapsulation frame-relay frame-relay map ipv6 FE80::A8BB:CCFF:FE00:C01 120 ipv6 ospf neighbor FE80::A8BB:CCFF:FE00:C01
In addition, if the OSPF router does not have an IPv4 address configured, a router ID must be configured. This is done under IPv6 router mode.
Other useful options can be configured under IPv6 router mode, such as enabling routes summarization at an area boundary or enabling authentication for an OSPF area, as illustrated in Example-9.
Example-9. OSPF Optionsipv6 router ospf 100 router-id 200.11.11.1 area range 1 2001::/48 area 1 authentication ipsec spi 678 md5 1234567890ABCDEF1234567890ABCDEF
Finally, to verify proper OSPF configuration, you can use the following show command.
Example-10. OSPF StatusRouter#show ipv6 ospf Routing Process "ospfv3 100" with ID 200.11.11.1 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Number of external LSA 0. Checksum Sum 0x000000 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Area 1 Number of interfaces in this area is 2 SPF algorithm executed 4 times Area ranges are 2001::/48 Passive Advertise Number of LSA 12. Checksum Sum 0x04F3D1 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0
The show commands display the process ID and OSPF router ID, the configured LSA timer values, the number of areas, and details about each.
In this tutorial:
- IPv6 Routing Protocols
- Distance Vector Routing Protocol
- Path Vector Routing Protocol
- Link-State Routing Protocol
- IPv6 Interior Gateway Protocols
- EIGRP for IPv6
- OSPFv3
- IS-IS for IPv6
- BGP
- Use of MP-BGP Extensions for IPv6 Interdomain Routing
- Site Multihoming
- Deploying IPv6 Routing Protocols
- Network Distribution/Edge