Assigning an IPv6 address to a loopback interface

The following command enables nondefault IPv6 address configuration on loopback interfaces.

Syntax:

interface loopback <0-7> ipv6 address <ipv6-addr>

no interface loopback <0-7> ipv6 address <ipv6-addr>

Configures an IPv6 address on a loopback interface identified by <0-7> .

To remove nondefault IPv6 addresses from the loopback interface, use the no form of the command

NOTE:

You cannot remove the (reserved) default loopback interface address ::1/128 from lo-0.

You can configure up to 32 IPv6 addresses (and up to 32 IPv4 addresses) on a loopback interface. To configure an IPv6 address for the loopback interface, enter the ipv6 address <ip-address> command at the loopback interface configuration level, as shown in the following example.

When you configure an IPv6 address for a loopback interface, you do not specify a prefix. The default prefix/128 applies automatically.
Switch(config)# interface loopback 1
Switch(lo-1)# IPv6 address 2001:db8::1

NOTE:
  • You can configure a loopback interface only from the CLI; you cannot configure a loopback interface from the Web Agent.

  • IPv6 loopback interfaces share IPv6 address space with VLAN configurations. The maximum number of IPv6 addresses supported on a switch is 2048, which includes all IPv6 addresses configured for both VLANs and loopback interfaces (except for the default loopback IPv6 address, ::1 /128).

  • Each IPv6 address that you configure on a loopback interface must be unique on switch.

  • You can configure up to 32 IPv6 and 32 IPv4 addresses on a loopback interface (lo0 to lo7).