Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can my MAC address be identified by a web site when I access the site? Does it make a difference if the site requires me to upload files?

share|improve this question
    
Your question is vague. Please specify and provide some more details. – Indigo Mar 27 at 13:50
1  
Via network traffic: NO. Via code in the browser: maybe. – Ricky Beam Mar 28 at 4:44
up vote 17 down vote accepted

In general it is not possible for a web site that you access to learn your MAC address. However there are special cases where the server could learn your MAC address:

  1. IPv6 supports assigning addresses in a way which embed the MAC address in the IP address. For privacy reasons this way of assigning IPv6 addresses is not very common.
  2. If you are directly attached to the same network segment as the web server, it will be able to see your MAC address. (But this is probably not the scenario you had in mind.)
  3. I have seen some ISPs embed the MAC address of the customer's equipment in reverse DNS records (the format was x1-6- followed by the MAC address).
  4. There might be scripting capabilities in the browser which would allow scripts to learn the MAC address of the client machine and send it to the server. I do not know whether javascript can acquire the MAC address of the client machine, but I know that it can find the local IP address.
share|improve this answer
2  
For #1, see RFC 4941 – Bob Mar 28 at 0:33

No, a remote site will only learn what public IP address you're using, not the MAC address of your device, unless you're using IPv6 with a EUI-64 address. In that case, your MAC address could be derived from the IPv6 address.

share|improve this answer

You should study the OSI Model. MAC addresses are layer-2 addresses in a frame, but frames are stripped off at a router. IP addresses are layer-3 addresses in the packet. Only packets will cross a router.

Hosts and switches use MAC addresses in the frames to deliver frames to the correct host (including a gateway, which is just another host on layer-2) on a LAN. When a gateway (router) gets the frame from a host, it strips off the frame header to get to the packet, and it routes the packet based on the IP address. When the router sends the packet out the new interface, it will create a new frame encapsulation for the new link, using its own MAC address for the new frame. As a packet moves from router-to-router to its final destination, the only surviving source MAC address will be that of the final router.

share|improve this answer
3  
All true but I don't think anybody should study the OSI model. It doesn't apply to TCP/IP, which has its own, historically prior, model, and it doesn't apply to anything else in the real world either. It didn't even apply properly to the OSI protocol suite. – EJP Mar 27 at 21:52
2  
The OSI model is a good aid to understand, in general, how things work. Up through the transport layer, modern network stacks work surprisingly well with the OSI model. Starting with layer-5, the OS and application programmers don't match the OSI model, but those layers are off-topic here, anyway. – Ron Maupin Mar 27 at 21:55
3  
@EJP, the real point is that a network professional for professional networks (what is on topic here, through OSI layer-4, per the help center) should be familiar with the OSI model, and should understand that MAC addresses are layer-2 addresses, IP addresses are layer-3 addresses, and TCP/UDP ports are layer-4 addresses, and how datagrams flow through, and are encapsulated by, the different layers in the network stack. – Ron Maupin Mar 27 at 21:59
    
@RonMaupin The number of layers beneath IP is not constant. It is not at all unusual to have another layer between Ethernet and IP. And it gets even worse if any sort of tunnel is involved. I find it much more productive to learn the key concepts in the IP protocol suite than to learn a model that assumes layers can be assigned a coherent numbering. – kasperd Mar 27 at 23:19
3  
@kasperd: The point is to teach the notion of abstraction layers. It doesn't really matter what you call them or which specific model you study. – Lightness Races in Orbit Mar 28 at 3:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.