next up previous contents index
Next: 14.3 The Expanded Node-Address Up: 14.2 The Hierarchical Address Previous: 14.2.1 Default Hierarchical Setting

14.2.2 Specific Hierarchical Setting

The second option allows a hierarchical address to be set with specified number of levels with number of bits assigned for each level. The API would be as the following:

$ns set-address-format hierarchical <#n hierarchy levels> <#bits for level1> <#bits for level 2> ....<#bits for nth level>

An example configuration would be:

$ns set-address-format hierarchical 2 8 15

where 2 levels of hierarchy is specified, assigning 8 bits for the 1st level and 15 bits for the second.