Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The Ethernet frame has 48 bits of MAC address. The IP address embedded within the frame payload has, for IPV6, up to 128 bits for each of destination and source address.
What happens when there are more than 2^48 MAC addresses?
Somebody must be worried about that because they (IETF: Internet Engineering Task Force) made the source and destinations 128 bits rather than the same as the MAC address of 48 bits.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
You read too much into their decision. A MAC address is a layer 2 protocol and isn't exposed outside of a physical network segment -- so even if there were two devices with the same MAC address this would not matter. However, the IP v6 address is designed so that every single thing which may be able to contain an IP stack can be see by every other so a few more addresses are needed.
For what it's worth MAC address collisions do happen in the real world and are so rare they're hard to spot. So, yes, if MAC addresses were designed today they would be longer but back when Xerox came up with the idea more than a few million computers was a pipe-dream.
That does not mean that we will be running into problems caused by duplicate MAC addresses any time soon -- just that duplicate MAC addresses may start to exist more.
A MAC address is a layer 2 protocol and isn't exposed outside of a physical network segment
The MAC is right there in the physical layer and so looks to me like it is exposed to the world. (Hmm, might that be a possible privacy issue? When my browser visits web site X them my computer initiated that transaction and my MAC would be in there.)
However, as you state and imply the IP addresses are what count and so the MAC is probably ignored outside of a local segment. And yeah, 2^48 addresses was way beyond what anyone had any justification to imagine then.
I was looking at packet structure, saw that contradiction and wondered.
Thanks for your thoughts.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by bkelly
273,
The MAC is right there in the physical layer and so looks to me like it is exposed to the world. (Hmm, might that be a possible privacy issue? When my browser visits web site X them my computer initiated that transaction and my MAC would be in there.)
No, the MAC address isn't exposed beyond the first physical network segment -- so in a wired network that's the switch and in a wireless network that's the wireless access point. The MAC address isn't seen by web sites you access.
The network stack acts "backwards" in that the application and internetworking layers are written first, then the link layer last and this is where the MAC address is. Every time the packet goes through a link layer device* the link layer is modified and any MAC address would be overwritten with the upper layers staying in tact.
*This is sometimes called a "layer 2" device as opposed to a device which acts upon IP addresses which is "layer 3". This is because the layers in the idealised OSI model are being refered to rather than the TCP/IP ones. That can become very confusing very fast but if you want to know how things work you should read up on both and attempt to reconcile them.
Last edited by 273; 03-23-2018 at 01:51 AM.
Reason: Attempting to clarify.
No, the MAC address isn't exposed beyond the first physical network segment -- so in a wired network that's the switch and in a wireless network that's the wireless access point. The MAC address isn't seen by web sites you access.
A switch is a layer 2 device and preserves the MAC addresses in the packets it carries. A switch and all its ports constitute a layer 2 network segment. Perhaps that's what you were trying to say, but your words could be misinterpreted.
The MAC addresses are lost when the packet passes through a router, which is a layer 3 device.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by rknichols
A switch is a layer 2 device and preserves the MAC addresses in the packets it carries. A switch and all its ports constitute a layer 2 network segment. Perhaps that's what you were trying to say, but your words could be misinterpreted.
The MAC addresses are lost when the packet passes through a router, which is a layer 3 device.
yes, thanks for the clarification. I was envisioning the usual switch+router+bridge devices and an internet packet but didn't explain it quite accuirately enough.
My google is not working well and I have not found a layout of the bits sent out from a router / Layer 3 device. Please post a link where I can find that.
My google is not working well and I have not found a layout of the bits sent out from a router / Layer 3 device. Please post a link where I can find that.
It's the same as for any other (presumably ethernet) packet. Yes, it includes MAC addresses, but the source MAC address will be that of the router's output port and the destination MAC address will be that of the remote destination. The original source and destination MAC addresses are replaced.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.