Interior Gateway Protocols · Topic 2 of 3
OSPFv3
JN0-650 study page on OSPFv3 for IPv6 on Junos: protocols ospf3, link local addressing, new LSA types, IPsec authentication, instances and realms.
- 5 min
protocols ospf3,show ospf3 ..., multicast FF02::5 and FF02::6.- Runs per link and uses link local addresses for Hellos and next hops.
- Router ID is 32 bits and is not derived from an IPv6 address.
What it is
OSPFv3 is the version of OSPF designed for IPv6. It keeps the same ideas as OSPFv2: areas, neighbors, DR election, SPF, and the same five packet types. What changes is how addresses are carried, how LSAs are structured and how authentication works.
On Junos OS, OSPFv3 is configured under protocols ospf3, separate from protocols ospf. You can run both on the same router at the same time.
How it works
What is the same and what is different
| Item | OSPFv2 | OSPFv3 |
|---|---|---|
| Address family | IPv4 | IPv6 (and others with realms) |
| Runs per | Subnet | Link |
| Source of Hellos | Interface IPv4 address | Link local IPv6 address |
| Multicast addresses | 224.0.0.5 and 224.0.0.6 | FF02::5 and FF02::6 |
| Router ID | 32 bits | 32 bits, still written like an IPv4 address |
| Authentication | In the OSPF header | None in the header; uses IPsec |
| Junos hierarchy | protocols ospf | protocols ospf3 |
Because OSPFv3 runs per link, two routers on the same link can become neighbors even if they do not share a prefix. Neighbors are found by link local addresses, so next hops in the routing table are link local addresses too.
The router ID remains a 32-bit number. If the router has no IPv4 address to borrow it from, set routing-options router-id explicitly or OSPFv3 cannot form neighbors.
LSA changes
OSPFv3 removed addresses from the Router and Network LSAs, so they describe topology only. Prefixes moved to new LSA types.
| Type | Name | Purpose |
|---|---|---|
| 1 | Router | Topology within the area; no prefixes |
| 2 | Network | Routers attached to a broadcast link |
| 3 | Inter-area prefix | Replaces the OSPFv2 network summary LSA |
| 4 | Inter-area router | Replaces the OSPFv2 ASBR summary LSA |
| 5 | AS external | External prefixes |
| 7 | NSSA external | NSSA external prefixes |
| 8 | Link | Link local address and prefixes of the router on a link; flooded on that link only |
| 9 | Intra-area prefix | Prefixes attached to a router or a network, flooded in the area |
LSAs also have a flooding scope in the type field: link local, area or AS. This lets a router handle unknown LSA types by their scope instead of dropping them.
Configuration
set routing-options router-id 10.255.0.1
set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:12::1/64
set protocols ospf3 area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf3 area 0.0.0.0 interface lo0.0 passive
The interface needs family inet6 and the area ID is still written as a dotted number. Area types, interface-type, metric and priority use the same statements as OSPFv2. The Hello and dead intervals must still match, and the Hello also carries an instance ID, which must match for two routers to form a neighbor.
Authentication
OSPFv3 has no authentication fields in its packet header. Instead it relies on IPsec (AH or ESP) to authenticate or encrypt OSPFv3 packets. On Junos you define a manual security association under security ipsec and reference it from the OSPFv3 interface (or area) with ipsec-sa.
set security ipsec security-association OSPF3-SA manual direction bi protocol ah spi 256 authentication algorithm hmac-sha1-96 key ascii-text "<key>"
set protocols ospf3 area 0.0.0.0 interface ge-0/0/1.0 ipsec-sa OSPF3-SA
Address families and realms
The original OSPFv3 carries only IPv6 unicast. To carry other address families, OSPFv3 uses separate instances, and Junos exposes this as realms. You choose a realm under protocols ospf3, for example realm ipv4-unicast, and the instance then advertises IPv4 prefixes over the IPv6 link local adjacency.
set protocols ospf3 realm ipv4-unicast area 0.0.0.0 interface ge-0/0/1.0
Remember the purpose: one set of IPv6 neighbors can carry IPv4 routes, so you do not run OSPFv2 and OSPFv3 side by side.
Verification
show ospf3 neighbor
show ospf3 interface
show ospf3 database
show ospf3 route
These are the OSPFv3 twins of the show ospf commands. Neighbor addresses shown are link local.
Common mistakes
Searching show ospf for IPv6 neighbors. OSPFv3 is shown by show ospf3.
No router ID on an IPv6 only router. Set it explicitly.
Forgetting family inet6 on the interface. OSPFv3 does not start without it.
Expecting authentication under the interface like OSPFv2. Use an IPsec security association.
Looking for prefixes in the Router LSA. They are in the intra-area prefix LSA (type 9).
What to remember for the exam
protocols ospf3,show ospf3 ..., multicast FF02::5 and FF02::6.- Runs per link and uses link local addresses for Hellos and next hops.
- Router ID is 32 bits and is not derived from an IPv6 address.
- Router and Network LSAs carry no prefixes; type 8 is the link LSA and type 9 the intra-area prefix LSA; type 3 is inter-area prefix and type 4 is inter-area router.
- Authentication uses IPsec; the packet header has no authentication field.
- Realms let OSPFv3 carry other address families, such as IPv4 unicast.
Check yourself
Which OSPFv3 LSA carries a router's prefixes inside an area?
The intra-area prefix LSA, type 9; the Router LSA holds topology only.
How is OSPFv3 authenticated on Junos?
With an IPsec security association referenced by
ipsec-sa, because the OSPFv3 header has no authentication field.What does a router with only IPv6 addresses need before OSPFv3 can run?
A manually configured 32-bit router ID.
Topic 2 of 3 in Interior Gateway Protocols
Test yourself on Interior Gateway Protocols
The full Juniper JNCIP-ENT JN0-650 question bank has 858 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.