Hi. I am running the following code bu every time I run, nodes appear in different positions and overall visualization is very bad. How can I fix the positions of which node to appear where (while it is still part of LAN!). Also, I send data between two nodes, which goes to the main bus and is distributed to all nodes. How can I restrict the communication between two specific nodes only.
Please reply soon. Faraz set ns [new Simulator] set tracefd [open topology.tr w] $ns trace-all $tracefd set nf [open out.nam w] $ns namtrace-all $nf proc finish {} { global ns nf $ns flush-trace close $nf exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam & exit 0 } set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] $ns make-lan "$n1 $n2 $n3 $n4 $n5" 25Mb 200ms LL Queue/DropTail Mac/Csma/Cd set udp0 [new Agent/UDP] $ns attach-agent $n1 $udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 1000 $cbr0 set interval_ 0.005 $cbr0 attach-agent $udp0 set null0 [new Agent/Null] $ns attach-agent $n3 $null0 $ns connect $udp0 $null0 $ns at 0.1 "$cbr0 start" $ns at 4 "$cbr0 stop" $ns at 4.1 "finish" $ns run