I configured multiple HostOnly networks, one for each guest:
Code: Select all
% vboxmanage list hostonlyifs
Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 10.0.0.254
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Wireless: No
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
Name: vboxnet1
GUID: 786f6276-656e-4174-8000-0a0027000001
DHCP: Disabled
IPAddress: 10.0.1.254
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType: Ethernet
Wireless: No
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet1
For the IP configuration of the guests I use a DHCPserver for each HostOnly network:
Code: Select all
% vboxmanage list dhcpservers
NetworkName: HostInterfaceNetworking-vboxnet0
IP: 10.0.0.254
NetworkMask: 255.255.255.0
lowerIPAddress: 10.0.0.1
upperIPAddress: 10.0.0.100
Enabled: Yes
NetworkName: HostInterfaceNetworking-vboxnet1
IP: 10.0.1.254
NetworkMask: 255.255.255.0
lowerIPAddress: 10.0.1.1
upperIPAddress: 10.0.1.100
Enabled: Yes
I used the following commands to specify additional options the DHCPserver should send:
Code: Select all
% vboxmanage dhcpserver modify --netname "HostInterfaceNetworking-vboxnet0" --options --id 3 --value "10.0.0.254"
% vboxmanage dhcpserver modify --netname "HostInterfaceNetworking-vboxnet1" --options --id 3 --value "10.0.1.254"
I verified the configuration in the VirtualBox.xml configuration file, which looks good to me:
Code: Select all
<DHCPServers>
<DHCPServer networkName="HostInterfaceNetworking-vboxnet0" IPAddress="10.0.0.254" networkMask="255.255.255.0" lowerIP="10.0.0.1" upperIP="10.0.0.100" enabled="1">
<Options>
<Option name="3" value="10.0.0.254"/>
</Options>
</DHCPServer>
<DHCPServer networkName="HostInterfaceNetworking-vboxnet1" IPAddress="10.0.1.254" networkMask="255.255.255.0" lowerIP="10.0.1.1" upperIP="10.0.1.100" enabled="1">
<Options>
<Option name="3" value="10.0.1.254"/>
</Options>
</DHCPServer>
</DHCPServers>
When I start a guest the guest gets it's IP configuration from DHCPserver. But the DHCPserver did not send the additional option. I captured the DHCP requests and response with tcpdump at the host. This proves that the configured option with ID 3 (Routers) was not sent by the DHCPserver of VirtualBox:
Code: Select all
17:00:59.702317 IP (tos 0x0, ttl 255, id 15375, offset 0, flags [none], proto UDP (17), length 576)
10.0.0.254.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 548, xid 0x29cc23f, Flags [none] (0x0000)
Client-IP 10.0.0.1
Your-IP 10.0.0.1
Client-Ethernet-Address 08:00:27:7a:84:28
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
Server-ID Option 54, length 4: 10.0.0.254
DHCP-Message Option 53, length 1: ACK
Lease-Time Option 51, length 4: 1200
Subnet-Mask Option 1, length 4: 255.255.255.0
END Option 255, length 0
PAD Option 0, length 0, occurs 286
Thanks a lot in advance!