Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
af33bbe0
Commit
af33bbe0
authored
May 24, 2006
by
Robert Ricci
Browse files
Template for making a 'plab-in-a-box'.
parent
e6583883
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/nsgen/plinabox.xml
0 → 100644
View file @
af33bbe0
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE nstemplate SYSTEM "nstemplate.dtd">
<!--
XML NS template for making a single-node PlanetLab DevBox experiment
-->
<nstemplate
name=
"PlanetLab In A Box"
author=
"Robert Ricci"
authormail=
"ricci@cs.utah.edu"
authoruid=
"ricci"
>
<description>
This template is for creating a private PlanetLab using the
"PlanetLab in a Box" code. The only thing you may want to edit
is the number of nodes.
</description>
<variable
name=
"Count"
default=
"2"
descr=
"Number of nodes (not including PLC)"
/>
<variable
name=
"PLCHWType"
default=
"pc3000"
descr=
"Hardware Type for PLC"
/>
<variable
name=
"HWType"
default=
"pc"
descr=
"Hardware Type for nodes"
/>
<!-- This hard-codes the image name, but it seems like we have to do
that somewhere... -->
<variable
name=
"ImageName"
default=
"PLAB-PLBOX"
descr =
"Disk Image for PLC"
/>
<nstext>
<section>
<![CDATA[
# plinabox.ns - NS script to make a private PlanetLab on Emulab
#
# May 24, 2006
#
# Questions and comments to testbed-ops@emulab.net
#
# Boilerplate
#
source tb_compat.tcl
set ns [new Simulator]
set num_pcs <Count />
#
# Create the PLC
#
set plc [$ns node]
tb-set-node-os $plc
<ImageName
/>
tb-set-node-plab-role $plc plc
tb-set-hardware $plc
<PLCHWType
/>
#
# Create the nodes
#
set lan_string ""
for {set i 1} {$i
<
= $num_pcs} {incr i} {
set node($i) [$ns node]
tb-set-node-plab-role $node($i) node
append lan_string "$node($i) "
}
set lan [$ns make-lan $lan_string 100Mb 0ms]
#
# Boilerplate
#
$ns rtproto Static
$ns run
]]>
</section>
</nstext>
</nstemplate>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment