--- 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="192.168.122.1" netmask="255.255.255.0">
 	  <dhcp>
-	    <range start="192.168.122.2" end="192.168.122.254" />
+	    <host name="myhost1" mac="01:23:45:67:89:AB" ip="192.168.122.2" />
+	    <range start="192.168.122.3" end="192.168.122.254" />
 	  </dhcp>
 	</ip>
       </network>
+
domain
+
The domain element is optional. If specified, then + the name attribute defines the default domain that will + 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 used. + If not specified, then the guest hosts will have no domain. + Since 0.4.5 +
ip
The address attribute defines an IPv4 address in dotted-decimal format, that will be configured on the bridge @@ -116,7 +128,7 @@
Immediately within the ip element there is an optional dhcp element. The presence of this element enables DHCP services on the virtual network. It will further - contain one or more range elements. + contain one or more range or host elements. Since 0.3.0
range
@@ -126,6 +138,15 @@ must lie within the scope of the network defined on the parent ip element. Since 0.3.0 +
host
+
The ip 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 mac attribute. The optional + name attribute will further assign the guest hostname. + If a domain is specified in the name attribute to create a FQDN, then + the domain name must also be specified, and they must match. + Since 0.4.5 +

Example configuration

@@ -154,6 +175,27 @@ </ip> </network> +

Static IP based network

+ +

+ This example demonstrates how to assign static IPv4 addresses to + guest OSs. +

+ +
+      <network>
+	<name>default</name>
+	<bridge name="virbr0" />
+	<forward mode="nat"/>
+	<domain name="mydomain.net"/>
+	<ip address="192.168.122.1" netmask="255.255.255.0">
+	  <dhcp>
+	    <range start="192.168.122.10" end="192.168.122.254" />
+	    <host mac="01:23:45:67:89:ab" ip="192.168.122.2" name="myhost1.mydomain.net" />
+	    <host mac="01:23:45:67:89:ac" ip="192.168.122.3" name="myhost2.mydomain.net" />
+	  </dhcp>
+	</ip>
+      </network>

Routed network config