[libvirt] [PATCH 10/10] docs: Describe the <dhcp> 'enable' and 'relay' attributes

TJ libvirt at iam.tj
Thu Feb 28 02:57:35 UTC 2013


From: TJ <linux at iam.tj>

Signed-off-by: TJ <linux at iam.tj>
---
 docs/formatnetwork.html.in | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in
index 41a83fa..c4c4def 100644
--- a/docs/formatnetwork.html.in
+++ b/docs/formatnetwork.html.in
@@ -650,12 +650,20 @@
           <dt><code>dhcp</code></dt>
           <dd>Also within the <code>ip</code> element there is an
             optional <code>dhcp</code> element. The presence of this element
-            enables DHCP services on the virtual network. It will further
+            enables DHCP services on the virtual network. It can further
             contain one or more <code>range</code> elements. The
             <code>dhcp</code> element supported for both
             IPv4 <span class="since">Since 0.3.0</span>
             and IPv6 <span class="since">Since 1.0.1</span>, but
             only for one IP address of each type per network.
+            Since $TODO.$FIXME it can optionally contain a boolean <code>enable</code> attribute
+            ('yes' or 'no') where the value defaults to 'yes', and a boolean
+            <code>relay</code> attribute where the value defaults to 'no'.
+            When <code>relay='yes'</code> any settings within the <code>dhcp</code> block
+            are ignored and a DHCP relay agent is started instead of a local DHCP server.
+            The DHCP relay daemon will listen on the network's bridge interface for
+            DHCP/BOOTP traffic and relay it via broadcast from the first interface declared
+            in the <code>forward</code> element.
             <dl>
               <dt><code>range</code></dt>
               <dd>The <code>start</code> and <code>end</code> attributes on the
@@ -779,6 +787,18 @@
         <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
       </network></pre>
 
+    <p>Here is the same configuration using a DHCP relay agent instead of a local DHCP server.</p>
+    <pre>
+      <network>
+        <name>local</name>
+        <bridge name="virbr1" />
+        <forward mode="route" dev="eth1"/>
+        <ip address="192.168.122.1" netmask="255.255.255.0">
+          <dhcp relay='yes'/>
+        </ip>
+        <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
+      </network></pre>
+ 
     <p>
       Below is another IPv6 varition.  Instead of a dhcp range being
       specified, this example has a couple of IPv6 host definitions.
-- 
1.8.1.2.433.g9808ce0.dirty




More information about the libvir-list mailing list