Final Spring2015

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

CS 421: COMPUTER NETWORKS SPRING 2015

FINAL
May 21, 2015
150 minutes

Name:

Student No:

Show all your work very clearly. Partial credits will only be given if you carefully state
your answer with a reasonable justification.

Q1

Q2

Q3

TOT
1)
a) (6 pts) Suppose you are developing a multimedia networking application which requires a
minimum data transfer rate from the network in order to function effectively. Which of the
two transport layer protocols, TCP or UDP, will you prefer? Justify your answer.
b) (5 pts) Complete the following table.
Router Switch Hub
Layer of operation
(1,2,3,4,5)
Isolates network
traffic (Yes,No)
Does not require
configuration from
network
administrator
(Yes,No)
May implement
OSPF (Yes,No)
Has store and
forward capability
(Yes,No)

c) (6 pts) TCP uses cumulative acknowledgements as opposed to the individual


acknowledgements. Give two advantages of using cumulative acknowledgements.
d) (7 pts) Assume that the bandwidth of a connection is 10 Mbits/sec (10x106 bits/sec) and the
round-trip propagation delay for the connection is 20 msec. Assume that each data segment is
1000 Bytes long including the headers and the ACK packets are 40 Bytes long. Assuming that
no packets are lost, what should be the minimum window size (in terms of data segments)
in order to achieve full bandwidth utilization for this connection?
e) (8 pts) Suppose that a file composed of 32 segments, each with a size of 1250 Bytes, will be
transferred over a TCP connection with a round-trip delay of 10 ms and bandwidth of 100
Mbps, i.e., 100x106 bps. Assume that no loss event occurs during the entire file transfer.
Further assume that the slow start threshold (ssthresh) at the beginning of the TCP connection
is infinitely large. Ignore all processing and queueing delays and assume that ACK messages
have a negligibly small transmission time. How long does it take to transmit the entire file and
receive the final ACK?
2)
a) (10 pts) Four subnets are defined by the following IP prefixes:
Subnet Subnet address
1 139.179.0.0/16
2 139.183.0.0/16
3 140.183.14.0/23
4 140.183.192.0/18

In the following table indicate to which subnets the following hosts with given IP addresses
belong. If there are some hosts that do not belong to any of the subnets, mark them with a “-
``.
Host IP Address Subnet
A 139.179.12.118
B 139.183.12.16
C 140.183.12.115
D 140.183.190.55
E 140.183.224.88

b) (6 pts) The largest IP router can hold 200,000 entries in its forwarding table while the largest
Ethernet switch can hold 1,000,000 entries in its forwarding table. However, a large IP
network can support many more hosts than a large Ethernet network. Why?
c) (12 pts) The Dijkstra algorithm that we studied in class is given below. Dijkstra’s algorithm
computes all least-cost (i.e., shortest) paths from node u to all other nodes in the network
where the cost of a path (x1,x2,x3,…,xp), denoted as pc(x1,x2,x3,…,xp), is given by the sum of
all the link costs along the path; that is,
pc(x1,x2,x3,…,xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp).
Now assume that we modified the definition of the path cost as the product of the link costs
along the path; that is,
pc(x1,x2,x3,…,xp) = c(x1,x2) * c(x2,x3) * … * c(xp-1,xp),
where the costs are real numbers in the interval (0,1). Considering that the costs are
probabilities of links being intact (i.e., working), that the costs of links are independent of
each other, and the task is to find the most reliable (i.e., highest cost) paths from node u to
all other nodes in the network, use the following table to give a Modified Dijkstra Algorithm
which solves this new problem.
Hint: Note that -log(a * b) = -(log a + log b).

Dijkstra Algorithm Modified Dijkstra Algorithm


N' = {u}
for all nodes v
if v adjacent to u
then D(v) = c(u,v)
else D(v) = ∞
Repeat
find w not in N' such that D(w) is a minimum
add w to N'
for all v adjacent to w and not in N'
D(v) = min( D(v), D(w) + c(w,v) )
until all nodes in N'
d) (8 pts) The network below uses the distance-vector routing algorithm. Assume the
following:
• Links have the same cost in both directions.
• Nodes exchange their routing info once every second, in perfect synchrony and with
negligible transmission delays. Specifically, at every t = i, i = 0, 1, 2, 3,..., each node sends
and receives routing info instantaneously, and updates its routing table; the update is
completed by time t=i+0.1.
• At time t = 0, the link costs are as shown below and the routing tables have been stabilized.
At time t = 0.5, the cost of the link (4,5) becomes 3. There are no further link cost changes.
• Route advertisements are only exchanged periodically, i.e., there are no immediate route
advertisements after a link cost change. Hence the first route advertisement after the link
cost change at t = 0.5 sec occurs at t = 1.0 sec. Note: However, whenever a link cost change
occurs, the two nodes at the endpoints of this link immediately make corresponding changes
in their distance tables.
• Assume that the distance vector algorithm does not use poisoned reverse.
2 2
2 1 5

3 4
1
5
3 4

Give the evolution of the distance tables with respect to destination 5. Specifically, give the
distance table entries for destination 5 at nodes 1-5, for t = 0.1, 0.5, 1.1, 2.1, ..., until all
distance vectors stabilize. Present your final answer in the table given below where D i (j) is
the distance vector element denoting the distance from i to j.

Time, t D1 (5) via D 2 (5) via D3 (5) via D 4 (5) via


2 4 5 1 3 2 4 1 3 5
0.1
0.5
1.1
2.1
3.1
4.1
5.1
6.1
7.1
8.1
3)
a) (6 pts) Suppose the data bit sequence, D, to be transmitted is 4 bits long and the CRC bit
sequence, R, to be transmitted is 3 bits long. That is, X = 23D XOR R is the bit sequence to
be transmitted. If G = 1001 is the generator bit sequence, give an error bit sequence E which
will not be detected. In other words, give an example E for which X’ = X XOR E is
perceived as being correct at the receiver.

b) Suppose that nodes A, B and C are connected to the same Ethernet. Assume that each of
these three nodes is trying to retransmit a frame. These frames have already experienced 2,
3, and 4 collisions, respectively, i.e., collision counters are 2, 3 and 4 for nodes A, B and C.
Assume further that all other nodes on the Ethernet are inactive.
i. (5 pts) Assume that all three nodes detected the last collision simultaneously. Node C
chooses 5 as the random number according to the exponential backoff algorithm.
What is the probability that A will be the first node initiating a retransmission
attempt?
ii. (5 pts) Consider part i. if node C chooses 2 as the random number (instead of 5).
What is the probability that B will be the first node initiating a retransmission
attempt?
c) (6 pts) Consider a 100 Mbps 100BaseT Ethernet network with a star topology composed of
5 nodes where each node has a point-to-point connection with a hub in the middle. The
distances from the 5 nodes to the hub are given by 100m, 200m, 500m, 900m and 1000 m,
respectively. Calculate the minimum frame size that this LAN can support so that the
CSMA/CD protocol will function correctly. Assume that the speed of propagation is 2x108
m/s.
d) Consider the network given in the figure below, where hosts X, Y, Z, W are connected
conn via
Switches 1, 2 and 3. Initially assume that the switch ((i.e., bridge) tables
les of all switches are
empty. Recall that each switch applies the self learning algorithm to learn which hosthosts can
be reached through
rough which interfaces. Answer the questions below when the following events
happen sequentially over time.
i. (3 pts) First, X sends a packet to Z. Which switches learn where X is, and does Y's
network interface see this packet?

ii. (3 pts) Z now sends a packet to X (after X hass sent to Z). Which switches learn
where Z is, and does Y's network interface see this packet?

iii. (2 pts) Next, Y sends a packet to X (after the above two packets). Which
W switches
learn where Y is, and does Z's network interface see this packet?

iv. (2 pts) Finally, Z sends a packet to Y (after the above three packets). Which
W switches
learn where Z is, and does W's network interface see this packet?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy