The following is a list of lan related commands commonly used in simulation scripts:
$ns_ newLan nodelist BW delay args
This command creates a lan similar to make-lan described above. But this command can be used for finer control whereas make-lan is a more convinient and easier command. For example newLan maybe used to create a lan with hierarchical addresses. See /tcl/ex/vlantest-hier.tcl, vlantest-mcst.tcl, lantest.tcl, mac-test.tcl for usage of newLan. The possible argument types that can be passed are LL, ifq, MAC, channel, phy and address.
$lannode cost c
This assigns a cost of c/2 to each of the (uni-directional) links in the lan.
Returns the cost of (bi-directional) links in the lan, i.e c.
Internal procedures :
$lannode addNode nodes bw delay LL ifq MAC phy
Lan is implemented as a virtual node. The LanNode mimics a real node and uses an address (id) from node's address space. This command adds a list of <nodes> to the lan represented by lannode. The bandwidth, delay and network characteristics of nodes are given by the above arguments. This is an internal command used by make-lan and newLan.
Returns the virtual node's id.
Returns virtual nodes's address.
This command creates a given lan layout in nam. This function may be changed to redefine the lan layout in a different way.
This command always returns 1, since the node here is a virtual node representing a lan. The corresponding command for base class Node $node is-lan? always returns a 0.