## Comments : ## <#method keyword> <#number of graphs> [<#initial seed>] ## <#stubs/xit> <#t-s edges> <#s-s edges> ## <#n> <#scale> <#edgemethod> <#alpha> [<#beta>] [<#gamma>] ## number of nodes = 1*8* (1 + 4*6) = 200 ts 10 47 4 0 0 1 20 3 1.0 8 20 3 0.8 6 10 3 0.5
On running 'itm ts200', 10 transit-stub graphs with 200 nodes
each will be created starting with initial
seed 47. line 4 0 0 means each transit node
will have 4 stub domains connected to
it;there shall be no extra transit-stub edges and no extra
stub-stub edges. Line 1 20 3 1.0 means there will 1
transit domain in each graph. Line 8 20 3
0.8 says each transit domain will have, on an
average, 8 transit nodes with an edge between
each pair of node with a probability of 0.8
and line 6 10 3 0.42 says every stub
domain shall have, on an average, 6 nodes each
with an edge between every pair with a
probability of 0.5.
For a more complete description of the parameter
specification file see models.ps file under docs subdirectory.
The graphs produced are named as ts200-[0 to 9].gb and
are in Stanford Graph Base Output format. This needs to
be converted to tcl format for ns-2 to interpret it correctly.
A modification to sgb2ns contributed by Yunxi Shi separates transit nodes from stub nodes when using transit-stub networks. The file (ts2ns.c) is included in sgb2ns distribution.
Smaller and simpler topologies are easier to be created by hand. Below is given an example taken from test-suite.tcl from ns/tcl/ex directory. For more information refer to ns Notes and Documentation (now renamed as ns Manual) (available in PostScript format) and take a look at other example files in ns/tcl/ex directory.
Simple Topology Generation by Hand
# Create a simple four node topology: # # s1 # \ # 8Mb,5ms \ 0.8Mb,100ms # r1 --------- k1 # 8Mb,5ms / # / # s2 # proc create_testnet { } { global s1 s2 r1 k1 set s1 [ns node] set s2 [ns node] set r1 [ns node] set k1 [ns node] ns_duplex $s1 $r1 8Mb 5ms drop-tail ns_duplex $s2 $r1 8Mb 5ms drop-tail set L [ns_duplex $r1 $k1 800Kb 100ms drop-tail] [lindex $L 0] set queue-limit 6 [lindex $L 1] set queue-limit 6 }