Midterm2 cp372 Solution
Midterm2 cp372 Solution
10. When a UDP segment arrives to a host, in order to direct the segment to the appropriate
socket, the OS uses
a. the destination port number
b. the source IP address
c. the source port number
d. all of the above
11. TCP applies fast retransmit to a segment when
a. it estimates unusually large RTTs
b. the segment's timer expires
c. when it receives three ACKs for an earlier segment
d. none of the above
12. Suppose a router has n input ports each with identical line speeds, n output ports each
with identical line speeds, and the line speed of an output port is at least n times as that
of an input port. Further suppose that the switching fabric speed is at least n times as
fast as an input line speed. Then
a. queuing can occur in an input port
b. queuing can occur in the switching fabric
c. there is no queuing delay in the router
d. queuing can occur in an output port
13. Consider sending a 2400 byte datagram into a link that has an MTU of 700 bytes.
(change the values)
a. Four fragments are created, with offsets 0, 87.5, 175, 262.5.
b. Four fragments are created, with offsets 0, 85, 170 and 255
c. Four fragments are created, with offsets 0, 700, 1400 and 2100.
d. None of the above
14. Which one describes congestion control in TCP?
a. Making sure the senders can send data at any rate they wish
b. Making sure the packets are not dropped by the routers
c. Making sure all connections on a link share equal share of bandwidth
d. Making sure the sender does not overwhelm the receiver
15. What is the sequence number of the next packet sent by sender in the following
diagram. It is specified with question mark
a. 92
b. 100
c. 120
d. 110
16. What is the service model of the network layer of the Internet?
a. Best effort
b. guaranteed delivery
c. Guaranteed in-order delivery
d. Guaranteed minimal bandwidth
17. If the data consists of two 16 bytes as follow, what would be the checksum
a. 00011110 01001110
b. 00011110 01001111
c. 1111111111111111
d. 11100001 10110000
10111110 11100000
18. suppose host A sends host B a TCP segment encapsulated in an IP datagram. When
Host B receives the datagram, how does the network layer in Host B know it should pass
the segment (that is, the payload of the datagram) to TCP rather than to UDP or to some
other upper-layer protocol
a. The 8-bit protocol field in the IP datagram contains information about
which transport layer protocol the destination host should pass the
segment to.
b. TTL field in IP datagram
c. Flags header field is used
d. None of the above
19. When a large datagram is fragmented into multiple smaller datagrams, where are these
smaller datagrams reassembled into a single larger datagram?
a. The next router
b. Destination host
c. The router just before the destination host on the path from source to destination
d. None of the above
20. What is meant by term route aggregation? Why is it useful for a router to perform route
aggregation?
a. An ISP uses a single prefix to advertise multiple networks
b. An ISP selects the best route based on the IP
c. An ISP advertises its IP to the rest of the Internet
d. All the hosts in a subnet share the same IP prefix
21. Consider the sliding window protocol in the following figure. What protocol is depicted in
the figure
a. Selective repeat
b. Go back N(GBN)
c. TCP
d. UDP
22. How will network operate with mixed IPv4 and IPv6 routers?
a. It does not work with mixed IPv6 and IPv4 routers
b. IPv6 datagrams are converted into an IPv4 datagram
c. The IPV6 packets are dropped and an error message is sent to the sender
d. IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers
23. When TCP re-transmits data? Hint: it retransmits data in case of two events. What are
those two events?
Answer: Timeout, 3 duplicate ACKs
24. What causes congestion? What is meant by congestion control
Answer: Too many sources attempting to send data at too high a rate
25. What is flow control? How does it differ from congestion control?
Answer: Flow control is about matching the speed of a sender to the capabilities of the
receiver. Congestion occurs when senders over-utilize the resources within the network.
26. What is meant by AIMD in TCP (Additive increase multiplicative decrease)
27. Consider four Internet hosts, each with a TCP session. These four TCP sessions share a
common bottleneck link - all packet loss on the end-to-end paths for these four sessions
occurs at just this one link. The bottleneck link has a transmission rate of R. The round
trip times, RTT, for all fours hosts to their destinations are approximately the same. No
other sessions are currently using this link. The four sessions have been running for a
long time. What is the approximate throughput of each of these four TCP sessions?
Explain your answer briefly. Answer: R/4 since TCP shares bandwidth fairly.
If I had asked: What is the approximate size of the TCP window at each of these hosts?
Then the answer would be: Recall that roughly throughput = W/RTT or W = throughput *
RTT = R*RTT/4.
28. Network Layer functionality can be broadly divided into data plane functionality and
control plane functionality. What are the main functions of the data plane? Of the control
plane?
Answer: The main function of the data plane is packet forwarding, which is to forward
datagrams from their input links to their output links. For example, the data plane’s
input ports perform physical layer function of terminating an incoming physical link
at a router, perform link-layer function to interoperate with the link layer at the other
side of the incoming link, and perform lookup function at the input ports.
The main function of the control plane is routing, which is to determine the paths a
packet takes from its source to its destination. A control plane is responsible for
executing routing protocols, responding to attached links that go up or down,
communicating with remote controllers, and performing management functions.
29. Consider an Internet address of the form 128,119.40.0/23. What does the /23 signify?
Answer: The leftmost 23 bits is the network address… the rightmost 9 bits are used to
specify the host within the network
2^6bits is 64 addressses
32-6 = 26 subnet mask
2^4bits is 16 addresses
32-4 = 28 subnet mask
64-16 = 48 addresses
---
2^4bits is 16 addresses
32-4 = 28 subnet mask
2^2bits is 4 addresses
32-2 = 30 subnet mask
16-4 = 12 addresses
---
Subnet C: 128.119.40.32/28
2^4bits is 16 addresses
32-4 = 28 subnet mask
31. Network Address Translation: Consider a number of host in a private local network behind
a NATed router having IP addresses 10.0.1.11, 10.0.1.16, 10.0.1.18. The router’s interface on
the LAN side has IP address 10.0.1.28, while the router’s address on the Internet side has IP
address 135.122.191.210. Suppose that the host with IP address 10.0.1.11 sends an IP
datagram destined to host 128.119.160.182. The source port is 3348, and the destination port
is 80. Specify the entry that has been made in the router's NAT table.
Answer: Look at the solutions to chapter 4 problems and also at the lecture slides