VirtualBox

Ticket #14615 (closed defect: fixed)

Opened 2 years ago

Last modified 12 months ago

Linux kernel can't get IP address over DHCP on Windows host => Fixed in SVN

Reported by: andyp1973 Owned by:
Priority: major Component: network
Version: VirtualBox 5.0.4 Keywords: PXE, DHCP, IP, Wireless
Cc: Guest type: Linux
Host type: Windows

Description

A virtual machine is setup with a bridged Ethernet adapter (Intel Pro/1000 MT Desktop) and configured to remote boot using the PXE boot ROM.

On a Linux host (CentOS 6.7 running VirtualBox 4.3.31-101940 the boot process proceeds as follows: PXE Boot ROM gets IP address from DHCP server, runs the pxelinux.0 file to get the correct configuration file. Configuration file specifies the guest Linux kernel command line to include ip=dhcp along with a bunch of NFS root file system stuff. The Linux kernel boots, gets the same IP address allocated again and mounts the correct NFS file system.

On a Windows host (tried Windows 7 x64 with VirtualBox 4.3.31-101940 and Windows 10 x64 with versions up to and including 5.0.51-102781) the PXE boot ROM successfully gets an IP address from the DHCP server but the guest Linux kernel doesn't it just sits sending DHCP requests which never get responded to.

Looking at the network adapter on Windows using WireShark I can see the DHCP request coming from the MAC address of the guest followed immediately by a matching DHCP request from the host adapter to which it is bridged but never any responses.

Only key difference is that in the Linux host case the guest adapter is bridged to a wired interface on the host whereas on the Windows hosts it is bridged to a wireless interface.

Change History

comment:1 in reply to: ↑ description Changed 2 years ago by vushakov

Replying to andyp1973:

Only key difference is that in the Linux host case the guest adapter is bridged to a wired interface on the host whereas on the Windows hosts it is bridged to a wireless interface.

Right. "Bridging" to wireless is not really bridging. The guest shares the MAC of the host and the host does a sort of MAC-NAT translation based on IP addresses.

On a Windows host (tried Windows 7 x64 with VirtualBox 4.3.31-101940 and Windows 10 x64 with versions up to and including 5.0.51-102781) the PXE boot ROM successfully gets an IP address from the DHCP server but the guest Linux kernel doesn't it just sits sending DHCP requests which never get responded to.

Can you get a packet capture for the guest using VirtualBox builtin capture?

Can you also get a simultaneous packet capture at the DHCP server?

comment:2 follow-up: ↓ 3 Changed 2 years ago by andyp1973

The packet capture file from the VirtualBox built in capture was too large to add directly to the ticket but can be downloaded from  https://www.dropbox.com/s/7mdqfx252vucbp3/kerneldhcpfail.7z?dl=0

I'll work on a packet capture at the DHCP server but as it is the same machine that is the internet gateway and firewall it will be very noisy unless we capturing only DHCP related packets will be enough.

Andy.

comment:3 in reply to: ↑ 2 Changed 2 years ago by vushakov

Replying to andyp1973:

I'll work on a packet capture at the DHCP server but as it is the same machine that is the internet gateway and firewall it will be very noisy unless we capturing only DHCP related packets will be enough.

Yes, DHCP and ARP should be enough.

comment:4 Changed 2 years ago by andyp1973

There is a new file available at  https://www.dropbox.com/s/bcijaixab6t3wbz/dhcplogs.7z?dl=0 which contains a guest PCAP file and a corresponding PCAP file from the DHCP server which captures ARP and DHCP requests (UDP ports 67 and 68).

Andy.

comment:5 Changed 2 years ago by vushakov

Thanks. I think I see what the problem is. When bridging to wireless we rewrite DHCP packets to always request broadcast replies and update the UDP checksum accordingly, but the code doesn't check if UDP checksumming is disabled (checksum set to zero), so the rewritten DHCP DISCOVER packet that we send to the router ends up with bad checksum. I'll try to provide a test build for you to test later today.

comment:6 Changed 2 years ago by vushakov

I've uploaded a Windows test build, revision 102800. Please, give it a try.

comment:7 Changed 2 years ago by andyp1973

I can confirm that test build 102800 resolves this issue.

Thank you for your quick response in looking into this and providing a fix.

Andy.

comment:8 Changed 2 years ago by vushakov

  • Summary changed from Linux kernel can't get IP address over DHCP on Windows host to Linux kernel can't get IP address over DHCP on Windows host => Fixed in SVN

The fix will be in the next 5.0.* and 4.3.* releases.

comment:9 Changed 2 years ago by frank

Fixed in VBox 5.0.6.

comment:10 Changed 2 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

comment:11 Changed 12 months ago by rpr-nospam

  • Status changed from closed to reopened
  • Resolution fixed deleted

I am seeing the same issue on VirtualBox 5.1.8 running on MS Windows 10 Pro. 64-bit.

I created a guest with the network bridged to the host's wired NIC and installed Debian 8.6 32-bit. When Debian boots it cannot get an IP address from local DHCP server running on MS Windows Server 2012 R2.

The same guest system created on the Ubuntu 16.04 64-bit host is getting an IP address from the same DHCP server.

comment:12 Changed 12 months ago by vushakov

  • Status changed from reopened to closed
  • Resolution set to fixed

This bug is about bridging to wireless, which is quite different from bridging to wired. Please, file a new bug. Please provide packet captures too.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use