You are on page 1of 13

EE471/CS471/CS573: Fall 2017-2018

Zartash Uzmi

Final Examination 2017-2018 (Solutions)


(Closed books, closed notes, no help sheets. Only calculators allowed)
Time Allowed: 180 minutes (Friday, Dec 22, 2017 starting at 3:00pm)

“I certify that I have neither received nor given unpermitted aid on this examination and
I have reported all such incidents observed by me in which unpermitted aid is given.”

Signature

Name Student ID

IMPORTANT NOTE: In this course, and in this exam, 1 K means 1000 and not 1024. Similarly,
1 M means 106 . Capital ‘B’ is used for bytes, while small ‘b’ is used for bits. Therefore, 1 Kb/s is
1000 bits/sec, and 4 MB is 4×106 bytes.

We will prefer brief and to the point answers!

For questions that require numerical answers, significant grade will be lost if you fail
to compute a final answer. Use your calculators!

Write your Student ID on this paper before you start.

Provide solutions using the space provided under each question/part. We WILL NOT
grade the back of the pages. Use that space for Rough Work.

Problem 1 [18]

Problem 2 [9]

Problem 3 [20]

Problem 4 [10]

Problem 5 [14]

Problem 6 [12]

Problem 7 [18]

TOTAL [101]

1
Problem 1: TCP Congestion Control [18 points] The figure shows the congestion control
window of a TCP sender which has already established a connection. The sender starts at a window
size of 1MSS. After one RTT, the window size increases to 2MSS and so on.
Noting that the first transmission round is between 1 and 2 along the horizontal axis, the figure
shows the window progression in the first 14 transmission rounds. Rest of the portion has been left
out; you will need to complete it on the graph up to the 24th transmission round (end of graph).
25
Congeson Window Size (in Segments)

20

15

10

0
0 5 10 15 20 25
Transmission Round

Figure 1: TCP Window Progression

(a) [2 pts] Just by looking at the figure, can we say if TCP (old) Tahoe or TCP (new) Reno is
being used? Say YES/NO. If YES, which one? If NO, why not?

Solution: NO. More information about the events in ninth (9th) and thirteenth (13th)transmission
rounds is needed to answer this.

(b) [4 pts] What is the value of ssthresh during each of the 3rd, 7th, 11th, and 14th transmission
rounds? Your answer will be in terms of MSS (or Segments).

During Transmission Round # value of ssthresh


3rd 16MSS
7th 16MSS
11th 10MSS
14th 4MSS

(c) [2 pts] If you are told that TCP (new) Reno is used by the sender, what events occurred during
each of the 9th and 13th transmission rounds? Naming the events is sufficient.

Solution: retransmission timer timeout during both rounds.

2
(d) [3 pts] From after the 14th round up until the 24th round, no timeout occurs but a triplicate
ACK occurs during 20th transmission round. Complete the missing portion of the congestion
window progression assuming that TCP (new) Reno is used.

Solution: Complete directly on the given figure. Be careful and you may want to use a pencil to
complete the graph. The graph is completed in red color.

(e) [2 pts] Continuing from part (d), i.e., with a TCP (new) Reno sender, what is the value of
ssthresh in the 22nd transmission round?

Solution: 4MSS

(f ) [3 pts] Note that during transmission round 1, pkt #1 is sent; during round 2, pkts #2-3 are
sent; during round 3, pkts #4-7 are sent (total 4 packets). What is the total number of packets
sent up until the end of round 24?

Solution: 187. See below for explanation (SS for Slow Start; CA for Congestion Avoidance).

Trans. Num Packets Packet Window Trans. Num Packets Packet Window
Round (this round) Num(s) State Round (this round) Num(s) State
1 1 1 SS 13 8 113-120 SS
2 2 2-3 SS 14 1 121 SS
3 4 4-7 SS 15 2 122-123 SS
4 8 8-15 SS 16 4 124-127 SS → CA
5 16 16-31 SS → CA 17 5 128-132 CA
6 17 32-48 CA 18 6 133-138 CA
7 18 49-66 CA 19 7 139-145 CA
8 19 67-85 CA 20 8 146-153 CA
9 20 86-105 CA 21 7 154-160 CA
10 1 106 SS 22 8 161-168 CA
11 2 107-108 SS 23 9 169-177 CA
12 4 109-112 SS 24 10 178-187 CA

(g) [2 pts] If no timeout or triplicate ACK happens after the 24th transmission round (beyond
what is shown on the graph), at the end of which transmission round would the sender congestion
control window reach 20MSS?

Solution: At the end of 33rd transmission round.

3
Problem 2: Misconfigured Subnet Mask [9 points] Consider the network shown in the figure
below. The router R is owned by an organization which has received a block of 256 IP addresses.
First half of the addresses in the block are placed in one subnet (X) and the later half on another
subnet (Y). These two “local area networks” (or subnets) are connected to two different interfaces
of the router R as shown. Another interface of the router connects to the Internet. Some machines
with their IP addresses and subnet masks are also shown in the figure.
We want all machines to be able to access each other and the Internet.

1 3
ID IP Address Subnet X R Subnet Y
A 213.182.1.3/25
B 213.182.1.120/25 2
C 213.182.1.147/25 B C
A D
D 213.182.1.148/25
To Internet

(a) [2pts] What is the smallest and largest IP address in each subnet?

Solution:
Subnet Smallest IP Largest IP
X 213.182.1.0 213.128.1.127
Y 213.128.1.128 213.128.1.255

(b) [3pts] Write down the routing table entries of the router R.

Solution:
Prefix Outgoing Interface
213.182.1.0/25 (or 11010101 10111010 00000001 0 1
213.128.1.128/25 (or 11010101 10111010 00000001 1) 3
0.0.0.0/0 2

(c) [2pts] If station A starts using a subnet mask of length 26 (without any other change in the
network), what undesirable behavior might result? why? Be brief and precise. Answers with
unnecessary details will receive no credit.

Solution: The mask at station A is too long. It may regard stations on its own subnet as being
on a different subnet and may try to (incorrectly) use the default gateway (router) to reach those.

(d) [2pts] If station A starts using a subnet mask of length 24 (without any other change in the
network), what undesirable behavior might result? why?

Solution: The mask at station A is too short. It will incorrectly perceive some stations on the
“other” subnet as residing on the local subnet. Thus, it will (incorrectly) try to use the ARP
(address resolution protocol) mechanism (instead of using hte default gaeway) to directly send
packets to those stations.

4
Problem 3: Intradomain Routing [20 points] Consider the network topology with several
routers shown in the figure below.

H
14 2

4
G B

10 9 1

3 2
F D A
1 4
1 1

E C
4

(a) [5 pts] First, we need to find the lowest-cost tree to reach router D from each of the other
routers using the Bellman-Ford algorithm. This is very similar to the example we did in class (or
given in homework). Note: This problem is not about RIP which also uses the Bellman-Ford
algorithm. So, do not assume that 16 is infinity as is considered in RIP routing protocol.
Clearly show each step of the algorithm, including the evolution of routing table entry at each
router. Use the following table to write your answers. You need to show the 2-tuple (Next-hop
router, Cost to reach D) for each router at each step of the algorithm until it converges (i.e., no
more change in routing entries). This is quite similar to the procedure we used in example discussed
in class slides. Some entries are already included in the table to get you started.
Note: The entries show the state at the start of the step. Thus, in the first row (step 1), no
other router yet knows the cost to reach router D.

Step A B C E F G H
1 (–, ∞) (–, ∞) (–, ∞) (–, ∞) (–, ∞) (–, ∞) (–, ∞)
2 (–, ∞) (D,9) (D,1) (D,1) (D,3) (–, ∞) (–, ∞)
3 (C,5) (C,3) (D,1) (D,1) (E,2) (F/B,13) (B,11)
4 (B,4) (C,3) (D,1) (D,1) (E,2) (B,7) (B,5)

5
(b) [5 pts] After the algorithm has converged as in part(a), the link between D and C breaks.
Starting from the solution in part(a), show, in the following table, how the routing entries at each
router evolve until they stabilize again. Assume split horizon (or triggered updates or other similar
mechanisms) are not implemented.

Step A B C E F G H
1 (B,4) (C,3) (D,1) (D,1) (E,2) (B,7) (B,5)
2 (B,4) (C,3) (B/E,5) (D,1) (E,2) (B,7) (B,5)
3 (B,4) (A,5) (B/E,5) (D,1) (E,2) (B,7) (B,5)
4 (B,6) (A,5) (E,5) (D,1) (E,2) (B,9) (B,7)
5 (B,6) (A/C,7) (E,5) (D,1) (E,2) (B,9) (B,7)
6 (B,8) (A/C,7) (E,5) (D,1) (E,2) (B,11) (B,9)
7 (B,8) (C,7) (E,5) (D,1) (E,2) (B,11) (B,9)
8 (B,8) (C,7) (E,5) (D,1) (E,2) (B,11) (B,9)

(c) [3 pts] In the original network given (i.e., in which the link between D and C in still in place),
the link between F and E becomes asymmetric as shown in the figure below. How would this change
your answer to part (a). There is no need to redo the entire table. Just state what would change
in the table of part (a).

H
14 2

4
G B

10 9 1

3 2
F D A
1 1 4
1
8
E C
4

Solution: Nothing will change. F will keep reaching D through E without a change in cost. The
link from E to F has an increased cost now but E was not using that link anyways to reach D. Thus,
nothing will change.

6
(d) [7 pts] Assume now that the routers in the given original network are implementing a link state
protocol (such as OSPF). We need the lowest cost paths from router D to all other routers, using
the Dijkstra’s algorithm. This can be done in steps where one destination (on shortest path from
D) is added at each iterative step. List all the iterations of the algorithm in the following table,
using the procedure similar to the one given in class and homework.

N ′ : set of nodes to which shortest path/distance from router D is definitely known.


D(x): Currently best known value of cost of path from router D to x.
p(x): Predecessor node (currently best known) along path from router D to x.

Step N′ D(A),p(A) D(B),p(B) D(C),p(C) D(E),p(E) D(F),p(F) D(G),p(G) D(H),p(H)


— — ∞ ∞ ∞ ∞ ∞ ∞ ∞
0 D ∞ 9,D 1,D 1,D 3,D ∞ ∞
1 D,C 5,C 3,C 1,D 3,D ∞ ∞
2 D,C,E 5,C 3,C 2,E ∞ ∞
3 D,C,E,F 5,C 3,C 12,F ∞
4 D,C,E,F,B 4,B 7,B 5,B
6 D,C,E,F,B,A 7,B 5,B
7 D,C,E,F,B,A,H 7,B

One possible solution

Step N′ D(A),p(A) D(B),p(B) D(C),p(C) D(E),p(E) D(F),p(F) D(G),p(G) D(H),p(H)


— — ∞ ∞ ∞ ∞ ∞ ∞ ∞
0 D ∞ 9,D 1,D 1,D 3,D ∞ ∞
1 D,E ∞ 9,D 1,D 2,E ∞ ∞
2 D,E,C 5,C 3,C 2,E ∞ ∞
3 D,E,C,F 5,C 3,C 12,F ∞
4 D,E,C,F,B 4,B 7,B 5,B
6 D,E,C,F,B,A 7,B 5,B
7 D,E,C,F,B,A,H 7,B

Another possible solution

Important Note: Decide the entries on rough pages (back of the sheets in this exam may be used as
rough pages) and provide the final answer on this question sheet, neatly filling this table. Messy,
unclear entries will lose you points.

7
Problem 4: Wide Area Routing [10 points] We learned that an interior gateway protocol
(IGP) as well as border gateway protocol (BGP), both are used to propagate wide area routing
information. We also learned that BGP has two flavors: iBGP and eBGP.

(a) [2 pts] Which of the three (IGP, iBGP, eBGP) usually carry intradomain (or intra-AS) routing
information? State all which apply.

Solution: IGP

(b) [2 pts] Which of the three (IGP, iBGP, eBGP) carry interdomain (or inter-AS) routing infor-
mation? State all which apply.

Solution: iBGP, eBGP

(c) [2 pts] A host sends a packet to another one within its own domain (or AS) but on a different
LAN/subnet. Correctly sending this packet will require consulting table entries created by which
of the three (IGP, iBGP, eBGP)?

Solution: IGP

(d) [2 pts] A host sends a packet to another one in a different domain (or AS). Along the way,
correctly sending this packet will require consulting table entries created by which of the three
(IGP, iBGP, eBGP)?

Solution: IGP, iBGP, eBGP (for entries on various routers along the way).

(e) [2 pts] A host sends a packet to another one within its own domain (or AS) on the same local
LAN/subnet. Correctly sending this packet will require consulting table entries created by which
of the three (IGP, iBGP, eBGP)?

Solution: none – it would be a direct delivery without an intermediate router.

8
Problem 5: Cyclic Redundancy Check (CRC) [14 points] A sequence of 14 data bits
11010011101100 is to be communicated to a receiver; the sender and receiver agree to use CRC
with a generator polynomial of x3 + x + 1 (corresponding to a generator bit pattern of 1011).

(a) [2 pts] How many CRC bits are needed?

(b) [4 pts] Compute the CRC bits? Show the procedure for credit.

Solution:

%11010011101100 000 <--- input right padded by 3 bits


%1011 <--- divisor
%01100011101100 000 <--- result (note the first four bits are the XOR with the
% divisor beneath, the rest of the bits are unchanged)
% 1011 <--- divisor ...
%00111011101100 000
% 1011
%00010111101100 000
% 1011
%00000001101100 000 <--- note that the divisor moves over to align with the next
% 1 in the dividend (since quotient for that step was zero)
% 1011 (in other words, it doesn’t necessarily move one bit
% per iteration)
%00000000110100 000
% 1011
%00000000011000 000
% 1011
%00000000001110 000
% 1011
%00000000000101 000
% 101 1
%-----------------
%00000000000000 100 <--- remainder (3 bits). Division algorithm stops here as
% dividend is equal to zero.
%

(c) [2 pts] What bit sequence is actually sent over the wire?

Solution: 11010011101100 100

9
(d) [2 pts] The 7th bit from the left in the transmitted data gets flipped. All other bits remain
intact. What bit sequence is received?

Solution: 11010001101100 100

(e) [4 pts] The receiver checks for the CRC which will fail. Work out the details of how the receiver
will determine there was an error in receiving the bit sequence. What would be the remainder after
long division?

Solution: Performing the long division, we get

11010001101100 100
1011
01100001101100 100
1011
00111001101100 100
1011
00010101101100 100
1011
00000011101100 100
1011
00000001011100 100
1011
00000000000100 100
101 1
00000000000001 000
1 011
------------------
00000000000000 011

The remainder is 011 (non-zero), hence the checksum fails, indicative of error.

10
Problem 6: Local and Wide area Forwarding [12 points] A network topology is shown in the
figure. X and Y (shown as circles) are end stations. All devices have one or more network interfaces
with corresponding IP and MAC addresses. The NAT IP6 is on the “inside” of an organizational
network while IP7 is a global IP address. B1 is a bridge while R1, R2 and R3 are routers. Assume
that all interfaces of routers are on different subnets (this is what usually happens in a router).

IP6 IP7 IP8 IP9


MAC6 MAC7 MAC8 MAC9
X NAT R3
IP1
MAC1 IP11
IP2 IP5 MAC11
MAC5
MAC2 R2 B1 Y
IP4 IP10 IP12
R1 MAC4 MAC10 MAC12
IP3
MAC3

Figure 2: Switched Ethernet LAN

Assume that X and Y are exchanging application layer traffic that uses TCP underneath. We
are interested in source and destination IP and MAC on various packets in the network for this
traffic. For packets on each of the following directional links, indicate all the four fields:

(a) [2 pts] Who has likely initiated the connection? Why?


Station X

(b) [2 pts] Packet on link from B1 to R3.


Src IP: IP12 Src MAC: MAC12
Dst IP: IP7 Dst MAC: MAC9

(c) [2 pts] Packet on link from NAT to R2.


Src IP: IP12 Src MAC: MAC6
Dst IP: IP1 Dst MAC: MAC5

(d) [2 pts] Packet on link from R2 to R1.


Src IP: IP12 Src MAC: MAC4
Dst IP: IP1 Dst MAC: MAC3

(e) [2 pts] Packet on link from X to R1.


Src IP: IP1 Src MAC: MAC1
Dst IP: IP12 Dst MAC: MAC2

(f ) [2 pts] Packet on link from Y to B1.


Src IP: IP12 Src MAC: MAC12
Dst IP: IP7 Dst MAC: MAC9

11
Problem 7: Ethernet frames [18 points] Suppose three end stations A, B, and C are directly
connected to a hub (single collision domain) via 100 Mbps Ethernet cables. The distances between
the hub and these stations are 250m, 500m, and 750m, respectively. Assume that the medium
allows signal propagation at 80% of the speed of light (which, of course, is 3 × 108 m/s). Recall that
CSMA/CD is the underlying protocol used for the Ethernet.

(a) [2 pts] What is the minimum required frame length in bits, rounded up to the nearest hundred?
Make sure to read part (h) before answering this part.

Solution: Let b is the desired frame length, then:

b 2 × (750 + 500)
6
≥ ⇒ b ≥ 1041.67 bits
100 × 10 0.8 × 3 × 108
Rounding up to the nearest hundred, we take b = 1100 bits.

(b) [3 pts] If this frame length from part (a) is used, estimate the efficiency of this Ethernet using
the sophisticated collision models. Recall that, using these models, the efficiency η is given by:
1
η=
1 + 5a
where a is the ratio of the longest propagation delay to the transmission delay over this Ethernet.
   
750+500 1200 1
Solution: a = 0.8×3×10 8 ÷ 100×106
= 0.4735. Therefore, η = 1+5×0.4735 = 0.297 = 29.7%

(c) [2 pts] If the bit error rate (probability that a given bit is in error) on this Ethernet is 1 × 10−9 ,
what is the frame error rate using the frame length of part (a).
1100
Solution: 1 − 1 − 1 × 10−9 ≈ 1.1 × 10−6

(d) [2 pts] Someone claims to have observed a frame error rate on this link that is greater than
what you find in part (c). Will you believe? Say YES or NO. Why? Why not?

Solution: YES. The answer in part (c) is for the smallest frame. Thus, the actual traffic will
consist of frames at least this big. Consequently, the error rate will be at least as high as in part
(c).

12
(e) [2 pts] Someone claims to have observed a frame error rate on this link that is smaller than
what you find in part (c). Will you believe? Say YES or NO. Why? Why not?

Solution: NO. A smaller frame error rate would require fames to be smaller than those used in
part (c), but that is the minimum-sized frame. Hence NO.

(f ) [2 pts] For this Ethernet, we standardize a maximum fixed frame length that is 10 times the
frame length you found above. What is the maximum probability a frame will be received in error?
11000
Solution: 1 − 1 − 1 × 10−9 ≈ 1.1 × 10−5

(g) [2 pts] If the frame length of part (f) is used, what is the efficiency of this Ethernet?
0.4735 1
Solution: a = 10 = 0.04735. Therefore, η = 1+5×0.04735 = 0.8086 = 80.86%

(h) [3 pts] If the Hub in the question is replaced by a smart bridge (that uses a store and forward
mechanism, creating separate collision domains across its interfaces), how would your answer to
part (a) change?

Solution: Let b′ is the desired frame length, then:

b′ 2 × (750)
6
≥ ⇒ b′ ≥ 625 bits
100 × 10 0.8 × 3 × 108
Rounding up to the nearest hundred, we take b′ = 700 bits.

(i) [2 pts] Repeat part (f) when the smart bridge replaces the hub. The maximum frame size is
still chosen to be 10 times the minimum frame size (now found in part (h) for the case of smart
bridge).
7000
Solution: 1 − 1 − 1 × 10−9 ≈ 7 × 10−6

13

You might also like