Opened 8 years ago
Closed 8 years ago
#16430 closed defect (obsolete)
DHCP server netmask issue
Reported by: | huszty | Owned by: | |
---|---|---|---|
Component: | network | Version: | VirtualBox 5.1.14 |
Keywords: | dhcp, networking, netmask | Cc: | |
Guest type: | all | Host type: | Windows |
Description
I found an issue in the Virtualbox DHCP server and it's configuration interface. Since the command line help does not specify the netmask format for the add command, we used it with the bitcount format, like:
VBoxManage dhcpserver add --netname int-cp --ip 192.168.54.1 --netmask 24 --lowerip 192.168.54.32 --upperip 192.168.54.40 --enable
The command is accepted, but when using it, a very strange netmask is given in the DHCP offer to the VM: 96.223.171.3. This is not even a legal netmask. See the attached packet capture for the details. When using the dhcpserver add command with decimal netmask number (255.255.255.0) it works as expected. If bitcount netmask format is not accepted, the command shall fail.
A listing or similar inquiry operation would be great for the DHCP servers, since now you can only add/modify/remove them. Maybe this issue would be also visible in such listing output.
P.S.: an interesting addition to the story is that on RHEL linux type of guests there were a recently fixed issue in the ipcalc command (provided by the initscripts rpm), which is used by the dhclient command. The issue caused that the mentioned random netmask was accepted and the client bound itself to the given IP address with a /32 netmask.
Attachments (2)
Change History (6)
by , 8 years ago
Attachment: | dhclient_intcp_24.pcap added |
---|
comment:1 by , 8 years ago
Please, can you provide the entry for this DHCP server from the VirtualBox.xml
file (found in ~/.config/VirtualBox
or ~/.VirtualBox
) and also the command line of the VBoxNetDHCP
process for this network when it's started.
by , 8 years ago
Attachment: | VirtualBox.xml added |
---|
comment:2 by , 8 years ago
I've attached the XML. The interesting dhcp server is the int-cp related one. There the 24 is visible in the settings:
<DHCPServer networkName="int-cp" IPAddress="192.168.54.1" networkMask="24" lowerIP="192.168.54.32" upperIP="192.168.54.40" enabled="1"/>
Interesting, but VBoxNetDHCP.exe returns nothing (both when user and Administrator running cmd):
C:\WINDOWS\system32>cd "\Program Files\Oracle\VirtualBox" C:\Program Files\Oracle\VirtualBox>VBoxNetDHCP.exe C:\Program Files\Oracle\VirtualBox>
My Virtualbox version: 5.1.10 r112026 (Qt5.6.2) - Win7 x64
comment:3 by , 8 years ago
Could you recheck with 5.1.16? I remember that there were a few DHCP-related fixes but I don't remember your specific problem.
comment:4 by , 8 years ago
Resolution: | → obsolete |
---|---|
Status: | new → closed |
packet capture