Answer to Question #281774 in Computer Networks for Rox

Question #281774

Write an NS2 script to build 2-node point to point network. Implement three nodes point 

– to – point network with duplex links between them. Set the queue size, vary the 

bandwidth and find the number of packets dropped.


1
Expert's answer
2021-12-22T01:10:36-0500

Write an NS2 script to build 2-node point to point network. Implement three nodes point 

– to – point network with duplex links between them. Set the queue size, vary the 

bandwidth and find the number of packets dropped.

Answer:

NS-is one of the types simulation (Network Simulation in full) which is used to simulate the networks. It provide simulation for routing both wired and wireless networks.

Script:

Node-link-agent-traffic source

#create 3 nodes

Set n0{$ns node}

Set n1{$ns node}

Set n2{$ns node}

Source label “TCP source”

#create Link between nodes

$ns duplex-link $n0 $ n1 1mb 10ms drop

$ns duplex-link $n1 $n2 1mb 10ms drop

#set queue size

$ns queue-limit $ n0 $n1 10

$ns queue –limit $n1 $n2 10

#Show the number of packets dropped

Exec “The number of packets drops

Exit 0;



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS