Commit 2eed47f6 authored by Christopher Alfeld's avatar Christopher Alfeld

Documentation on vtypes.

parent 2d547c70
......@@ -21,6 +21,7 @@
<li><a href="#ROUTE">IP Routing Commands</a>
<li><a href="#OS">OS Commands</a>
<li><a href="#LOSS">Link Loss Commands</a>
<li><a href="#VTYPE">Virtual Type Commands</a>
<li><a href="#MISC">Misc. Commands</a>
......@@ -588,6 +589,101 @@ tb-set-node-lan-params $node0 $lan0 40ms 20Mb 0.05
<a name="VTYPE"></a><h3>Virtual Type Commands</h3>
<p>Virtual Types are a method of defining fuzzy types. I.e. types
that can be fulfilled by multiple different physical types. The
advantage of virtual types (vtypes) is that all nodes of the same
vtype will usually be the same physical type of node. In this way,
vtypes allows logical grouping of nodes.
<p>As an example, imagine we have network with internal routers
connecting leaf nodes. We want the routers to all have the same
hardware, and the leaf nods to all have the same hardware, but the
specifics of this hardware do not matter. We have the following
fragment in our NS file:
tb-make-soft-vtype router {pc600 pc850}
tb-make-soft-vtype leaf {pc600 pc850}
tb-set-hardware $router1 router
tb-set-hardware $router2 router
tb-set-hardware $leaf1 leaf
tb-set-hardware $leaf2 leaf
<p>Here we have set up two soft (see below) vtypes, router and leaf.
Our router nodes are then specified to be of type router, and the leaf
nods of type leaf. When the experiment is swapped in the testbed will
attempt to make router1 and router2 be of the same type, and
similarly, leaf1 and leaf2 of the same type. However, the
routers/leafs may be pc600s or they may be pc850s, whichever is easier
to fit in to the available resources.
<p>As a basic use, vtypes can be used to request nodes that are all
the same type, but can be of any available type:
tb-make-soft-vtype N {pc600 pc850}
tb-set-hardware $node1 N
tb-set-hardware $node2 N
<p>Vtypes come in two varieties, hard and soft. With soft vtypes, the
testbed will try to make all nodes of that vtype the same physical
type, but may do otherwise if resources are tight. Hard vtypes behave
just like soft vtypes except that the testbed will give higher
priority to vtype consistency and swapping in will fail if the vtypes
can not be satisfied. So, if you use soft vtypes you are more likely
to swap in but there is a chance your node of a specific vtype will
not all be the same. If you use hard vtypes all nods of a given vtype
will be the same, but swapping in may fail.
<p>Finally, you can have weighted soft vtypes. Here you assign a
weight from 0 to 1 exclusive to your vtype. The testbed will give
higher priority to consistency in the higher weighted vtypes. The
primary use of this in to rank multiple vtypes by importance of
consistency. Soft vtypes have a weight of 0.5 by default.
<p>As a final note, when specifying the types of a vtype, use the most
specific type possible. For example: tb-make-soft-vtype router {pc
pc600}, is not very useful, as pc600 is a sub type of pc. You may
very well end up with two routers as type pc with different hardware,
as pc covers multiple types of hardware.
tb-make-soft-vtype <i>vtype</i> {<i>types</i>}
tb-make-hard-vtype <i>vtype</i> {<i>types</i>}
tb-make-weighted-vtype <i>vtype</i> <i>weight</i> {<i>types</i>}
tb-make-soft-vtype router {pc600 pc850}
tb-make-hard-vtype leaf {pc600 pc850}
tb-make-weighted-vtype A 0.1 {pc600 pc850}
<dt><i>vtype</i> - The name of the vtype to create.
<dt><i>types</i> - One or more physical types.
<dt><i>weight</i> - The weight of the vtype, 0 < <i>weight</i> < 1.
<li>These commands create vtypes. See notes above for description
of vtypes and the difference between soft and hard.
<li><code>tb-make-soft-vtype</code> creates vtypes with weight 0.5.
<li>vtype commands must appear before <code>tb-set-hardware</code>
commands that use them.
<li>Do not used <code>tb-fix-node</code> with nodes that have a vtype.
<a name="MISC"></a><h3>Misc. Commands</h3>
......@@ -608,4 +704,5 @@ tb-fix-node $node0 pc42
<li>This command forces the virtual node to be mapped to the
specified physical node. Swap in will fail if this can not be
<li>Do not use this command on nodes that are a virtual type.
......@@ -21,3 +21,6 @@ proc tb-set-node-lan-params {node lan delay bw loss} {}
proc tb-set-node-failure-action {node type} {}
proc tb-set-ip-routing {type} {}
proc tb-fix-node {v p} {}
proc tb-make-weighted-vtype {name weight types} {}
proc tb-make-soft-vtype {name types} {}
proc tb-make-hard-vtype {name types} {}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment