VirtualBox

source: vbox/trunk/doc/manual/en_US/man_VBoxManage-dhcpserver.xml@ 79611

Last change on this file since 79611 was 79611, checked in by vboxsync, 6 years ago

VBoxManage,manual: Added the dhcpserver subcommand findlease for testing IDHCPServer::FindLeaseByMAC(). Wrote a man page for the dhcpserver command and converted the help to the new style. Also took a shot at simplifying the option handling of the existing dhcpserver subcommands while retaining a somewhat more flexible compatibility with the old syntax (not advertised) - not really tested. bugref:9288 bugref:9151

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 manpage, user manual, usage: VBoxManage dhcpserver
4
5 Copyright (C) 2006-2015 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14 -->
15<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
16<refentry id="vboxmanage-dhcpserver" lang="en">
17
18 <refentryinfo>
19 <pubdate>$Date: 2019-07-08 23:33:59 +0000 (Mon, 08 Jul 2019) $</pubdate>
20 <title>VBoxManage dhcpserver</title>
21 </refentryinfo>
22
23 <refmeta>
24 <refentrytitle>VBoxManage-dhcpserver</refentrytitle>
25 <manvolnum>1</manvolnum>
26 </refmeta>
27
28 <refnamediv>
29 <refname>VBoxManage-dhcpserver</refname>
30 <refpurpose>DHCP server management</refpurpose>
31 <refclass>Oracle VM VirtualBox</refclass>
32 </refnamediv>
33
34 <refsynopsisdiv>
35 <cmdsynopsis id="synopsis-vboxmanage-dhcpserver-add">
36 <command>VBoxManage dhcpserver add</command>
37 <group choice="req">
38 <arg choice="plain">--network=<replaceable>netname</replaceable></arg>
39 <arg choice="plain">--interface=<replaceable>ifname</replaceable></arg>
40 </group>
41 <arg choice="req">--ip=<replaceable>dhcpd-address</replaceable></arg>
42 <arg choice="req">--netmask=<replaceable>mask</replaceable></arg>
43 <arg choice="req">--lower-ip=<replaceable>address</replaceable></arg>
44 <arg choice="req">--upper-ip=<replaceable>address</replaceable></arg>
45 <group choice="req">
46 <arg choice="plain">--enable</arg>
47 <arg choice="plain">--disable</arg>
48 </group>
49 <sbr/>
50 <arg choice="opt" rep="repeat">
51 <arg choice="opt">--global</arg>
52 <arg choice="opt" rep="repeat">--add-opt=<replaceable>dhcp-opt-no hex-string</replaceable></arg>
53 </arg>
54 <sbr/>
55 <arg choice="opt" rep="repeat">
56 <arg choice="req">--vm=<replaceable>name|uuid</replaceable></arg>
57 <arg choice="opt">--nic=<replaceable>1-N</replaceable></arg>
58 <arg choice="opt" rep="repeat">--add-opt=<replaceable>dhcp-opt-no hex-string</replaceable></arg>
59 </arg>
60 </cmdsynopsis>
61 <cmdsynopsis id="synopsis-vboxmanage-dhcpserver-modify">
62 <command>VBoxManage dhcpserver modify</command>
63 <group choice="req">
64 <arg choice="plain">--network=<replaceable>netname</replaceable></arg>
65 <arg choice="plain">--interface=<replaceable>ifname</replaceable></arg>
66 </group>
67 <arg choice="opt">--ip=<replaceable>dhcpd-address</replaceable></arg>
68 <arg choice="opt">--netmask=<replaceable>mask</replaceable></arg>
69 <arg choice="opt">--lower-ip=<replaceable>address</replaceable></arg>
70 <arg choice="opt">--upper-ip=<replaceable>address</replaceable></arg>
71 <group choice="opt">
72 <arg choice="plain">--enable</arg>
73 <arg choice="plain">--disable</arg>
74 </group>
75 <sbr/>
76 <arg choice="opt" rep="repeat">
77 <arg choice="opt">--global</arg>
78 <arg choice="plain">--del-opt=<replaceable>dhcp-opt-no</replaceable></arg>
79 <arg choice="plain">--add-opt=<replaceable>dhcp-opt-no hex-string</replaceable></arg>
80 </arg>
81 <sbr/>
82 <arg choice="opt" rep="repeat">
83 <arg choice="req">--vm=<replaceable>name|uuid</replaceable></arg>
84 <arg choice="opt">--nic=<replaceable>1-N</replaceable></arg>
85 <arg choice="opt" rep="repeat">--del-opt=<replaceable>dhcp-opt-no</replaceable></arg>
86 <arg choice="opt" rep="repeat">--add-opt=<replaceable>dhcp-opt-no hex-string</replaceable></arg>
87 </arg>
88 </cmdsynopsis>
89 <cmdsynopsis id="synopsis-vboxmanage-dhcpserver-remove">
90 <command>VBoxManage dhcpserver remove</command>
91 <group choice="req">
92 <arg choice="plain">--network=<replaceable>netname</replaceable></arg>
93 <arg choice="plain">--interface=<replaceable>ifname</replaceable></arg>
94 </group>
95 </cmdsynopsis>
96 <cmdsynopsis id="synopsis-vboxmanage-dhcpserver-restart">
97 <command>VBoxManage dhcpserver restart</command>
98 <group choice="req">
99 <arg choice="plain">--network=<replaceable>netname</replaceable></arg>
100 <arg choice="plain">--interface=<replaceable>ifname</replaceable></arg>
101 </group>
102 </cmdsynopsis>
103 <cmdsynopsis id="synopsis-vboxmanage-dhcpserver-findlease">
104 <command>VBoxManage dhcpserver findlease</command>
105 <group choice="req">
106 <arg choice="plain">--network=<replaceable>netname</replaceable></arg>
107 <arg choice="plain">--interface=<replaceable>ifname</replaceable></arg>
108 </group>
109 <arg choice="req">--mac-address=<replaceable>mac</replaceable></arg>
110 </cmdsynopsis>
111 </refsynopsisdiv>
112
113 <refsect1>
114 <title>Description</title>
115
116 <para>
117 The <command>dhcpserver</command> commands enable you to control the DHCP
118 server that is built into VirtualBox. You may find this useful when
119 using internal or host-only networking. Theoretically, you can also
120 enable it for a bridged network, but that may cause conflicts with other
121 DHCP servers in your physical network.
122 </para>
123
124 <refsect2 id="vboxmanage-dhcpserver-common-options">
125 <title>Common options</title>
126 <remark role="help-scope" condition="GLOBAL"/>
127 <para>The subcommands of <command>dhcpserver</command> all operate on an
128 internal network that can be identified via its name or in the host-only
129 case via the host-only interface name:</para>
130 <variablelist>
131 <varlistentry>
132 <term>--network=<replaceable>netname</replaceable></term>
133 <listitem><para>The internal network name. This is the same as you
134 would use as value to the <command>VBoxManage modifyvm --intnet</command>
135 option when configuring a VM for internal networking. Or you see as
136 VBoxNetworkName in the output from
137 <command>VBoxManage list intnets</command>,
138 <command>VBoxManage list natnets</command>, or
139 <command>VBoxManage list hostonlyifs</command>.
140 </para></listitem>
141 </varlistentry>
142 <varlistentry>
143 <term>--interface=<replaceable>ifname</replaceable></term>
144 <listitem><para>The host only interface name. This would be same value
145 as you would use for the <command>VBoxManage modifyvm --hostonlyadapter</command>
146 option when configuring a VM to use a host-only network. The value
147 can also be found in the Name row in <command>VBoxManage list hostonlyifs</command>.
148 </para></listitem>
149 </varlistentry>
150 </variablelist>
151 </refsect2>
152
153 <refsect2 id="vboxmanage-dhcpserver-add">
154 <title>dhcpserver add</title>
155 <remark role="help-copy-synopsis"/>
156 <para>
157 Adds a new DHCP server to a network or host-only interface.
158 </para>
159 <variablelist>
160 <varlistentry>
161 <term><option>--ip=<replaceable>dhcpd-address</replaceable></option></term>
162 <listitem><para>The IP address the DHCP server should use.</para></listitem>
163 </varlistentry>
164 <varlistentry>
165 <term><option>--netmask=<replaceable>mask</replaceable></option></term>
166 <listitem><para>The network mask. Typically 255.255.255.0.</para></listitem>
167 </varlistentry>
168 <varlistentry>
169 <term><option>--lower-ip=<replaceable>address</replaceable></option>, <option>--upper-ip=<replaceable>address</replaceable></option></term>
170 <listitem><para>The IP address range for the DHCP server to manage. This
171 should not include the address of the DHCP server itself, but it must be
172 in the same network as it is. The boundraries are inclusive, so both the
173 lower and upper addresses will be handed out to clients.</para></listitem>
174 </varlistentry>
175 <varlistentry>
176 <term><option>--enable</option>, --disable</term>
177 <listitem><para>Whether to enable the DHCP server or disable it. If not specified,
178 the server will be created in disabled state and no IP addresses handed out.</para></listitem>
179 </varlistentry>
180 <varlistentry>
181 <term><option>--global</option></term>
182 <listitem><para>Set the option scope to global. Any subsequent <option>--add-opt</option>
183 options will be apply to all the DHCP clients.</para></listitem>
184 </varlistentry>
185 <varlistentry>
186 <term><option>--vm=<replaceable>vmname|uuid</replaceable></option></term>
187 <listitem><para>Set the option scope to the first NIC of the specified VM. Any
188 subsequent <option>-add-opt</option> options will apply just to that interface,
189 nothing else.</para></listitem>
190 </varlistentry>
191 <varlistentry>
192 <term><option>--nic=<replaceable>1-N</replaceable></option></term>
193 <listitem><para>Set the option scope to a NIC other than first of the VM specified
194 the in <option>--vm</option>.</para></listitem>
195 </varlistentry>
196 <varlistentry>
197 <term><option>--add-opt=<replaceable>dhcp-opt-no hex-string</replaceable></option></term>
198 <listitem><para>Adds the specified DHCP option number (0-255) and value. The scope of
199 the option is decided by the <option>--vm</option> and <option>global</option> options.
200 </para></listitem>
201 </varlistentry>
202 </variablelist>
203 </refsect2>
204
205 <refsect2 id="vboxmanage-dhcpserver-modify">
206 <title>dhcpserver modify</title>
207 <remark role="help-copy-synopsis"/>
208 <para>
209 This modifies an existing DHCP server configuration. It takes the same
210 options as the <command>add</command> command with the addition of:
211 </para>
212 <variablelist>
213 <varlistentry>
214 <term><option>--del-opt=<replaceable>dhcp-opt-no</replaceable></option></term>
215 <listitem><para>Counterpart to <option>--add-opt</option> that will cause the specified
216 DHCP option number (0-255) to be deleted from the server settings. Like with
217 <option>--add-opt</option> the scope of the deletion is governed by the
218 <option>--vm</option> and <option>global</option> options.
219 </para></listitem>
220 </varlistentry>
221 </variablelist>
222 </refsect2>
223
224 <refsect2 id="vboxmanage-dhcpserver-remove">
225 <title>dhcpserver remove</title>
226 <remark role="help-copy-synopsis"/>
227 <para>
228 Removes the specified DHCP server.
229 </para>
230 </refsect2>
231
232 <refsect2 id="vboxmanage-dhcpserver-restart">
233 <title>dhcpserver restart</title>
234 <remark role="help-copy-synopsis"/>
235 <para>
236 Restarts the specified DHCP server. The DHCP server must be running.
237 </para>
238 </refsect2>
239
240 <refsect2 id="vboxmanage-dhcpserver-findlease">
241 <title>dhcpserver findlease</title>
242 <remark role="help-copy-synopsis"/>
243 <para>
244 Performs a lease database lookup. This is mainly for getting the IP
245 address of a running VM.
246 </para>
247 <variablelist>
248 <varlistentry>
249 <term><option>--mac-address=<replaceable>mac</replaceable></option></term>
250 <listitem><para>The MAC address to lookup in the lease database.</para></listitem>
251 </varlistentry>
252 </variablelist>
253 </refsect2>
254
255 </refsect1>
256
257</refentry>
258
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette