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 1routes only IPv4 traffic; enablingipv6 router ospf 1routes 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.

Key Differences: OSPFv2 vs. OSPFv3
| Feature | OSPFv2 (IPv4) | OSPFv3 (IPv6) |
|---|---|---|
| Target Protocol | IPv4 | IPv6 (classic mode) / IPv4 & IPv6 (IOS-XE Address Families) |
| Global Prerequisite | ip routing (enabled by default) | ipv6 unicast-routing (disabled by default; mandatory) |
| Interface Activation | network command in router mode OR ip ospf <pid> area <id> under interface | Interface-level only: ipv6 ospf <pid> area <id> (no network statement) |
| Multicast Addresses | 224.0.0.5 (AllSPFRouters), 224.0.0.6 (AllDRouters) | FF02::5 (AllSPFRouters), FF02::6 (AllDRouters) |
| Neighbor Source & Next-Hop | Interface IPv4 unicast address (10.1.12.2); peers must share a subnet | Interface 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 |
| Authentication | Clear-text (Type 1) or MD5 (Type 2) in OSPF header | IPsec AH/ESP (classic OSPFv3); authentication trailer on supported platforms (RFC 7166) |
| LSA Architecture | Types 1-5, 7 | Renamed 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:
- Dual-Stack-OSPF-Starter.pkt (Pre-cabled topology ready for configuration)
- Dual-Stack-OSPF-Completed.pkt (Fully configured and verified solution)

Physical Cabling Table
| Source Device & Port | Cable Type | Destination Device & Port |
|---|---|---|
| PC1 (FastEthernet0) | Copper Straight-Through | S1 (FastEthernet0/1) |
| S1 (GigabitEthernet0/1) | Copper Straight-Through | R1 (GigabitEthernet0/0) |
| R1 (GigabitEthernet0/1) | Copper Cross-Over | R2 (GigabitEthernet0/1) |
| R2 (GigabitEthernet0/0) | Copper Straight-Through | S2 (GigabitEthernet0/1) |
| S2 (FastEthernet0/1) | Copper Straight-Through | PC2 (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.
| Device | Interface | IPv4 Address / Mask | IPv6 Global Unicast | IPv6 Link-Local | Default Gateway (IPv4 / IPv6) |
|---|---|---|---|---|---|
| R1 | G0/0 (LAN 1) | 192.168.10.1 /24 (255.255.255.0) | 2001:DB8:ACAD:1::1/64 | FE80::1 | N/A |
| R1 | G0/1 (Transit) | 10.1.12.1 /30 (255.255.255.252) | 2001:DB8:ACAD:12::1/64 | FE80::1 | N/A |
| R2 | G0/1 (Transit) | 10.1.12.2 /30 (255.255.255.252) | 2001:DB8:ACAD:12::2/64 | FE80::2 | N/A |
| R2 | G0/0 (LAN 2) | 192.168.20.1 /24 (255.255.255.0) | 2001:DB8:ACAD:2::1/64 | FE80::2 | N/A |
| PC1 | FastEthernet0 | 192.168.10.10 /24 | 2001:DB8:ACAD:1::10/64 | Auto (FE80::...) | 192.168.10.1 / FE80::1 |
| PC2 | FastEthernet0 | 192.168.20.10 /24 | 2001:DB8:ACAD:2::10/64 | Auto (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)# endConfigure 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)# endConfigure PC1 and PC2 in Packet Tracer
- 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.

Figure 3: Dual-stack static IPv4 and IPv6 addressing configured on PC1. - Under IP Configuration, select Static and enter:
- 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
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)# exitConfigure 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)# exitMoments 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
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-configConfigure 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-configOnce 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
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 Task | OSPFv2 (IPv4) Command | OSPFv3 (IPv6) Command |
|---|---|---|
| Check Neighbor Adjacencies | show ip ospf neighbor | show ipv6 ospf neighbor |
| Inspect Learned OSPF Routes | show ip route ospf | show ipv6 route ospf |
| Verify OSPF Interfaces & Areas | show ip ospf interface brief | show ipv6 ospf interface brief |
| Check Router ID & Passive Links | show ip protocols | show 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
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). Undershow 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).
- IPv4 (
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
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
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:
- 2001:DB8:ACAD:1::1 (R1 G0/0 — PC1's gateway)
- 2001:DB8:ACAD:12::2 (R2 G0/1 — Transit link)
- 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.

1. IPv4 Pings Succeed, but IPv6 Fails Between LANs (ipv6 unicast-routing Missing)
- Symptom:
show ipv6 ospf neighborreturns no output, or PC1 can ping its own gateway (FE80::1) but cannot reach PC2. - Cause:
ipv6 unicast-routingwas omitted in global configuration mode. Without it, Cisco routers do not forward routed IPv6 packets or start OSPFv3. - Fix: Enter
ipv6 unicast-routingglobally on both routers and verify withshow running-config | include unicast-routing.
2. OSPFv3 Process Refuses to Start (%OSPFv3-4-NORTRID)
- Symptom: Entering
ipv6 router ospf 1triggers "%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 withclear 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 ospfon R1 displays2001: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 ospfon 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
Author Laxmi Goswami Updated on 2026-11-22
