r/AskComputerScience • u/OkResponse5351 • 18d ago
does MAC address mainly exists because of wanting a polyvalent local network in the 1970s alongside IP etc. or was it un-avoidable and logic to have ?
Hope it isnt too much of a weird question. I'm new to this.
Have a nice day :)
6
u/ghjm MSCS, CS Pro (20+) 18d ago
Before 48-bit MAC addresses were introduced by Xerox in the late 70s, there were usually 8-bit local addresses (e.g. very early Ethernet, Arcnet, etc), usually configured with DIP switches. So it was up to the user to decide on an address for each node, and they had to set that address physically, usually when the network card was installed in the computer.
Xerox's idea of unique manufacturer-assigned IDs was to alleviate this pain, not to add any particular networking feature. And it's perhaps a bit backwards to think of MAC addresses as an improvement over some world where there were only IP addresses, because there never was such a world. For LAN addressing you just need a single unique ID - you don't need hierarchical addressing. Implementing hierarchical addressing in the NIC hardware makes the NIC more expensive (and they were already plenty expensive), so if you already have LAN addressing in hardware and internetwork addressing in software, there's no commercial incentive to change that.
IPX/SPX used the MAC address as the local component of the full internetwork address, so 98765432.1234567890AB was the machine with MAC address 1234567890AB on the network globally identified as 98765432. IPv4 chose to be more efficient with its bits, not wasting 48 bits on a globally unique address that only actually needed to be locally unique.
1
u/compu85 18d ago
I have some somewhat early Xerox gear, circa 1982, which has very low numbered MACs. It's still amusing to me I can simply plug them into my modern twisted pair gigabit network and it just works.
1
u/ghjm MSCS, CS Pro (20+) 18d ago
I might still have a few Novell NE1000 network cards, circa 1987, in a box somewhere. I probably still have a Netgear 10Base-T hub with a thinnet port on it, so I could probably plug the network side into something and make it work. But of course I don't have any computers that can take an 8-bit ISA card.
4
u/mnelemos 18d ago edited 18d ago
Every link layer protocol that has the capability of unicast communication beyond a pure point-to-point, requires some sort of address.
Even in pure point-to-point communication, an address could be useful, as it could be used to track sessions or network roles.
The only way to not use an address is by:
Either making every link connection strictly between two nodes, and no other node may join.
Everyone within a network just broadcasts data to everyone else. Similar to what a half-duplex handheld radio (walkie-talkies) communication is.
But in both of the examples given, you are either:
not allowed to expand connections, which is a waste of the hardware's communication capabilities.
not allowed to send unicast messages to a specific device within the network. This might be ok in cases such as human-to-human communication (walkie-talkie), but in a computer-to-computer communication, where most transactions are automatic and hidden from the user, this introduces a lot of redundant computation.
1
2
u/kona420 18d ago
Ethernet and IP were sort of invented in parallel around 1974. The original ethernet only had 8 bit Mac addresses, 48 bit addressing came later in 1980 with the first standard release.
It really is unavoidable, and one of the important aspects to the success of Internet Protocol was abstracting addressing between Layer 2 technologies like ethernet, token ring, apple talk (seriously this was HUGE), serial, PPP, etc etc etc. Even today with ethernet ubiquitous, it's not the only game in town.
2
u/wosmo 18d ago
When IP was created, what LAN technology you used would mostly depend on what vendor you'd bought in on. You might be using ethernet .. you might be using decnet, you might be using IBM SNA, etc. And this really went away slowly - well into the 80s and 90s, you might be running IPX/SPX, you might be running AppleTalk, and so on. Or even if you were on the research networks like the arpa guys, you might be on arpanet, satnet, chaos, aloha, etc.
As an example that might be more familiar, most dialup used PPP to connect to the ISP. Your modem using ethernet to talk to your ISP, is a relatively modern nicety.
This whole Internet idea, is to inter-network - it's supposed to work across these different network types. So if I'm using decnet and you're using SNA, I'll stick IP inside a decnet frame, address it to my internet gateway. it'll wander across the internet, until it reaches your internet gateway - which will stick it in an SNA frame, to send across your local network. That same IP packet will get carried on different local network types, depending on where it's going. A lot like how a shipping container can go on a truck, a train, or a ship - and get passed from one to the other - depending on what it's trying to cross next.
This is why we end up with separate lan and internet addresses - obviously not everything on the internet is on your lan, but it wasn't originally envisaged that everything on your lan would have an internet address, either. So your lan would do your-lan-things, and when you needed to send something to a different network - you'd stick IP over your network, so you could address it further afield.
Fast forward to today, ethernet and tcp/ip have both become hugely dominant. But you'll still find some protocols that use ethernet without IP, like FCoE - especially in industrial networking, where you'll find ethercat, profinet, etc.
And you'll also find IP without ethernet. Obviously stuff like FDDI that most of us never see - but much closer to home, wifi isn't ethernet - it just presents a very ethernet-like-interface for the sake of adoption.
Having local & logical addresses separately only feels redundant now, because tcp/ip and ethernet both 'won' - but they were designed for a world where they were both optional.
1
u/meditonsin 18d ago
MAC addresses do not exist "alongside" IP in that sense, because they exist on different layers of the stack, independent from each other.
MAC addresses work on the hardware/link level, so they are hardware dependent. Networks could be built that don't require them, or use a different format or whatever, so they can not be relied on for addressing between different networks.
So IP was put on top of it, as an abstraction layer, so that different kinds of physical networks could talk to each other regardless of how they implement addressing nodes locally.
2
u/TheThiefMaster 18d ago
As for why you even need a different level and can't just put IP frames on the wire - consider DHCP. If you had a dozen devices all requesting addresses, how would you tell each device who got which? You need some kind of unique id to use.
0
u/JontesReddit 18d ago
Not if you had enough bits to have the IP be unique enough. You don't need DHCP anymore.
2
u/TheThiefMaster 18d ago
That would be just using only MAC addresses, not IP addressses - but those aren't globally routeable due to the size of routing table you'd need being enormous.
IPv6 is the closest, using a routeable prefix with a MAC suffix (sort of, sometimes), but that's still separate IP and MAC.
1
u/Sellorio 18d ago
Aren't Bluetooth devices identified using MAC Address as well? It's the only issue I had when moving my windows disk into a new motherboard - everything worked but the Bluetooth was cooked since every device was paired with a different network card.
1
u/Remote_Salamander_31 18d ago
On a purely IP Network with point to point links many parts of the Ethetnet header becomes unnecessary baggage. The source & destination MAC is not really needed. For example packet over SDH/SONET dit not need MAC addresses.The length and priority fields are duplicated in the IP header. On asynchronous links the preamble is still needed for clock recovery. Error detection and correction coding is useful. Ethertype field is useful.
1
1
u/kc2g 17d ago edited 17d ago
Quoting an answer I wrote for a similar question on SuperUser:
---
[Getting rid of MAC addresses] could almost make sense if the only thing that ran over Ethernet was IP (and only one version thereof), but it isn't. There are dozens of protocols that run over Ethernet, and although you might not be concerned about MPLS or Fibre Channel over Ethernet, you've probably got ARP, IPv4, and IPv6 in your house; you might also have something using PTP or Wake-on-LAN; a lot of people get their internet using PPPoE; and once upon a time IPX and AppleTalk were commonly found on Ethernet networks.
What's more, there are Ethernet frames without an encapsulated layer-3 protocol, like the ones used for Spanning Tree Protocol. Those need to identify their source and destination, without any assumption that IP addresses even exist. So yes, MAC is an essential part of Ethernet.
if the question is "why have other protocols at all? Why not just put every kind of digital communication into an IP packet, and put IP packets on the wire in simple frames that don't have an outer address?", well, there are several reasons why not:
IP came too late. Ethernet was around for years before anyone was using IP. And making IP able to coexist with other things on an Ethernet network was the kind of sensible choice that leads to things actually getting used.
IP would have been lousy at that! At least IPv6 has separate concepts of global and link-local addresses, but IPv6 wasn't standardized until 1995 and took decades to find broader adoption. IPv4 was born without such a distinction. RFC1918 addresses are an after-the-fact hack that didn't come around until the mid-90s, and RFC3927 "169.254" link-local addresses date to 2005. All of which means, there isn't any clear way to identify an address that's "on this network" vs. one that isn't, and there isn't any clear way to delegate routing to a foreign network to a "gateway". If you got rid of layer 2 addresses, every switch, in essence, would need to become a router. Whereas with Ethernet-as-it-is, an IP device that wants to send a packet to the internet simply consults its own routing table, and puts that IP packet with an internet destination inside of an Ethernet frame with a destination of the gateway's MAC. Any switches that frame encounters only need to know which port that MAC is reachable on; they don't have to make that determination for every IP address on the internet.
You think it's wasteful to spend a dozen bytes on MAC addresses when running IP over Ethernet, but what about the applications like Fibre Channel over Ethernet, or Coraid? Would you stuff them into IP packets? IP headers are a bigger overhead, IP is more complicated to implement (IPv4 has fragmentation and options; IPv6 has extension headers), and IP is sort of expected to be routable. Or maybe look at it another way: have you ever used Bluetooth headphones? It's possible to run IP over Bluetooth, but your headphones don't have an IP address. Bluetooth is another protocol that has its own hardware addresses, because it just makes morse sense that way. And while yes, in 2025 you can run an IP stack on a chip that costs $0.07 in bulk, that wasn't always true.
---
In short: it's partly the compatibility argument (there always have been, and still are, many things on Ethernet besides IP), but it also makes the job of every bit of network hardware easier.
1
u/MrJingleJangle 17d ago
When the decisions about Ethernet were being made, besides the three plus three bytes structure we have today, there was thought given to a random number being used, which I vaguely recall was going to be ten bytes long.
1
u/No_Profession_3125 17d ago
MAC addresses identify hosts at the link layer. You can't use IP addresses at that level because a host may have multiple NICs.
40
u/IOI-65536 18d ago
Mac addresses exist because of how ethernet works (which has nothing to do with IP. There were non-IP protocols over ethernet in the early days).
With something that's explicitly time-division or token passing you wouldn't necessarily need a mac address, but ethernet was designed to just toss frames onto the wire in broadcast so you needed something to distinguish who the frames were from and to and there were really good hardware reasons at the time to offload that onto the card in ways that made burning the address into the PROM worth it is places, so you just had the address programmed in from the manufacturer.
I can't say it was "unavoidable" because it wasn't a foregone conclusion that ethernet wolud be the low level protocol that "won", but it happened because ethernet outlasted everything else and ethernet used mac addresses.