OSPFv3: OSPF for IPv6

Same ideas, new address family

OSPFv3 is OSPF for IPv6. Neighbours, hellos, DR/BDR, areas, cost and SPF all work just like OSPFv2. The differences:

OSPFv2 (IPv4)OSPFv3 (IPv6)
Turn it onnetwork commands or ip ospf 1 area 0Only on the interface: ipv6 ospf 1 area 0
Processrouter ospf 1ipv6 router ospf 1 (needs ipv6 unicast-routing)
Neighbours talk fromInterface IPv4 addressLink-local address (fe80::)
Must be in the same subnet?YesNo: link-local addresses are always on the link
Router ID32 bits, like 1.1.1.1Still 32 bits! Set it by hand if the router has no IPv4 address
Show commandsshow ip ospf ...show ipv6 ospf ...

Configure it

Here the triangle from module 14 has IPv6 addresses. R2 and R3 already run OSPFv3; set up R1:

In NetLab

▶ R1
R1>enable
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id 1.1.1.1
R1(config-rtr)#passive-interface g0/0
R1(config-rtr)#exit
R1(config)#interface g0/0
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#interface g0/1
R1(config-if)#ipv6 ospf 1 area 0
*Mar  1 00:00:10.000: %OSPFv3-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/1 from LOADING to FULL, Loading Done
R1(config-if)#interface g0/2
R1(config-if)#ipv6 ospf 1 area 0
*Mar  1 00:00:12.000: %OSPFv3-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/2 from LOADING to FULL, Loading Done
R1(config-if)#interface loopback0
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#end
*Mar  1 00:00:15.000: %SYS-5-CONFIG_I: Configured from console by console
R1#show ipv6 ospf neighbor

            OSPFv3 Router with ID (1.1.1.1) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
2.2.2.2           1   FULL/DR         00:00:33    1               GigabitEthernet0/1
3.3.3.3           1   FULL/DR         00:00:35    1               GigabitEthernet0/2
R1#show ipv6 route ospf
IPv6 Routing Table - default - 14 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
       a - Application
O   2001:DB8:2::/64 [110/2]
     via FE80::21A:2BFF:FE4B:7649, GigabitEthernet0/1
O   2001:DB8:3::/64 [110/2]
     via FE80::21A:C8FF:FEE3:1C10, GigabitEthernet0/2
O   2001:DB8:23::/64 [110/2]
     via FE80::21A:2BFF:FE4B:7649, GigabitEthernet0/1
O   2001:DB8:23::/64 [110/2]
     via FE80::21A:C8FF:FEE3:1C10, GigabitEthernet0/2
O   2001:DB8:FFFF::2/128 [110/2]
     via FE80::21A:2BFF:FE4B:7649, GigabitEthernet0/1
O   2001:DB8:FFFF::3/128 [110/2]
     via FE80::21A:C8FF:FEE3:1C10, GigabitEthernet0/2
R1#ping 2001:db8:3::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:3::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

The next hops in the routing table are the neighbours' link-local addresses, with the exit interface: that's normal for IPv6 routing protocols.

Common mistake: If a router has no IPv4 address at all, OSPFv3 can't pick a router ID and won't start ("could not pick a router-id, please configure manually"). Always set router-id.

HOME LABS COMMUNITY DASHBOARD