LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-19-2018, 12:37 PM   #1
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Rep: Reputation: 13
MAC address –vs- IPV6 address


I am looking at Ethernet packets. Begin with the Wiki on Ethernet Frame here:

https://en.wikipedia.org/wiki/Ethernet_frame

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?
 
Old 03-19-2018, 01:00 PM   #2
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
Won't happen until there are about 300 million million devices
 
Old 03-19-2018, 03:44 PM   #3
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Original Poster
Rep: Reputation: 13
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.
 
Old 03-20-2018, 07:07 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
Old 03-22-2018, 05:36 PM   #5
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Original Poster
Rep: Reputation: 13
273,
Quote:
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.
 
Old 03-23-2018, 01:50 AM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by bkelly View Post
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.
 
Old 03-23-2018, 08:41 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by 273 View Post
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.
 
2 members found this post helpful.
Old 03-23-2018, 12:30 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by rknichols View Post
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.
 
Old 03-23-2018, 03:30 PM   #9
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Original Poster
Rep: Reputation: 13
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.
 
Old 03-23-2018, 05:03 PM   #10
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by bkelly View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using arp for converting ip address to mac address in kernel module programing in c karan2386 Linux - Kernel 1 03-31-2012 05:02 AM
how do I find what MAC address web pages see as my MAC address rob.rice General 20 05-29-2010 02:08 AM
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-08-2007 11:16 PM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration