VirtualBox

Opened 12 years ago

Closed 4 years ago

#10593 closed defect (obsolete)

arp mac address collision if DHCP server has same IP as host-only adapter

Reported by: VirtualBox User Owned by:
Component: network/hostif Version: VirtualBox 4.1.16
Keywords: Cc:
Guest type: BSD Host type: Linux

Description

My guest's network adapter is set to host-only mode. In File..Preferences..Network, if I modify my host-only adapter so that the IPv4 address matches the DHCP server address, arp requests from the guest will get two replies from two mac addresses: one from the host OS and one from the DHCP server.

Sometimes the guest OS will pick the mac address corresponding to the host. When this happens, networking works fine. When the guest OS picks the mac address corresponding to the DHCP server, networking stops working because packets destined to the host are sent to the wrong mac address.

My setup:

  • VirtualBox 4.1.16
  • host Linux (Ubuntu 12.04 Precise) amd64
  • guest NetBSD 6.0_BETA i386
  • host-only networking

Change History (6)

comment:1 by Aleksey Ilyushin, 12 years ago

Let's make sure we are talking the same thing: you put the same IP address in "IPv4 Address" field on "Adapter" page and in "Server Address" field on "DHCP Server" page in "Host-only Network Details" dialog window? And why would you do this? Assigning the same IP to two computers on the network is not a good idea, even if these "computers" are virtual.

in reply to:  1 comment:2 by VirtualBox User, 12 years ago

Replying to aleksey:

Let's make sure we are talking the same thing: you put the same IP address in "IPv4 Address" field on "Adapter" page and in "Server Address" field on "DHCP Server" page in "Host-only Network Details" dialog window?

Yes.

And why would you do this? Assigning the same IP to two computers on the network is not a good idea, even if these "computers" are virtual.

It was unclear to me that the DHCP server would be a separate virtual device. I was expecting the DHCP server to be a process (e.g., dnsmasq) running on the host machine and bound to the vboxnet0 interface. If that was the case, why would I want the IP address to be different?

comment:3 by Aleksey Ilyushin, 12 years ago

I see your point. Although DHCP server essentially is a host process, it "connects" to VirtualBox internal "switch" almost just like any other VM network adapter. It also has its own MAC address. A host-only interface, in fact, represents a network to which all VM network adapters attached to the same host-only interface connect. Our DHCP server "connects" to this virtual network.

comment:4 by VirtualBox User, 12 years ago

Would you be willing to add that explanation to the dialog box so that people understand how it works? Or maybe raise an error if the two IP addresses equal each other, and have that explanation be in the error message text?

comment:5 by gyrovague, 9 years ago

See forum post here, this issue still exists in Virtualbox version 4.3.20 on OSX. It would certainly be helpful if the UI checked and warned one if the IP addresses clash, or at least had some text or mouseover help alerting one to that possibility.

comment:6 by aeichner, 4 years ago

Resolution: obsolete
Status: newclosed

No activity for 5 years, closing as obsolete.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use