<!-- arbitrary number of these files, I suggest one master file -->
<!-- describing physical topology than can only be edited by the-->
<!-- admin, and then several editable files descibing logical   -->
<!-- networks, one file per experiment                          -->
<!-- -->
<!-- Adam suggests one file per host -->
<topology>

<group>

  <!-- groups will be useful to define the same kernel for a bunch of -->
  <!-- machines with same hardware -->
  <groupid>
    dells
  </groupid>

  <!-- this means some of the config is in the named grub file -->
  <!-- i would prefer it all in one file really -->
  <grubconfig>
    /gentoo/boot/grub.dells
  </grubconfig>

  <rootpath>
    192.168.1.1:/exports/dells
  </rootpath>

  <device>

    <type>
      host
    </type>

    <deviceid>
      dell1
    </deviceid>

    <!-- a symlink will be created at grubconfigbase which points to -->
    <!-- the current config, i.e. grubconfig -->
    <!-- this must match what is in dhcp.conf -->
    <!-- this is in order to avoid modifying dhcp.conf -->
    <grubconfigbase>
      /gentoo/boot/grub.lst
    </grubconfigbase>

    <rootpathbase>
       192.168.1.1:/exports/gentoo
    </rootpathbase>
    
    <interface management="true"> <!-- 'management' indicates this interface  -->
                                  <!--  should never be reconfigured by       -->
                                  <!--  users but is probably redundant since -->
                                  <!--  *everything* in the master file is    -->
                                  <!--  supposed to be immutable to users     -->
      <mac>
        00:01:02:AB:C5:41
      </mac>

      <ip>
        192.168.1.3
      </ip>

      <link><target> <!-- what is on the other end of the cable -->
        <mac>
          00:50:8B:09:3E:A3  <!-- may also be IP address, providing you have defined -->
        </mac>               <!-- an interface with that IP address somewhere else -->
      </target></link>                    

      <!-- we could specify some device names here (eth0, sis0) but they are OS -->
      <!-- specific so I would prefer to automatically determine them based on the mac -->

    </interface>

    <interface>
      <mac>
        00:01:02:AB:C5:42
      </mac>
    </interface>
  
  </device>

</group>

<device>

  <type>
    switch
  </type>

  <identifier>
    extreme1
  </identifier>

  <mac>  <!-- will be inherited by all interfaces -->
    00:50:8B:09:3E:A3
  </mac>

  <interface>

    <!-- I would prefer to auto detect the port number, but that won't work if the config is done while -->
    <!-- the cable is unplugged. -->
    <!-- Note that port could be specified in the defintion of the interface on dell1 in which case -->
    <!-- this interface definiton would be completely unnecessary -->
    <port>
      0
    </port>

    <link><target>
      <mac>
        00:01:02:AB:C5:41
      </mac>
    </target></link>

    <!-- this port is going to be part of a VLAN -->
    <vlan>
      <vlanid>
        network1
      </vlanid>
    </vlan>

  </interface>

  <!-- alternatively, the VLAN may be specified like this -->
  <vlan>
    <vlanid>network1</vlanid>
    <interface>
      <port>0</port>
    </interface>
    <interface>
       <port>1</port>
    </interface>
  </vlan>

</device>

<!-- Links may also be specified independendly, rather than inside interface definitions -->
<link>
  <mac> <!-- we cant inherit this from an interface now, so we specify it -->
    00:50:8B:09:3E:A3  
  </mac>
  <target>
    <mac>
       00:01:02:AB:C5:41
    </mac>
   </target>
</link>


<!-- and here is an independent VLAN definition -->
<vlan>
  <identifier> <!-- the switch -->
    extreme1
  </identifier>
  <vlanid>network1</vlanid>
  <interface>
    <port>0</port>
  </interface>
  <interface>
     <port>1</port>
  </interface>
</vlan>
</topology>
