ipv6 address

Syntax

ipv6 address <IPV6-ADDR>/<MASK>

no ipv6 address <IPV6-ADDR>/<MASK>

Description

Sets an IPv6 address on the interface. Configure the interface as layer 3 using the routing command.

The no form of this command removes the IPv6 address on the interface.

Command context

config-if

Parameters

<IPV6-ADDR>

Specifies the IP address in IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx), where x is a hexadecimal number from 0 to F. You can use two colons (::) to represent consecutive zeros (but only once), remove leading zeros, and collapse a hextet of four zeros to a single 0. For example, this address 2222:0000:3333:0000:0000:0000:4444:0055 becomes 2222:0:3333::4444:55.

<MASK>

Specifies the number of bits in the address mask in CIDR format (x), where x is a decimal number from 0 to 128.

Authority

Administrators

Examples

Setting the IPv6 address on interface 1/1/1 to 2001:0db8:85a3::8a2e:0370:7334 with a mask of 24 bits:

switch(config)# interface 1/1/1
switch(config-if)# ipv6 address 2001:0db8:85a3::8a2e:0370:7334/24

Removing the IP address 2001:0db8:85a3::8a2e:0370:7334 with mask of 24 bits on interface 1/1/1:

switch(config)# interface 1/1/1
switch(config-if)# no ipv6 address 2001:0db8:85a3::8a2e:0370:7334/24