0% found this document useful (0 votes)
794 views8 pages

Midterm2 cp372 Solution

1. Routers can have multiple IP addresses. 2. There is no IP fragmentation in IPv6. 3. Connections with smaller round-trip times (RTTs) are able to grab available bandwidth more quickly. 4. Go-Back-N (GBN) does not buffer out-of-order packets so a receive buffer is not needed.

Uploaded by

bottbott
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
794 views8 pages

Midterm2 cp372 Solution

1. Routers can have multiple IP addresses. 2. There is no IP fragmentation in IPv6. 3. Connections with smaller round-trip times (RTTs) are able to grab available bandwidth more quickly. 4. Go-Back-N (GBN) does not buffer out-of-order packets so a receive buffer is not needed.

Uploaded by

bottbott
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

True/False questions

1. (​True​ / False) router have multiple IP addresses


2. (True / ​False​) There is IP fragmentation in IPV6
3. (​True​ / False) When multiple connections share a common bottleneck, those with a
smaller RTT are able to grab the available bandwidth at that link more quickly as it
becomes free.
4. (​True​/False) GBN does not buffer out of order packets, so a receive buffer is not needed
5. True/​False ​The size of the TCP RcvWindow never changes throughout the duration of
the connection.
6. True​/False The network portion of an IP address is the same for all the hosts on the
same IP network.
7. True/​False​ TCP congestion control mechanism run at the network not at the hosts

8. What is the use of checksum in network protocols?


a. To detect bit errors
b. To detect packet loss
c. To recover from bit errors
d. To recover from packet loss
9. When a TCP segment arrives to a host, the socket to which the segment is directed
depends on
a. the destination port number
b. the source port number
c. the source IP address of the datagram that encapsulated the segment
d. all of the above

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

01011111 01101110 ​this binary number is 24430 decimal (base 10)

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

30. (4 points) IP addressing:


a. Consider the network shown above, consisting of a single router, R1, with three
subnets A, B and C, with 43, 12, and 13 hosts respectively on these subnets.
Assign an address range to the hosts in subnets A, B, and C such that only a
single aggregated address need be advertised by R1 to the public Internet, and
that the size of the aggregated address ranges that is advertised is minimized.
Explain how you arrived at your answer
First solution: (acceptable but not minimum use of address range)
128.119.40.0/23 0.0 0 0 0 0 0 0 0
A: 43 0.0 0 x x x x x x → 128.119.40.0/26
B:12 001 000000 → 128.119.40.64/27
C: 13 001 100000 → 128.119.40.96/27
Second solution:

Subnet A: 128.119.40.128/26 - 128.119.40.16/28

2^6bits is 64 addressses
32-6 = 26 subnet mask

2^4bits is 16 addresses
32-4 = 28 subnet mask

64-16 = 48 addresses

---

Subnet B: 128.119.40.16/28 - 128.119.40.4/30

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.

WAN-side address LAN-side address

135.122.191.210, 5123 10.0.1.11, 3348

Answer:​ Look at the solutions to chapter 4 problems and also at the lecture slides

32. (2 points)What is destination based forwarding? What is generalized forwarding? What


are the differences?
Answer​: Destination-based forwarding means that a datagram arriving at a
router will be forwarded to an output interface based on only the final destination
of the datagram. Generalized-forwarding means that besides its final destination,
other factors associated with a datagram is also considered when a router
determines the output interface for the datagram. Software defined networking
adopts generalized forwarding, for example, forwarding decision can be based on
a datagram’s TCP/UDP source or destination port numbers, besides its
destination IP address.
33. (Bonus question: 2 points) In the stop-and-wait protocol you implemented in Assignment
2, why the receiver sends a packet with wrong sequence number if it receives a corrupt
or duplicate packet?
Answer: In case of duplicate: sender needs this acknowledgement to stop sending the
packet. Assume the ack was sent by receiver but it was lost. So the sender sends the
package again. But it is a duplicate from the receiver’s viewpoint, so the expected
sequence number must not be used . If the wrong one is used , the sender moves
forward.

You might also like