0% found this document useful (0 votes)
101 views7 pages

Presidency University Bangalore Network Programming Lab Comscpbtech624922 Comsc Btech Sem 6 Div 2

This document contains explanations for multiple choice questions about the Network Simulator 2 (NS2) programming language. It provides the question, possible answers, and the correct answer along with a brief explanation for each question. The questions cover topics such as creating nodes, setting queue limits, opening trace files, and syntax for setting up connections and protocols in NS2 programs.

Uploaded by

Hithai Shree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views7 pages

Presidency University Bangalore Network Programming Lab Comscpbtech624922 Comsc Btech Sem 6 Div 2

This document contains explanations for multiple choice questions about the Network Simulator 2 (NS2) programming language. It provides the question, possible answers, and the correct answer along with a brief explanation for each question. The questions cover topics such as creating nodes, setting queue limits, opening trace files, and syntax for setting up connections and protocols in NS2 programs.

Uploaded by

Hithai Shree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

4/25/2020 Edhitch: Connect. Collaborate. Learn.

Presidency University Bangalore


Network Programming Lab COMSCPBTech624922 COMSC BTech Sem 6 Div 2

Explanation

What is synatx for creating the node in the NS2 program

set n0 [$nf node]

set ns [$n0 node]

set n0 [$ node ns]

set n0 [$ns node]

Correct Answer:D
Explanation:

This line of code does what set null0 [new Agent/Null]

creates null agent

creates new agent

creates traffic sink

sets null agent

Correct Answer:C
Explanation:

How to set the queue limt in NS2 program

$ns queue-limit $n0 10

queue-limit $n0$n2 10

$ns queue-limit $n0$n2 10

https://www.edhitch.com/whatisexplanation 1/7
4/25/2020 Edhitch: Connect. Collaborate. Learn.

$ns queue-limit 10

Correct Answer:C
Explanation:

After simulation which file should be run to see the output

tr

nam

ns

awk

Correct Answer:D
Explanation:

Pick the correct syntax for creating the network simulation object

set ns [New Simulator]

set ns [new Simulator]

set ns [new simulator]

set ns [newSimulator]

Correct Answer:B
Explanation:

What is the syntax to close the trace file

close $tf

close $tr

$close tf

$close tr

https://www.edhitch.com/whatisexplanation 2/7
4/25/2020 Edhitch: Connect. Collaborate. Learn.

Correct Answer:A
Explanation:

How to flush the trace file content in NS2 programs

$ns flush-trace

$ns flush trace

$ns flush

$ns flush-Trace

Correct Answer:A
Explanation:

Which type of simulator NS2 belongs to

discrete contineous simulator

discrete event simulator

discrete simulator

discrete time event simulator

Correct Answer:B
Explanation:

What is the syntax to open a nam file lab1

set nf [open lab1.nam ]

set nf [open lab1.nam w]

set nf [open lab1.nam ]

set nf [open lab.nam ]

Correct Answer:B
Explanation:

https://www.edhitch.com/whatisexplanation 3/7
4/25/2020 Edhitch: Connect. Collaborate. Learn.

Simulation program should always be saved with extension

tr

nam

ns

awk

Correct Answer:C
Explanation:

How to open the nam trace file in ns2 program

set nf [program name.nam w]

set [open Program name.nam w]

set [open program name.nam E]

set nf [open program name.nam w]

Correct Answer:D
Explanation:

What is the full form of TCL

Tool Command Language

Tranmission Command Language

Tool Control Language

Tranismission Control Language

Correct Answer:A
Explanation:

Whate the syntax for traceing the all the information in trace file

https://www.edhitch.com/whatisexplanation 4/7
4/25/2020 Edhitch: Connect. Collaborate. Learn.

$ns trace all $tf

$ns trace-all

$ns trace-all $tf

$trace-all $tf

Correct Answer:C
Explanation:

ns lab4.tcl Here ns indicates

new simulator

network simulator

Neither a or b

Either a or b

Correct Answer:B
Explanation:

What type of connection duplex belong to

Two way communication

One way communication

One to many communication

Many to one communication

Correct Answer:A
Explanation:

The AWK file starts with keyword

PROC

https://www.edhitch.com/whatisexplanation 5/7
4/25/2020 Edhitch: Connect. Collaborate. Learn.

END

GLOBAL

BEGIN

Correct Answer:D
Explanation:

What is the syntax to setup a TCP connection

set tcp0 [new Agent/T]

set tcp0 [new Agent/Tcp]

set tcp0 [new Agent/TCP]

set tcp0 [new Agent/tcp]

Correct Answer:C
Explanation:

nam trace file should be opened in which mode

execute

read

write

any of the above

Correct Answer:C
Explanation:

How I can attach the transport layer protocol with node

set udp [new Agent/UDP]

udp0 [new Agent/UDP]

https://www.edhitch.com/whatisexplanation 6/7
4/25/2020 Edhitch: Connect. Collaborate. Learn.

set udp0 [new Agent, UDP]

set udp0 [new Agent/UDP]

Correct Answer:D
Explanation:

cbr refers to

continuous bit rate

communication bit rate

control bit rate

constant bit rate

Correct Answer:D
Explanation:

https://www.edhitch.com/whatisexplanation 7/7

You might also like