ex1_1sol
ex1_1sol
Answer the following questions regarding the basics principles and concepts of networks.
a) Sketch the 7-layer OSI reference model. In one sentence, or less, describe the function of (or service
provided by) each layer.
+--------------+
7 | Application | -- Provides access to user applications
+--------------+
6 | Presentation | -- Provides data independence
+--------------+
5 | Session | -- Manages end-to-end connections
+--------------+
4 | Transport | -- Provides reliable end-to-end data transport
+--------------+
3 | Network | -- Maintains point-to-point connections
+--------------+
2 | Data Link | -- Provides reliable point-to-point data transport
+--------------+
1 | Physical | -- Transmission of bit stream
+--------------+
Protocol = Complete set of rules regarding information exchange between same level
layers between sites. Example = HTTP.
The IETF is the Internet Engineering Task Force. “The mission is to make the Internet
work better by producing high quality, relevant technical documents that influence the
way people design, use, and manage the Internet.”
d) Here is a screenshot showing a ping from USF to University of Alaska Anchorage. It is about 4000 miles to
Anchorage from here. What percentage of the round-trip time in the below is due to propagation? What is the
most likely primary cause of the remaining (non-propagation) delay? Carefully list any assumptions you
make to answer this question.
Signal propagates at about the speed of light, which is about 1 nanosecond per foot or
5 microseconds per mile. At 4000 miles one-way the round-trip propagation delay is
about 40 milliseconds. Assuming a fairly straight path from Tampa to Anchorage, about
120 millseconds of the shown round-trip delay is not due to propagation. It is most
likely due to queueing delays in routers between Tampa and Anchorage.
Sockets is the standard API between Internet applications and the TCP (or UDP) protocol. Sockets is based on a
client/server model. List the key sockets functions and for each function give a one sentence description of what
the function does. The key functions are those that a working client/server sockets program could not be written
without. Consider both streams and datagram service.
socket()- creates a socket of a specified type and allocates resources to it.
bind()- associates a socket with a server address
listen() – causes a bound socket to enter into a listening (for connections) state
connect()- used on client side, assigns a free local port to a socket
accept() – used on server side, accepts an incoming connection and creates a new socket
send() / recv() – send and receive data bytes for streaming (TCP)
sendto()/ recvfrom() – send and receive datagrams for datagram (UDP)
closesocket() – closes a socket and releases resources
Consider a Stop-and-Wait protocol operating point-to-point across a single link with the following parameters:
Message length = 50 bytes
ACK length = 50 bytes
Link rate = 100 kb/s
Link length = 1000 miles
Probability of a bit error = 10-3
The sender always has data (messages) to send
Assume that ACKs are never lost.
What is the link utilization? Is the assumption of ACKs are never lost reasonable (explain your answer
including why we make this assumption)?
We must note that tack is no longer negligible as it is the same value as tpacket . Thus, the link utilization will now be
1 p t fr
U .
2 t prop t packet t ack
p 1 1 Pr bit error
400
(the 400 is the number of bits in a 50 byte message). Doing some calculations:
400
t packet t ack 4 ms
100.0 10 3
p 1 1 10 3
400
0.3298
The above values plugged into the above U formula result in U = 14.9%.
The assumption on ACKs are never lost is not reasonable when the length of a message
and ACK is the same – the probability of loss is thus the same also for each. We make
this assumption for reasons of tractability – Deriving Nretry would be much more
difficult if we allowed for the possibility of lost ACKs.
Problem #4 A basic SAW timing diagram is 6 points, the double ACK is 6 points
Consider the RDT protocol from Kurose and Ross (hint: the RDT protocol is a SAW protocol) discussed in my
away lecture slides and covered in your reading. The keys RDT FSMs are in Appendix A. Sketch the timing
diagram (that is, show the packet flows between the sender and receiver) for the case of a premature time-out. A
premature time-out occurs when an ACK is “in flight” from receiver to sender and a time-out occurs in the
sender before the ACK is received.
b) Describe the Ethernet CSMA/CD algorithm including the algorithm for determining the random delay for
retransmission after a collision.
CSMA/CD:
BEB:
c) What is the goal of the algorithm that determines the random delay in Ethernet?
The goal of BEB is to estimate, in a distributed fashion, how many nodes (Q) are
competing for the channel and to approximate Pr[xmit] = 1/Q as this is optimum (from
Metcalfe analysis).
Answer the following questions regarding performance modeling and experimental design.
a) What is a model (precisely define it), what is the goal of building a model, and why do we build models (and
not just study actual systems)?
b) What are at least five performance measures of interest for computer networks? What is probably the most
important (that is, the most interesting) performance measure?
The goal is to be say something like “We are 95% confident that the true population
mean lies between value1 and value2” where value1 and value2 are the sample mean
plus/minus a confidence interval half width.
d) What is the advantage (and disadvantage) of a full-factorial experiment design compared to a simple
experiment design?
Advantage: A full-factorial experiment design can find all possible factor interactions
where a simple experiment design may miss such interactions. Disadvantage: A full-
factorial design has more experiments to run that a simple design.
b) What is a P matrix? What is a Q matrix? Briefly describe the key properties of each.
A P matrix is the matrix showing all state transition probabilities for a DMTC. A Q
matrix is the matrix showing all state transition rates for a CMTC. For a P matrix each
row sums to 1. For a Q matrix each row sums to 0 with each diagonal element being the
negative sum of all other (non-diagonal) elements in the row.
c) What is the distribution of time between arrivals in a Poisson process? Show it.
The time between arrivals in a Poisson process is exponentially distributed. This can
be shown as follows.
1
t 0 e t for 0 arrivals in a Poisson process in time t
0!
t
1 e which is the exponential distribution, so the time between arrivals follows an exponential distribution
d) Convert the below Q matrix to a P matrix and then solve it (for steady state probabilities).
8 8
Q
2 2
We can use uniformization, P I 1 Q where is the maximum absolute value in Q (6 in the case of the above
example). So, we get
1 0 1 8 8 0 1
P
0 1 8 2 2 1 4 3 4
From P and 1 we can write 0 1 4 1 and 1 0 1 , which solves to 0 1 5 and
1 4 5 .
Problem #8 4 pts for CTMC, 4 pts for Q matrix, 2 pts for set-up, 2 pts for correct numerical solution.
You are given a wireless device with three states, XMIT, RECV, and SLEEP. Let the power draw of each state
be as follows:
XMIT = 1 W
RECV = 0.8 W
SLEEP = 0.1 W
The system transitions between states at known rates (given below). What is the average power draw of this
system?
XMIT to RECV at rate = 1 transition per minute
RECV to SLEEP at rate = 2 transitions per minute
RECV to XMIT at rate = 3 transitions per minute
SLEEP to XMIT at rate = 4 transitions per minute
1 .0 1 .0 0 .0
Q 3 .0 5 .0 2 .0
4.0 0.0 4.0
We then write the three equations in three unknowns and solve for the steady state probabilities as:
Note that one of the equations is 0 1 2 1 to break the linear dependence of the equations. We solve and get
0 10 13 , 1 2 / 13, and 2 1 / 13.
To determine the average power draw we multiply the steady state probabilities for each state by its power draw. That
is,
In “On the Modeling and Analysis of Computer Networks” (Kleinrock, Proceedings of the IEEE, August 1993)
Kleinrock states that “Gigabits are indeed different” (compared to previous networks with kb/s and Mb/s data
rates). Explain why Kleinrock states this. Describe at least one key issue with Gigabit networks as noted by
Kleinrock.
Kleinrock says that the reason for the difference “has to do with the effect of latency due to the speed of light.” The
effect is that it is now latency, and not bandwidth, that dominates the time to deliver a file across long (WAN-scale)
links. That is, the post-gigabit world is now latency, not bandwidth, limited.
A key issue is that of flow and congestion control. Feedback based schemes may be too sluggish where more bits
may be “in flight” that the buffer at the receiver can store before a signal from the receiver to the sender to slow down
is received. This suggest that proactive, versus reactive, flow control schemes need to be explored. One form of
proactive flow control is rate-based flow control.
Humor
From: http://www.phdcomics.com