This document describes a simulation scenario to study the performance of TCP and UDP traffic in a wired network. The scenario includes:
1) A TCP connection between nodes 9 and 1 with an FTP source starting at 0.2 seconds
2) A multicast UDP connection between node 7 and nodes 0 and 2 with a CBR source also starting at 0.2 seconds
3) The simulation runs until 1.5 seconds.
This document describes a simulation scenario to study the performance of TCP and UDP traffic in a wired network. The scenario includes:
1) A TCP connection between nodes 9 and 1 with an FTP source starting at 0.2 seconds
2) A multicast UDP connection between node 7 and nodes 0 and 2 with a CBR source also starting at 0.2 seconds
3) The simulation runs until 1.5 seconds.
This document describes a simulation scenario to study the performance of TCP and UDP traffic in a wired network. The scenario includes:
1) A TCP connection between nodes 9 and 1 with an FTP source starting at 0.2 seconds
2) A multicast UDP connection between node 7 and nodes 0 and 2 with a CBR source also starting at 0.2 seconds
3) The simulation runs until 1.5 seconds.
Tema: Studimi i performancs s TCP dhe UDP n rrjetat wired
Qellimi i ketij laboratori eshte simulimi i nje rrjeti ku bashke-ekzistojne trafiku TCP dhe multicast UDP.
Shkruani nje skript tcl qe krijon topologjine e mesiperme
1 lidhje TCP burimi nyja 9 destinacioni nyja 1 1 burim FTP source te lidhur tek agjenti tcp i nyjes 9 burimi FTP fillon ne kohen 0.2 second 1 lidhje Multicast UDP perdor dense mode multicast routing derguesi nyje 7 marresat: nyjet 0 dhe 2 1 burim CBR te lidhur tek agjenti udp i nyjes 7 burimi CBR fillon ne kohedn 0.2 second dy marresit i bashkohen grupit ne kohen 0.0 Simuli perfundon ne kohen 1.5 second
Skripti ndihmes tcl
# Creating the core event scheduler ...PLOTESONI... $ns color 1 red $ns color 2 blue # Creating 11 nodes . ...PLOTESONI... # Outputs nam traces set nf [open out.nam w] $ns namtrace-all $nf # Creating 10 links # All with bandwidth 10Mb, delay 10ms, and DropTail queue # Except the bottleneck link with bw 1.5Mb, delay 20ms, and RED queue ...PLOTESONI... # Set queue limit (buffer size) to 5 packets in the bottleneck link $ns queue-limit $n(3) $n(4) ...PLOTESONI... $ns queue-limit $n(4) $n(3) ...PLOTESONI... # Set link orientation for nam $ns duplex-link-op $n(0) $n(3) orient right-down $ns duplex-link-op $n(1) $n(3) orient right $ns duplex-link-op $n(2) $n(3) orient right-up $ns duplex-link-op $n(3) $n(4) orient right $ns duplex-link-op $n(4) $n(5) orient right-up $ns duplex-link-op $n(4) $n(6) orient right-down $ns duplex-link-op $n(5) $n(7) orient right-up $ns duplex-link-op $n(5) $n(8) orient right $ns duplex-link-op $n(6) $n(9) orient right $ns duplex-link-op $n(6) $n(10) orient right-down # Set queue position for nam $ns duplex-link-op $n(3) $n(4) queuePos -0.5 $ns duplex-link-op $n(4) $n(3) queuePos -0.5 # Set multicast routing to dense mode ...PLOTESONI...
# Create a TCP connection from node 9 to node 1
. ...PLOTESONI... $tcp set class_ 1 $tcp set window_ 20
# Create an FTP source and attach it to the TCP connection
...PLOTESONI... # Create a UDP connection from node 7 to a multicast group ...PLOTESONI... $udp set class_ 2 # Create a CBR source and attach it to the UDP connection ...PLOTESONI... # Create dummy receivers and attach them to the receiving nodes set rcvr0 [new Agent/Null] $ns attach-agent $n(0) $rcvr0 set rcvr1 [new Agent/Null] $ns attach-agent $n(2) $rcvr1 # Schedule events to happen ...PLOTESONI...
# A finish proc to flush traces and out call nam
proc finish {} { global ns nf $ns flush-trace close $nf puts "running nam..." exec nam out.nam & exit 0 } # Start the event scheduler $ns run