You are on page 1of 15

EE471/CS471/CS573: Fall 2018-2019

Zartash Uzmi and Tariq Jadooon

Final Exam 2018-2019


(Allowed: Calculators, three A-4 sheets hand-written both sides)
Time Allowed: 165 minutes (Tuesday, Dec 15, 2018 starting at 8:00am)

“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, 1k means 1000 and not 1024. Similarly,
1M means 106 . Capital ‘B’ is used for bytes, while small ‘b’ is used for bits. Therefore, 1kb/s is
1000 bits/sec, and 4MB 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 [15]

Problem 3 [30]

Problem 4 [20]

Problem 5 [25]

Problem 6 [14]

TOTAL [125]
Student ID:

Problem 1: Campus Ethernet [18 points] Consider a university campus where wired Ethernet
(which uses CSMA/CD protocol) is to be deployed. Ethernet packets are standardized to have a
minimum length of 72 bytes (which includes 26 bytes of header and preamble and 4 bytes of CRC
frame check sequence). Assume a signal propagation speed of 2.7 × 108 m/s.

(a) [3pts] First consider that a single LAN (without any hub, and without any store-and-forward
type switch) is used. The network admin has the choice to operate the network links at any one of
1Mb/s, 10Mb/s, 100Mb/s, 1Gb/s, 10Gb/s. If the farthest cable distance between any two adjacent
network cards on campus is 540m, what is the maximum network link operating speed the network
admin could choose? Show your working. Note: Adjacent network cards are those that connect
directly to each other without any other network interface coming in between.

(b) [3pts] The university expands and acquires additional land adjacent to the current premises.
This results in a 30% increase in the longest Ethernet cable length when additional stations are
added to the same LAN. The network admin would like to continue to operate the network links
at the speed they chose in part (a). What kind of networking device will they be required to add
to the LAN?

(c) [2pts] Now consider the original campus of part (a), without the expansion considered in part
(b). Is it okay to add a bridge (ethernet switch) to this network? Say YES or NO. If YES, why?
If NO, why not? In no more than one sentence. Longer and irrelevant explanations (even if they
contain the correct answer) will receive no credit.

2
Student ID:

(d) [2pts] Consider a campus with size you found in part (a), is it okay to add a hub (or repeater)
to this network? Say YES or NO. If YES, why? If NO, why not? In no more than one sentence.
Longer and irrelevant explanations (even if they contain the correct answer) will receive no credit.
The definition of hub/repeater is the one we used in class, i.e. a device all of whose ports are in
the same collision domain.

(e) [3pts] Suppose the network admin intends an upgrade by increasing the operating speed of
links by a factor of 10 over what they chose in part (a). Will they be able to do so by installing
the following: (i) just some hubs, (ii) just some bridges, or (iii) just some routers? In each case,
say YES or NO, and provide a reason of no more than one short sentence.

(f ) [3pts] With the upgrade of part (e), what would be the maximum length of an Ethernet cable
between any two adjacent network cards?

(g) [2pts] If the network admin wants to upgrade the link operating speeds, as in part (e), by a
factor of 10 but does not want to install any additional networking device on the existing network,
do they have a choice? Explain in no more than two sentences.

3
Student ID:

Problem 2: Routing, Prefixes, Protocols [15 points]

(a) [1pts] What network protocol is used immediately underneath BGP to send BGP advertise-
ments?

(b) [1pts] What network protocol is used immediately underneath OSPF to send OSPF advertise-
ments?

(c) [1pts] What network protocol is used immediately underneath RIP to send RIP advertisements?

(d) [1pts] A routing protocol has to advertise four contiguous /24 blocks of IP addresses. What is
the total number of IP addresses the routing protocol has to advertise?

(e) [3pts] From part (d), if the lowest IP address in those four blocks is 196.56.24.0 and the highest
IP address is 196.56.27.255, indicate the four /24 blocks we are to advertise.

4
Student ID:

(f ) [2pts] From part (e), a routing protocol may advertise four prefixes, one for each /24 block.
However, we want the routing protocol to aggregate the prefixes and advertise as a single prefix.
What single prefix will be advertised?

(g) [3pts] A routing table has just three entries: (129.59.28.0/22, port 0), (129.59.28.0/23, port
1) and (129.59.28.0/24, port 2). These entries simply indicate the matching prefix and the corre-
sponding port to which a packet should be forwarded to. Which port will the following IP packets
be forwarded to given their corresponding destination IP addresses:

1) Packet 1: 129.59.29.108 Which port?

2) Packet 2: 129.59.24.110 Which port?

3) Packet 3: 129.59.30.57 Which port?

(h) [3pts] Fill the following table with Y/N indicating if a BGP route learned by a router is
advertised to the indicated entity.

Learned Route Advertised To


From ↓ Peer Customer Provider
Peer
Customer
Provider

5
Student ID:

Problem 3: Throughput Efficiency [30 points] Consider two nodes A and C communicating
through an intermediate node B. The full-duplex link AB is 3km long and is operating at 100Mb/s
while the full-duplex link BC is 2km long and is also operating at 100Mb/s. On both links, the
signal propagation delay is 5 nanoseconds per meter.
Data frames of fixed size at 400-bytes each are sent from node A to node C through intermediate
node B in a store-and-forward manner. Node C sends back an ACK frame of size 50 bytes to node
A through node B, also in a store-and-forward manner. Node B introduces a processing delay of 5
microseconds in either direction of communication, i.e. after a data frame or an ACK is completely
received by node B, it is forwarded towards the destination 5 microseconds later.
The end nodes A and C take 10 microseconds each to process a frame (data or ACK) after its
reception is complete. Immediately after processing an ACK, node A is ready to send the next
frame if one is available. Assume that node A always has data to send and neglect header bytes in
your calculations.

Case-I: First assume that no frames are lost, mis-sequenced, or corrupted in either direction of
transmission and node C only sends ACK frames back to node A.

(a) [3pts] What percentage of time is node A busy sending “useful” data when an alternating bit
protocol (ABP) is used? [Note: This value is also the throughput efficiency]

(b) [1pts] What percentage of time is node C busy receiving “useful” data when an ABP is used?

(c) [1pts] How many sequence numbers are needed if ABP is used for communication between node
A and node C?

6
Student ID:

(d) [3pts] If now a GBN protocol is used, what is the minimum value for the sender window at
node A that will result in at least 80% throughput efficiency? Provide your answer in number of
frames.

(e) [2pts] What is the maximum throughput efficiency that can be achieved using GBN?

(f ) [2pts] Find the minimum value of sender window at node A that will result in the maximum
GBN efficiency, found in above part?

Case-II: Next assume that no frames are lost, mis-sequenced, or corrupted in either direction of
transmission but node C also has some data to send back to node A. The ACKs from node C to
node A are piggy-backed onto the data frames with fixed total size of 400 bytes. When a data frame
is received from node A, node C processes the frame (which takes 10 microseconds as before), and
then node C waits until it has some data to send back to node A. As before, assume that node A
always has data to send.

(g) [2pts] If node C always has data available from higher layers, and an ABP is used, what is the
throughput efficiency from node A to node C?

7
Student ID:

(h) [3pts] If, after processing the data frame received from node A, node C must wait for 70
microseconds before it receives data from its own upper layer to send back to node A, what is the
throughput efficiency from node A to node C when an ABP is used?

(i) [2pts] If, after processing the data frame received from node A, node C must wait for a random
amount of time W before it receives data from its upper layer to send back to node A, and W is
uniformly distributed between 0 and 200 microseconds, what is the average throughput efficiency
for data transmission from node A to node C when an ABP is used?

(j) [3pts] Consider the situation in above part: After processing the data frame received from node
A, node C must wait for a random amount of time W before it receives data from its upper layer to
send back to node A, and W is uniformly distributed between 0 and 200 microseconds. If a GBN
protocol is used, what is the minimum sender window size at node A that will “ensure” maximum
efficiency?

Part-III: Finally, consider the case when node A sends 400-byte data frames to node C and node
C sends back only 50-byte ACK frames in the alternating bit protocol (ABP). As before, node A
always has data to send from its upper layers. The channel, however, may now corrupt or lose data
and ACK frames, without any reordering. Let P is the probability that node A correctly receives

8
Student ID:

an ACK from node C for a frame that node A had previously sent. Thus, 1 − P is the probability
that a retransmission will be needed (because either the data frame did not correctly make it to
node C or the ACK frame could not correctly make it back to node A).

(k) [3pts] If node A retransmits with a timeout value T (i.e., a retransmission is launched unless
the correct ACK is received within time T after node A started the original transmission), what is
the minimum feasible value of T ?

(l) [3pts] Continuing from above part, how long, on average, would it take node A to successfully
complete transmission of one data frame (i.e., data frame correctly received by node C and ACK
for that frame correctly received by node A). Your answer will be in terms of P and T . Evaluate
your answer for P = 0.8.

(m) [2pts] From the above two parts, if the minimum feasible value of T is Tmin , and we select a
timeout value which is 1.8Tmin , what is the throughput efficiency of ABP for P = 0.8?

9
Student ID:

Problem 4: Transmission and Buffering [20 points] Asif and Bilal are directly connected
through a link which operates at 1Gb/s (note: b represents bits). Assume that the propagation
delay on the link is negligible.
Asif wants to send a 12GB (note: B represents bytes) file to Bilal. No ACKs are needed.
The file is transmitted by breaking it up into equal-sized packets, each sized 1kB.

(a) [2pts] If the packet overhead is negligible, what is the minimum amount of time it will take
Asif to send the file to Bilal?

(b) [3pts] If now each packet contains 200B header (the total packet size still remains 1kB), how
long will it take Asif to send the file to Bilal?

(c) [2pts] Once again assume 200B header in each packet of total size 1kB. Now suppose there is
some control at Asif’s end which only allows sending a burst of 75000 packets (each of size 1kB)
every second. How long will it take Asif to send the file to Bilal?

(d) [3pts] The control mechanism in previous part is performing the sending rate adjustment. This,
in some way, is similar to protocols (such as TCP) which also control the sending rate to avoid
overwhelming the receiver or the network. Suppose the control in above part is implemented in
the Transport layer at Asif’s end by making use of a buffer. Using the same information as above,
75000 packets are taken from Asif’s Transport layer buffer every second for further transmission
to Bilal (at link speed of 1Gb/s). At Asif’s end, the Application layer feeds to the Transport layer
a continuous data stream at a constant rate. The Transport layer forms the packets and adds the
200B header to each packet while maintaining the size of each packet to 1kB. What is the maximum
rate the Application layer can feed to the Transport layer at Asif’s end without causing a finite
buffer to overflow? Make sure to specify units with your answer.

10
Student ID:

(e) [5pts] In the previous part, if the Application layer feeds to the Transport layer at the rate
you found, draw the buffer occupancy graph labeling important points. Assume that first burst of
packets is removed from the Transport layer buffer for further transmission to Bilal when the buffer
has exactly 75000 packets. Also assume that the time to form the packets and insert headers at
the Transport layer is negligible. [Hint: It may help to draw the cumulative arrival and departure
processes, in terms of number of packets. Please attempt that on the facing (rough) page first
before copying your final answer in the permitted space below.]

(f ) [2pts] What is the average buffer occupancy in part (d)? Provide your answer in “number of
packets”.

(g) [3pts] What is the expected delay incurred by a packet in part (d)?

11
Student ID:

Problem 5: Fun with NAT and Routing [25 points] Consider a network as shown in the
figure. A number of wireless devices are connected to a wireless router that implements NAT
functionality. The wireless router also runs a DHCP server to assign IP addresses to wireless
devices in the range 192.168.3.0 to 192.168.13.255.
The wireless router itself resides on a campus network that uses private IP addresses in the
range 10.0.0.0 to 10.255.255.255. The campus network is connected to outside world through
a single NAT gateway whose “external” IP address is 110.93.234.9 and “internal” IP address is
10.31.0.1. Note that 110.93.234.9 is the only IP address the entire campus uses and is allocated by
the ISP. Everyone on campus network, except for devices on the wireless network, uses 10.31.0.1
as the default gateway.

To Internet Campus Wireless


Router Router

(a) [2pts] What is an appropriate subnet mask to be used on the wireless network? Show as dotted
decimal (and optionally in binary).

(b) [2pts] What is an appropriate subnet mask to be used on the campus network? Show as dotted
decimal (and optionally in binary).

(c) [3pts] Write the usual routing table entries for the wireless router in the table given below.
Note that, for the next hop, we have simply used the name/gateway of the network (i.e., “wireless”,
“campus net”, or 10.31.0.1).

Entry Number Destination Prefix Next Hop


1 campus net
2 wireless
3 10.31.0.1

12
Student ID:

(d) [2pts] Write the usual routing table entries for the campus router that connects to the internet,
using the table given below. Once again, for the next hop, we have simply used the name of the
network (i.e., “internet/ISP” or “campus net”).

Entry Number Destination Prefix Next Hop


1 campus net
2 Internet or ISP

(e) [2pts] Why is there no 192.168.13.x entry in the table of the campus router in the previous
part? One short sentence only.

(f ) [2pts] Write the routing table entries the ISP must create in order to correctly route all traffic
destined for the campus network (including the wireless devices). Use a table with format as in
previous parts.

For the rest of the parts, assume the following: Someone using a laptop on wireless network connects
to a webserver at port 8090 on the Internet at website with IP 171.64.90.123. Answer the following
parts for this interaction only.

(g) [2pts] Write the following values in IP datagrams on the wireless network from laptop to wireless
router (if some information is not available, write some reasonable values):

Src IP address:
Dst IP address:
Src Port:
Dst Port:

13
Student ID:

(h) [2pts] Continuing from the scenario in above part, write the following values in IP datagrams
on the wireless network from wireless router to laptop (if some information is not available, write
some reasonable values):

Src IP address:
Dst IP address:
Src Port:
Dst Port:

(i) [2pts] Continuing from the scenario in above part, write the following values in IP datagrams
on the campus network from wireless router to campus router (if some information is not available,
write some reasonable values):

Src IP address:
Dst IP address:
Src Port:
Dst Port:

(j) [2pts] Continuing from the scenario in above part, write the following values in IP datagrams
on the campus network from campus router to wireless router (if some information is not available,
write some reasonable values):

Src IP address:
Dst IP address:
Src Port:
Dst Port:

(k) [2pts] For the IP and port values given above (or you selected by wisdom), when a laptop is
communicating with the webserver, write a NAT table entry for the wireless router.

WAN Side LAN Side


IP:port IP:port

(l) [2pts] For the IP and port values given above (or you selected by wisdom), when a laptop is
communicating with the webserver, write a NAT table entry for the campus router.

WAN Side LAN Side


IP:port IP:port

14
Student ID:

Problem 6: TCP Congestion Control [14 points] For each of the following, indicate true (T)
or false (F). A statement is true only if it is true in ALL cases. Mark those statements false which
are neither true nor false. In each case, justify your answer concisely.

(a) [2pts] Size of congestion window (cwnd) increases faster in slow start phase than in congestion
avoidance phase.

(b) [2pts] TCP series 1 Tahoe (old TCP) responds to “retransmit timeouts” and “three duplicate
ACKs” differently.

(c) [2pts] TCP series 2 Reno (newer TCP) responds to “retransmit timeouts” and “three duplicate
ACKs” differently.

(d) [2pts] In TCP slow start, the congestion window is doubled on receiving each ACK.

(e) [2pts] TCP fast recovery means invocation of slow start.

(f ) [2pts] On receiving three duplicate ACKs, the TCP congestion window is set equal to the
threshold.

(g) [2pts] In TCP, the send window is greater than the congestion window.

15

You might also like