An ethernet frame header is defined as:
struct ethernet_header {
uint8_t dest_address[6];
uint8_t source_address[6];
uint16_t length_or_ethertype;
};
My understanding is that the 6-octet MAC address format is now formally known as EUI-48
. I have also read that there is another format, known as EUI-64
, which describes an 8-octet MAC address.
But I'm very confused about the purpose of EUI-64
. At face value, the obvious reason for EUI-64
is to deal with address exhaustion when we have more than 2^48 unique devices on Earth. However, all available information I can find Googling about EUI-64
seems to only talk about it in relation to IPv6. That is, EUI-64
provides a way to map a 48-bit MAC address to a IPv6 address.
But, apart from IPv6, does EUI-64
have any other purpose? Was EUI-64 invented purely to solve a problem related to IPv6, or was it also invented to deal with the eventual exhaustion of 48-bit MAC addresses?
I assumed that EUI-64 was primarily designed to deal with eventual exhaustion of 48-bit MAC addresses - meaning that many new hardware devices will be created that have 64-bit MAC addresses (or Extended Unique Identifiers, to use the formally correct term.) But if this is the case, how will any existing networking equipment, such as routers and switches, be able to tell the difference between a packet with a 48-bit source and destination address, and a packet with a 64-bit source and destination address?
Since the first two fields of an Ethernet header are the 2 48-bit source/destination addresses, we can't just replace these fields with 64-bit source/destination addresses, because any software inspecting the packet won't know how to tell the difference, since there is no "type" or "version" field that precedes the addresses. (In the way that, for example, an IP header conveniently has a 4-bit version field as the first 4-bits of the header, so we can easily distinguish between IPv4 and IPv6).
So my question(s):
Is EUI-64 meant to solve 48-bit MAC address exhaustion, or is it only meant to map MAC addresses to IPv6 addresses?
If EUI-64 is meant to solve eventual 48-bit address exhaustion, how can networking software distinguish between Ethernet packets containing 48-bit versus 64-bit MAC addresses?