18

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?

2
  • Your question is vague. Please specify and provide some more details.
    – Indigo
    Mar 27, 2016 at 13:50
  • 1
    Via network traffic: NO. Via code in the browser: maybe.
    – Ricky
    Mar 28, 2016 at 4:44

3 Answers 3

21

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.
2
  • 2
    For #1, see RFC 4941
    – Bob
    Mar 28, 2016 at 0:33
  • 1
    I don't believe JavaScript can obtain the MAC address of a device.
    – forest
    Feb 25, 2019 at 2:29
16

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.

3

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.

8
  • 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.
    – user207421
    Mar 27, 2016 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, 2016 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, 2016 at 21:59
  • 1
    When configuring network equipment, PPP is a layer-2 protocol. It has a bridge (NCP) to the layer-3 protocol(s) it is supporting. When configuring network equipment (e.g. Cisco) it is configured as a layer-2 protocol. It may be different for end-devices, but configuring those is off-topic here.
    – Ron Maupin
    Mar 28, 2016 at 0:19
  • 4
    @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. Mar 28, 2016 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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