This document provides an overview of OSPFv3, the Open Shortest Path First routing protocol for IPv6 networks. It describes the key differences between OSPFv3 and OSPFv2, including that OSPFv3 runs per link instead of per subnet, uses new LSA types to advertise addresses and link-local addresses, and has additional option bits. The document also covers common aspects like the use of multicast, DR election, the database exchange process, and the different OSPF packet types.
1. 1
RFC5340 OSPFv3 for IPv6
IPv6 For Life
Fred Bovy
Villa les 2 Soeurs
21, Avenue Theirs
06600 Antibes
fred@ipv6forlife.com
twitter fredbovy
OSPFv3 for IPv6
Cheat sheet
2. !2
1 2 3
EGP versus IGP
OSPFv3 is an IGP and it is designed to run
within an IPv6 Autonomous system, provide a
maximum of information to build a consistent
topology of the Autonomous system.
Scalability is achieved by the use of Area.
Each area router has a common Topological
Database.
Differences in OSPFv3
• Permit to run 256 instances on the same shared
media.
• Security is managed by IPSec and is no longer part
of OSPF Process.
• As many addresses can be configured on each link,
OSPFv3 run per link and not per subnet.
• OSPF Database has been redesigned with 2 new
LSAs. One LSA to advertise addresses in an area and
one LSA to advertise Link-Local Addresses. The Type
1 and 2 LSA do not carry any more addresses but
topological addresses only. A new Intra-Area LSAhas
been introduced to carry these addresses.
• Two LSA have been renamed with more explicit
names.
• Two new bits have been added to Option bits: R-Bit
and V6-bit. The R-bit allows a router to signal that it
should not be used in the routing process. The V6-bit
bit signals that the router is able to carry IPv6 Traffic.
• MOSPF has been deprecated in OSPFv3.
Common Characteristics with OSPFv2
• It runs directly over IPv6 Protocol number 89.
• The router ID still has the format of an IPv4 address.
• It uses multicast so non OSPFv3 nodes are not
impacted by OSPFv3 traffic.
• Multiaccess networks are optimised with a
Designated router.
• No filtering of routing information in an area. Only
ASBR and ABR can summarise Routes.
• It still uses multicast addresses: ff02::5, ff02::6.
Remarks about OSPFv3 design
Routing is operated with Link-Local addresses. The
Global addresses are only needed for remote routing for
user traffic.
If OSPF is a Link-State routing protocol inside an area, it
is a Distance-Vector between Area. The Area Border
Router transmit routes and not Link-states informations.
Same for ASBR, they transmit External Routes and not
Link States. This is why 1) ABR should be able to
summarise routing information between Area.2) It is not
recommended to redistribute BGP routes into OSPF but
to run iBGP between routers. Always control with
routes-maps the routes that you redistribute in OSPF.
3. HELLO PROTOCOL
With OSPF exchanges start with Hello and all OSPF
packets starts with a common headers.
They are 5 types of packets in OSPF.
Two routers are sending Hellos using the AllOspfRouters
Multicast address ff02::5.
The Finite State Machine for the inteface goes:
DOWN -> INIT
During the INIT state they check that the parameters
found in Hello are compatible. For instance if they are not
in the same Area or do both not send hello every 10
seconds, they will not form Neighbour relationship.
When a router sees its Router-ID in a Neighbour
advertisement, their states becomes TWO-WAY.
DR/BDR Election. In addition, they will elect a
Designated Router and a Backup Designated Router on
Multipoint, Broadcast or Not, interface.
They start waiting 40 seconds listening if there are
already a DR/BDR on this link. Then they compare their
Router Priority with the Priority of the others received.
This is not preemptive, if a DR is elected you would not
replace it either should you have a better priority. With the
same priority, highest Router ID wins. Priority 0 is
ineligible.
The next state is Database synchronisation with Adjacent
routers. On a Point-to-Point you should be systematically
adjacent. On a multiaccess you only become adjacent
with the DR/BDR. This is to avoid that everybody need to
synchronise with everybody!
4. EXSTART
Once, routers are neighbours, they may become adjacent.
Each router send a DBD with the Master bit set (MS) pretending it is the Master.
Highest Router-ID wins.
DBD other bits are:
I-bit
The Init bit. When set to 1, this packet is the first in the sequence of Database
Description packets.
M-bit
The More bit. When set to 1, it indicates that more Database Description
packets are to follow.
MS-bit
The Master/Slave bit. When set to 1, it indicates that the router is the master
during the Database Exchange process. Otherwise, the router is the slave.
The Master will then be responsible to synchronise the communication. This
exchange looks like a simple TFTP file transfer. Each router sends its Database,
LSA Headers for each router to check that it has the latest version for each LSA.
EXLOAD
If a LSA is not up to date, the router will send a Link State Request. It's neighbour
should now reply with a Link-State Reply which will be Acked with a Link State
Acknowledgement. When both Databases are up to date, the status is now FULL.
3 2 Packet Length
Router-ID
Area-ID
Checksum
Instance
ID
0
Database Description Packet
0 Options
Interface MTU 0 0 0 0 0 0 I M MS
DD Sequence Number
An LSA Header
5. Other OSPF packets are needed to exchange the
Database Records called LSA or Link State
Acknowledgement.
3 3 Packet Length
Router-ID
Area-ID
Checksum
Instance
ID
0
Link State Request
0 LS Type
Link-State ID
Advertising Router
Link-State ID....
3 4 Packet Length
Router-ID
Area-ID
Checksum
Instance
ID
0
Link State Update
# Link State
LSAs....
3 5 Packet Length
Router-ID
Area-ID
Checksum
Instance
ID
0
Link State Acknowledgement
An LSA Header
LSA Header
LSA Type
U S2 S1 LSA Function Code
U=0 Treat the LSA as if it had link-local flooding scope
U=1 Store and Flood the LSA as if the type is understood
S2 S1 Flooding Scope
0 0 Link-Local Scoping
0 1 Area Scoping
1 0 AS Scoping
1 1 Reserved
LSA Function Code LS-Type
1 0x2001 Router-LSA
2 0x2002 Network-LSA
3 0x2003 Inter-Area-Prefix-LSA
4 0x2004 Inter-Area_Router-LSA
5 0x2005 AS-External-LSA
6 Deprecated
7 0x2007 NSSA-LSA
9 0x2009 Intra-Area-Prefix-LSA
LS Age LS Type
Link State ID
Advertising Router
LS Sequence Number
LS Checksum Length