联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2021-11-15 10:17

CSCI4211: Introduction to Computer Networks

Fall 2021

Homework Assignment 2

Due Wed Nov 14 11:55pm

Instructions:

1. Please submit your homework using the on-line electronic submission system (via the

class Convas site).

In case you could not use the on-line electronic submission system, please hand in

your homework to the instructors or TAs on the due day. Please email csci4211-

help@googlegroups.com to let us know that you have handed in a hard-copy of your

homework immediately afterwards. (Make sure that you also make and retain a copy

of your homework!)

Please make sure that you include your name and student id in your submission, and

retain a copy of your submission!

2. There are seven questions in total. The number of points for each question is given

in parentheses. There are 130 points in total. An estimated time for answering each

question is also given in parentheses. This is just a guideline, you may take less or

more time on each problem.

3. Partial credit is possible for an answer. Please try to be as concise and make your

homework as neat as possible. We must be able to read your handwriting in order to

be able to grade your homework.

4. Enjoy!

1. Short Questions and Answers: (10 points; 15 minutes)

(Two or three sentences would generally suffice.)

a. (2 points) Can we assign any arbitrary IP address to a computer connected to a

network? Please briefly explain your answer.

b. (2 points) A network on the Internet has a subnet mask of 255.255.224.0. What is

the maximum number of hosts it can handle?

c. (2 points) Can an IP packet loop forever inside an IP network even though there is a

cycle in the topology? Briefly explain your answer.

d. (2 points) When an IP host receives two IP datagrams, how can it tell that these

two IP datagrams are two IP datagram “fragments” belonging to one single original IP

datagram?

e. (2 points) Briefly explain why IP datagram re-assembly is done only at the destination

host, not by any intermediate IP router.

2. TCP Flow & Congestion Control (25 points total. Approx. 25 minutes)

(a) (4 points) Briefly describe how TCP congestion control works.

In answering the following questions, we assume that the TCP Reno version (the most

commonly used version in today’s Internet) is used, i.e., with the Fast Recover/Fast

Retransmit mechanisms implemented.]

(b) (7 points) Suppose that the current congestion window, CongWin, of a TCP connection

is currently at 12 KB, and threshold = 24 KB. During this round, the sender sends

8 TCP data segments, each of size 1500 bytes. [Here we assume that 1KB = 1000

bytes; and the TCP maximum segment size is 1500 bytes.] The last segment of these 8

data segments sent by the send carries the sequence number 2003000 (in decimal repre-

sentation, not binary representation). The sender then receives four acknowledgments

from the receiver, each acknowledging the receipt of two consecutive data segments.

In particular, the last acknowledgment from the receiver carries the acknowledgment

number 2004500. What will the sender set CongWin to at the end of this round?

(c) (7 points) Suppose that during the next round of data transmission after b., a time-out

event occurs at the sender side. What will be the value (in bytes) of CongWin after

this event? What will be the value (in bytes) of threshold?

1

(d) (7 points) Now consider a new scenario where the congestion window, CongWin, at the

sender side is currently set to 9 KB, and threshold = 9 KB. The sender then sends

6 data segments of 1500 bytes each (thus a total of 9 KB data is sent), where the

last data segment carries a sequence number 3001500 (in decimal representation, not

binary representation). After having sent these 6 data segments, the sender receives 3

acknowledgments from the receiver, each acknowledging the receipt of two consecutive

data segments. In particular, the last acknowledgment from the receiver carries the

acknowledgment number 3003000. What will the sender set CongWin to at the end?

What will be the value (in bytes) of threshold?

3. More on TCP Congestion Control (25 points total. Approx. 25 minutes)

a. (5 points) Briefly describe how TCP flow control works.

[In answering the following questions, we assume that the TCP Reno version (the most

commonly used version in today’s Internet) is used, i.e., with the Fast Recover/Fast Retrans-

mit mechanisms implemented.]

(20 points) Please Do Problem P40 a. b. c. d., Chapter 3 in the textbook (Kurose &

Ross, 7th & editions). In case you do not have the textbook, the problem is reproduced

below for you.

2

4. Longest Prefix matching (10 points total. Approx. 15 minutes)

Do Problem P8, Chapter 4 in the textbook, 8th edition (it is Problem P5, Chapter 4,

page 366, in the 7th edition). In case you do not have the textbook, the problem is reproduced

below for you.

3

5. MAC Address, ARP, Switching and IP Forwarding(25 points. Approx. 30 minutes)

Consider the following switched network (Figure 1), where we have one Ethernet switch

S, connecting three hosts, host H on port 1, host X on port 2 and host Z on port 3, as well

as an IP router R (default router for the hosts) on port 0. These hosts lie on an IP network

with the network prefix 127.64.1.0/24. The IP address for the interface of router R that is

connected to switch S is 127.64.1.254. The IP addresses for hosts H, X and Z are shown

in the figure. Furthermore, the current switch (forwarding) table at switch S and the ARP

caches at host X and router R are also shown in the figure.

Host X

Internet

Host Z

Router R

Switch S

port 0

port 1

port 3

port 2

Switch Table at B

R’s MAC addr

host port

0

1 H’s MAC addr

Server W

IP network

127.64.1.0/24

127.64.1.254

127.64.3.254

127.64.1.3 52.14.101.204

127.64.1.2

Host H

ARP cache at X

R’s MAC addr

IP MAC

127.64.1.254

127.64.1.1

127.64.1.1 H’s MAC addr

ARP cache at R

Z’s MAC addr

IP MAC

127.64.1.3

127.64.1.1 H’s MAC addr

Figure 1: Figure for Question 6.

(a) (9 points) Suppose host X wants to send an IP datagram to host Z, and assume that

host X knows the IP address of host Z (e.g., via DNS lookup).

(3 points) Briefly explain how host X obtains the MAC address of host Z. Describe

how switch S handles the ARP request and response messages, and builds its

switch table.

(3 points) Will router R also receive the ARP request? If your answer is affirma-

tive, what action does router R take? What about the ARP response message

from host Z?

(3 points) After host X learns the MAC address of host Z. Briefly describe how

the IP datagram is delivered from host X to host Z, paying particular attention

to the actions taken by switch S, and router R if any.

(b) (7 points) Suppose host X sends an IP datagram to host H instead of host Z. Repeat

the above questions.

4

(c) (9 points) Suppose now that host X wants to send an IP datagram to a remote server W

outside the network. The IP address of sever W is 52.14.101.204. Answer the following

questions.

(3 points) Since sever W’s MAC address is not currently in its ARP cache, will

host X issue an ARP request for server W? Briefly explain your answer.

(3 points) How does X know that it should forward the IP datagram to router R

so that it can be delivered (via the Internet) to server W?

(3 points) Briefly describe how the IP datagram is delivered from host X to router

R, paying in particular attention to the actions taken by switch S and router

R. Moreover, please explicitly describe the source and destination IP and MAC

addresses contained in the IP datagram and the encapsulating Ethernet frame.

5. Virtual Circuits (15 points total. Approx. 15 minutes)


相关文章

版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp