CSCI4211思考与实践

逻辑潮汐
• 阅读 685

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!
  5. 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.
  6. 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
  7. 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
  8. 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?
  9. 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
  10. 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
  11. 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
  12. 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.
  13. Virtual Circuits (15 points total. Approx. 15 minutes)
    WX:codehelp
点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
美凌格栋栋酱 美凌格栋栋酱
6个月前
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(
Wesley13 Wesley13
3年前
VBox 启动虚拟机失败
在Vbox(5.0.8版本)启动Ubuntu的虚拟机时,遇到错误信息:NtCreateFile(\\Device\\VBoxDrvStub)failed:0xc000000034STATUS\_OBJECT\_NAME\_NOT\_FOUND(0retries) (rc101)Makesurethekern
Wesley13 Wesley13
3年前
FLV文件格式
1.        FLV文件对齐方式FLV文件以大端对齐方式存放多字节整型。如存放数字无符号16位的数字300(0x012C),那么在FLV文件中存放的顺序是:|0x01|0x2C|。如果是无符号32位数字300(0x0000012C),那么在FLV文件中的存放顺序是:|0x00|0x00|0x00|0x01|0x2C。2.  
Wesley13 Wesley13
3年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
3年前
PHP创建多级树型结构
<!lang:php<?php$areaarray(array('id'1,'pid'0,'name''中国'),array('id'5,'pid'0,'name''美国'),array('id'2,'pid'1,'name''吉林'),array('id'4,'pid'2,'n
Stella981 Stella981
3年前
DOIS 2019 DevOps国际峰会北京站来袭~
DevOps国际峰会是国内唯一的国际性DevOps技术峰会,由OSCAR 联盟指导、DevOps时代社区与高效运维社区联合主办,共邀全球80余名顶级专家畅谈DevOps体系与方法、过程与实践、工具与技术。会议召开时间:2019070508:00至2019070618:00结束会议召开地点:北京主办单位:DevOps
Wesley13 Wesley13
3年前
Java日期时间API系列36
  十二时辰,古代劳动人民把一昼夜划分成十二个时段,每一个时段叫一个时辰。二十四小时和十二时辰对照表:时辰时间24时制子时深夜11:00凌晨01:0023:0001:00丑时上午01:00上午03:0001:0003:00寅时上午03:00上午0
Wesley13 Wesley13
3年前
MBR笔记
<bochs:100000000000e\WGUI\Simclientsize(0,0)!stretchedsize(640,480)!<bochs:2b0x7c00<bochs:3c00000003740i\BIOS\$Revision:1.166$$Date:2006/08/1117
逻辑潮汐
逻辑潮汐
Lv1
月下飞天镜,云生结海楼。
文章
3
粉丝
0
获赞
0