Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Reti di Comunicazione e Internet
- Academic year
- 2008-2009
- 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.
Pag. 1/4 Fondamenti di Reti di Telecomunicazioni Prova di Laboratorio – 8 Luglio 2009 Cognome e nome: (stampatello) Matricola: (firma leggibile) Dato il seguente programma (script) NS in linguaggio TCL (svolgere su questo foglio): NOME FILE: eserc8luglio.tcl set ns [new Simulator] set namFile [open eserc8luglio.nam w] $ns namtrace-all $namFile $ns at 10.0 "finish" proc finish {} { global ns global namFile $ns flush-trace close $namFile #exec nam eserc8luglio.nam & exit 0 } set Node0 [$ns node] set Node1 [$ns node] set Node2 [$ns node] set Node3 [$ns node] set Node4 [$ns node] set Node5 [$ns node] $ns duplex-link $Node0 $Node1 2Mb 20ms DropTail $ns queue-limit $Node0 $Node1 50 $ns duplex-link $Node2 $Node0 10Mb 200ms DropTail $ns duplex-link $Node3 $Node0 10Mb 200ms DropTail $ns duplex-link $Node1 $Node4 10Mb 20ms DropTail $ns duplex-link $Node1 $Node5 10Mb 20ms DropTail set UDP0 [new Agent/UDP] $UDP0 set packetSize_ 1000 set UDP1 [new Agent/UDP] $UDP1 set packetSize_ 1000 set Null0 [new Agent/Null] set Null1 [new Agent/Null] $ns attach-agent $Node4 $Null0 $ns attach-agent $Node5 $Null1 $ns attach-agent $Node2 $UDP0 $ns attach-agent $Node3 $UDP1 $ns connect $UDP0 $Null0 $ns connect $UDP1 $Null1 set ExpOnOff0 [new Application/Traffic/ExpOnOff] $ExpOnOff0 set packetSize_ 1000 $ExpOnOff0 set rate_ 800k $ExpOnOff0 set burst_time_ 0.5s $ExpOnOff0 set idle_time_ 0.125s set CBR0 [new Application/Traffic/CBR] $CBR0 set packetSize_ 1000 $CBR0 set rate_ 400k $ExpOnOff0 attach-agent $UDP0 $CBR0 attach-agent $UDP1 $ns at 0.5s "$ExpOnOff0 start" $ns at 9.5s "$ExpOnOff0 stop" $ns at 0.5s "$CBR0 start" $ns at 9.5s "$CBR0 stop" $ns run Nota: i pacchetti da UDP0 a Null0 seguono il percorso Node2 – Node0 – Node1 – Node4 mentre i pacchetti da UDP1 a Null1 seguono il percorso Node3 – Node0…
First page of the document.