ipv6 address [prefix/64] eui-64
Configures an IPv6 address on an interface using the EUI-64 format, which automatically generates the interface ID from the MAC address, commonly used for stateless address autoconfiguration (SLAAC).
Definition: ipv6 address [prefix/64] eui-64 is a Cisco IOS interface config command. Configures an IPv6 address on an interface using the EUI-64 format, which automatically generates the interface ID from the MAC address, commonly used for stateless address autoconfiguration (SLAAC).
Overview
The `ipv6 address [prefix/64] eui-64` command configures an IPv6 address on an interface using the EUI-64 format, which automatically generates the interface identifier (the last 64 bits of the address) from the interface's MAC address. This command is essential for stateless address autoconfiguration (SLAAC) in IPv6 networks, allowing hosts to derive their IPv6 address without a DHCP server. The EUI-64 process expands the 48-bit MAC address to 64 bits by inserting 'FFFE' in the middle and flipping the seventh bit (the universal/local bit).
For example, a MAC of 0012.3456.7890 becomes 0212.34FF.FE56.7890. This command is typically used on router interfaces that will serve as default gateways for SLAAC clients, or on point-to-point links where a unique link-local or global unicast address is needed without manual configuration. It is an alternative to manually specifying the full 128-bit address (e.g., `ipv6 address 2001:db8:1:1::1/64`) or using DHCPv6.
The EUI-64 method simplifies address management and ensures uniqueness within a subnet, as MAC addresses are globally unique. However, it has privacy implications because the MAC address can be derived from the IPv6 address, which is why privacy extensions (RFC 4941) are often used on hosts. In a configuration workflow, this command is applied after enabling IPv6 routing globally (`ipv6 unicast-routing`) and entering interface configuration mode.
The command immediately takes effect and appears in the running configuration. It requires privileged EXEC mode (enable) and interface configuration mode. The prefix length must be /64; using a different prefix length will cause an error because EUI-64 requires a 64-bit interface identifier.
This command is commonly used in conjunction with `ipv6 enable` to also generate a link-local address. For troubleshooting, verifying the generated address with `show ipv6 interface brief` or `show ipv6 interface` is essential to confirm the correct prefix and interface ID.
ipv6 address [prefix/64] eui-64When to Use This Command
- Assigning a link-local or global unicast IPv6 address to a router interface for SLAAC-based networks.
- Configuring IPv6 on a LAN interface where hosts will use SLAAC to obtain their addresses.
- Enabling IPv6 routing on a router interface with minimal manual addressing effort.
- Setting up a point-to-point link with EUI-64 addresses for automatic interface ID generation.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| prefix/64 | X:X:X:X::/64 | The IPv6 prefix (first 64 bits) of the address, written in colon-hexadecimal notation. Must be a valid global unicast or unique local prefix (e.g., 2001:db8:1:1::/64). The prefix length must be exactly /64; any other length is invalid with EUI-64. Common mistakes include using a prefix length other than /64 or omitting the trailing '::'. |
Command Examples
Basic EUI-64 address configuration on GigabitEthernet0/0
ipv6 address 2001:db8:1:1::/64 eui-64Router(config-if)# ipv6 address 2001:db8:1:1::/64 eui-64
Router(config-if)# end
Router# show ipv6 interface gigabitethernet 0/0
GigabitEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::20C:29FF:FE8A:4B2C
No Virtual link-local address(es):
Global unicast address(es):
2001:DB8:1:1:20C:29FF:FE8A:4B2C, subnet is 2001:DB8:1:1::/64 [EUI]
Joined group address(es):
FF02::1
FF02::1:FF8A:4B2C
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 millisecondsThe command assigns a global unicast address with prefix 2001:db8:1:1::/64. The EUI-64 process uses the MAC address (e.g., 00:0C:29:8A:4B:2C) to generate the interface ID 20C:29FF:FE8A:4B2C. The output shows the resulting global address and its subnet. The link-local address is also automatically derived from the same MAC.
Verifying EUI-64 address on a serial interface
ipv6 address 2001:db8:2:2::/64 eui-64Router(config-if)# ipv6 address 2001:db8:2:2::/64 eui-64
Router(config-if)# do show ipv6 interface serial 0/0/0
Serial0/0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::20C:29FF:FE8A:4B2C
No Virtual link-local address(es):
Global unicast address(es):
2001:DB8:2:2:20C:29FF:FE8A:4B2C, subnet is 2001:DB8:2:2::/64 [EUI]
Joined group address(es):
FF02::1
FF02::1:FF8A:4B2C
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 millisecondsOn a serial interface, the EUI-64 address is generated similarly. The output confirms the global unicast address and its subnet. Note that the link-local address remains the same across interfaces if the same MAC is used (common on routers with a single MAC for all interfaces).
Understanding the Output
The 'show ipv6 interface' output displays the IPv6 configuration for a specific interface. Key fields include: 'IPv6 is enabled' indicates IPv6 is active; 'link-local address' is the automatically derived FE80:: address; 'Global unicast address(es)' shows the configured global address with its subnet and the [EUI] tag confirming EUI-64 format; 'Joined group address(es)' lists multicast groups the interface belongs to, including the solicited-node multicast group (FF02::1:FFxx:xxxx) used for Neighbor Discovery. A good configuration shows a valid global address with correct prefix length.
Watch for duplicate address detection (DAD) failures or missing global address, which indicate misconfiguration or duplicate MAC issues.
Configuration Scenarios
Configure EUI-64 address on a router LAN interface for SLAAC clients
A router serves as the default gateway for a subnet where hosts use SLAAC to obtain IPv6 addresses. The router's interface needs a global unicast address with EUI-64 to match the prefix advertised via Router Advertisements.
Topology
R1(Gi0/0)---2001:db8:1:1::/64---(Gi0/0)HostsSteps
- 1.Step 1: Enter global configuration mode: R1# configure terminal
- 2.Step 2: Enable IPv6 routing: R1(config)# ipv6 unicast-routing
- 3.Step 3: Enter interface configuration mode: R1(config)# interface GigabitEthernet0/0
- 4.Step 4: Configure the IPv6 address using EUI-64: R1(config-if)# ipv6 address 2001:db8:1:1::/64 eui-64
- 5.Step 5: (Optional) Enable IPv6 on the interface: R1(config-if)# no shutdown
- 6.Step 6: Exit and verify: R1(config-if)# end
! ipv6 unicast-routing ! interface GigabitEthernet0/0 ipv6 address 2001:db8:1:1::/64 eui-64 no shutdown !
Verify: R1# show ipv6 interface brief GigabitEthernet0/0 [up/up] FE80::212:34FF:FE56:7890 2001:DB8:1:1:212:34FF:FE56:7890
Watch out: Ensure the interface MAC address is unique; if two interfaces have the same MAC (e.g., virtual interfaces), the EUI-64 addresses will collide. Also, the prefix length must be /64; using /48 or /56 will cause an error.
Configure EUI-64 on a point-to-point link between two routers
Two routers are connected via a serial link and need IPv6 connectivity. Using EUI-64 simplifies address assignment without manual address planning for each link.
Topology
R1(Se0/0/0)---2001:db8:2:2::/64---(Se0/0/0)R2Steps
- 1.Step 1: On R1, enable IPv6 routing and configure the interface: R1(config)# ipv6 unicast-routing; R1(config)# interface Serial0/0/0; R1(config-if)# ipv6 address 2001:db8:2:2::/64 eui-64
- 2.Step 2: On R2, repeat similar steps: R2(config)# ipv6 unicast-routing; R2(config)# interface Serial0/0/0; R2(config-if)# ipv6 address 2001:db8:2:2::/64 eui-64
- 3.Step 3: Verify connectivity: R1# ping 2001:db8:2:2: (R2's EUI-64 address)
! ! R1 configuration ipv6 unicast-routing ! interface Serial0/0/0 ipv6 address 2001:db8:2:2::/64 eui-64 no shutdown ! ! R2 configuration ipv6 unicast-routing ! interface Serial0/0/0 ipv6 address 2001:db8:2:2::/64 eui-64 no shutdown !
Verify: R1# show ipv6 interface serial 0/0/0 Serial0/0/0 is up, line protocol is up IPv6 is enabled, link-local address is FE80::212:34FF:FE56:7890 Global unicast address(es): 2001:DB8:2:2:212:34FF:FE56:7890, subnet is 2001:DB8:2:2::/64
Watch out: Both routers must use the same prefix; otherwise, they will be on different subnets. Also, ensure the serial interface is not using a loopback address that might conflict.
Troubleshooting with This Command
When troubleshooting the `ipv6 address ... eui-64` command, the primary verification tool is `show ipv6 interface [interface]`. Healthy output shows the interface status as up/up, an IPv6 link-local address (FE80::/10) automatically generated from the MAC, and the configured global unicast address with the EUI-64 interface ID. The interface ID should match the pattern derived from the MAC: for example, if the MAC is 0012.3456.7890, the interface ID should be 0212:34FF:FE56:7890.
A common problem indicator is the absence of a global unicast address, which may mean the command was not applied correctly or the prefix length is not /64. Another issue is duplicate address detection (DAD) failures; if the address is already in use on the subnet, the router will log a DAD error and the address will be marked as 'tentative' or 'duplicate'. Use `show ipv6 interface` to check the address state: 'tentative' means DAD is in progress, 'preferred' means valid, 'deprecated' means lifetime expired, and 'duplicate' indicates a conflict.
If the address shows as 'duplicate', change the MAC address (e.g., by using a different interface) or manually configure a different interface ID. Another symptom is that the link-local address may not be generated if IPv6 is not enabled on the interface; ensure `ipv6 enable` or an `ipv6 address` command is present. For connectivity issues, verify that the prefix is correctly advertised via Router Advertisements (if using SLAAC) by checking `show ipv6 routers` or debugging with `debug ipv6 nd`.
Also, confirm that IPv6 routing is enabled globally with `ipv6 unicast-routing`. If pings fail, check the routing table with `show ipv6 route` to ensure the destination is reachable. Correlate with `show interfaces` to verify the interface is up and has no errors.
For deeper diagnostics, use `debug ipv6 packet` (with caution) to see if packets are being sent and received. In summary, the key fields to focus on are the interface status, the global unicast address presence and state, and the link-local address. A step-by-step diagnostic flow: 1) Check interface status with `show ipv6 interface brief`. 2) Verify the global address is present and not duplicate. 3) Ping the link-local address of the neighbor. 4) Check routing. 5) If using SLAAC, verify Router Advertisements.
CCNA Exam Tips
Remember that EUI-64 inserts FFFE in the middle of the MAC address and flips the U/L bit (7th bit) to 1.
CCNA may ask to calculate the EUI-64 interface ID from a given MAC address (e.g., MAC 00:1C:58:AB:CD:EF becomes 021C:58FF:FEAB:CDEF).
The command is used in interface configuration mode; you must first enter 'interface' mode.
EUI-64 addresses are commonly used with SLAAC; the router can advertise the prefix via Router Advertisements.
Common Mistakes
Forgetting to enable IPv6 globally with 'ipv6 unicast-routing' before configuring interface addresses.
Using the wrong prefix length (must be /64 for EUI-64 to work correctly).
Assuming the link-local address is manually configurable with this command; link-local is automatically generated.
ipv6 address [prefix/64] eui-64 vs ipv6 address [prefix/len]
Both commands assign an IPv6 address to an interface, but they differ in how the interface ID is derived and the prefix length requirement. They are commonly confused because both appear in interface configuration mode and serve similar purposes, yet one relies on EUI-64 auto-generation while the other requires explicit address specification.
| Aspect | ipv6 address [prefix/64] eui-64 | ipv6 address [prefix/len] |
|---|---|---|
| Address specification | Only prefix provided; interface ID auto-generated from MAC | Full address (prefix + interface ID) explicitly provided |
| Prefix length requirement | Requires /64 prefix length | Any valid prefix length (e.g., /48, /64, /124) |
| Interface ID generation | Automatic via EUI-64 | Manual (user specifies) |
| Typical use case | Stateless address autoconfiguration (SLAAC) or simplified configuration | Static addressing with specific IPv6 address |
| Configuration mode | Interface configuration | Interface configuration |
| Persistence | Saved to running-config | Saved to running-config |
Use ipv6 address [prefix/64] eui-64 when you want to leverage SLAAC or need a simple way to generate a unique interface ID from the MAC address, typically in /64 subnets.
Use ipv6 address [prefix/len] when you require a specific IPv6 address or need to configure a prefix length other than /64, such as for point-to-point links or subnetting.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 switches), the command syntax is identical: `ipv6 address prefix/64 eui-64`. However, some platforms may require the `ipv6 unicast-routing` command to be enabled globally. In NX-OS (Cisco Nexus switches), the equivalent command is `ipv6 address prefix/64 eui-64` as well, but note that NX-OS uses a different configuration mode (e.g., `configure terminal` then `interface ethernet 1/1`).
Also, NX-OS may require `feature ipv6` to be enabled first. On Cisco ASA firewalls, IPv6 is supported in later versions (9.x+), and the command is `ipv6 address prefix/64 eui-64` under interface configuration mode, but the ASA uses a different CLI structure (e.g., `interface gigabitethernet0/0`). For IOS-XR, the command is `ipv6 address prefix/64 eui-64` under interface configuration, but note that IOS-XR uses a hierarchical configuration model and requires committing changes.
There are no significant differences between IOS 12.x, 15.x, and 16.x for this command; the syntax and behavior remain consistent. However, in older IOS versions (12.x), the EUI-64 format might not be supported on all interface types (e.g., loopback). Always verify with the specific IOS documentation.
On some platforms, the MAC address used for EUI-64 may be the burned-in MAC of the interface; for virtual interfaces like VLAN interfaces, the MAC may be derived from the switch's base MAC. In summary, the command is widely consistent across Cisco platforms, but always check the specific platform's IPv6 configuration guide.
Related Commands
ipv6 address [prefix/len]
Assigns a global unicast or link-local IPv6 address to an interface, enabling IPv6 routing on that interface.
ipv6 unicast-routing
Enables IPv6 unicast routing on a Cisco router, allowing it to forward IPv6 packets and participate in IPv6 routing protocols.
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.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions