[libvirt] network domain name patch

JJ Reynolds jjr at reynoldsus.net
Sat Sep 13 04:10:17 UTC 2008

As requsted, here is a patch for the network documentation.  I don't know 
how to generate the html file from the in file but the guts are here and it 
seems right to me...



--- formatnetwork.html.in_orig 2008-09-12 23:21:18.000000000 -0400
+++ formatnetwork.html.in 2008-09-12 23:59:51.000000000 -0400
@@ -96,14 +96,26 @@

+ <domain name="mynet.net" />
  <ip address="" netmask="">
-     <range start="" end="" />
+     <host name="myhost1" mac="01:23:45:67:89:AB" ip="" 
+     <range start="" end="" />

+      <dt><code>domain</code></dt>
+      <dd>The <code>domain</code> element is optional.  If specified, then
+         the <code>name</code> attribute defines the default domain that 
+         be reported to hosts that request their domain via DHCP.  It also
+         makes it possible to specify a fully qualified domain
+         name (host.domain.com) for static IP address assignments.  If a 
+         is specified as the domain, then the domain of the host will be 
+         If not specified, then the guest hosts will have no domain.
+  <span class="since">Since 0.4.5</span>
+      </dd>
       <dd>The <code>address</code> attribute defines an IPv4 address in
  dotted-decimal format, that will be configured on the bridge
@@ -116,7 +128,7 @@
       <dd>Immediately 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
- contain one or more <code>range</code> elements.
+ contain one or more <code>range</code> or <code>host</code> elements.
  <span class="since">Since 0.3.0</span>
@@ -126,6 +138,15 @@
  must lie within the scope of the network defined on the parent
  <code>ip</code> element.  <span class="since">Since 0.3.0</span>
+      <dt><code>host</code></dt>
+      <dd>The <code>ip</code> attribute specifies the IPv4 addess that will
+        be assigned, via DHCP, to the guest OS using a virtual network 
interface with a
+        mac address matching the <code>mac</code> attribute.  The optional
+        <code>name</code> attribute will further assign the guest hostname.
+        If a domain is specified in the name attribute to create a FQDN, 
+        the <code>domain name</code> must also be specified, and they must 
+        <span class="since">Since 0.4.5</span>
+      </dd>

     <h2><a name="examples">Example configuration</a></h2>
@@ -154,6 +175,27 @@

+    <h3><a name="examplesNAT">Static IP based network</a></h3>
+    <p>
+      This example demonstrates how to assign static IPv4 addresses to
+      guest OSs.
+    </p>
+    <pre>
+      <network>
+ <name>default</name>
+ <bridge name="virbr0" />
+ <forward mode="nat"/>
+ <domain name="mydomain.net"/>
+ <ip address="" netmask="">
+   <dhcp>
+     <range start="" end="" />
+     <host mac="01:23:45:67:89:ab" ip="" 
name="myhost1.mydomain.net" />
+     <host mac="01:23:45:67:89:ac" ip="" 
name="myhost2.mydomain.net" />
+   </dhcp>
+ </ip>
+      </network></pre>
     <h3><a name="examplesRoute">Routed network config</a></h3>


More information about the libvir-list mailing list