Posts

Showing posts from June, 2018

Networks

Image
In Networks, simulation tools play an important role for carrying out simulations. Below is the code for simulation of nodes on NS2 platform. The below tcl script shows the code for creation of six nodes in the network. The code to create global simulator object, open trace file, nam file required for the simulation is available on  https://sandip9334.blogspot.in/ . These lines of code mentioned in the above link has to be placed before the below mentioned code in a single tcl file. #Creation of six nodes set na [$sn node] set nb [$sn node] set nc [$sn node] set nd [$sn node] set ne [$sn node] set nf [$sn node] #Creating links between the nodes $sn duplex-link $na $nc 2Mb 10ms DropTail $sn duplex-link $nb $nc 2Mb 10ms DropTail $sn duplex-link $nc $nd 1.7Mb 20ms DropTail $sn duplex-link $nd $ne 2Mb 20ms DropTail $sn duplex-link $nd $nf 2Mb 20ms DropTail #Setting Queue Size of link (nc-nd) to 10 $sn queue-limit $nc $nd 10 #Provide node p