CCNA online course

How to Configure IPv6 on a Cisco Router

Learn how to enable IPv6 routing, configure router interfaces and link-local addresses, add static routes, verify connectivity, and troubleshoot IPv6 on Cisco IOS.

IPv6 configuration on a Cisco router has four main stages: understand the address, enable IPv6 forwarding, configure each routed interface, and verify the resulting interfaces and routes. This lesson uses documentation prefixes such as 2001:db8::/32; do not use these prefixes for production Internet connectivity.

Basic Cisco IOS command modes are assumed. Enter privileged EXEC mode with enable, then enter global configuration mode with configure terminal. For background, review the OSI reference model and basic computer networking concepts.

IPv6 addressing fundamentals

IPv6 is Internet Protocol version 6 and uses 128-bit addresses. An address is normally written as eight groups of four hexadecimal digits called hextets. Hextets are separated by colons.

2001:0db8:0010:0001:0000:0000:0000:0001

A prefix length identifies how many leading bits represent the network portion. For example, /64 means that the first 64 bits are the network prefix and the remaining 64 bits are commonly used for the interface identifier.

IPv6 shortening rules

  • Remove leading zeros from each hextet. For example, 0db8 becomes db8, and 0001 becomes 1. A hextet containing only zeros becomes 0.
  • Replace one consecutive run of all-zero hextets with ::.
  • Use :: only once in an address. Otherwise, the number of omitted hextets would be ambiguous.

For example, 2001:0db8:0000:0000:0000:0000:0000:0010 becomes 2001:db8::10. If two zero runs exist, compress the longer run. If they are equal, compress the first one.

Common IPv6 address categories

Address typeTypical prefix or rangeScopeRouter configuration relevance
Global unicastCommonly 2000::/3Routable across networks and, when assigned, the InternetUsed for routed interfaces, host addresses, and static-route next hops
Link-localFE80::/10One local Layer 2 linkAutomatically present on IPv6-enabled interfaces; useful for Neighbor Discovery and routing next hops
Unique localFC00::/7Private organizational networksUseful for internal addressing; not globally Internet-routable
MulticastFF00::/8A group of receiversUsed by Neighbor Discovery, Router Advertisements, and other IPv6 functions
Loopback::1/128The local device onlyUsed to test the local IPv6 stack
Unspecified::/128No address assignedRepresents an unknown source or default-route prefix context; it is not assigned to an interface
IPv4-embedded or transition-relatedExamples include mapped or translation-specific formatsDepends on the transition mechanismUsed by particular coexistence or translation technologies, not as a general replacement for normal IPv6 addressing

An IPv6 interface normally has a link-local address even when no global address has been manually configured. A link-local address supports communication with neighbors on the local link, including Neighbor Discovery and router discovery. A global unicast or unique local address is needed when the interface must be addressed within a broader routed network.

Most Ethernet LANs use a /64 prefix. The upper 64 bits identify the LAN, while the lower 64 bits form the interface identifier. The identifier can be manually selected, generated with EUI-64, or formed by a host using SLAAC information.

Enable IPv6 forwarding on Cisco IOS

Assigning an IPv6 address to an interface does not necessarily enable the router to forward IPv6 packets between interfaces. Enable IPv6 unicast routing globally when the router must route between IPv6 networks.

Router> enable
Router# configure terminal
Router(config)# ipv6 unicast-routing
Router(config)# end

IPv6 unicast routing means Cisco IOS can forward IPv6 unicast packets between routed interfaces. Command syntax and feature availability can vary by IOS version, platform, feature set, and interface type. If a command is rejected, check the platform's supported commands and interface capabilities.

Configure static IPv6 addresses on interfaces

Choose the routed interface that connects to a Layer 3 segment. Ethernet, serial, VLAN, loopback, and other routed interfaces can carry IPv6 when supported. Use a different IPv6 prefix for each separate Layer 3 network.

Router# configure terminal
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address 2001:db8:10:1::1/64
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface GigabitEthernet0/1
Router(config-if)# ipv6 address 2001:db8:10:2::1/64
Router(config-if)# no shutdown
Router(config-if)# end

In this example, GigabitEthernet0/0 belongs to 2001:db8:10:1::/64, while GigabitEthernet0/1 belongs to 2001:db8:10:2::/64. A host on the first LAN should use 2001:db8:10:1::1 as its IPv6 default gateway. A host on the second LAN should use 2001:db8:10:2::1. Hosts must use the gateway address on their own local prefix.

DeviceInterfaceIPv6 address/prefixLink-local addressPurpose
RouterGigabitEthernet0/02001:db8:10:1::1/64Automatic or FE80::1Gateway for user LAN
RouterGigabitEthernet0/12001:db8:10:2::1/64AutomaticGateway for server LAN
HostLAN 1 adapter2001:db8:10:1::10/64Usually automaticUser endpoint
HostLAN 2 adapter2001:db8:10:2::10/64Usually automaticServer endpoint

Configure IPv6 link-local addresses

A link-local address is generated automatically when IPv6 is enabled on an interface. It is valid only on that interface's local Layer 2 segment and is never routed beyond that link.

You can configure a predictable link-local address manually:

Router# configure terminal
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address FE80::1 link-local
Router(config-if)# end

Link-local addresses are not globally unique in the same way as global unicast addresses. When a command references a link-local next hop, IOS commonly needs the outgoing interface as well. The interface identifier, sometimes called a zone identifier in host operating systems, tells the device which local link to use.

IPv6 interface configuration alternatives

Manual addressing

Manual static addressing is the basic CCNA method. It provides predictable addresses for router interfaces, infrastructure devices, and documented lab topologies.

EUI-64 interface identifiers

EUI-64 derives the lower 64-bit interface identifier from the interface MAC address. Configure it by specifying the prefix and the eui-64 keyword:

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address 2001:db8:10:1::/64 eui-64

EUI-64 can make an address less convenient to read and document. Modern hosts may use privacy-generated identifiers instead, so do not assume every endpoint identifier comes directly from its MAC address.

SLAAC and DHCPv6

SLAAC, or Stateless Address Autoconfiguration, allows a host to use an IPv6 prefix learned from an ICMPv6 Router Advertisement and form its own address. DHCPv6 can provide additional configuration or addresses depending on the network design. These methods are commonly used on client-facing devices rather than for the router's own basic interface addresses.

When IPv6 routing is enabled and an interface is operational, the router can advertise router and prefix information with Router Advertisements. Neighbor Discovery uses ICMPv6 messages for neighbor reachability, address resolution, router discovery, and related functions.

Route IPv6 traffic between networks

For a router to forward traffic between two IPv6 networks, it needs an IPv6 address on each connected network and IPv6 forwarding must be enabled. Directly connected networks appear automatically in the IPv6 routing table after the interface is configured and operational.

Connected, local, static, and default routes

  • Connected route: identifies an IPv6 prefix directly attached to an operational interface.
  • Local route: identifies a specific IPv6 address assigned to one of the router's interfaces.
  • Static route: is manually configured by an administrator to reach a remote prefix.
  • Default route: ::/0, used when no more-specific route matches the destination.

Static route with a global next hop

Suppose Router 1 reaches the remote LAN 2001:db8:10:3::/64 through Router 2 at 2001:db8:10:12::2:

Router1# configure terminal
Router1(config)# ipv6 route 2001:db8:10:3::/64 2001:db8:10:12::2
Router1(config)# end

The next hop must be reachable through an existing route, normally the directly connected transit network. The remote router also needs a return route to the source network.

Static route with an exit interface

For a directly connected point-to-point link, an exit interface can be appropriate:

Router1(config)# ipv6 route 2001:db8:10:3::/64 Serial0/0/0

The exact behavior and preferred syntax can depend on the interface type and IOS release. On multiaccess networks, specifying only an exit interface may not provide enough next-hop information, so use the platform's supported form carefully.

Default route with a link-local next hop

An edge router forwarding unknown destinations toward an upstream router at FE80::2 on GigabitEthernet0/0 can use:

Router(config)# ipv6 route ::/0 GigabitEthernet0/0 FE80::2

The outgoing interface is required because FE80::2 is meaningful only on its local link. Verify that the upstream router's link-local address is actually on GigabitEthernet0/0.

Verify IPv6 configuration and connectivity

CommandConfiguration modePurposeExpected result or key output
show ipv6 interface briefPrivileged EXECSummarizes interface state and IPv6 addressesInterfaces should be up/up and show expected global and link-local addresses
show ipv6 interface GigabitEthernet0/0Privileged EXECDisplays detailed IPv6 propertiesShows link-local address, multicast memberships, Neighbor Discovery details, and operational state
show ipv6 routePrivileged EXECDisplays the IPv6 routing tableShows local, connected, static, and default routes
show ipv6 route staticPrivileged EXECFilters for static routesConfirms whether configured static routes are installed
show running-config | section interfacePrivileged EXECDisplays interface configuration sectionsConfirms the intended address and no shutdown commands
show running-config | include ipv6 unicast-routingPrivileged EXECChecks global IPv6 forwardingDisplays the command if it is configured
ping ipv6 2001:db8:10:2::10Privileged EXECTests IPv6 reachabilitySuccessful replies confirm reachability from the router or selected source
traceroute ipv6 2001:db8:10:3::10Privileged EXECShows the IPv6 path toward a destinationIdentifies the hop where forwarding stops

Test in layers

  1. Test the local interface and its directly connected neighbor. A failure here suggests interface state, Layer 2, addressing, or Neighbor Discovery problems.
  2. Test the router's address from a host on the same subnet. Confirm the host prefix and default gateway.
  3. Test a remote subnet across the router. Confirm the router has a route and that the destination host is configured correctly.
  4. Test end-to-end connectivity across multiple routers. Check every forward and return path with routing tables and traceroute.

When testing a link-local address, identify the correct outgoing interface or source according to the IOS ping workflow. The same link-local value can exist on different interfaces, and a link-local destination cannot be reached through a remote routed path.

Troubleshoot common IPv6 failures

SymptomLikely causeVerification commandCorrective action
Interfaces have addresses, but hosts on different LANs cannot communicateIPv6 forwarding is disabled, an interface is down, or hosts have an incorrect gatewayshow running-config | include ipv6 unicast-routing
show ipv6 interface brief
show ipv6 route
Enable ipv6 unicast-routing, activate interfaces, and use the router address on each host's own LAN as its gateway
A configured static route does not reach the remote networkWrong or unreachable next hop, wrong prefix length, or missing return routeshow ipv6 route
ping ipv6 2001:db8:10:12::2
traceroute ipv6 destination
Correct the destination or next hop, verify the transit path, and add a valid return route
A route using FE80::2 failsNo exit interface was specified, or the link-local address belongs to another interfaceshow ipv6 interface GigabitEthernet0/0
show ipv6 route
Specify the correct outgoing interface with the link-local next hop and verify both routers share the same Layer 2 link
The expected global address is absentInvalid syntax, wrong interface, or removed/replaced configurationshow ipv6 interface brief
show running-config interface GigabitEthernet0/0
Reapply the address under the correct interface and verify the prefix length
Ping to a link-local address fails or is ambiguousDestination is not local, or source/interface identification is missingshow ipv6 interface
ping ipv6
Use the address only on its directly connected link and identify the correct interface or source

Use the verification output to isolate the failure domain: interface output reveals local addressing and state; Neighbor Discovery details reveal local neighbor problems; the routing table reveals route selection; and end-to-end tests reveal missing return paths or endpoint gateway errors.

Save and document the configuration

After testing, save the working configuration so it survives a reload:

Router# copy running-config startup-config

Maintain a simple addressing plan containing the device, interface, IPv6 prefix, interface address, link-local address, host gateway, and static routes. Clear documentation helps identify wrong prefixes, duplicate addresses, and incorrect link-local interfaces.

Complete two-LAN configuration example

Router> enable
Router# configure terminal
Router(config)# ipv6 unicast-routing
Router(config)# interface GigabitEthernet0/0
Router(config-if)# description User LAN
Router(config-if)# ipv6 address 2001:db8:10:1::1/64
Router(config-if)# ipv6 address FE80::1 link-local
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface GigabitEthernet0/1
Router(config-if)# description Server LAN
Router(config-if)# ipv6 address 2001:db8:10:2::1/64
Router(config-if)# no shutdown
Router(config-if)# end
Router# show ipv6 interface brief
Router# show ipv6 route
Router# ping ipv6 2001:db8:10:2::10
Router# copy running-config startup-config