ipv6 address
Syntax
ipv6 address <IPV6-ADDR>/<MASK>{eui64 | [tag <ID>]}
no ipv6 address <IPV6-ADDR>/<MASK>
Description
Sets an IPv6 address on the interface.
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.eui64
- Configure the IPv6 address in the EUI-64 bit format.
tag <ID>
Configure route tag for connected routes. Range: 0 to 4294967295. Default: 0.
Authority
Administrators or local user group members with execution rights for this command.
Examples
Setting the IPv6 address 2001:0db8:85a3::8a2e:0370:7334 with a mask of 24 bits:
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:
switch(config-if)# no ipv6 address 2001:0db8:85a3::8a2e:0370:7334/24