5

As far as my understading goes MAC address is used to recognize a computer node in a LAN where as internet communications happen over IPv4 address. When a request comes from the internet to the gateway the packet has the destination IP address. Now the cached ARP table is looked up to see the corresponding MAC address. If not ARP broadcast request is sent to get the corresponding MAC address.

But in case of virtual machine(Windows XP) running on my CentOS both will have same MAC address but different IPV4 addresses. So how the packet will be delievred to the correct host?

  • With some of the small router/switches you can buy in a Walmart there is the capability to spoof MAC addresses. The idea of "burned in" is passe. – MarkH Jul 12 '16 at 2:47
10

I am assuming you're using "bridge-mode" for networking (your internal, virtual adapter is bridged to your host's physical adapter).

In any case (unless you explicitlly manually set them to the same address, which causes a lot of other problems), your guest (WinXP) machine will have a different MAC address than your host (CentOS). Due to bridge-mode, your host acts as an ethernet switch, and forwards packets to the guest.

So when an ARP broadcast comes, your host gets the packet and also forwards it to your guest machine. When packets for your host come, they are processed by your host's network stack. When packets for your guest come, the host forwards them to your guest, which then processes them as needed.

  • I thought physical addresses are harcoded by manufacturers. How is this new AMC address of guest machine generated? Is this how spoofing of done? – Aniket Thakur Oct 7 '13 at 7:45
  • 1
    They are hardcoded, but can be overriden in 99% by the OS. Virtual machines mac addesses are usually generated by the virtualization software. (eg pubs.vmware.com/vsphere-51/… ) – mulaz Oct 7 '13 at 8:11
4

Think of it like a mailbox. The MAC identifies a specific box. The person who empties that box then looks at the name (i.e. IP) and hands each item to the correct person, which might mean placing more than one person's items into yet another box.

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.