ipv6 address

Use this command to set the IPv6 address and enable IPv6 processing on an interface.

Syntax

ipv6 address {link-local-address link-local | ipv6-address/length | ipv6-prefix/length eui-64 | autoconfig | general-prefix sub-bits/length}
no ipv6 address {link-local-address link-local | ipv6-address/length | ipv6-prefix/length eui-64 | autoconfig | general-prefix sub-bits/length}

Parameters

link-local-address link-local Specifies an IPv6 link-local address.
ipv6-address/length Specifies the IPv6 address for this interface.
ipv6-prefix/length eui-64 Formulate the IPv6 address using an EUI?64 ID in the lower order 64 bits of the address.
autoconfig Specifies that autoconfiguration of the IPv6 address is enabled for this interface. IPv6 address autoconfiguration is disabled by default.
general-prefix sub-bits/length Specifies a configured general prefix followed by the sub-bits and length that complete the address.

Defaults

None.

Mode

Interface configuration.

Usage

Use this command to manually configure a global unicast IPv6 address for an interface. Link local addresses are network addresses which are intended only for communications within one segment of a local network (a link) or a point-to-point connection. They allow addressing hosts without using a globally-routable address prefix. Routers will not forward packets with link-local addresses. A link local address must begin with fe80:.

A single link local address is supported per interface. If IPv6 autoconfiguration is enabled, the link local address is autoconfigured. When manually configuring a link local address, if a link local address already exists on the interface, a warning displays asking you if you wish to change it.

EUI-64 is an automatic interface addressing capability. By implementing the IEEE's 64-bit Extended Unique Identifier (EUI-64) format, a host can automatically assign itself a unique 64-bit IPv6 interface identifier without the need for manual configuration or DHCP. This is accomplished on Ethernet interfaces by referencing the already unique 48-bit MAC address and reformatting that value to match the EUI-64 specification as specified in RFC 2373. When configuring an EUI-64 address, the specified prefix must have a length of 64.

A general prefix allows an assigned name to represent a network prefix from which longer IPv6 addresses can be configured. The sub-bits added to the general prefix can both extend the network prefix by adding to the specified prefix length, as well as complete the IPv6 address. See ipv6 general-prefix for general prefix command details.

Use show ipv6 interface to display IPv6 addresses assigned by the ipv6 address command.

See ip address for IPv4 address configuration command information.

The no ipv6 address command removes the specified IPv6 address configuration for this interface.

Examples

This example sets the IPv6 address for interface VLAN 50 to ba10:1100:aa11:c171:0:0:1111:00/48:

System(su-config)->interface vlan 50
System(su-config-intf-vlan.0.50)->ipv6 address ba10:1100:aa11:c171:0:0:1111:00/48
System(su-config-intf-vlan.0.50)->

This example sets the IPv6 link local address for interface VLAN 50 to fe80:1234:5678::300:

System(su-config)->interface vlan 50
System(su-config-intf-vlan.0.50)->ipv6 address fe80:1234:5678::300 link-local
Do you want to replace IPv6 link-local address (y/n) [n]?y
System(su-config-intf-vlan.0.50)->

This example sets an IPv6 EUI-64 address for interface VLAN 50 based upon the prefix 2001:febd:1234:0/64, and displays the EUI-64 address in the interface output:

System(su-config)->interface vlan 50
System(su-config-intf-vlan.0.50)->ipv6 address 2001:febd:1234:0/64 eui-64
System(su-config-intf-vlan.0.50)->show ipv6 interface vlan.0.50
 vlan.0.50 is Operationally down, Administratively down
  IPv6 is enabled link-local address is fe80::2e0:63ff:fe6b:1d26%vlan.0.50
  Global unicast address(es):
    2001:febd:1234::2e0:63ff:fe6b:1d26, subnet is 2001:febd:1234::/64 [EUI]
...
System(su-config-intf-vlan.0.50)->

The following example creates a general prefix named “Doc-Prefix” with a prefix value of 2001:11ac:fd34::/48 and assigns the IPv6 address 2001:11ac:fd34:50:0:0:abcd:33 to VLAN 51. The general prefix Doc-Prefix is followed by ::50:0:0:abcd:33/64. The subnet length is changed to /64 adding :50 to the general prefix to create a network prefix of 2001:11ac:fd34:50/64:

System(su)->configure
System(su-config)->ipv6 general-prefix Doc-Prefix 2001:11ac:fd34::/48
System(su-config)->show ipv6 general-prefix
  ipv6 general-prefix Doc-Prefix 2001:11ac:fd34::/48
System(su-config)->interface vlan 51
System(su-config-intf-vlan.0.51)->ipv6 address Doc-Prefix ::50:0:0:abcd:33/64
System(su-config-intf-vlan.0.51)->show ipv6 interface vlan.0.51
 vlan.0.51 is Operationally down, Administratively down
  IPv6 is enabled link-local address is fe80::211:88ff:fe7c:32c1%vlan.0.51
  Global unicast address(es):
    2001:11ac:fd34:50:0:0:abcd:33, subnet is 2001:11ac:fd34:50::/64
...
System(su-config-intf-vlan.0.51)->