ipv6 address [prefix/len]
Assigns a global unicast or link-local IPv6 address to an interface, enabling IPv6 routing on that interface.
ipv6 address [prefix/len]When to Use This Command
- Configuring an IPv6 address on a router interface to enable IPv6 communication on a subnet
- Setting a link-local address manually for neighbor discovery or routing protocol adjacency
- Assigning an IPv6 address to a VLAN interface for inter-VLAN routing
- Configuring an IPv6 address on a loopback interface for management or OSPFv3 router-id
Command Examples
Assign a global unicast IPv6 address
ipv6 address 2001:db8:1:1::1/64Router(config-if)# ipv6 address 2001:db8:1:1::1/64
Router(config-if)# end
Router# show ipv6 interface brief
GigabitEthernet0/0 [up/up]
FE80::1
2001:DB8:1:1::1The command assigns the global unicast address 2001:db8:1:1::1/64 to the interface. The output from 'show ipv6 interface brief' shows the interface state and the IPv6 addresses configured, including the automatically generated link-local address (FE80::1) and the assigned global address.
Assign a link-local address manually
ipv6 address fe80::1 link-localRouter(config-if)# ipv6 address fe80::1 link-local
Router(config-if)# end
Router# show ipv6 interface gigabitethernet0/0
GigabitEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::1
Global unicast address(es):
2001:DB8:1:1::1, subnet is 2001:DB8:1:1::/64This manually sets the link-local address to FE80::1. The 'show ipv6 interface' output confirms the link-local address and also shows any global unicast addresses configured on the interface.
Understanding the Output
The command itself does not produce output; it configures the interface. To verify, use 'show ipv6 interface brief' or 'show ipv6 interface [interface]'. The 'show ipv6 interface brief' output lists each interface with its status (up/down) and the IPv6 addresses assigned. The 'show ipv6 interface' output provides detailed information including the link-local address, global unicast addresses, multicast groups, and neighbor discovery parameters. Key fields: 'IPv6 is enabled' indicates the interface is active; 'link-local address' is the automatically generated or manually set link-local; 'Global unicast address(es)' lists assigned global addresses. A good state shows 'up/up' for the interface and valid addresses. Watch for 'Tentative' or 'Duplicate' status indicating address conflicts.
CCNA Exam Tips
Remember that the 'ipv6 address' command is configured in interface configuration mode, not global config.
The 'link-local' keyword is required to manually set a link-local address; otherwise, the router auto-generates one from the EUI-64 format.
CCNA 200-301 expects you to know that IPv6 addresses are configured with a prefix length (e.g., /64), not a subnet mask.
Be aware that 'ipv6 address' can also be used with 'eui-64' to generate the interface ID from the MAC address.
Common Mistakes
Forgetting to enter interface configuration mode before using the command (results in '% Invalid input detected').
Using a subnet mask (e.g., 255.255.255.0) instead of a prefix length (e.g., /64).
Omitting the 'link-local' keyword when trying to set a specific link-local address, causing the router to interpret it as a global address.
Related Commands
ipv6 enable
Enables IPv6 processing on an interface, allowing the interface to forward IPv6 traffic and participate in IPv6 routing protocols.
show ipv6 interface brief
Displays a summary of IPv6 interface status and addresses, useful for quickly verifying IPv6 configuration and interface operational state.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions