How to Configure Dual-Stack OSPF in Packet Tracer (Step-by-Step Lab)

Running IPv4 and IPv6 simultaneously across the same network infrastructure—known as dual-stacking—is the standard migration strategy for enterprise networks transitioning to IPv6. On Cisco routers, a dual-stack OSPF deployment runs OSPFv2 for IPv4 routing and OSPFv3 for IPv6 routing in parallel on the exact same physical interfaces.

In this hands-on Cisco Packet Tracer lab, you will build a dual-stack topology from scratch, configure OSPFv2 and OSPFv3 in Area 0, verify simultaneous neighbor adjacencies and routing tables, test end-to-end PC connectivity across both protocols, and diagnose the most common dual-stack OSPF failure scenarios.

How Dual-Stack OSPF Works ("Ships in the Night")

OSPFv2 and OSPFv3 operate as completely independent routing protocols—often called "ships in the night" parallel routing. Even when both protocols run on the same GigabitEthernet0/1 interface, each protocol maintains its own isolated control plane:

  • Separate Processes: Enabling router ospf 1 routes only IPv4 traffic; enabling ipv6 router ospf 1 routes only IPv6 traffic.
  • Separate Tables: Each stack builds its own independent Neighbor Table, Link-State Database (LSDB), and Routing Information Base (RIB).
  • Shared Operational Design: Both use the Shortest Path First (SPF) algorithm, bandwidth-based interface cost, Area 0 as the backbone area, DR/BDR elections on multi-access Ethernet segments, and a 32-bit Router ID (RID) written in dotted-decimal IPv4 format.
How Dual-Stack OSPF operates on a single Cisco router interface with parallel OSPFv2 and OSPFv3 stacks
Figure 1: Parallel OSPFv2 (IPv4) and OSPFv3 (IPv6) operation across a single dual-stack router interface.

Key Differences: OSPFv2 vs. OSPFv3

FeatureOSPFv2 (IPv4)OSPFv3 (IPv6)
Target ProtocolIPv4IPv6 (classic mode) / IPv4 & IPv6 (IOS-XE Address Families)
Global Prerequisiteip routing (enabled by default)ipv6 unicast-routing (disabled by default; mandatory)
Interface Activationnetwork command in router mode OR ip ospf <pid> area <id> under interfaceInterface-level only: ipv6 ospf <pid> area <id> (no network statement)
Multicast Addresses224.0.0.5 (AllSPFRouters), 224.0.0.6 (AllDRouters)FF02::5 (AllSPFRouters), FF02::6 (AllDRouters)
Neighbor Source & Next-HopInterface IPv4 unicast address (10.1.12.2); peers must share a subnetInterface IPv6 Link-Local address (FE80::2); peers operate per link
Router ID (RID)32-bit value (manual RID > highest active Loopback > highest active physical)Still a 32-bit IPv4-formatted value; must be set manually if no IPv4 exists
AuthenticationClear-text (Type 1) or MD5 (Type 2) in OSPF headerIPsec AH/ESP (classic OSPFv3); authentication trailer on supported platforms (RFC 7166)
LSA ArchitectureTypes 1-5, 7Renamed Type 3 (Inter-Area Prefix) & Type 4; adds Type 8 (Link) & Type 9

Lab Prerequisites and Network Topology

Software and Lab Requirements

  • Simulator: Cisco Packet Tracer 8.2 or newer.
  • Devices:
    • 2x Cisco 2911 ISR Routers (R1, R2). Cisco 4321 routers may also be used, but their interface names differ. Adapt the interface references and CLI commands accordingly.
    • 2x Cisco 2960 Switches (S1, S2)
    • 2x End-Device PCs (PC1, PC2)
  • Downloadable Packet Tracer Files:
Cisco Packet Tracer workspace showing the Dual-Stack OSPF topology with R1, R2, S1, S2, PC1, PC2, active links, and IPv4 and IPv6 addressing
Figure 2: Packet Tracer workspace showing the cabled Dual-Stack OSPF topology with active interfaces and IPv4/IPv6 addressing.

Physical Cabling Table

Source Device & PortCable TypeDestination Device & Port
PC1 (FastEthernet0)Copper Straight-ThroughS1 (FastEthernet0/1)
S1 (GigabitEthernet0/1)Copper Straight-ThroughR1 (GigabitEthernet0/0)
R1 (GigabitEthernet0/1)Copper Cross-OverR2 (GigabitEthernet0/1)
R2 (GigabitEthernet0/0)Copper Straight-ThroughS2 (GigabitEthernet0/1)
S2 (FastEthernet0/1)Copper Straight-ThroughPC2 (FastEthernet0)

Dual-Stack IP Addressing Table

Configuring static link-local addresses (FE80::1 on R1 and FE80::2 on R2) is a practical best practice. Because OSPFv3 installs link-local addresses as next-hop entries in the IPv6 routing table, static assignments make show ipv6 route ospf immediately readable instead of displaying long auto-generated EUI-64 strings.

DeviceInterfaceIPv4 Address / MaskIPv6 Global UnicastIPv6 Link-LocalDefault Gateway (IPv4 / IPv6)
R1G0/0 (LAN 1)192.168.10.1 /24 (255.255.255.0)2001:DB8:ACAD:1::1/64FE80::1N/A
R1G0/1 (Transit)10.1.12.1 /30 (255.255.255.252)2001:DB8:ACAD:12::1/64FE80::1N/A
R2G0/1 (Transit)10.1.12.2 /30 (255.255.255.252)2001:DB8:ACAD:12::2/64FE80::2N/A
R2G0/0 (LAN 2)192.168.20.1 /24 (255.255.255.0)2001:DB8:ACAD:2::1/64FE80::2N/A
PC1FastEthernet0192.168.10.10 /242001:DB8:ACAD:1::10/64Auto (FE80::...)192.168.10.1 / FE80::1
PC2FastEthernet0192.168.20.10 /242001:DB8:ACAD:2::10/64Auto (FE80::...)192.168.20.1 / FE80::2

Step 1: Configure Dual-Stack Interfaces and End Devices

Start by enabling IPv6 routing globally on both routers with ipv6 unicast-routing, then assign both IPv4 and IPv6 addresses to every active interface.

Configure Router R1

Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# no ip domain-lookup
R1(config)# ipv6 unicast-routing

R1(config)# interface GigabitEthernet0/0
R1(config-if)# description LAN-1
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# ipv6 address 2001:DB8:ACAD:1::1/64
R1(config-if)# ipv6 address FE80::1 link-local
R1(config-if)# no shutdown
R1(config-if)# exit

R1(config)# interface GigabitEthernet0/1
R1(config-if)# description LINK-TO-R2
R1(config-if)# ip address 10.1.12.1 255.255.255.252
R1(config-if)# ipv6 address 2001:DB8:ACAD:12::1/64
R1(config-if)# ipv6 address FE80::1 link-local
R1(config-if)# no shutdown
R1(config-if)# end

Configure Router R2

Router> enable
Router# configure terminal
Router(config)# hostname R2
R2(config)# no ip domain-lookup
R2(config)# ipv6 unicast-routing

R2(config)# interface GigabitEthernet0/1
R2(config-if)# description LINK-TO-R1
R2(config-if)# ip address 10.1.12.2 255.255.255.252
R2(config-if)# ipv6 address 2001:DB8:ACAD:12::2/64
R2(config-if)# ipv6 address FE80::2 link-local
R2(config-if)# no shutdown
R2(config-if)# exit

R2(config)# interface GigabitEthernet0/0
R2(config-if)# description LAN-2
R2(config-if)# ip address 192.168.20.1 255.255.255.0
R2(config-if)# ipv6 address 2001:DB8:ACAD:2::1/64
R2(config-if)# ipv6 address FE80::2 link-local
R2(config-if)# no shutdown
R2(config-if)# end

Configure PC1 and PC2 in Packet Tracer

  1. Open PC1 -> Desktop -> IP Configuration.
    • Under IP Configuration, select Static and enter:
      • IPv4 Address: 192.168.10.10
      • Subnet Mask: 255.255.255.0
      • Default Gateway: 192.168.10.1
    • Under IPv6 Configuration, select Static and enter:
      • IPv6 Address: 2001:DB8:ACAD:1::10
      • Prefix Length: 64
      • Default Gateway: FE80::1
    • Leave the auto-generated Link Local Address intact.
    Packet Tracer IP Configuration window on PC1 showing static IPv4 address 192.168.10.10 and static IPv6 address 2001:DB8:ACAD:1::10 with gateway FE80::1
    Figure 3: Dual-stack static IPv4 and IPv6 addressing configured on PC1.
  2. Open PC2 -> Desktop -> IP Configuration.
    • IPv4 (Static): IPv4 Address 192.168.20.10, Subnet Mask 255.255.255.0, Default Gateway 192.168.20.1.
    • IPv6 (Static): IPv6 Address 2001:DB8:ACAD:2::10, Prefix Length 64, Default Gateway FE80::2.

Pre-OSPF Baseline Verification

Before configuring dynamic routing, verify Layer 1-3 local connectivity on R1 using show ip interface brief, show ipv6 interface brief, and local pings to R2 (10.1.12.2 and 2001:DB8:ACAD:12::2) and PC1 (192.168.10.10):

R1# show ip interface brief
R1# show ipv6 interface brief
R1# ping 10.1.12.2
R1# ping 2001:DB8:ACAD:12::2
R1# ping 192.168.10.10
R1 CLI baseline verification showing up/up IPv4 and IPv6 interfaces and successful local pings to R2 and PC1
Figure 4: R1 baseline check confirming up/up dual-stack interfaces and direct connectivity across the transit link and LAN 1.

Notice that the transit pings to R2 achieve 100 percent (5/5), while the first ping to PC1 (192.168.10.10) outputs .!!!! (80 percent, 4/5). That single initial timeout dot (.) is completely normal—it occurs while R1 resolves PC1's MAC address via ARP.

Step 2: Configure OSPFv2 (IPv4)

Create the IPv4 OSPF process (router ospf 1), assign an explicit 32-bit Router ID, place both connected subnets into Area 0, and mark the LAN-facing interface (GigabitEthernet0/0) as passive so the router does not send unnecessary OSPF Hello traffic toward PCs.

Configure OSPFv2 on R1

R1# configure terminal
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# network 10.1.12.0 0.0.0.3 area 0
R1(config-router)# passive-interface GigabitEthernet0/0
R1(config-router)# exit

Configure OSPFv2 on R2

R2# configure terminal
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 192.168.20.0 0.0.0.255 area 0
R2(config-router)# network 10.1.12.0 0.0.0.3 area 0
R2(config-router)# passive-interface GigabitEthernet0/0
R2(config-router)# exit

Moments after completing the OSPFv2 configuration on R2, the console logs the IPv4 adjacency reaching the FULL state:

05:32:42: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet0/1 from LOADING to FULL, Loading Done
R2 CLI syslog message confirming OSPFv2 adjacency with neighbor 1.1.1.1 on GigabitEthernet0/1 reached FULL state
Figure 5: OSPFv2 adjacency syslog confirmation on R2 showing neighbor 1.1.1.1 transitioning from LOADING to FULL.

Step 3: Configure OSPFv3 (IPv6)

Classic OSPFv3 does not support network statements. First, enter ipv6 router ospf 1 to configure the 32-bit Router ID and set GigabitEthernet0/0 as a passive interface. Next, assign each participating interface directly to Area 0 using ipv6 ospf 1 area 0.

Configure OSPFv3 on R1

R1(config)# ipv6 router ospf 1
R1(config-rtr)# router-id 1.1.1.1
R1(config-rtr)# passive-interface GigabitEthernet0/0
R1(config-rtr)# exit

R1(config)# interface GigabitEthernet0/0
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# exit

R1(config)# interface GigabitEthernet0/1
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# end
R1# copy running-config startup-config

Configure OSPFv3 on R2

R2(config)# ipv6 router ospf 1
R2(config-rtr)# router-id 2.2.2.2
R2(config-rtr)# passive-interface GigabitEthernet0/0
R2(config-rtr)# exit

R2(config)# interface GigabitEthernet0/0
R2(config-if)# ipv6 ospf 1 area 0
R2(config-if)# exit

R2(config)# interface GigabitEthernet0/1
R2(config-if)# ipv6 ospf 1 area 0
R2(config-if)# end
R2# copy running-config startup-config

Once GigabitEthernet0/1 is enabled for OSPFv3 on R2, the router generates a separate %OSPFv3-5-ADJCHG syslog message confirming IPv6 convergence:

05:40:45: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet0/1 from LOADING to FULL, Loading Done
R2 CLI syslog notification confirming OSPFv3 adjacency with neighbor 1.1.1.1 on GigabitEthernet0/1 reached FULL state
Figure 6: OSPFv3 adjacency syslog confirmation on R2 showing IPv6 convergence with R1 (1.1.1.1).

Step 4: Verify Dual-Stack Adjacencies, Routes, and Interfaces

Because OSPFv2 and OSPFv3 maintain completely separate tables, always verify both stacks. Nearly every IPv6 verification command mirrors its IPv4 counterpart by replacing ip with ipv6.

Dual-Stack Verification Command Reference

Verification TaskOSPFv2 (IPv4) CommandOSPFv3 (IPv6) Command
Check Neighbor Adjacenciesshow ip ospf neighborshow ipv6 ospf neighbor
Inspect Learned OSPF Routesshow ip route ospfshow ipv6 route ospf
Verify OSPF Interfaces & Areasshow ip ospf interface briefshow ipv6 ospf interface brief
Check Router ID & Passive Linksshow ip protocolsshow ipv6 protocols

1. Verify Side-by-Side Neighbor Tables and OSPF Routes on R1

Run all four verification commands on R1 to inspect both stacks together:

R1# show ip ospf neighbor
R1# show ipv6 ospf neighbor
R1# show ip route ospf
R1# show ipv6 route ospf
R1 CLI output showing OSPFv2 and OSPFv3 neighbor adjacencies with 2.2.2.2 in FULL/BDR state and learned IPv4 and IPv6 OSPF routes
Figure 7: Dual-stack verification on R1 showing simultaneous FULL/BDR neighbor adjacencies with R2 (2.2.2.2) and learned OSPF routes in both IPv4 and IPv6 routing tables.

Key details to examine in R1's output:

  • Simultaneous FULL Adjacencies: Neighbor 2.2.2.2 (R2) appears in both the IPv4 and IPv6 neighbor tables on GigabitEthernet0/1 with priority 1 and state FULL/BDR.
  • Why Is R2 (2.2.2.2) the BDR Instead of the DR? OSPF DR/BDR elections are non-preemptive. In this lab, R1 is the DR and R2 is the BDR despite R2 having a higher Router ID. This is consistent with R1 completing its DR election before R2 joined. To make R2 the DR reliably, configure a higher OSPF interface priority on R2 for both protocols and perform a controlled re-election. Clearing the OSPF processes on R1 alone does not guarantee the desired result.
  • Address vs. Interface ID: Under show ip ospf neighbor, OSPFv2 identifies R2 by its IPv4 transit address (10.1.12.2). Under show ipv6 ospf neighbor, OSPFv3 displays R2's numeric Interface ID (2) instead of an IP address because OSPFv3 operates per link over link-local addresses.
  • Routing Table Next-Hop Comparison ([110/2]): Both protocols install R2's remote LAN with Administrative Distance 110 and total OSPF cost 2 (cost 1 for R1's GigabitEthernet0/1 + cost 1 for R2's GigabitEthernet0/0):
    • IPv4 (show ip route ospf): O 192.168.20.0 [110/2] via 10.1.12.2, 00:16:50, GigabitEthernet0/1
    • IPv6 (show ipv6 route ospf): O 2001:DB8:ACAD:2::/64 [110/2] via FE80::2, GigabitEthernet0/1 — proving OSPFv3 routes via R2's link-local address (FE80::2), not its global unicast address (2001:DB8:ACAD:12::2).

2. Verify OSPF Interface Bindings on R1

Confirm that both GigabitEthernet0/0 and GigabitEthernet0/1 are active in Process ID 1, Area 0, with interface Cost 1:

R1# show ip ospf interface brief
R1# show ipv6 ospf interface brief
R1 CLI output of show ip ospf interface brief and show ipv6 ospf interface brief confirming Gig0/0 and Gig0/1 in Process 1 Area 0
Figure 8: Verification of OSPFv2 and OSPFv3 interface bindings, Area 0 membership, and interface costs on R1.

Step 5: Test End-to-End Dual-Stack Connectivity

Open PC1 -> Desktop -> Command Prompt and test end-to-end reachability to PC2 across both IPv4 and IPv6, followed by an IPv6 traceroute:

C:\> ping 192.168.20.10
C:\> ping 2001:DB8:ACAD:2::10
C:\> tracert 2001:DB8:ACAD:2::10
PC1 Command Prompt showing 4 of 4 successful IPv4 and IPv6 ping replies from PC2 and complete 3-hop IPv6 traceroute
Figure 9: End-to-end dual-stack verification from PC1 confirming 0% packet loss for IPv4 and IPv6 pings plus the complete 3-hop IPv6 path to PC2.

How to read the verification results:

  • IPv4 Ping (192.168.20.10): 4/4 replies (0% loss, TTL=126).
  • IPv6 Ping (2001:DB8:ACAD:2::10): 4/4 replies (0% loss, TTL=126). A TTL/Hop Limit of 126 confirms the packets started at the PC default of 128 and decremented by 1 at each router hop (R1 and R2).
  • IPv6 Traceroute (tracert 2001:DB8:ACAD:2::10): Confirms every Layer 3 hop across the dual-stack core:
    1. 2001:DB8:ACAD:1::1 (R1 G0/0 — PC1's gateway)
    2. 2001:DB8:ACAD:12::2 (R2 G0/1 — Transit link)
    3. 2001:DB8:ACAD:2::10 (PC2 — Destination host)

Common Dual-Stack OSPF Troubleshooting Scenarios

When IPv4 routes work but IPv6 fails—or vice versa—work through the diagnostic sequence below from Layer 1 up to OSPF parameters.

Dual-Stack OSPF Troubleshooting Workflow flowchart showing step-by-step checks from interfaces and ipv6 unicast-routing to Router ID, Area 0, and timers
Figure 10: Step-by-step troubleshooting decision tree for Dual-Stack OSPF.

1. IPv4 Pings Succeed, but IPv6 Fails Between LANs (ipv6 unicast-routing Missing)

  • Symptom: show ipv6 ospf neighbor returns no output, or PC1 can ping its own gateway (FE80::1) but cannot reach PC2.
  • Cause: ipv6 unicast-routing was omitted in global configuration mode. Without it, Cisco routers do not forward routed IPv6 packets or start OSPFv3.
  • Fix: Enter ipv6 unicast-routing globally on both routers and verify with show running-config | include unicast-routing.

2. OSPFv3 Process Refuses to Start (%OSPFv3-4-NORTRID)

  • Symptom: Entering ipv6 router ospf 1 triggers "%OSPFv3-4-NORTRID: OSPFv3 process 1 could not pick a router-id, please configure manually".
  • Cause: If OSPFv3 is configured before any IPv4 interfaces are up—or on an IPv6-only router—IOS cannot automatically derive a 32-bit Router ID.
  • Fix: Configure a unique 32-bit ID manually under ipv6 router ospf 1 (for example, router-id 1.1.1.1) and restart the process with clear ipv6 ospf process.

3. Neighbor Table Remains Empty Despite up/up Interfaces

Inspect both transit interfaces using show ip ospf interface g0/1 and show ipv6 ospf interface g0/1, verifying every mandatory OSPF neighborship parameter:

  • Area ID mismatch: Both ends of GigabitEthernet0/1 must belong to Area 0.
  • Accidental passive-interface: Placing GigabitEthernet0/1 (the router-to-router link) as passive suppresses Hello packets toward the peer. Only LAN interface GigabitEthernet0/0 should be passive.
  • Hello/Dead timer mismatch: Default Ethernet timers (10s Hello / 40s Dead) must match on both routers.
  • IPv4 Subnet Mask mismatch: OSPFv2 requires identical masks on G0/1 (/30 on both R1 and R2).
  • Duplicate Router IDs: Both routers cannot share 1.1.1.1; verify unique RIDs on R1 and R2.

4. R1 Can Ping PC2, but PC1 Gets Request Timed Out

  • Symptom: show ipv6 route ospf on R1 displays 2001:DB8:ACAD:2::/64, and pings sourced from R1 succeed, yet PC1 fails to reach PC2.
  • Cause: Either PC1's IPv6 default gateway is blank or incorrect (should be FE80::1), or R1's GigabitEthernet0/0 was never added to OSPFv3 (ipv6 ospf 1 area 0), leaving R2 without a return route to 2001:DB8:ACAD:1::/64.
  • Fix: Verify show ipv6 route ospf on both R1 and R2 to confirm bidirectional routes exist, and double-check PC1/PC2 default gateways (FE80::1 and FE80::2).

Frequently Asked Questions

Q: Can OSPFv2 and OSPFv3 use the same Process ID and Router ID on the same router?

A: Yes. Process IDs are locally significant and independent between IPv4 (router ospf 1) and IPv6 (ipv6 router ospf 1). Using the same Process ID (1) and matching Router ID (1.1.1.1 on R1, 2.2.2.2 on R2) across both stacks keeps troubleshooting consistent.

Q: Does an interface require an IPv6 Global Unicast Address to form an OSPFv3 adjacency?

A: No. OSPFv3 exchanges Hello packets and forms neighbor relationships strictly using IPv6 link-local addresses (FE80::/10). A transit link only needs ipv6 enable (or a static link-local address) plus ipv6 ospf 1 area 0 to establish an adjacency, though assigning a global unicast /64 prefix makes tracert and router-to-router ping diagnostics clearer in CCNA labs.

Q: Will resetting OSPFv3 disrupt IPv4 traffic on a dual-stack router?

A: In this classic dual-stack lab, running clear ipv6 ospf process resets the OSPFv3 process without resetting OSPFv2. IPv4 routes learned through the separate OSPFv2 process are unaffected.

Related Tutorials on ComputerNetworkingNotes.com

ComputerNetworkingNotes CCNA Tutorials How to Configure Dual-Stack OSPF in Packet Tracer (Step-by-Step Lab)

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com