6

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?

1
  • 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.
    – user27646
    Jul 12, 2016 at 2:47

2 Answers 2

12

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.

2
  • I thought physical addresses are harcoded by manufacturers. How is this new AMC address of guest machine generated? Is this how spoofing of done? Oct 7, 2013 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, 2013 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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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