Difference between revisions of "Vnx-plugin-ospf"

From VNX
Jump to: navigation, search
(Introduction)
Line 19: Line 19:
  
  
 +
== OSPF Plugin Example Scenario ==
  
<pre>
 
<ospf_conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
  xsi:noNamespaceSchemaLocation="/usr/share/xml/vnx/ospf.xsd">
 
 
  <vm name="r1" type="quagga" subtype="lib-install">
 
      <hostname>r1</hostname>
 
      <password>xxxx</password>
 
      <network area="0.0.0.0">10.0.0.0/16</network>
 
      <passive_if>eth1</passive_if>
 
      <binaries>
 
        <zebra>/usr/lib/quagga/zebra</zebra>
 
        <ospfd>/usr/lib/quagga/ospfd</ospfd>
 
      </binaries>
 
  </vm>
 
  
  <vm name="r2" type="quagga" subtype="lib-install">
+
=== Scenario Specification ===
      <hostname>r2</hostname>
 
      <password>xxxx</password>
 
      <network area="0.0.0.0">10.0.0.0/16</network>
 
      <passive_if>eth1</passive_if>
 
  </vm>
 
</ospf_conf>
 
</pre>
 
  
 
<pre>
 
<pre>
Line 153: Line 133:
 
</vnx>
 
</vnx>
 
</pre>
 
</pre>
 +
 +
=== Plugin Configuration File (PCF) ===
 +
 +
<pre>
 +
<ospf_conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
  xsi:noNamespaceSchemaLocation="/usr/share/xml/vnx/ospf.xsd">
 +
 +
  <vm name="r1" type="quagga" subtype="lib-install">
 +
      <hostname>r1</hostname>
 +
      <password>xxxx</password>
 +
      <network area="0.0.0.0">10.0.0.0/16</network>
 +
      <passive_if>eth1</passive_if>
 +
      <binaries>
 +
        <zebra>/usr/lib/quagga/zebra</zebra>
 +
        <ospfd>/usr/lib/quagga/ospfd</ospfd>
 +
      </binaries>
 +
  </vm>
 +
 +
  <vm name="r2" type="quagga" subtype="lib-install">
 +
      <hostname>r2</hostname>
 +
      <password>xxxx</password>
 +
      <network area="0.0.0.0">10.0.0.0/16</network>
 +
      <passive_if>eth1</passive_if>
 +
  </vm>
 +
</ospf_conf>
 +
</pre>
  
  

Revision as of 01:01, 11 September 2011

OSPF Plugin

...to be completed...

Authors:
David Fernández (david at dit.upm.es)
Miguel Ferrer (mferrer at dit.upm.es)
Francisco Jose Martin (fjmarin at dit.upm.es)
Fermín Galán (galan at dit.upm.es)
version 2.0, September 11th, 2011

Introduction

OSPF plugin is an example VNX extension plugin designed to facilitate the configuration of OSPF in virtual machines. It provides a simple XML language to express OSPF configurations independent of the OSPF implementation used in the virtual machine.


OSPF Plugin Example Scenario

Scenario Specification

<?xml version="1.0" encoding="UTF-8"?>

<!--

~~~~~~~~~~~~~~~~~~~~
VNX Sample scenarios
~~~~~~~~~~~~~~~~~~~~

Name:        example_ospf-plugin
Description: Example scenario to show the use of ospf plugin. It is made of two 
             routers: r1 (ubuntu) and r2(uml) and two hosts: h1 (ubuntu) and h2 (uml).   

This file is part of the Virtual Networks over LinuX (VNX) Project distribution. 
(www: http://www.dit.upm.es/vnx - e-mail: vnx@dit.upm.es) 

Departamento de Ingenieria de Sistemas Telematicos (DIT)
Universidad Politecnica de Madrid
SPAIN

-->

<vnx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="/usr/share/xml/vnx/vnx-2.00.xsd">
  <global>
    <version>2.0</version>
    <scenario_name>example_ospf-plugin</scenario_name>
    <ssh_key>~/.ssh/id_dsa.pub</ssh_key>
    <automac offset="4"/>
    <!--vm_mgmt type="none" /-->
    <vm_mgmt type="private" network="10.250.0.0" mask="24" offset="16">
       <host_mapping />
    </vm_mgmt> 
    <vm_defaults>
        <console id="0" display="no"/>
	<console id="1" display="yes"/>
    </vm_defaults>
    <extension plugin="ospf" conf="example_ospf-plugin-conf.xml" />
  </global>
    
  <net name="lan1" mode="virtual_bridge" />
  <net name="lan2" mode="virtual_bridge" />
  <net name="ptp12" mode="virtual_bridge" />
  
  <!-- NODES -->
  <vm name="r1" type="libvirt" subtype="kvm" os="linux" exec_mode="cdrom">
    <filesystem type="cow">/usr/share/vnx/filesystems/rootfs_ubuntu</filesystem>
    <mem>256M</mem>
    <if id="1" net="lan1">
      <ipv4>10.0.1.1/24</ipv4>
      <ipv6>2001:db8:1::1/64</ipv6>
    </if>
    <if id="2" net="ptp12">
      <ipv4>10.0.0.1/30</ipv4>
      <ipv6>2001:db8:12::1/64</ipv6>
    </if>
    <forwarding type="ip" />
  </vm>

  <vm name="r2" type="uml" subtype="" os="" exec_mode="mconsole">
    <filesystem type="cow">/usr/share/vnx/filesystems/rootfs_uml</filesystem>
    <mem>64M</mem>
    <kernel>/usr/share/vnx/kernels/linux</kernel>
    <if id="1" net="lan2" name="fxp0">
      <ipv4>10.0.2.1/24</ipv4>
      <ipv6>2001:db8:2::1/64</ipv6>
    </if>
    <if id="2" net="ptp12" name="fxp1">
      <ipv4>10.0.0.2/30</ipv4>
      <ipv6>2001:db8:12::2/64</ipv6>
    </if>
    <forwarding type="ip" />
  </vm>

  <vm name="h1" type="libvirt" subtype="kvm" os="linux" exec_mode="cdrom">
    <filesystem type="cow">/usr/share/vnx/filesystems/rootfs_ubuntu</filesystem>
    <mem>256M</mem>
    <if id="1" net="lan1">
      <ipv4>10.0.1.2/24</ipv4>
      <ipv6>2001:db8:1::2/64</ipv6>
    </if>
    <route type="ipv4" gw="10.0.1.1">default</route>    
    <route type="ipv6" gw="2001:db8:1::1">default</route>       
  </vm>

  <vm name="h2" type="uml" exec_mode="mconsole">
    <filesystem type="cow">/usr/share/vnx/filesystems/rootfs_uml</filesystem>
    <mem>64M</mem>
    <kernel>/usr/share/vnx/kernels/linux</kernel>
    <if id="1" net="lan2">
      <ipv4>10.0.2.2/24</ipv4>
      <ipv6>2001:db8:2::2/64</ipv6>
    </if>
    <route type="ipv4" gw="10.0.2.1">default</route>    
    <route type="ipv6" gw="2001:db8:2::1">default</route>       
  </vm>
  

  <host>
    <hostif net="lan1">
       <ipv4>10.0.1.3/24</ipv4>
       <ipv6>2001:db8:1::3/64</ipv6>
    </hostif>
    <route type="ipv4" gw="10.0.1.1">10.0.0.0/16</route>    
    <route type="ipv6" gw="2001:db8:1::1">2001:db8::/32</route>    
  </host>
  
</vnx>

Plugin Configuration File (PCF)

<ospf_conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="/usr/share/xml/vnx/ospf.xsd">

   <vm name="r1" type="quagga" subtype="lib-install">
      <hostname>r1</hostname>
      <password>xxxx</password>
      <network area="0.0.0.0">10.0.0.0/16</network>
      <passive_if>eth1</passive_if> 
      <binaries>
        <zebra>/usr/lib/quagga/zebra</zebra>
        <ospfd>/usr/lib/quagga/ospfd</ospfd>
      </binaries>
   </vm>

   <vm name="r2" type="quagga" subtype="lib-install">
      <hostname>r2</hostname>
      <password>xxxx</password>
      <network area="0.0.0.0">10.0.0.0/16</network>
      <passive_if>eth1</passive_if> 
   </vm>
</ospf_conf>