Computer Networking Assignment Help
Computer Networking Assignment Help
Help Services
(a) Reconfigure Ben's script so that the RTT for the connection is
500ms and repeat parts (a) and (b) above.' (Note: You will need
to increase the length of the simulation in order to see TCP
enter the steady state.)
(b) Without looking at the simulation results, tell us how big the
average congestion window would need be to allow a single TCP of
fully utilizing the bottleneck link.
(c) From your plot in 2-(a), what is the maximum value of TCP's
congestion window size in the steady state? What is peculiar about
the evolution of TCP's congestion window over time in this case
(use part (a))?
3. Ben figures that the problem with his satellite simulation has
something to do with the size of the queue at the router; packets
seem to be getting dropped as the T CP connection bursts traffic in
slow start.
(a) Plot the evolution of the queue over time as well along with the
evolution of the sender's congestion window.
To understand how the queue evolves over time. Ben sets up the
timing diagram shown in Figure 1. In this figure, time proceeds
vertically downwards, and the arrows indicate the progress of
packets back-and-forth across the network.
(b) Fill in the picture with the appropriate arrival and departure
times for each packet. For the purposes of this exercise, you may
assume that the packet takes 125ms to propagate through each
leg of its trip, that packets take Oms to process at the endpoints,
and that the processing time for acknowledgments is negligible.
(d) Assume you don't have control over the router to increase its
maximum queue length. Can you change the behavior of the TCP
sender so that it can achieve a large maximum cwnd and fully
utilize the link? How?2
1. Fair Queueing.
(a) Ben first configures the Ro-R1 link to use fair queueing. Let So
be a CBR source sending 1000-byte packets at a rate of 200
packets every second, and SI and S2 be long-running TCP
sources. Plot the goodput each source sees over time. Does it
match your intuition? Now set bo = BIV(RI,D0) = 56K bps (see
create-netl). What goodput does each source see in this case?
Why?
(b) Now make So a TCP source too. What goodput does each
source see for the cases where Lb = 100Mbps and Lb = 56Kbps?
Why?
(c) Based on this study, can you tell what the pros and cons of
deploying fair queueing are?
2. RED.
(a) Next, Ben sets a RED queue with parameters mint hr esh_ = 6,
maxthr esh_ = 18, maxp_ = 0.1, q_weight_ = 0.002, gentle_ = true
on the Ro-R1 link.
The buffer size on this link is set to be 54 packets (see opt (glen)). All
sources are long running TCPs. What are the goodput and loss rates
of each connection?
3. RED & ECN.
(a) Ben hears the hype that ECN is likely to be deployed in the next
few years. So, he makes all the TCP sources ECN-capable. What
does he see this time? Does the goodput of each source
increase? What about the loss rate?
(b) Ben wants to see how ECN-capable flows interact with non-ECN
flows. So, he sets up So to be ECN-capable and Si! S2 to be not.
What does he see this time? Is there any benefit of deploying ECN
in this network?
You should (be able to) answer this question without running any
simulation.
3. Louis decides that this utilization will not do. He asks you how
the average link utilization, U, varies as a function of r, the ratio of
the amount of router buffering, B, to the "pipe-size," P (the
bandwidth-delay product). Calculate U(r) for 0 < r < 1. (We know,
from part 1, that U(1) = 1, and the answer to part 2 is U(0).)
4. Sketch U versus r, for 0 < r < 1. From this curve, what can you
conclude about the gain in link utilization as you add more
memory?
Hint: Look at the sum of all the queue lengths, Ei jqij and consider
the increment and decre-ment in this quantity in each time-slot.
If you show that the sum of all queue lengths is bounded, then
you're done because each queue length is > 0.
{
print $1, $7 > cwndfile;
}
{
print $3, $11 > Qfile;
}
#
# LFN.tcl is a simulation script to
study the relation between the
# optimal buffer size and link
utilization. This has been used in
the
# Computer Networks course
6.829 at MIT.
#
# Xiaowei Yang
Class TestSuite
proc default-options {} {
global opt
proc usage {} {
global opt
puts "Options:"
puts "\t-test <LFN>. The test to
run. Default: $opt(test)."
puts "\t-outdir <value>. Data file
output
directory. Default: $opt(outdir)."
puts "\t-qtrace <on/off>. Queue
tracing on
# set up topology
remove-packet-header AODV
ARP
Trace set show_tcphdr_ 1
Agent/TCP/FullTcp set segsize_
$opt(maxseg);
Agent/TCP/FullTcp set window_
$opt(maxwin);
if {$opt(namtrace) == "on" } {
set namf [open nam.out w]
$ns_ namtrace-all $namf
}
if {$opt(traceall) == "on"} {
flush $allf
close $allf
}
if {$opt(qtrace) == "on"} {
flush $qf
close $qf
}
if {$opt(namtrace) == "on"} {
flush $namf
close $namf
}
if {$opt(cwndtrace) == "on"} {
flush $cwndf
close $cwndf
}
if {$opt(autonam) == "on"} {
exec nam
$opt(outdir)/nam.out &
}
#exec awk -f script/xplot3.awk
$opt(outdir)/all.out >
$opt(outdir)/all-$opt(qlen).xpl &
exit 0
}
if {$opt(cwndtrace) == "on"} {
#set cwndf [open "| awk -f
script/cwnd.awk >
$opt(outdir)/cwnd-$opt(qlen).xpl"
w]
set cwndf [open
$opt(outdir)/cwnd-$opt(qlen).out
w]
}
set rng [new RNG]
default-options
set b [llength $arg]
runtest $argv
BEGIN {
nconn = 2;
for (i = 0; i < nconn; i++) {
loss[i] = 0;
total[i] = 0;
}
startup = 2;
}
{
if (($1 == "+") && ($4 == (2 *
nconn))) {
total[$8]++;
}
if ($1 == "d") {
loss[$8]++;
}
}
END {
for (i = 0; i < nconn; i++) {
printf "%d %6.5f\n", i, loss[i] *
1.0 / total[i];
}
}
{
if ($1 == "Q" && NF>2)
print $2, $3 > Qfile
else if ($1 == "a" && NF>2)
print $2, $3 > afile
}
#
# Helper script. Works with
AQM.tcl. Assume FullTCP
show_hdr
# formate. $8 is the flow id.
# Compute goodput of TCP,
throughput of other sources
# Compute loss rate
# Compute link utilization
# Works only for dumpbell
topologies, where nodes i < nconn
are
# sources, 2*nconn > i >= nconn
are destinations, 2*nconn is the
router
# connecting all sources, and
2*nconn+1 is the router
connecting all
# destinations.
# This has been used in the
Computer Networks course 6.829
at MIT.
#
# Xiaowei Yang
BEGIN {
nconn = 2;
for (i = 0; i < nconn; i++) {
# src[i] = i;
dst[i] = nconn + i;
bytes[i] = 0;
start[i] = 0;
virgin[i] = 1;
loss[i] = 0;
total[i] = 0;
prevT[i] = 0;
prevB[i] = 0;
prevL[i] = 0;
prevP[i] = 0;
}
prefix = "";
interval = 1.0;
loss_interval = 100;
startuptime = 25;
bw = 1500000;
totalB = 0;
prevtotalB = 0;
prevtotalT = 0;
}
{
if (NR == 1) {
split(FILENAME, a, "-");
if (a[1] == "") {
a[1] = prefix;
}
}
# compute tcp throughput. only
count data bytes, no header.
tcpput = (($1 == "+") && ($5 ==
"ack") && ($3 >= nconn) && ($3 <
2*nconn));
nontcpput = (($1 == "r") && (($5
== "cbr") || ($5 == "pareto")) &&
($3 == (2 * nconn + 1)));
if (tcpput || nontcpput) {
fid = $8;
if (virgin[fid]) {
start[fid] = prevT[fid] = $2;
virgin[fid] = 0;
} else {
if (tcpput) {
bytes[fid] = $13;
} else {
bytes[fid] += $6;
}
printf "%f %6.5f\n", $2,
bytes[fid] * 8.0 / ($2 - start[fid]) >
a[1]"-tput-"fid".dat";
if (($2 - prevT[fid]) >
interval) {
printf "%f %6.5f\n", $2,
(bytes[fid] - prevB[fid]) * 8.0 / ($2 -
prevT[fid]) > a[1]"-stput-"fid".dat";
prevT[fid] = $2;
prevB[fid] = bytes[fid];
}
}
}
if ($1 == "d") {
fid = $8;
loss[fid]++;
}