Come posso configurare un server DHCP assegnato a una rete solo host in virtualbox


13

Posso creare un adattatore tramite VBoxManage hostonlyif createma come configurarlo con DHCP, non sembra VBoxManage hostonlyif ipconfigprendere argomenti per DHCP:

Kits-MacBook-Air:media-pop kitsunde$ VBoxManage hostonlyif ipconfig vboxnet0
Oracle VM VirtualBox Command Line Management Interface Version 4.1.16
(C) 2005-2012 Oracle Corporation
All rights reserved.

Usage:

VBoxManage hostonlyif       ipconfig <name>
                            [--dhcp |
                            --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |
                            --ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]
                            create |
                            remove <name>


Syntax error: Not enough parameters
Kits-MacBook-Air:media-pop kitsunde$ VBoxManage hostonlyif ipconfig vboxnet0 --dhcp
VBoxManage: error: Code NS_ERROR_NOT_IMPLEMENTED (0x80004001) - Not implemented (extended info not available)
Context: "EnableDynamicIpConfig ()" at line 244 of file VBoxManageHostonly.cpp

Risposte:


26

Sembra che posso fare questo:

VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
VBoxManage dhcpserver add --ifname vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0 --lowerip 192.168.56.100 --upperip 192.168.56.200
VBoxManage dhcpserver modify --ifname vboxnet0 --enable
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.