Been a while since I looked into this...
What's the point of having MAC address at all, if we are still
communicating via private IP address, even if we are on the same LAN?
Well, that's a big if. Very hypothetical, at least from a historical perspective. IP is one of various possible network protocols at layer 3 of the OSI ISO reference model. Seems very universal now but it wasn't always. There used to be a thing called IPX that some apparently used up to the Win XP era. https://en.wikipedia.org/wiki/IPX/SPX Though I never saw IPX, and I got online around the Win98 days.
We have ethernet network switches, they use MAC addresses (Level 2 on OSI ISO).
But let's say looking now, and supposing there is only IP. Maybe switches are faster. IP addresses are hierarchical and require routing.
If you have a very large number of nodes / network interfaces, then sure routing is better. But for a smaller number, a non-hierarchical algorithm might be faster or if not faster then simpler. Or cheaper to build or something like that.
And looking to the future, Suppose you go from IPv6 to some later version of IP. A network switch will still work because it doesn't work with IPs.
However, my understanding is that nowadays Ethernet is the de-facto
link layer protocol, but on the same Ethernet, we are still
communicating via private IP address!
I think when we speak of Ethernet, we are speaking purely of layers below layer 3, so, no IP addresses. You can say that a network that uses Ethernet, usually also uses IP.
Also, you say Ethernet is a link layer protocol.. Well, i'm more familiar with the terminology of the OSI ISO reference model... which would say Ethernet is a data link layer protocol.
The TCP/IP architecture was chosen over the OSI ISO architecture, maybe 'cos the TCP/IP architecture got there first. But we tend to use the OSI ISO reference model to refer to the TCP/IP Architecture.
Moreover, that private IP address has to be translated to a MAC
address via ARP protocol. The link and internet layer are not
"separated" at all, the only thing MAC address bought to the process
is the ARP overhead.
Well, so looking at the TCP/IP reference model.. you have the Internet Layer, and from what I understand, below that, you have the Network Access Layer which is also known as the the Link Layer.
ARP could I suppose be seen as both Link Layer and Internet layer. Or some might say between them.
If we take the term "packet" not as an Internet layer term, but if we use the telecomunications meaning of the term and refer to refer to the whole thing.
Then you see you have a record and fields.
The data link layer fields , and then the network layer fields, and then the transport layer fields..
And protocols at "layers".
So layer 2 encapsulating layer 3, which encapsulates layer 4.
With ARP, if we can speak fo ARP encapsulating any protocols, it encapsulates, layers 2 and 3. (which isn't the normal rule with encapsulation of layer 2 encapsulating layer 3 encapsulating layer 4 etc).
I don't find the concept of layers that useful, I think a record and fields is more clear and what we are looking at.
I just did a search for wireshark(a packet sniffer), and ARP, to check and show what ARP looks like, in terms of what protocols are in what protocols.. what the whole record looks like
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/K9dmJ.png)
The "layers" concept shouldnt' doesn't need to be thrown out the window, it just doesn't apply that much with ARP. And I think thinking in terms of a record and fields is simpler anyhow and covers ARP too.
Then I want to ask: why the hassle? why cannot we just use IP address
to deliver packets to another machine on the same Ethernet?
The only good reason I can think of is cost. If we route everything
via private IP address only, then everything needs to be connected
directly to a router, which is typically more expensive than a link
layer switch.
Also, there may be less common non-IP L3 protocols still in use, where
Ethernet is running underneath. However, I don't know if it makes
sense for the majority of the use cases to cater to these minor cases,
by paying the seemingly unnecessary overhead of ARP.
Last, I hear the argument that "MAC address is globally unique", but I
don't think it has much to do with routing... Private IP addresses can
also be unique, the fact it changes when being moved around doesn't
really matter for the success of routing.
Are there any other good reasons for the MAC address to be used for
routing?
MAC addresses are pretty good.. so good infact that when have you ever had to fiddle around in regard to MAC addresses?
Also, the reason I mentioned re new versions of IP appearing. Whereas switches with their simple protocol, still apply.
There's perhaps no technical reason why we have to have MAC or layer 2 addresses.
Routers do actually work with MAC addresses too I think.. 'cos if they receive a packet (usually 'cos it needs to be routed elsewhere), they see it should be routed somewhere, and they write in the correct MAC address.
In theory maybe routing protocols could be rewritten to not bother, and network switches could be gotten rid of.
By the way let's say people did switch to just routers. And routers were rewritten to not bother with data link layer / link layer addresses. Bear in mind also that most routers nowadays are considered to be a bit of a joke and barely routers e.g. they are really a router with 2 "arms", and a network switch built in. Their routing is pretty minimal. And apparently when people want to do something more like routing, they don't tend to get a router, they get a device that can do "VLANS". I haven't looked into VLANs for a while, but VLANs are considered to be layer 2. If I had Wendell Odom's "Networking first step" book near me i'd say something more re VLANs! Cisco would still do "proper routers" no doubt i.e. routers that aren't just two "arms" and a network switch built in.
It wouldn't surprise me if IP addresses are somewhat human readable, whereas MAC addresses might be processed faster. Though I doubt that speed difference would ever translate to a speed drop overall 'cos I doubt that that any "slowness" there would ever be a bottleneck.