33.5 Commands at a glance

Following is a list of hierarchical routing/addressing related commands used in simulation scripts:

$ns_ set-address-format hierarchical
This command was used to setup hierarchical addressing in ns. However with the recent changes in node APIs, this command has been replaced by
ns_ node-config -addressType hierarchical
This creates a default topology of 3 levels of hierarchy, assigning 8 bits to each level.

$ns_ set-address-format hierarchical nlevels #bits in level1....#bits in level n
This command creates a hierarchy of <nlevels> and assigns the bits in each level as specified in the arguments.

AddrParams set domain\_num\_ \<n\_domains\>
AddrParams set cluster\_num\_ \<n\_clusters\>
AddrParams set nodes\_num\_ \<n\_nodes\>
The above APIs are used to specify the hierarchical topology, i.e the number of domains, clusters and nodes present in the topology. Default values used by AddrParams (i.e if nothing is specified) provide a topology with a single domain with 4 clusters, with each cluster consisting of 5 nodes.

Internal procedures:

$Node add-route dst target
This procedure is used to add next-hop entries of a destination <dst> for a given <target>.

$hiernode_ split-addrstr str
This splits up a hierarchical adrress string (say a.b.c) into a list of the addresses at each level (i.e, a,b and c).

Tom Henderson 2011-11-05