Skip to content
Contents
GuidesOpenWrt

How to calculate the IPv6 EUI-64 suffix from an OpenWrt LAN bridge MAC

A MAC starting with 4a can give you an IPv6 suffix starting with 48. You can check the arithmetic against our OpenWrt 25.12.6 virtual router without changing any settings.

A MAC starting with 4a can give you an IPv6 suffix starting with 48. You can check the arithmetic against our OpenWrt 25.12.6 virtual router without changing any settings.

Find the MAC that matters

In LuCI open Network → Interfaces → Devices. Over SSH, read l3_device and replace br-lan below if needed. Use link/ether for that device. The label on the case may show another MAC. We explicitly selected eui64. A silent second command leaves the setting unconfirmed.

ifstatus lan
uci -q get network.lan.ip6ifaceid
ip link show dev br-lan
ip -6 addr show dev br-lan

LuCI · br-lan · 4a:42:e4:12:34:56

Why 4a becomes 48

Insert ff:fe between the two halves of the MAC. XOR the first byte with hexadecimal 02 to flip the second bit from the right. This changes 4a to 48 but also changes 00 to 02, so subtracting two only works in some cases. Group the bytes in pairs.

4a:42:e4:12:34:56
4a:42:e4:ff:fe:12:34:56
4a XOR 02 = 48
48:42:e4:ff:fe:12:34:56
4842:e4ff:fe12:3456

Check the last four groups in Interfaces

Expand any double colon in the LAN /64 address and compare the last four groups. Our local ULA address matched. This check tells you nothing about public prefix delegation.

LuCI · LAN · 4842:e4ff:fe12:3456

When we removed the explicit suffix setting, the ULA reverted to fd42:1111:2222::1 while the link-local address kept the calculated suffix.

Check the intended address separately from the fe80 link-local address. They can use different suffixes. Look for a fixed value, a stable privacy identifier or a temporary address. Leave the MAC alone. If you previously changed the suffix, restore its original setting and check management access and local DNS.

Troubleshoot OpenWrt IPv6 prefix delegation when only WAN has IPv6

Explore hardware

Comments