ipv6 address [addr] link-local
Assigns a link-local IPv6 address to an interface, overriding the automatically generated EUI-64 address.
Definition: ipv6 address [addr] link-local is a Cisco IOS interface config command. Assigns a link-local IPv6 address to an interface, overriding the automatically generated EUI-64 address.
Overview
The `ipv6 address [addr] link-local` command in Cisco IOS assigns a static link-local IPv6 address to an interface, overriding the automatically generated EUI-64 address. Link-local addresses are essential for IPv6 neighbor discovery, routing protocol adjacencies (e.g., OSPFv3, EIGRP for IPv6), and next-hop addresses in routing tables. By default, Cisco IOS automatically generates a link-local address using the EUI-64 format based on the interface MAC address.
However, network engineers often need to manually assign a well-known, predictable link-local address for easier troubleshooting, security policies, or to ensure consistency across redundant links. This command is used in interface configuration mode and immediately replaces the auto-generated address. It is important to note that a link-local address is required for IPv6 to function on an interface; if you remove the auto-generated one without assigning a static one, the router will automatically generate a new EUI-64 address.
The command does not affect the global unicast address configuration. Privilege level 15 (enable) is required to enter global configuration mode. The change is written to the running configuration immediately.
This command is commonly used when configuring OSPFv3, where the router ID is derived from the link-local address, or when setting up static routes with link-local next hops. It also helps in scenarios where MAC address changes (e.g., due to hardware replacement) would otherwise break neighbor relationships. The command is available in all IOS versions (12.x, 15.x, 16.x) and is supported on routers, switches, and firewalls running IOS.
Understanding link-local addressing is fundamental to IPv6 networking, as every IPv6-enabled interface must have at least one link-local address. The command provides control over this critical address, ensuring network stability and predictability.
ipv6 address [addr] link-localWhen to Use This Command
- Manually specifying a well-known link-local address for easier troubleshooting (e.g., FE80::1 on a router interface).
- Ensuring consistent link-local addressing across redundant links for predictable OSPFv3 or EIGRPv6 neighbor relationships.
- Configuring a specific link-local address for security or policy-based routing purposes.
- Avoiding automatic EUI-64 generation when interface MAC changes (e.g., on redundant supervisor modules).
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| addr | X:X:X:X::X | The IPv6 address to assign as the link-local address. Must be in the fe80::/10 range (typically fe80::/64). Common practice uses fe80::1, fe80::2, etc. The address must be a valid unicast address. A common mistake is using a global unicast address (e.g., 2001::1) which will be rejected because the link-local prefix is required. |
Command Examples
Assign a specific link-local address
ipv6 address fe80::1 link-localRouter(config-if)# ipv6 address fe80::1 link-local
Router(config-if)# end
Router# show ipv6 interface brief
GigabitEthernet0/0 [up/up]
FE80::1
unassigned
The command assigns FE80::1 as the link-local address. 'show ipv6 interface brief' confirms the link-local address is now FE80::1 instead of the auto-generated EUI-64 address.
Override auto-generated link-local address
ipv6 address fe80::2 link-localRouter(config-if)# ipv6 address fe80::2 link-local % Interface GigabitEthernet0/0 already has a link-local address FE80::2E0:FCFF:FE00:1 % Overwriting with FE80::2 Router(config-if)# end Router# show ipv6 interface gigabitethernet 0/0 | include link-local IPv6 is enabled, link-local address is FE80::2
The warning indicates an existing link-local address is being replaced. The 'show ipv6 interface' output confirms the new link-local address.
Understanding the Output
The command itself produces no output unless there is a conflict. Use 'show ipv6 interface [interface]' or 'show ipv6 interface brief' to verify. In 'show ipv6 interface', look for 'link-local address is' followed by the address.
A manually configured link-local address will appear exactly as configured; an auto-generated one will include the EUI-64 format (e.g., FE80::2E0:FCFF:FE00:1). Ensure the address is in the FE80::/10 range; otherwise, the command will be rejected.
Configuration Scenarios
Assigning a static link-local address to a router interface for OSPFv3
In OSPFv3, the router ID is derived from the link-local address. Using a predictable link-local address simplifies troubleshooting and ensures stability if the interface MAC changes.
Topology
R1(Gi0/0)---fe80::1 link-local---(Gi0/0)R2 with fe80::2Steps
- 1.Step 1: Enter privileged EXEC mode: enable
- 2.Step 2: Enter global configuration mode: configure terminal
- 3.Step 3: Enter interface configuration mode: interface GigabitEthernet0/0
- 4.Step 4: Assign the link-local address: ipv6 address fe80::1 link-local
- 5.Step 5: Enable IPv6 on the interface: ipv6 enable
- 6.Step 6: Exit and verify: end, show ipv6 interface brief
! Full IOS config block interface GigabitEthernet0/0 ipv6 address fe80::1 link-local ipv6 enable
Verify: show ipv6 interface GigabitEthernet0/0 | include link-local Expected output: IPv6 is enabled, link-local address is fe80::1
Watch out: If you omit 'ipv6 enable', the interface may not have a link-local address at all (auto-generation occurs only when IPv6 is enabled). Always ensure IPv6 is enabled on the interface.
Overriding the auto-generated link-local address on a switch VLAN interface
On a multilayer switch, VLAN interfaces (SVIs) auto-generate link-local addresses based on the MAC. For consistent routing adjacencies, assign a static link-local address.
Topology
SW1(Vlan10)---fe80::1 link-local---(Vlan10)SW2 with fe80::2Steps
- 1.Step 1: Enter privileged EXEC mode: enable
- 2.Step 2: Enter global configuration mode: configure terminal
- 3.Step 3: Enter interface configuration mode: interface Vlan10
- 4.Step 4: Assign the link-local address: ipv6 address fe80::1 link-local
- 5.Step 5: Enable IPv6: ipv6 enable
- 6.Step 6: Exit and verify: end, show ipv6 interface Vlan10
! Full IOS config block interface Vlan10 ipv6 address fe80::1 link-local ipv6 enable
Verify: show ipv6 interface Vlan10 | include link-local Expected output: link-local address is fe80::1
Watch out: If the VLAN interface is not in up/up state, the link-local address may not appear. Ensure the VLAN exists and the switchport is active.
Troubleshooting with This Command
When troubleshooting IPv6 connectivity, the link-local address is often the first thing to verify. A healthy interface will show a link-local address in the 'fe80::/10' range. Use 'show ipv6 interface [interface]' to display the link-local address.
If the output shows 'Link-local address: fe80::... [TEN]' (TEN = tentative), the address is still being verified via Duplicate Address Detection (DAD). If it shows 'Link-local address: fe80::... [DUPLICATE]', there is an address conflict. In that case, remove the static assignment and let the router auto-generate a new one, or assign a different static address.
Another common symptom is that OSPFv3 neighbors fail to form. Check that both sides have link-local addresses in the same subnet (fe80::/64) and that they are reachable. Use 'show ipv6 route' to verify that the next-hop address for OSPFv3 routes is the link-local address of the neighbor.
If the link-local address is missing, the interface may not have IPv6 enabled. Use 'show running-config interface [interface]' to confirm the 'ipv6 enable' command is present. Also, ensure that the interface is not administratively down.
For static routes using link-local next hops, the outgoing interface must be specified (e.g., 'ipv6 route 2001:db8::/32 GigabitEthernet0/0 fe80::2'). If the link-local address changes, static routes become invalid. Correlate with 'debug ipv6 routing' to see routing updates.
In summary, always start troubleshooting IPv6 by checking the link-local address assignment and its state.
CCNA Exam Tips
CCNA 200-301: Remember that link-local addresses must be in the FE80::/10 range; any other prefix will be rejected.
CCNA 200-301: The 'link-local' keyword is mandatory; omitting it assigns a global unicast address instead.
CCNA 200-301: Manually configured link-local addresses override auto-generated ones; this is a common exam scenario.
CCNA 200-301: Use 'show ipv6 interface brief' to quickly verify link-local addresses on all interfaces.
Common Mistakes
Forgetting the 'link-local' keyword, which assigns a global unicast address instead of a link-local address.
Using an address outside the FE80::/10 range, causing the command to be rejected.
Assuming the link-local address is automatically derived from the MAC address; manual configuration overrides it.
ipv6 address [addr] link-local vs ipv6 address [prefix/len]
Both commands configure IPv6 addresses on an interface, but they serve distinct purposes. The 'ipv6 address [addr] link-local' command explicitly sets a link-local address, overriding the automatically generated EUI-64 address, while 'ipv6 address [prefix/len]' assigns a global unicast address (or potentially a link-local address if the prefix is FE80::/10) and enables IPv6 routing on the interface.
| Aspect | ipv6 address [addr] link-local | ipv6 address [prefix/len] |
|---|---|---|
| Scope | Assigns a link-local address only | Assigns a global unicast or link-local address |
| IPv6 Activation | Does not enable IPv6 on the interface; requires 'ipv6 enable' or a global address | Enables IPv6 on the interface and generates automatic link-local address |
| Effect on Auto-generated Link-Local | Overrides the auto-generated EUI-64 link-local address | Does not affect the auto-generated link-local address (unless prefix is link-local) |
| Typical Use | Custom link-local for neighbor discovery or routing protocol stability | Global unicast addressing for end-to-end reachability and routing |
Use ipv6 address [addr] link-local when you need a specific, stable link-local address for OSPFv3 or other protocols that rely on link-local addressing.
Use ipv6 address [prefix/len] when you want to assign a global unicast address and enable IPv6 routing on the interface.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 switches), the command syntax is identical: 'ipv6 address fe80::1 link-local'. The output of 'show ipv6 interface' is similar but may include additional fields like 'IPv6 subnet' and 'Anycast address'. In NX-OS (e.g., Nexus switches), the equivalent command is 'ipv6 address fe80::1 link-local' under interface configuration mode, but note that NX-OS uses 'ipv6 enable' as well.
However, NX-OS does not automatically generate a link-local address; you must explicitly assign one or use 'ipv6 address autoconfig' to get an EUI-64 link-local. In ASA (Adaptive Security Appliance), the command is 'ipv6 address fe80::1 link-local' under interface configuration, but the ASA uses a different configuration hierarchy (e.g., 'interface gigabitethernet0/0'). In IOS-XR, the command is 'ipv6 address fe80::1 link-local' under interface configuration, but the configuration is committed differently (using 'commit').
The behavior is consistent across IOS versions 12.x, 15.x, and 16.x. One notable difference: in older IOS (12.x), the 'ipv6 enable' command was not always required; IPv6 was enabled automatically when a global or link-local address was configured. In modern IOS (15.x+), 'ipv6 enable' is recommended to ensure IPv6 processing is active.
Always check the specific platform documentation.
Related Commands
ipv6 address [prefix/len]
Assigns a global unicast or link-local IPv6 address to an interface, enabling IPv6 routing on that interface.
show ipv6 interface [interface]
Displays detailed IPv6 configuration and status for an interface, including all IPv6 addresses, link-local address, NDP settings, RA flags (M/O), and whether the interface is forwarding IPv6 packets.
show ipv6 interface brief
Displays a summary of all interfaces with IPv6 addresses, their operational status (up/up), and all IPv6 addresses assigned including link-local, global unicast, and anycast addresses.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions