Wednesday, February 14, 2024

DUPLEX LINK

 $ns duplex-link node1 node2 bandwidth delay queue-type



set n0 [$ns node]
set n1 [$ns node]

A new node object is created with the command '$ns node'. The above code creates two nodes and assigns them to the handles 'n0' and 'n1'.

The next line connects the two nodes.

$ns duplex-link $n0 $n1 1Mb 10ms DropTail

This line tells the simulator object to connect the nodes n0 and n1 with a duplex link with the bandwidth 1Megabit, a delay of 10ms and a DropTail queue.

No comments:

Post a Comment