MAC Address Converter, EUI-64 Calculator and IPv6 Expander

MAC Address Converter, EUI-64 and IPv6 Address Tool

Convert MAC addresses between every common format, decode the I/G and U/L bits, build EUI-64 interface IDs and IPv6 link-local or SLAAC addresses, map multicast groups to MAC addresses, and expand or compress IPv6 addresses (RFC 5952). Everything runs in your browser.

Inputs are saved in the page URL, so you can share or bookmark a result.

1. MAC address converter (bulk)

Accepted: aa:bb:cc:dd:ee:ff, AA-BB-CC-DD-EE-FF, aabb.ccdd.eeff (Cisco), aabb-ccdd-eeff, aabbccddeeff, aa bb cc dd ee ff. Up to 500 lines.

2. EUI-64: MAC to IPv6 interface ID, link-local and SLAAC address

Reverse: EUI-64 IPv6 address to MAC

3. Multicast group to multicast MAC (IPv4 and IPv6)

An IPv6 unicast address gives its solicited-node group (ff02::1:ffXX:XXXX) and that group's MAC.

4. IPv6 address expander and compressor (RFC 5952)

What this tool does

This MAC address converter reads a MAC address in any of the formats that switches, routers and operating systems print, and rewrites it in all the others: colon, hyphen, Cisco dotted, bare hex, upper and lower case, plus the binary form. It decodes the two flag bits of the first octet (individual/group and universal/local), detects broadcast and well-known protocol addresses such as STP, LLDP, CDP, HSRP and VRRP, and converts a whole list at once when you paste one address per line.

The same page converts a MAC address to IPv6: it builds the modified EUI-64 interface ID, the fe80::/64 link-local address and the full SLAAC-style address for any /64 prefix you enter, and it turns an EUI-64 based IPv6 address back into the MAC address. It also maps IPv4 and IPv6 multicast groups to their Ethernet multicast MAC addresses (with the 32-to-1 overlap list for IPv4) and works as an IPv6 address expander and compressor that writes the canonical RFC 5952 form.

How it works

MAC address formats and the I/G and U/L bits

A MAC address (EUI-48) is 48 bits, written as 6 octets or 12 hex digits. The separators are only notation: 00:1b:21:3c:4d:5e, 00-1B-21-3C-4D-5E, 001b.213c.4d5e and 001b213c4d5e are the same address. Two bits of the first octet have a meaning (IEEE 802, RFC 7042 section 2.1):

  • I/G bit (value 0x01, least significant bit of the first octet): 0 = individual (unicast), 1 = group (multicast). ff:ff:ff:ff:ff:ff is the broadcast address. Ethernet sends each octet least significant bit first, so this is the first bit on the wire.
  • U/L bit (value 0x02): 0 = universally administered (the first 3 octets are an OUI assigned by the IEEE), 1 = locally administered (set by an administrator, a hypervisor or a randomized Wi-Fi address).

Modified EUI-64 interface ID

RFC 4291 Appendix A builds a 64-bit interface ID from a 48-bit MAC: split the MAC after the third octet, insert ff:fe in the middle, then invert the universal/local bit (XOR the first octet with 0x02). The link-local address is fe80:: plus that interface ID (fe80::/10 with 54 zero bits, RFC 4291 section 2.5.6). With SLAAC (RFC 4862) a host combines a /64 prefix from a Router Advertisement with the same interface ID. The reverse works only when bytes 12 and 13 of the address are ff:fe; flip the bit back and drop ff:fe.

Multicast MAC mapping

  • IPv4 (RFC 1112 section 6.4): the low-order 23 bits of the group address go into the low-order 23 bits of 01:00:5e:00:00:00. A group address has 28 significant bits, so 5 bits are lost and 32 groups share each MAC.
  • IPv6 (RFC 2464 section 7): 33:33 followed by the last 4 octets of the group address. The solicited-node group of a unicast address is ff02::1:ff plus its last 24 bits (RFC 4291 section 2.7.1).

IPv6 canonical text form

RFC 5952 section 4: drop leading zeros in each 16-bit group, use lowercase hex, replace the longest run of two or more all-zero groups with :: (the first run if two are equally long), and never use :: for a single zero group. For IPv4-mapped addresses (::ffff:0:0/96) RFC 5952 section 5 recommends mixed notation such as ::ffff:192.0.2.1; the tool shows both forms.

Sources: RFC 7042 (IEEE 802 parameters, I/G and U/L bits, 33-33 block), RFC 4291 (IPv6 addressing, Appendix A modified EUI-64, solicited-node), RFC 4862 (SLAAC), RFC 8064 (stable IIDs instead of EUI-64), RFC 1112 (IPv4 multicast MAC), RFC 2464 (IPv6 over Ethernet), RFC 5952 (IPv6 text form), RFC 5798 (VRRP MACs), IEEE standard group MAC addresses (STP, LACP, LLDP), and the Cisco HSRP configuration guides (HSRP virtual MACs).

Worked examples

Example 1: Cisco dotted MAC to every format

Input 0050.56C0.0008. Colon form 00:50:56:c0:00:08, Windows form 00-50-56-C0-00-08, bare 005056c00008. The first octet 00 is 00000000 in binary: I/G = 0 (unicast) and U/L = 0 (globally unique, the OUI 00:50:56 is assigned by the IEEE).

Example 2: MAC to IPv6 link-local and SLAAC address (EUI-64)

MAC 00:1b:21:3c:4d:5e. Split: 00:1b:21 | 3c:4d:5e. Insert ff:fe: 00:1b:21:ff:fe:3c:4d:5e. Flip the U/L bit: first octet 0x00 XOR 0x02 = 0x02. Interface ID 021b:21ff:fe3c:4d5e, link-local fe80::21b:21ff:fe3c:4d5e, and with prefix 2001:db8:acad:10::/64 the address 2001:db8:acad:10:21b:21ff:fe3c:4d5e. On Cisco IOS this is what ipv6 address 2001:db8:acad:10::/64 eui-64 configures.

Example 3: locally administered MAC

MAC 52:54:00:12:34:56 (a typical QEMU/KVM virtual NIC). The first octet 0x52 is 01010010: U/L = 1, so the address is locally administered and has no registered vendor. EUI-64 flips the bit to 0: interface ID 5054:00ff:fe12:3456, link-local fe80::5054:ff:fe12:3456.

Example 4: IPv4 multicast 239.1.1.1 and the 32:1 overlap

239.1.1.1 is 0xEF010101. The low 23 bits are 0x010101, so the MAC is 01:00:5e:01:01:01. The same MAC is used by 224.1.1.1, 224.129.1.1, 225.1.1.1, 225.129.1.1 and so on up to 239.129.1.1, 32 groups in total. OSPF AllSPFRouters 224.0.0.5 maps to 01:00:5e:00:00:05.

Example 5: IPv6 multicast and solicited-node MAC

ff02::5 (OSPFv3 AllSPFRouters) maps to 33:33:00:00:00:05. The unicast address 2001:db8:acad:10:21b:21ff:fe3c:4d5e has the solicited-node group ff02::1:ff3c:4d5e, which maps to 33:33:ff:3c:4d:5e.

Example 6: IPv6 address expander and compressor

2001:0DB8:0000:0000:0000:ff00:0042:8329 compresses to 2001:db8::ff00:42:8329. 2001:db8:0:0:1:0:0:1 has two equal zero runs, so only the first is shortened: 2001:db8::1:0:0:1. 2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001.

Reference: well-known MAC addresses

MAC address / rangeUseSource
ff:ff:ff:ff:ff:ffBroadcastIEEE 802
01:00:5e:00:00:00 to 01:00:5e:7f:ff:ffIPv4 multicastRFC 1112, RFC 7042
33:33:00:00:00:00 to 33:33:ff:ff:ff:ffIPv6 multicastRFC 2464
01:80:c2:00:00:00Bridge group address (STP/RSTP/MSTP BPDUs)IEEE 802.1Q
01:80:c2:00:00:02Slow protocols (LACP, Ethernet OAM)IEEE 802.1AX / 802.3
01:80:c2:00:00:0eNearest bridge group address (LLDP)IEEE 802.1Q / 802.1AB
01:00:0c:cc:cc:ccCisco CDP, VTP, DTP, PAgP, UDLDCisco
00:00:5e:00:01:XXVRRP virtual MAC for IPv4, XX = VRIDRFC 5798
00:00:5e:00:02:XXVRRP virtual MAC for IPv6, XX = VRIDRFC 5798
0000.0c07.acXXHSRP version 1 virtual MAC, XX = group (hex)Cisco
0000.0c9f.fXXXHSRP version 2 (IPv4) virtual MAC, XXX = group (hex)Cisco
0005.73a0.0XXXHSRP version 2 (IPv6) virtual MACCisco

How vendors display MAC addresses

PlatformTypical format
Cisco IOS / IOS-XE / NX-OS, Arista EOS001b.213c.4d5e
Juniper Junos, Linux (ip link), macOS00:1b:21:3c:4d:5e
Windows (ipconfig /all, getmac)00-1B-21-3C-4D-5E
Huawei VRP, HPE Comware001b-213c-4d5e

Limitation: the tool contains no OUI vendor database and makes no network requests. To find the manufacturer, search the first three octets in the IEEE Registration Authority public listing.

FAQ

What MAC address formats does this converter accept?

Colon (aa:bb:cc:dd:ee:ff), hyphen (AA-BB-CC-DD-EE-FF), Cisco dotted (aabb.ccdd.eeff), aabb-ccdd-eeff, bare 12 hex digits (aabbccddeeff) and space-separated octets, in upper or lower case. Paste one address per line to convert a whole list at once.

How is an EUI-64 interface ID built from a MAC address?

The 48-bit MAC is split in half, ff:fe is inserted in the middle to make 64 bits, and the universal/local bit (0x02 in the first octet) is inverted, as described in RFC 4291 Appendix A. 00:1b:21:3c:4d:5e becomes 021b:21ff:fe3c:4d5e and the link-local address fe80::21b:21ff:fe3c:4d5e.

Why is the 7th bit flipped in modified EUI-64?

RFC 4291 inverts the universal/local bit so that in an interface ID a value of 1 means globally unique. This lets administrators hand-configure short local interface IDs such as ::1 instead of having to write 0200::1.

Why do 32 IPv4 multicast groups share one multicast MAC address?

An IPv4 multicast address has 28 significant bits, but only the low-order 23 bits are copied into the MAC address 01:00:5e:00:00:00 (RFC 1112). The 5 bits that are dropped give 2^5 = 32 groups per MAC. For example 224.1.1.1, 225.1.1.1 and 239.129.1.1 all map to 01:00:5e:01:01:01, so a switch or NIC filtering on the MAC can deliver traffic for groups the host did not join.

How is an IPv6 multicast address mapped to a MAC address?

RFC 2464 uses 33:33 followed by the last 32 bits of the IPv6 group address. ff02::1 maps to 33:33:00:00:00:01 and the solicited-node group ff02::1:ff3c:4d5e maps to 33:33:ff:3c:4d:5e.

What is the canonical way to write an IPv6 address?

RFC 5952: lowercase hex, no leading zeros in a group, :: replaces the longest run of two or more all-zero groups (the first one if two runs are equally long), and a single zero group is never shortened. 2001:0DB8:0000:0000:0000:ff00:0042:8329 becomes 2001:db8::ff00:42:8329.

Can the tool tell me the vendor of a MAC address?

No. The tool has no OUI vendor database and works offline in your browser. Look up the first three octets (the OUI) in the IEEE Registration Authority public listing. A locally administered address (U/L bit = 1), such as a randomized Wi-Fi MAC, has no registered vendor.

Do hosts still use EUI-64 for SLAAC addresses?

Often not. RFC 8064 recommends stable opaque interface IDs (RFC 7217) instead of embedding the MAC address, and Windows, macOS, iOS, Android and many Linux distributions use random or opaque interface IDs by default. Routers such as Cisco IOS still build EUI-64 link-local addresses and support the eui-64 keyword on the ipv6 address command.

Related tools

Comments

Popular posts from this blog

BGP Neighbor States

Reason legend in show ip ospf statistics

Cisco SPAN Port Mirroring: Practical Guide for Troubleshooting