Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Reti di Comunicazione e Internet
- Academic year
- 2011-2012
- Classification
- Other study material
- Original format
- Text
- Searchable text
Study material for Reti di Comunicazione e Internet, shared by the Studwiz community and reviewed by moderators.
Study material for Reti di Comunicazione e Internet, shared by the Studwiz community and reviewed by moderators.
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
Reti di Comunicazione e Internet-MOD1 Prof. Guido Maier, Prof. Massimo Tornatore. Prova di Laboratorio – 31 Gennaio 2012 Cognome e nome: (stampatello) Matricola: (firma leggibile) Dato il seguente programma (script) NS in linguaggio TCL (svolgere su questo foglio): set ns [new Simulator] set namFile [open 31_1_12.nam w] $ns namtrace-all $namFile $ns at 5.0 "finish" proc finish {} { global ns global namFile $ns flush-trace close $namFile exit 0 } set Node1 [$ns node] set Node2 [$ns node] set Node3 [$ns node] set Node4 [$ns node] set Node5 [$ns node] $ns duplex-link $Node1 $Node4 1Mb 5ms DropTail $ns duplex-link $Node2 $Node4 1.8Mb 13ms DropTail $ns duplex-link $Node3 $Node4 1Mb 45ms DropTail $ns duplex-link $Node4 $Node5 1.5Mb 121ms DropTail set UDP1 [new Agent/UDP] $UDP1 set packetSize_ 1000 set UDP2 [new Agent/UDP] $UDP2 set packetSize_ 1000 set UDP3 [new Agent/UDP] $UDP3 set packetSize_ 1000 $ns attach-agent $Node1 $UDP1 $ns attach-agent $Node3 $UDP2 $ns attach-agent $Node5 $UDP3 set Null1 [new Agent/Null] set Null2 [new Agent/Null] set Null3 [new Agent/Null] $ns attach-agent $Node5 $Null1 $ns attach-agent $Node2 $Null2 $ns attach-agent $Node2 $Null3 $ns connect $UDP1 $Null1 $ns connect $UDP2 $Null2 $ns connect $UDP3 $Null3 set VBR1 [new Application/Traffic/ExpOnOff] $VBR1 set ______ 1000 $VBR1 set ______ 1Mb $VBR1 set ___________ 0.5 $VBR1 set ___________ 0.5 set VBR2 [new Application/Traffic/ExpOnOff] $VBR2 set ______ 1000 $VBR2 set ______ 1Mb $VBR2 set ___________ 0.5 $VBR2 set ___________ 0.5 set CBR1 [new Application/Traffic/CBR] $CBR1 set packetSize_ 1000 $CBR1 set interval_ 20ms $CBR1 attach-agent $UDP3 $VBR1 attach-agent $UDP1 $VBR2 attach-agent $UDP2 $ns at 0.0 "$CBR1 start" $ns at 0.0 "$VBR1 start" $ns at 2.0 "$VBR2 start" $ns at 4.5 "$CBR1 stop" $ns at 4.5…
First page of the document.