IPv6 Unicast Routing

Last Updated: July 31, 2012

An IPv6 unicast address is an identifier for a single interface, on a single node. A packet that is sent to a unicast address is delivered to the interface identified by that address.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Information About IPv6 Unicast Routing

IPv6 Address Type: Unicast

An IPv6 unicast address is an identifier for a single interface, on a single node. A packet that is sent to a unicast address is delivered to the interface identified by that address. Cisco software supports the IPv6 unicast address types described in the following sections.

Aggregatable Global Address

An aggregatable global address is an IPv6 address from the aggregatable global unicast prefix. The structure of aggregatable global unicast addresses enables strict aggregation of routing prefixes that limits the number of routing table entries in the global routing table. Aggregatable global addresses are used on links that are aggregated upward through organizations, and eventually to the ISPs.

Aggregatable global IPv6 addresses are defined by a global routing prefix, a subnet ID, and an interface ID. Except for addresses that start with binary 000, all global unicast addresses have a 64-bit interface ID. The IPv6 global unicast address allocation uses the range of addresses that start with binary value 001 (2000::/3). The figure below shows the structure of an aggregatable global address.

Figure 1 Aggregatable Global Address Format


Addresses with a prefix of 2000::/3 (001) through E000::/3 (111) are required to have 64-bit interface identifiers in the extended universal identifier (EUI)-64 format. The Internet Assigned Numbers Authority (IANA) allocates the IPv6 address space in the range of 2000::/16 to regional registries.

The aggregatable global address typically consists of a 48-bit global routing prefix and a 16-bit subnet ID or site-level aggregator (SLA). In the IPv6 aggregatable global unicast address format document (RFC 2374), the global routing prefix included two other hierarchically structured fields named top-level aggregator (TLA) and next-level aggregator (NLA). The Internet Engineering Task Force (IETF) decided to remove the TLA and NLA fields from the RFCs because these fields are policy-based. Some existing IPv6 networks deployed before the change might still be using networks based on the older architecture.

A 16-bit subnet field called the subnet ID could be used by individual organizations to create their own local addressing hierarchy and to identify subnets. A subnet ID is similar to a subnet in IPv4, except that an organization with an IPv6 subnet ID can support up to 65,535 individual subnets.

An interface ID is used to identify interfaces on a link. The interface ID must be unique to the link. It may also be unique over a broader scope. In many cases, an interface ID will be the same as or based on the link-layer address of an interface. Interface IDs used in aggregatable global unicast and other IPv6 address types must be 64 bits long and constructed in the modified EUI-64 format.

Interface IDs are constructed in the modified EUI-64 format in one of the following ways:

  • For all IEEE 802 interface types (for example, Ethernet and FDDI interfaces), the first three octets (24 bits) are taken from the Organizationally Unique Identifier (OUI) of the 48-bit link-layer address (the media access control, or MAC, address) of the interface, the fourth and fifth octets (16 bits) are a fixed hexadecimal value of FFFE, and the last three octets (24 bits) are taken from the last three octets of the MAC address. The construction of the interface ID is completed by setting the universal/local (U/L) bit--the seventh bit of the first octet--to a value of 0 or 1. A value of 0 indicates a locally administered identifier; a value of 1 indicates a globally unique IPv6 interface identifier.
  • For other interface types (for example, ATM, Frame Relay, loopback, serial, and tunnel interface types except tunnel interfaces used with IPv6 overlay tunnels), the interface ID is constructed in the same way as the interface ID for IEEE 802 interface types; however, the first MAC address from the pool of MAC addresses in the device is used to construct the identifier (because the interface does not have a MAC address).
  • For tunnel interface types that are used with IPv6 overlay tunnels, the interface ID is the IPv4 address assigned to the tunnel interface with all zeros in the high-order 32 bits of the identifier.

    Note


    For interfaces using point-to-point protocol (PPP), given that the interfaces at both ends of the connection might have the same MAC address, the interface identifiers used at both ends of the connection are negotiated (picked randomly and, if necessary, reconstructed) until both identifiers are unique. The first MAC address in the device is used to construct the identifier for interfaces using PPP.

If no IEEE 802 interface types are in the device, link-local IPv6 addresses are generated on the interfaces in the device in the following sequence:

  1. The device is queried for MAC addresses (from the pool of MAC addresses in the device).
  2. If no MAC addresses are available in the device, the serial number of the device is used to form the link-local addresses.
  3. If the serial number of the device cannot be used to form the link-local addresses, the device uses a message digest algorithm 5 (MD5) hash to determine the MAC address of the device from the hostname of the device.

Link-Local Address

A link-local address is an IPv6 unicast address that can be automatically configured on any interface using the link-local prefix FE80::/10 (1111 1110 10) and the interface identifier in the modified EUI-64 format. Link-local addresses are used in the neighbor discovery protocol and the stateless autoconfiguration process. Nodes on a local link can use link-local addresses to communicate; the nodes do not need globally unique addresses to communicate. The figure below shows the structure of a link-local address.

IPv6 devices must not forward packets that have link-local source or destination addresses to other links.

Figure 2 Link-Local Address Format


IPv4-Compatible IPv6 Address

An IPv4-compatible IPv6 address is an IPv6 unicast address that has zeros in the high-order 96 bits of the address and an IPv4 address in the low-order 32 bits of the address. The format of an IPv4-compatible IPv6 address is 0:0:0:0:0:0:A.B.C.D or ::A.B.C.D. The entire 128-bit IPv4-compatible IPv6 address is used as the IPv6 address of a node and the IPv4 address embedded in the low-order 32 bits is used as the IPv4 address of the node. IPv4-compatible IPv6 addresses are assigned to nodes that support both the IPv4 and IPv6 protocol stacks and are used in automatic tunnels. The figure below shows the structure of an IPv4-compatible IPv6 address and a few acceptable formats for the address.

Figure 3 IPv4-Compatible IPv6 Address Format


Unique Local Address

A unique local address is an IPv6 unicast address that is globally unique and is intended for local communications. It is not expected to be routable on the global Internet and is routable inside of a limited area, such as a site. It may also be routed between a limited set of sites.

A unique local address has the following characteristics:

  • It has a globally unique prefix (that is, it has a high probability of uniqueness).
  • It has a well-known prefix to allow for easy filtering at site boundaries.
  • It allows sites to be combined or privately interconnected without creating any address conflicts or requiring renumbering of interfaces that use these prefixes.
  • It is ISP-independent and can be used for communications inside of a site without having any permanent or intermittent Internet connectivity.
  • If it is accidentally leaked outside of a site via routing or DNS, there is no conflict with any other addresses.
  • Applications may treat unique local addresses like global scoped addresses.

The figure below shows the structure of a unique local address.

Figure 4 Unique Local Address Structure


Site-Local Address

Because RFC 3879 obsoletes the use of site-local addresses, configuration of private IPv6 addresses should be done following the recommendations of unique local addressing in RFC 4193.

How to Configure IPv6 Unicast Routing

Configuring IPv6 Addressing and Enabling IPv6 Routing

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    interface type number

4.   Do one of the following:

  • ipv6 address ipv6-prefix/prefix-length eui-64
  • ipv6 address ipv6-prefix/prefix-length link-local
  • ipv6 address ipv6-prefix/prefix-length anycast
  • ipv6 enable

5.    exit

6.    ipv6 unicast-routing


DETAILED STEPS
  Command or Action Purpose
Step 1
enable


Example:

Device> enable

 

Enables privileged EXEC mode.

  • Enter your password if prompted.
 
Step 2
configure terminal


Example:

Device# configure terminal

 

Enters global configuration mode.

 
Step 3
interface type number


Example:

Device(config)# interface ethernet 0/0

 

Specifies an interface type and number, and places the device in interface configuration mode.

 
Step 4
Do one of the following:
  • ipv6 address ipv6-prefix/prefix-length eui-64
  • ipv6 address ipv6-prefix/prefix-length link-local
  • ipv6 address ipv6-prefix/prefix-length anycast
  • ipv6 enable


Example:

Device(config-if)# ipv6 address 2001:DB8:0:1::/64 eui-64



Example:

Device(config-if)# ipv6 address FE80::260:3EFF:FE11:6770 link-local



Example:

Device(config-if) ipv6 address 2001:DB8:1:1:FFFF:FFFF:FFFF:FFFE/64 anycast



Example:

Device(config-if)# ipv6 enable

 

Specifies an IPv6 network assigned to the interface and enables IPv6 processing on the interface.

or

Specifies an IPv6 address assigned to the interface and enables IPv6 processing on the interface.

or

Automatically configures an IPv6 link-local address on the interface while also enabling the interface for IPv6 processing.

or

Enable IPv6 processing on an interface that has not been configured with an explicit IPv6 address.

  • Specifying the ipv6 address eui-64 command configures global IPv6 addresses with an interface identifier (ID) in the low-order 64 bits of the IPv6 address. Only the 64-bit network prefix for the address needs to be specified; the last 64 bits are automatically computed from the interface ID.
  • Specifying the ipv6 address link-local command configures a link-local address on the interface that is used instead of the link-local address that is automatically configured when IPv6 is enabled on the interface.
  • Specifying the ipv6 address anycast command adds an IPv6 anycast address.
 
Step 5
exit


Example:

Device(config-if)# exit

 

Exits interface configuration mode, and returns the device to global configuration mode.

 
Step 6
ipv6 unicast-routing


Example:

Device(config)# ipv6 unicast-routing

 

Enables the forwarding of IPv6 unicast datagrams.

 

Configuration Examples for IPv6 Unicast Routing

Example: IPv6 Addressing and IPv6 Routing Configuration

In this example, IPv6 is enabled on the device with both a link-local address and a global address based on the IPv6 prefix 2001:DB8:c18:1::/64. The EUI-64 interface ID is used in the low-order 64 bits of both addresses. Output from the show ipv6 interface command is included to show how the interface ID (260:3EFF:FE47:1530) is appended to the link-local prefix FE80::/64 of Ethernet interface 0.

ipv6 unicast-routing
interface ethernet 0
  ipv6 address 2001:DB8:c18:1::/64 eui-64

Device# show ipv6 interface ethernet 0

Ethernet0 is up, line protocol is up
 IPv6 is enabled, link-local address is FE80::260:3EFF:FE47:1530
  Global unicast address(es):
    2001:DB8:C18:1:260:3EFF:FE47:1530, subnet is 2001:DB8:C18:1::/64
  Joined group address(es):
    FF02::1
    FF02::2
    FF02::1:FF47:1530
    FF02::9
  MTU is 1500 bytes
  ICMP error messages limited to one every 500 milliseconds
  ND reachable time is 30000 milliseconds
  ND advertised reachable time is 0 milliseconds
  ND advertised retransmit interval is 0 milliseconds
  ND router advertisements are sent every 200 seconds
  ND router advertisements live for 1800 seconds
  Hosts use stateless autoconfig for addresses.

In the following example, multiple IPv6 global addresses within the prefix 2001:DB8::/64 are configured on Ethernet interface 0:

interface ethernet 0
 ipv6 address 2001:DB8::1/64
 ipv6 address 2001:DB8::/64 eui-64

Additional References

Related Documents

Related Topic Document Title

IPv6 addressing and connectivity

IPv6 Configuration Guide

IPv4 addressing

IP Addressing: IPv4 Addressing Configuration Guide

Cisco IOS commands

Cisco IOS Master Commands List, All Releases

IPv6 commands

Cisco IOS IPv6 Command Reference

Cisco IOS IPv6 features

Cisco IOS IPv6 Feature Mapping

Standards and RFCs

Standard/RFC Title

RFCs for IPv6

IPv6 RFCs

MIBs

MIB

MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs

Technical Assistance

Description Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html

Feature Information for IPv6 Unicast Routing

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Table 1 Feature Information for IPv6 Unicast Routing
Feature Name Releases Feature Information

IPv6 Routing: Unicast Routing

12.2(25)SEA

12.2(40)SG

15.2(2)S

An IPv6 unicast address is an identifier for a single interface, on a single node. A packet that is sent to a unicast address is delivered to the interface identified by that address.

The following commands were introduced or modified: ipv6 address, ipv6 address anycast, ipv6 address eui-64, ipv6 address link-local, ipv6 enable, ipv6 unicast-routing.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

© 2012 Cisco Systems, Inc. All rights reserved.