Difference between revisions of "Example-DNS"

From VNUML-WIKI
Jump to: navigation, search
(VNUML Description)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Title|DNS Example}}
 
{{Title|DNS Example}}
  
version 1.7.0
+
<big>
 +
Authors:
 +
'''David Fern&aacute;ndez (david at dit.upm.es)'''
 +
'''version 1.8, October 3rd, 2007'''
 +
</big>
  
David Fernández ([mailto:david at dit.upm.es david at dit.upm.es])=======November 23rd, 2006====<br /><br />
+
__TOC__
| style="text-align: right; vertical-align: top" width="208" |
 
[http://www.dit.upm.es/vnuml [[Image:vnuml.png|Virtual Network User Mode Linux]]]
 
  
  
 +
== Scenario ==
 +
 +
This is an interesting example to learn and experiment with the Internet's Domain Name System (DNS) and the configuration of the widest used DNS server implementation: [http://www.isc.org/products/BIND bind].The example implements the complete dual IPv4/IPv6 DNS hierarchy shown in the figure. All DNS servers are under the fictitious .e6 top level domain (used for testing in [http://www.euro6ix.org Euro6IX project]).
 +
 +
<center>[[Image:dns.png|DSN]]</center>
 +
 +
<font color="red">'''NOTE:'''</font> if you are experiencing problems with the conventional xterm, we recommend you to uncomment the [[Reference#<xterm>|<xterm>]] tag in each virtual machine, in order to use gnome-terminal, that seems to be more stable. Of course, you will need the gnome-terminal installed in your system.
 +
 +
Once you have started the scenario (vnuml -t ...) and the simulation (vnuml -s ...), you can make queries to the different name servers from any of the virtual machines or the host (which is included in the scenario with address 10.1.1.10) using dig tool. For example:
 +
* '''dig @10.1.1.1 h1.dit.upm.e6''' queries root server (10.1.1.1) to get the A record corresponding to h1.dit.upm.e6 host.
 +
* '''dig @10.1.1.3 -x 10.12.1.1''' queries dit.upm.e6 server (10.1.1.3) to get the PTR record corresponding to 10.12.1.1.
 +
* '''dig @10.1.1.3 -t ptr 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.4.1.0.0.8.b.d.0.1.0.0.2.ip6.arpa''' queries dit.upm.e6 server (10.1.1.3) to get the PTR record corresponding to 2001:db8:14:100::1 IPv6 address.
  
== Scenario ==
+
The following table shows the main data related to the scenario:
  
|-
+
{| id="AutoNumber1" style="border-collapse: collapse" width="100%" border="1"
| colspan="2" |
+
|
<br />This is an interesting example to learn and experiment with with the Internet's Domain Name System (DNS) and the configuration of the widest used DNS server implementation: [http://www.isc.org/products/BIND bind].The example implements the complete dual IPv4/IPv6 DNS hierarchy shown in the figure. All DNS servers are under the fictitious .e6 top level domain (used for testing in [http://www.euro6ix.org Euro6IX project]).<center>[[Image:dns.png|DSN]]</center>You can get the complete specification [dns.xml here]. The bind configuration files used are in this [dns.tar tar file], that must be untared in /usr/share/vnuml/examples.<font color="red">'''NOTE:'''</font> if you are experiencing problems with the conventional xterm, we recommend you to uncomment the [../../1.7/reference/index.html#xterm <xterm>] tag in each virtual machine, in order to use gnome-terminal, that seems to be more stable. Of course, you will need the gnome-terminal installed in your system.Once you have started the scenario (vnuml -t ...) and the simulation (vnuml -s ...), you can make queries to the different name servers from any of the virtual machines or the host (which is included in the scenario with address 10.1.1.10) using dig tool. For example:
 
* "dig @10.1.1.1 h1.dit.upm.e6" queries root server (10.1.1.1) to get the A record corresponding to h1.dit.upm.e6 host.
 
* "dig @10.1.1.3 -x 10.12.1.1" queries dit.upm.e6 server (10.1.1.3) to get the PTR record corresponding to 10.12.1.1.
 
* "dig @10.1.1.3 -t ptr 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.4.1.0.0.8.b.d.0.1.0.0.2.ip6.arpa queries dit.upm.e6 server (10.1.1.3) to get the PTR record corresponding to 2001:db8:14:100::1 IPv6 address. The following table shows the main data related to the scenario:{| id="AutoNumber1" style="border-collapse: collapse" width="100%" border="1"
 
 
| width="14%" height="19" align="center" | '''e6'''
 
| width="14%" height="19" align="center" | '''e6'''
 
| width="14%" height="19" align="center" | '''upm.e6'''
 
| width="14%" height="19" align="center" | '''upm.e6'''
Line 24: Line 34:
 
| width="15%" height="19" align="center" | '''cons.e6'''
 
| width="15%" height="19" align="center" | '''cons.e6'''
 
|-
 
|-
| width="14%" height="57" | Server
+
| width="14%" height="57" align="left" | Server
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
ns1.e610.1.1.12001:db8::1
+
ns1.e610.1.1.1 2001:db8::1
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
ns1.upm.e610.1.1.12001:db8::1
+
ns1.upm.e610.1.1.1 2001:db8::1
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
ns1.dit.upm.e610.1.1.12001:db8::1
+
ns1.dit.upm.e610.1.1.1 2001:db8::1
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
ns1.umu.e610.1.1.12001:db8::1
+
ns1.umu.e610.1.1.1 2001:db8::1
 
| width="15%" height="57" align="center" |
 
| width="15%" height="57" align="center" |
ns1.dif.umu.e610.1.1.12001:db8::1
+
ns1.dif.umu.e610.1.1.1 2001:db8::1
 
| width="15%" height="57" align="center" |
 
| width="15%" height="57" align="center" |
ns1.cons.e610.1.1.12001:db8::1
+
ns1.cons.e610.1.1.1 2001:db8::1
 
|-
 
|-
| width="14%" height="36" | Authoritative for direct domains:
+
| width="14%" height="36" align="left" | Authoritative for direct domains:
 
| width="14%" height="36" align="center" |
 
| width="14%" height="36" align="center" |
 
e6
 
e6
Line 52: Line 62:
 
cons.e6
 
cons.e6
 
|-
 
|-
| width="14%" height="57" | Authoritative for inverse domains:
+
| width="14%" height="57" align="left" | Authoritative for inverse domains:
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
10.0.0.0/82001:db8::/32
+
10.0.0.0/8 2001:db8::/32
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
10.12.0.0/162001:db8:12::/48
+
10.12.0.0/16 2001:db8:12::/48
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
10.12.10.0/242001:db8:12:1000::/56
+
10.12.10.0/24 2001:db8:12:1000::/56
 
| width="14%" height="57" align="center" |
 
| width="14%" height="57" align="center" |
10.13.0.0/162001:db8:13::/48
+
10.13.0.0/16 2001:db8:13::/48
 
| width="15%" height="57" align="center" |
 
| width="15%" height="57" align="center" |
10.13.10.0/242001:db8:13:1000::/56
+
10.13.10.0/24 2001:db8:13:1000::/56
 
| width="15%" height="57" align="center" |
 
| width="15%" height="57" align="center" |
10.14.0.0/162001:db8:14::/48
+
10.14.0.0/16 2001:db8:14::/48
 
|-
 
|-
| width="14%" height="19" | Prefixes used by local hosts:
+
| width="14%" height="19" align="left" | Prefixes used by local hosts:
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
10.11.0.0/162001:db8:11::/48
+
10.11.0.0/16 2001:db8:11::/48
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
10.12.1.0/242001:db8:12:100:/56
+
10.12.1.0/24 2001:db8:12:100:/56
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
10.12.10.0/242001:db8:12:1000::/56
+
10.12.10.0/24 2001:db8:12:1000::/56
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
10.13.1.0/242001:db8:13:100:/56
+
10.13.1.0/24 2001:db8:13:100:/56
 
| width="15%" height="19" align="center" |
 
| width="15%" height="19" align="center" |
10.13.10.0/242001:db8:13:1000::/56
+
10.13.10.0/24 2001:db8:13:1000::/56
 
| width="15%" height="19" align="center" |
 
| width="15%" height="19" align="center" |
10.14.0.0/162001:db8:14::/48
+
10.14.0.0/16 2001:db8:14::/48
 
|-
 
|-
| width="14%" height="19" | Example host locally registered:
+
| width="14%" height="19" align="left" | Example host locally registered:
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
h1.e610.11.1.12001:db8:11::1
+
h1.e610.11.1.1 2001:db8:11::1
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
h1.upm.e610.12.1.12001:db8:11::1
+
h1.upm.e610.12.1.1 2001:db8:11::1
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
h1.dit.upm.e610.12.10.12001:db8:11::1
+
h1.dit.upm.e610.12.10.1 2001:db8:11::1
 
| width="14%" height="19" align="center" |
 
| width="14%" height="19" align="center" |
h1.umu.e610.13.1.12001:db8:11::1
+
h1.umu.e610.13.1.1 2001:db8:11::1
 
| width="15%" height="19" align="center" |
 
| width="15%" height="19" align="center" |
h1.dif.umu.e610.13.10.12001:db8:11::1
+
h1.dif.umu.e610.13.10.1 2001:db8:11::1
 
| width="15%" height="19" align="center" |
 
| width="15%" height="19" align="center" |
h1.cons.e610.11.1.12001:db8:11::1
+
h1.cons.e610.11.1.1 2001:db8:11::1
 
|}
 
|}
|-
+
 
| class="title" colspan="2" | VNUML Description
+
== VNUML Description ==
|-
 
| colspan="2" |
 
<br />
 
<?xml version="1.0" encoding="UTF-8"?>
 
 
   
 
   
<!DOCTYPE vnuml SYSTEM "/usr/share/xml/vnuml/vnuml.dtd">
+
<pre>
<vnuml>
+
 
+
<?xml version="1.0" encoding="UTF-8"?>
    <global>
+
<!DOCTYPE vnuml SYSTEM "/usr/share/xml/vnuml/vnuml.dtd" [
      <version>1.7</version>
+
  <!ENTITY VNUMLDIR "/usr/share/vnuml/">
      <simulation_name>dns</simulation_name>
+
  <!ENTITY BASEDIR "/root/">
+
  <!ENTITY REDIR "&amp;lt;/dev/null &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 &amp;amp;">
      <ssh_key>/root/.ssh/identity.pub</ssh_key>
+
]>
      <automac offset="0"/>
+
<vnuml>
      <vm_mgmt type="private" network="192.168.0.0" mask="24" offset="0">
+
 
+
  <global>
          <host_mapping/>
+
    <version>1.8</version>
      </vm_mgmt>
+
    <simulation_name>dns</simulation_name>
      <vm_defaults>
+
    <ssh_key>~/.ssh/identity.pub</ssh_key>
          <filesystem type="cow">/usr/share/vnuml/filesystems/root_fs_tutorial</filesystem>
+
    <automac offset="0"/>
          <kernel>/usr/share/vnuml/kernels/linux</kernel>
+
    <vm_mgmt type="private" network="10.250.0.0" mask="24">
+
      <host_mapping/>
          <shell>/bin/sh</shell>
+
    </vm_mgmt>
          <console id="0">xterm</console>
+
    <vm_defaults>
          <!--xterm>gnome-terminal,-t,-x</xterm-->
+
      <filesystem type="cow">&VNUMLDIR;filesystems/root_fs_tutorial</filesystem>
      </vm_defaults>
+
      <kernel>&VNUMLDIR;kernels/linux</kernel>
+
      <basedir>&BASEDIR;</basedir>
    </global>
+
      <console id="1">xterm</console>
   
+
      <!--xterm>gnome-terminal,-t,-x</xterm-->
    <!-- NETWORKS -->
+
    </vm_defaults>
    <net name="lan1" mode="uml_switch" />
+
  </global>
   
+
 
    <vm name="e6">
+
  <!-- NETWORKS -->
+
<net name="lan1" mode="uml_switch"/>
      <if id="1" net="lan1">
+
 
          <ipv4 mask="255.255.255.0">10.1.1.1</ipv4>
+
  <!-- NODES -->
          <ipv6>2001:db8::1/64</ipv6>
+
  <vm name="e6">
+
    <xterm>xterm,-T e6,-e</xterm>
      </if>
+
    <if id="1" net="lan1">
      <filetree root="/etc/bind" when="start">/usr/share/vnuml/examples/dns/ns1</filetree>
+
      <ipv4 mask="255.255.255.0">10.1.1.1</ipv4>
      <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
      <ipv6>2001:db8::1/64</ipv6>
+
    </if>
      <exec seq="start" type="verbatim">mv /etc/bind/ns1/* /etc/bind</exec>
+
    <filetree seq="start" root="/etc/bind">conf/ns1</filetree>
      <exec seq="start" type="verbatim">killall named</exec>
+
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <exec seq="start" type="verbatim">mv /etc/bind/ns1/* /etc/bind</exec>
      <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
    <exec seq="start" type="verbatim">killall named</exec>
      <exec seq="stop" type="verbatim">killall named</exec>
+
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
    <exec seq="stop" type="verbatim">killall named</exec>
    </vm>
+
  </vm>
    <vm name="upm.e6">    
+
 
      <if id="1" net="lan1">
+
  <vm name="upm.e6">
          <ipv4 mask="255.255.255.0">10.1.1.2</ipv4>
+
    <console id="1">xterm</console>
+
    <xterm>xterm,-T upm.e6,-e</xterm>
          <ipv6>2001:db8::2/64</ipv6>
+
    <if id="1" net="lan1">
       </if>
+
       <ipv4 mask="255.255.255.0">10.1.1.2</ipv4>
       <filetree root="/etc/bind" when="start">/usr/share/vnuml/examples/dns/ns2</filetree>
+
       <ipv6>2001:db8::2/64</ipv6>
+
    </if>
      <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <filetree seq="start" root="/etc/bind">conf/ns2</filetree>
      <exec seq="start" type="verbatim">mv /etc/bind/ns2/* /etc/bind</exec>
+
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <exec seq="start" type="verbatim">mv /etc/bind/ns2/* /etc/bind</exec>
      <exec seq="start" type="verbatim">killall named</exec>
+
    <exec seq="start" type="verbatim">killall named</exec>
      <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
    <exec seq="stop" type="verbatim">killall named</exec>
      <exec seq="stop" type="verbatim">killall named</exec>
+
  </vm>
    </vm>
+
 
    <vm name="dit.upm">
+
  <vm name="dit.upm">
      <if id="1" net="lan1">
+
    <console id="1">xterm</console>
+
    <xterm>xterm,-T dit.upm,-e</xterm>
          <ipv4 mask="255.255.255.0">10.1.1.3</ipv4>
+
    <if id="1" net="lan1">
          <ipv6>2001:db8::3/64</ipv6>
+
      <ipv4 mask="255.255.255.0">10.1.1.3</ipv4>
       </if>
+
       <ipv6>2001:db8::3/64</ipv6>
      <filetree root="/etc/bind" when="start">/usr/share/vnuml/examples/dns/ns3</filetree>
+
    </if>
+
    <filetree seq="start" root="/etc/bind">conf/ns3</filetree>
      <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
      <exec seq="start" type="verbatim">mv /etc/bind/ns3/* /etc/bind</exec>
+
    <exec seq="start" type="verbatim">mv /etc/bind/ns3/* /etc/bind</exec>
+
    <exec seq="start" type="verbatim">killall named</exec>
      <exec seq="start" type="verbatim">killall named</exec>
+
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
      <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
    <exec seq="stop" type="verbatim">killall named</exec>
+
  </vm>
      <exec seq="stop" type="verbatim">killall named</exec>
+
 
    </vm>
+
  <vm name="umu.e6">
    <vm name="umu.e6">
+
    <console id="1">xterm</console>
      <if id="1" net="lan1">
+
    <xterm>xterm,-T umu.e6,-e</xterm>
+
    <if id="1" net="lan1">
          <ipv4 mask="255.255.255.0">10.1.1.4</ipv4>
+
      <ipv4 mask="255.255.255.0">10.1.1.4</ipv4>
          <ipv6>2001:db8::4/64</ipv6>
+
       <ipv6>2001:db8::4/64</ipv6>
       </if>
+
    </if>
      <filetree root="/etc/bind" when="start">/usr/share/vnuml/examples/dns/ns4</filetree>
+
    <filetree seq="start" root="/etc/bind">conf/ns4</filetree>
+
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
      <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <exec seq="start" type="verbatim">mv /etc/bind/ns4/* /etc/bind</exec>
      <exec seq="start" type="verbatim">mv /etc/bind/ns4/* /etc/bind</exec>
+
    <exec seq="start" type="verbatim">killall named</exec>
+
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
      <exec seq="start" type="verbatim">killall named</exec>
+
    <exec seq="stop" type="verbatim">killall named</exec>
      <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
  </vm>
+
 
      <exec seq="stop" type="verbatim">killall named</exec>
+
  <vm name="dif.umu">
    </vm>
+
    <console id="1">xterm</console>
    <vm name="dif.umu">    
+
    <xterm>xterm,-T dif.umu,-e</xterm>
      <if id="1" net="lan1">
+
    <if id="1" net="lan1">
+
       <ipv4 mask="255.255.255.0">10.1.1.5</ipv4>
          <ipv4 mask="255.255.255.0">10.1.1.5</ipv4>
+
       <ipv6>2001:db8::5/64</ipv6>
          <ipv6>2001:db8::5/64</ipv6>
+
    </if>
       </if>
+
    <filetree seq="start" root="/etc/bind">conf/ns5</filetree>
      <filetree root="/etc/bind" when="start">/usr/share/vnuml/examples/dns/ns5</filetree>
+
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <exec seq="start" type="verbatim">mv /etc/bind/ns5/* /etc/bind</exec>
       <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <exec seq="start" type="verbatim">killall named</exec>
      <exec seq="start" type="verbatim">mv /etc/bind/ns5/* /etc/bind</exec>
+
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
    <exec seq="stop" type="verbatim">killall named</exec>
      <exec seq="start" type="verbatim">killall named</exec>
+
  </vm>
      <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
 
+
  <vm name="cons">
      <exec seq="stop" type="verbatim">killall named</exec>
+
    <console id="1">xterm</console>
    </vm>
+
    <xterm>xterm,-T cons,-e</xterm>
    <vm name="cons">
+
    <if id="1" net="lan1">
      <if id="1" net="lan1">
+
      <ipv4 mask="255.255.255.0">10.1.1.6</ipv4>
+
      <ipv6>2001:db8::6/64</ipv6>
          <ipv4 mask="255.255.255.0">10.1.1.6</ipv4>
+
    </if>
          <ipv6>2001:db8::6/64</ipv6>
+
    <filetree seq="start" root="/etc/bind">conf/ns6</filetree>
      </if>
+
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
      <filetree root="/etc/bind" when="start">/usr/share/vnuml/examples/dns/ns6</filetree>
+
    <exec seq="start" type="verbatim">mv /etc/bind/ns6/* /etc/bind</exec>
+
    <exec seq="start" type="verbatim">killall named</exec>
      <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
+
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
      <exec seq="start" type="verbatim">mv /etc/bind/ns6/* /etc/bind</exec>
+
    <exec seq="stop" type="verbatim">killall named</exec>
+
  </vm>
      <exec seq="start" type="verbatim">killall named</exec>
+
 
      <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
+
  <host>
+
    <hostif net="lan1">
      <exec seq="stop" type="verbatim">killall named</exec>
+
      <ipv4>10.1.1.10</ipv4>
    </vm>
+
    </hostif>
   
+
  </host>
    <host>
+
 
      <hostif net="lan1">
+
</vnuml>
+
 
          <ipv4 mask="255.255.255.0">10.1.1.10</ipv4>
+
</pre>
      </hostif>
+
 
    </host>
+
== Download ==
   
+
 
</vnuml>
+
* VNUML specification file: [http://jungla.dit.upm.es/~vnuml/doc/examples/dns/dns.xml dns.xml]
<br />
+
* Configuration files: [http://jungla.dit.upm.es/~vnuml/doc/examples/dns/dns.tar dns.tar]
|-
+
 
| class="title" colspan="2" | Old Releases
+
== Old Releases ==
|-
 
| colspan="2" |
 
<br />
 
* [1.3/dns.html 1.3]
 
* [1.6/dns.html 1.6]<br />
 
|-
 
| colspan="2" |
 
----
 
<center><font face="Tahoma">''Last update: <br />''</font><br /><center>[http://validator.w3.org/check/referer [[Image:valid-html401.png|Valid HTML 4.01!]]]</center></center>
 
|}
 
  
</div>
+
* [http://jungla.dit.upm.es/~vnuml/doc/examples/dns/1.3/dns.html 1.3]
 +
* [http://jungla.dit.upm.es/~vnuml/doc/examples/dns/1.6/dns.html 1.6]<br />
 +
* [[Example-dns-1.7|1.7]]

Latest revision as of 11:36, 4 October 2007

DNS Example

Authors:
David Fernández (david at dit.upm.es)
version 1.8, October 3rd, 2007


Scenario

This is an interesting example to learn and experiment with the Internet's Domain Name System (DNS) and the configuration of the widest used DNS server implementation: bind.The example implements the complete dual IPv4/IPv6 DNS hierarchy shown in the figure. All DNS servers are under the fictitious .e6 top level domain (used for testing in Euro6IX project).

DSN

NOTE: if you are experiencing problems with the conventional xterm, we recommend you to uncomment the <xterm> tag in each virtual machine, in order to use gnome-terminal, that seems to be more stable. Of course, you will need the gnome-terminal installed in your system.

Once you have started the scenario (vnuml -t ...) and the simulation (vnuml -s ...), you can make queries to the different name servers from any of the virtual machines or the host (which is included in the scenario with address 10.1.1.10) using dig tool. For example:

  • dig @10.1.1.1 h1.dit.upm.e6 queries root server (10.1.1.1) to get the A record corresponding to h1.dit.upm.e6 host.
  • dig @10.1.1.3 -x 10.12.1.1 queries dit.upm.e6 server (10.1.1.3) to get the PTR record corresponding to 10.12.1.1.
  • dig @10.1.1.3 -t ptr 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.4.1.0.0.8.b.d.0.1.0.0.2.ip6.arpa queries dit.upm.e6 server (10.1.1.3) to get the PTR record corresponding to 2001:db8:14:100::1 IPv6 address.

The following table shows the main data related to the scenario:

e6 upm.e6 dit.upm umu.e6 dif.umu cons.e6
Server

ns1.e610.1.1.1 2001:db8::1

ns1.upm.e610.1.1.1 2001:db8::1

ns1.dit.upm.e610.1.1.1 2001:db8::1

ns1.umu.e610.1.1.1 2001:db8::1

ns1.dif.umu.e610.1.1.1 2001:db8::1

ns1.cons.e610.1.1.1 2001:db8::1

Authoritative for direct domains:

e6

upm.e6

dit.upm.e6

umu.e6

dif.umu.e6

cons.e6

Authoritative for inverse domains:

10.0.0.0/8 2001:db8::/32

10.12.0.0/16 2001:db8:12::/48

10.12.10.0/24 2001:db8:12:1000::/56

10.13.0.0/16 2001:db8:13::/48

10.13.10.0/24 2001:db8:13:1000::/56

10.14.0.0/16 2001:db8:14::/48

Prefixes used by local hosts:

10.11.0.0/16 2001:db8:11::/48

10.12.1.0/24 2001:db8:12:100:/56

10.12.10.0/24 2001:db8:12:1000::/56

10.13.1.0/24 2001:db8:13:100:/56

10.13.10.0/24 2001:db8:13:1000::/56

10.14.0.0/16 2001:db8:14::/48

Example host locally registered:

h1.e610.11.1.1 2001:db8:11::1

h1.upm.e610.12.1.1 2001:db8:11::1

h1.dit.upm.e610.12.10.1 2001:db8:11::1

h1.umu.e610.13.1.1 2001:db8:11::1

h1.dif.umu.e610.13.10.1 2001:db8:11::1

h1.cons.e610.11.1.1 2001:db8:11::1

VNUML Description


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vnuml SYSTEM "/usr/share/xml/vnuml/vnuml.dtd" [
  <!ENTITY VNUMLDIR "/usr/share/vnuml/">
  <!ENTITY BASEDIR "/root/">
  <!ENTITY REDIR "&lt;/dev/null &gt;/dev/null 2&gt;&amp;1 &amp;">
]>
<vnuml>

  <global>
    <version>1.8</version>
    <simulation_name>dns</simulation_name>
    <ssh_key>~/.ssh/identity.pub</ssh_key>
    <automac offset="0"/>
    <vm_mgmt type="private" network="10.250.0.0" mask="24">
       <host_mapping/>
    </vm_mgmt>
    <vm_defaults>
       <filesystem type="cow">&VNUMLDIR;filesystems/root_fs_tutorial</filesystem>
       <kernel>&VNUMLDIR;kernels/linux</kernel>
       <basedir>&BASEDIR;</basedir>
       <console id="1">xterm</console>
       <!--xterm>gnome-terminal,-t,-x</xterm-->
    </vm_defaults>
  </global>

  <!-- NETWORKS -->
 <net name="lan1" mode="uml_switch"/>

  <!-- NODES -->
  <vm name="e6">
    <xterm>xterm,-T e6,-e</xterm>
    <if id="1" net="lan1">
       <ipv4 mask="255.255.255.0">10.1.1.1</ipv4>
       <ipv6>2001:db8::1/64</ipv6>
    </if>
    <filetree seq="start" root="/etc/bind">conf/ns1</filetree>
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
    <exec seq="start" type="verbatim">mv /etc/bind/ns1/* /etc/bind</exec>
    <exec seq="start" type="verbatim">killall named</exec>
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
    <exec seq="stop" type="verbatim">killall named</exec>
  </vm>

  <vm name="upm.e6">
    <console id="1">xterm</console>
    <xterm>xterm,-T upm.e6,-e</xterm>
    <if id="1" net="lan1">
       <ipv4 mask="255.255.255.0">10.1.1.2</ipv4>
       <ipv6>2001:db8::2/64</ipv6>
    </if>
    <filetree seq="start" root="/etc/bind">conf/ns2</filetree>
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
    <exec seq="start" type="verbatim">mv /etc/bind/ns2/* /etc/bind</exec>
    <exec seq="start" type="verbatim">killall named</exec>
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
    <exec seq="stop" type="verbatim">killall named</exec>
  </vm>

  <vm name="dit.upm">
    <console id="1">xterm</console>
    <xterm>xterm,-T dit.upm,-e</xterm>
    <if id="1" net="lan1">
       <ipv4 mask="255.255.255.0">10.1.1.3</ipv4>
       <ipv6>2001:db8::3/64</ipv6>
    </if>
    <filetree seq="start" root="/etc/bind">conf/ns3</filetree>
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
    <exec seq="start" type="verbatim">mv /etc/bind/ns3/* /etc/bind</exec>
    <exec seq="start" type="verbatim">killall named</exec>
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
    <exec seq="stop" type="verbatim">killall named</exec>
  </vm>

  <vm name="umu.e6">
    <console id="1">xterm</console>
    <xterm>xterm,-T umu.e6,-e</xterm>
    <if id="1" net="lan1">
       <ipv4 mask="255.255.255.0">10.1.1.4</ipv4>
       <ipv6>2001:db8::4/64</ipv6>
    </if>
    <filetree seq="start" root="/etc/bind">conf/ns4</filetree>
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
    <exec seq="start" type="verbatim">mv /etc/bind/ns4/* /etc/bind</exec>
    <exec seq="start" type="verbatim">killall named</exec>
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
    <exec seq="stop" type="verbatim">killall named</exec>
  </vm>

  <vm name="dif.umu">
    <console id="1">xterm</console>
    <xterm>xterm,-T dif.umu,-e</xterm>
    <if id="1" net="lan1">
       <ipv4 mask="255.255.255.0">10.1.1.5</ipv4>
       <ipv6>2001:db8::5/64</ipv6>
    </if>
    <filetree seq="start" root="/etc/bind">conf/ns5</filetree>
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
    <exec seq="start" type="verbatim">mv /etc/bind/ns5/* /etc/bind</exec>
    <exec seq="start" type="verbatim">killall named</exec>
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
    <exec seq="stop" type="verbatim">killall named</exec>
  </vm>

  <vm name="cons">
    <console id="1">xterm</console>
    <xterm>xterm,-T cons,-e</xterm>
    <if id="1" net="lan1">
       <ipv4 mask="255.255.255.0">10.1.1.6</ipv4>
       <ipv6>2001:db8::6/64</ipv6>
    </if>
    <filetree seq="start" root="/etc/bind">conf/ns6</filetree>
    <exec seq="start" type="verbatim">rm -f /etc/bind/*</exec>
    <exec seq="start" type="verbatim">mv /etc/bind/ns6/* /etc/bind</exec>
    <exec seq="start" type="verbatim">killall named</exec>
    <exec seq="start" type="verbatim">/usr/sbin/named -c /etc/bind/named.conf</exec>
    <exec seq="stop" type="verbatim">killall named</exec>
  </vm>

  <host>
    <hostif net="lan1">
      <ipv4>10.1.1.10</ipv4>
    </hostif>
  </host>

</vnuml>

Download

Old Releases