answersLogoWhite

0

How do you design a netwok in NS2?

User Avatar

Anonymous

14y ago
Updated: 8/19/2019

set ns [new Simulator]

set nf [open out.nam w]

$ns namtrace-all $nf

proc finish {} {

global ns nf

$ns flush-trace

exec 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]

set n6 [$ns node]

set n7 [$ns node]

set n8 [$ns node]

set n9 [$ns node]

$ns simplex-link $n1 $n3 10Mb 10ms DropTail

$ns duplex-link $n2 $n3 0.5Mb 15ms DropTail

$ns simplex-link $n3 $n4 40Mb 15ms DropTail

$ns duplex-link $n4 $n5 5Mb 5ms DropTail

$ns duplex-link $n4 $n6 10Mb 10ms DropTail

$ns simplex-link $n4 $n7 25Mb 5ms DropTail

$ns duplex-link $n7 $n8 20Mb 5ms DropTail

$ns duplex-link $n7 $n9 15Mb 5ms DropTail

$ns simplex-link-op $n1 $n3 orient right-down

$ns duplex-link-op $n2 $n3 orient right-up

$ns simplex-link-op $n3 $n4 orient right

$ns duplex-link-op $n4 $n5 orient down

$ns duplex-link-op $n4 $n6 orient up

$ns simplex-link-op $n4 $n7 orient right

$ns duplex-link-op $n7 $n8 orient right-up

$ns duplex-link-op $n7 $n9 orient right-down

$ns simplex-link-op $n1 $n3 color "blue"

$ns duplex-link-op $n2 $n3 color "blue"

$ns simplex-link-op $n3 $n4 color "blue"

$ns duplex-link-op $n4 $n5 color "blue"

$ns duplex-link-op $n4 $n6 color "blue"

$ns simplex-link-op $n4 $n7 color "blue"

$ns duplex-link-op $n7 $n8 color "blue"

$ns duplex-link-op $n7 $n9 color "blue"

$n1 color red

$n2 color red

$n3 color red

$n4 color red

$n5 color red

$n6 color red

$n7 color green

$n8 color green

$n9 color green

$ns at 5.0 "finish"

$ns run

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the scope of the NS2?

pls tel me the scope of ns2


How to use NS2 programming?

you don't need to use ns2 programming


What is business communication netwok?

what is communication network?


What is the molecular geometry for NS2?

Linear


What is the compound name for NS2?

The compound name for NS2 is disulfur mononitride.


What is the s block of elements?

ns1 or ns2


What channel is US netwok?

USA Network is on Ch. 105


In groups 13 through 18 valence electrons may be in which sublevels?

In groups 13 through 18, valence electrons may be in the s, p, and d sublevels. Group 13 elements have valence electrons in the s and p sublevels, while group 14-18 elements may also have valence electrons in the d sublevel in addition to s and p sublevels.


Which Linux os is suitable for NS2 simulations?

Currently NS2 development by VINT group is supported through Defense Advanced Research Projects Agency (DARPA) with SAMAN and through NSF with CONSER, both in collaboration with other researchers including ACIRI (see Resources). NS2 is available on several platforms such as FreeBSD, Linux, SunOS and Solaris. NS2 also builds and runs under Windows.


When did the kwa ns2 system come out?

The Kwa NS2 system was released in 2017. It is part of a series of advancements in the Kwa gaming platform, which focuses on enhancing user experience and performance. The NS2 model introduced new features and improvements over its predecessor, catering to the evolving needs of gamers.


How do you solve segmentation fault in ns2?

Segmentation errors appear in NS2 because pointers in the source code sometimes cause errors. If you encounter one of these errors first cut your off and back on again. Many times this will make the error go away. If it does not you may need to contact the makes of NS2 for advice.


What is the estimated beta coefficient for CBS?

What is the estimated beta coefficient of cbs netwok