The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes how to enable Open Shortest Path First (OSPF) version 3 for IPv6 on an interface.
Before you enable OSPF for IPv6 on an interface, you must:
Complete the OSPF network strategy and planning for your IPv6 network. For example, you must decide whether multiple areas are required.
Enable IPv6 unicast routing.
Enable IPv6 on the interface.
Configure the IP Security (IPsec) secure socket application program interface (API) on OSPF for IPv6 in order to enable authentication and encryption.
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Refer to Cisco Technical Tips Conventions for more information on document conventions.
Open Shortest Path First (OSPF) is a routing protocol for IP. It is a link-state protocol, as opposed to a distance-vector protocol. A link-state protocol makes routing decisions based on the states of the links that connect source and destination machines. The state of a link is a description of that interface and the relationship to its neighbor networking devices. The interface information includes the IPv6 prefix of the interface, the network mask, the type of network it is connected to, the routers connected to that network, and so forth. This information is propagated in various type of link-state advertisements (LSAs). OSPF version 3, which is described in RFC 2740, supports IPv6.
In this section, you are presented with the information to configure the features described in this document.
Note: Use the Command Lookup Tool /a> to find more information on the commands used in this document.
Note: Only registered Cisco users have access to internal Cisco tools and information.
This document uses this network setup:
This is the configuration of OSPFv3 for the routers shown in the diagram:
Stub Router |
---|
ipv6 unicast-routing ipv6 cef ! interface GigabitEthernet0/0 no ip address ipv6 address FD01:ABAB::/64 eui-64 |
ABR1 Router |
---|
ipv6 unicast-routing ipv6 cef ! interface GigabitEthernet1 no ip address speed auto ipv6 address FD03::1/124 ipv6 enable ipv6 ospf 1 area 0 ! interface GigabitEthernet2 no ip address ipv6 address FD02:ABAB::/64 eui-64 ipv6 enable ipv6 ospf 1 area 2 |
ASBR Router |
---|
ipv6 unicast-routing ipv6 cef ! interface GigabitEthernet1 no ip address ipv6 address FD03::2/124 ipv6 enable ipv6 ospf 1 area 0 ! interface GigabitEthernet2 no ip address ipv6 address FD03::1:1/124 ipv6 enable ipv6 rip EXT enable ! ipv6 router ospf 1 router-id 10.2.2.2 default-metric 25 redistribute rip EXT metric-type 1 include-connected ! ipv6 router rip EXT redistribute ospf 1 match internal external 1 external 2 include-connected ! |
External Router |
---|
ipv6 unicast-routing |
Use this section to confirm that your configuration works properly.
TheOutput Interpreter Tool supports certain show commands. Use the OIT to view an analysis of show command output.
The show ipv6 ospf database command shows the Link State Database (LSDB) of the router.
Note:Only registered Cisco users can access internal Cisco tools and information.
Stub_Router#show ipv6 ospf database OSPFv3 Router with ID (10.3.3.3) (Process ID 1) Router Link States (Area 2) ADV Router Age Seq# Fragment ID Link count Bits 10.1.1.1 5 0x8000000F 0 1 B 10.3.3.3 38 0x8000000E 0 1 None Inter Area Prefix Link States (Area 2) ADV Router Age Seq# Prefix 10.1.1.1 5 0x80000002 ::/0 Link (Type-8) Link States (Area 2) ADV Router Age Seq# Link ID Interface 10.1.1.1 5 0x8000000A 8 Gi0/0 10.3.3.3 292 0x80000005 2 Gi0/0 Intra Area Prefix Link States (Area 2) ADV Router Age Seq# Link ID Ref-lstype Ref-LSID 10.1.1.1 5 0x8000000B 0 0x2001 0 10.3.3.3 548 0x80000002 0 0x2001 0
The show ipv6 ospf database router command shows the Router LSAs where the router originates and receives. The Router LSAs carry no address or prefix information.
Stub_Router#show ipv6 ospf database router OSPFv3 Router with ID (10.3.3.3) (Process ID 1) Router Link States (Area 2) Routing Bit Set on this LSA LS age: 141 Options: (V6-Bit, R-Bit, DC-Bit) LS Type: Router Links Link State ID: 0 Advertising Router: 10.1.1.1 LS Seq Number: 8000000F Checksum: 0x9C2C Length: 40 Area Border Router Number of Links: 1 Link connected to: another Router (point-to-point) Link Metric: 1 Local Interface ID: 8 Neighbor Interface ID: 2 Neighbor Router ID: 10.3.3.3 LS age: 174 Options: (V6-Bit, R-Bit, DC-Bit) LS Type: Router Links Link State ID: 0 Advertising Router: 10.3.3.3 LS Seq Number: 8000000E Checksum: 0xBBF Length: 40 Number of Links: 1 Link connected to: another Router (point-to-point) Link Metric: 1 Local Interface ID: 2 Neighbor Interface ID: 8 Neighbor Router ID: 10.1.1.1
The LSAs carry an Options field which has these bits:
V6 bit—Indicates whether the router/link must be used in routing calculation.
R bit—This is the "Router bit". It indicates if the originator is an active router.
DC bit—Indicates the router handling of Demand Circuit.
The show ipv6 ospf database link self-originate command shows that Link LSAs carry link-specific addresses.
Stub_Router#show ipv6 ospf database link self-originate OSPFv3 Router with ID (10.3.3.3) (Process ID 1) Link (Type-8) Link States (Area 2) LS age: 650 Options: (V6-Bit, R-Bit, DC-Bit) LS Type: Link-LSA (Interface: GigabitEthernet0/0) Link State ID: 2 (Interface ID) Advertising Router: 10.3.3.3 LS Seq Number: 80000005 Checksum: 0x8578 Length: 56 Router Priority: 1 Link Local Address: FE80::5054:FF:FE00:3A Number of Prefixes: 1 Prefix Address: FD01:ABAB:: Prefix Length: 64, Options: None
Because the Stub Router belongs to a Totally-Stub Area, the ABR1 Router sends only the default route to the Stub Router.
Stub_Router#show ipv6 route IPv6 Routing Table - default - 5 entries Codes: C - Connected, L - Local, S - Static, U - Per-user Static route B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect RL - RPL, 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 lA - LISP away, a - Application OI ::/0 [110/2] via FE80::5054:FF:FE00:15, GigabitEthernet0/0 C FD01:ABAB::/64 [0/0] via GigabitEthernet0/0, directly connected L FD01:ABAB::5054:FF:FE00:3A/128 [0/0] via GigabitEthernet0/0, receive O FD02:ABAB::/64 [110/2] via FE80::5054:FF:FE00:15, GigabitEthernet0/0 L FF00::/8 [0/0] via Null0, receive
The ABR1 Router is the Area Border Router.
ABR1#show ipv6 ospf Routing Process "ospfv3 1" with ID 10.1.1.1 Supports NSSA (compatible with RFC 3101) Supports Database Exchange Summary List Optimization (RFC 5243) Event-log enabled, Maximum number of events: 1000, Mode: cyclic It is an area border router Router is not originating router-LSAs with maximum metric Initial SPF schedule delay 50 msecs Minimum hold time between two consecutive SPFs 200 msecs Maximum wait time between two consecutive SPFs 5000 msecs Initial LSA throttle delay 50 msecs Minimum hold time for LSA throttle 200 msecs Maximum wait time for LSA throttle 5000 msecs Minimum LSA arrival 100 msecs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Retransmission limit dc 24 non-dc 24 EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300 Number of external LSA 2. Checksum Sum 0x011699 Number of areas in this router is 2. 1 normal 1 stub 0 nssa Graceful restart helper support enabled Reference bandwidth unit is 100 mbps RFC1583 compatibility enabled Area BACKBONE(0) Number of interfaces in this area is 1 SPF algorithm executed 17 times Number of LSA 8. Checksum Sum 0x05579B Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Area 2 Number of interfaces in this area is 1 It is a stub area, no summary LSA in this area Generates stub default route with cost 1 SPF algorithm executed 20 times Number of LSA 7. Checksum Sum 0x0380EA Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0
The ABR1 Router receives external routes (RIP routes) from the ASBR Router.
ABR1#show ipv6 route IPv6 Routing Table - default - 8 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, RL - RPL, 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, lA - LISP away, le - LISP extranet-policy lp - LISP publications, a - Application, m - OMP O FD01:ABAB::/64 [110/2] via FE80::5054:FF:FE00:3A, GigabitEthernet2 C FD02:ABAB::/64 [0/0] via GigabitEthernet2, directly connected L FD02:ABAB::5054:FF:FE00:15/128 [0/0] via GigabitEthernet2, receive C FD03::/124 [0/0] via GigabitEthernet1, directly connected L FD03::1/128 [0/0] via GigabitEthernet1, receive OE1 FD03::1:0/124 [110/26] via FE80::5054:FF:FE00:3E, GigabitEthernet1 OE1 FD04:ABAB::/64 [110/26] via FE80::5054:FF:FE00:3E, GigabitEthernet1 L FF00::/8 [0/0] via Null0, receive
The ASBR Router is the Autonomous System Boundary Router for the network. It is connected to the RIP network through Serial 0/0 interface.
ASBR#show ipv6 ospf Routing Process "ospfv3 1" with ID 10.2.2.2 Supports NSSA (compatible with RFC 3101) Supports Database Exchange Summary List Optimization (RFC 5243) Event-log enabled, Maximum number of events: 1000, Mode: cyclic It is an autonomous system boundary router Redistributing External Routes (with default metric 25) from, rip EXT with metric-type 1 include-connected Router is not originating router-LSAs with maximum metric Initial SPF schedule delay 50 msecs Minimum hold time between two consecutive SPFs 200 msecs Maximum wait time between two consecutive SPFs 5000 msecs Initial LSA throttle delay 50 msecs Minimum hold time for LSA throttle 200 msecs Maximum wait time for LSA throttle 5000 msecs Minimum LSA arrival 100 msecs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Retransmission limit dc 24 non-dc 24 EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300 Number of external LSA 2. Checksum Sum 0x011699 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Graceful restart helper support enabled Reference bandwidth unit is 100 mbps RFC1583 compatibility enabled Area BACKBONE(0) Number of interfaces in this area is 1 SPF algorithm executed 10 times Number of LSA 8. Checksum Sum 0x05579B Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0
ASBR#show ipv6 rip RIP process "EXT", port 521, multicast-group FF02::9, pid 678 Administrative distance is 120. Maximum paths is 16 Updates every 30 seconds, expire after 180 Holddown lasts 0 seconds, garbage collect after 120 Split horizon is on; poison reverse is off Default routes are not generated Periodic updates 267, trigger updates 11 Full Advertisement 1, Delayed Events 0 Interfaces: GigabitEthernet2 Redistribution: Redistributing protocol ospf 1 with transparent metric (internal, external 1 & 2, ) include-connected
Use this section to troubleshoot your configuration.
Note: Refer to Important Information on Debug Commands before you use debug commands.
debug ipv6
As soon as OSPFv3 is enabled on the Stub Router, it sends out OSPFv3 Type 1 Hello messages to the FF02::5 multicast address. Once it receives Hello packets from the ABR1 Router, they negotiate the Primary/Secondary relationship and then start to send DBD packets.
Stub_Router#debug ipv6 ospf events Stub_Router#debug ipv6 ospf packet
Stub_Router#debug ipv6 ospf adj*Mar 8 17:47:01.324: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FF02::5: ver:3 type:1 len:36 rid:10.3.3.3 area:0.0.0.2 chksum:A0F9 inst:0 *Mar 8 17:47:03.307: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FF02::5: ver:3 type:1 len:36 rid:10.1.1.1 area:0.0.0.2 chksum:A31C inst:0 *Mar 8 17:47:03.308: OSPFv3-1-IPv6 ADJ Gi0/0: Added 10.1.1.1 to nbr list *Mar 8 17:47:03.308: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:1 len:40 rid:10.3.3.3 area:0.0.0.2 chksum:470D inst:0 *Mar 8 17:47:03.320: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:1 len:40 rid:10.1.1.1 area:0.0.0.2 chksum:4707 inst:0 *Mar 8 17:47:03.321: OSPFv3-1-IPv6 ADJ Gi0/0: 2 Way Communication to 10.1.1.1, state 2WAY *Mar 8 17:47:03.321: OSPFv3-1-IPv6 ADJ Gi0/0: Nbr 10.1.1.1: Prepare dbase exchange *Mar 8 17:47:03.322: OSPFv3-1-IPv6 ADJ Gi0/0: Send DBD to 10.1.1.1 seq 0x983C9C0 opt 0x11 flag 0x7 len 28 *Mar 8 17:47:03.322: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:2 len:28 rid:10.3.3.3 area:0.0.0.2 chksum:7A33 inst:0 *Mar 8 17:47:03.328: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:2 len:148 rid:10.1.1.1 area:0.0.0.2 chksum:141A inst:0 *Mar 8 17:47:03.329: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv DBD from 10.1.1.1 seq 0x983C9C0 opt 0x11 flag 0x2 len 148 mtu 1500 state EXSTART *Mar 8 17:47:03.330: OSPFv3-1-IPv6 ADJ Gi0/0: NBR Negotiation Done. We are the MASTER *Mar 8 17:47:03.330: OSPFv3-1-IPv6 ADJ Gi0/0: Nbr 10.1.1.1: Summary list built, size 7 *Mar 8 17:47:03.331: OSPFv3-1-IPv6 ADJ Gi0/0: Send DBD to 10.1.1.1 seq 0x983C9C1 opt 0x11 flag 0x1 len 128 *Mar 8 17:47:03.331: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:2 len:128 rid:10.3.3.3 area:0.0.0.2 chksum:F771 inst:0 *Mar 8 17:47:03.334: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:3 len:64 rid:10.1.1.1 area:0.0.0.2 chksum:C6FA inst:0 *Mar 8 17:47:03.335: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:2 len:28 rid:10.1.1.1 area:0.0.0.2 chksum:7C3D inst:0
Once the DBD packets are exchanged, the routers send Link-State Request (LS REQ) and Link-State Update (LS UPD) messages to build their LSDB. After successive LS REQ and LS UPD messages, and when the state reaches FULL, the routers continue to exchange Hello packets.
Stub_Router#*Mar 8 17:47:03.337: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv LS REQ from 10.1.1.1 length 64 LSA count 4 *Mar 8 17:47:03.337: OSPFv3-1-IPv6 ADJ Gi0/0: Send LS UPD to FE80::5054:FF:FE00:15 length 172 LSA count 4 *Mar 8 17:47:03.338: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:4 len:172 rid:10.3.3.3 area:0.0.0.2 chksum:D2CE inst:0 *Mar 8 17:47:03.339: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv DBD from 10.1.1.1 seq 0x983C9C1 opt 0x11 flag 0x0 len 28 mtu 1500 state EXCHANGE *Mar 8 17:47:03.339: OSPFv3-1-IPv6 ADJ Gi0/0: Exchange Done with 10.1.1.1
*Mar 8 17:47:03.340: OSPFv3-1-IPv6 ADJ Gi0/0: Send LS REQ to 10.1.1.1 length 40 *Mar 8 17:47:03.340: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:3 len:40 rid:10.3.3.3 area:0.0.0.2 chksum:FD46 inst:0 *Mar 8 17:47:03.343: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:4 len:72 rid:10.1.1.1 area:0.0.0.2 chksum:825E inst:0 *Mar 8 17:47:03.345: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv LS UPD from Nbr ID 10.1.1.1 length 72 LSA count 2 *Mar 8 17:47:03.345: OSPFv3-1-IPv6 ADJ Gi0/0: Synchronized with 10.1.1.1, state FULL *Mar 8 17:47:03.346: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.1.1.1 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
Revision | Publish Date | Comments |
---|---|---|
3.0 |
09-Mar-2023 |
All output code was replaced. Recertification. |
1.0 |
10-Aug-2010 |
Initial Release |