ipv6 address
Syntax
ipv6 address <IPV6-ADDR>/<MASK>
no ipv6 address <IPV6-ADDR>/<MASK>
Description
Sets an IPv6 address on the interface. To configure the interface as layer 3, use the
routing
command.
The
no
form of this command removes the IPv6 address on the interface.
This command automatically creates an IPv6 link-local address on the interface. However, it does not add the
ipv6 address link-local
command to the running configuration. If you remove the IPv6 address, the link-local address is also removed. To maintain the link-local address, you must manually execute the
ipv6 address link-local
command.
Command context
config-if
Parameters
<IPV6-ADDR>
Specifies the IP address in IPv6 format (
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
), wherex
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 address2222:0000:3333:0000:0000:0000:4444:0055
becomes2222:0:3333::4444:55
.<MASK>
Specifies the number of bits in the address mask in CIDR format (
x
), wherex
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