计网第五次作业_第1页
计网第五次作业_第2页
计网第五次作业_第3页
计网第五次作业_第4页
计网第五次作业_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、精选优质文档-倾情为你奉上精选优质文档-倾情为你奉上专心-专注-专业专心-专注-专业精选优质文档-倾情为你奉上专心-专注-专业Review Questions:1. What are some of the possible services that a link-layer protocol can offer to the network layer? Which of these link-layer services have corresponding services in IP? In TCP? 链路层协议提供给网络层的服务有哪些?哪些是给IP的?哪些是给TCP的 ?Link

2、access, framing, reliable delivery between adjacent nodes, flow control, error detection, error correction, half-duplex and full-duplex.In IP: framing, error detection.In TCP: framing, reliable delivery between adjacent nodes, error detection, half-duplex and full-duplex.2. If all the links in the I

3、nternet were to provide reliable delivery service, would the TCP reliable delivery service be redundant? Why or why not?不会多余,因为TCP保证的是传输层的数据传送,而link提供稳定可靠传输保证链路层的传输稳定,二者不完全重叠,所以TCP可靠传输也不会多余。3. In Section 5.3, we listed four desirable characteristics of a broadcast channel. Which of these characteris

4、tics does slotted ALOHA have? Which of these characteristics does token passing have?4. Suppose two nodes start to transmit at the same time a packet of length Lover a broadcast channel of rate R. Denote the propagation delay between the two nodes as dprop. Will there be a collision if dprop L / R?

5、Why or why not?因为L / R = 包传递的时间,如果dprop L / R,也就意味着A的信号跑到B的时候B的最后一个分组还没离开B,所以发生碰撞。7. Suppose nodes A, B, and C each attach to the same broadcast LAN (through their adapters). If A sends thousands of IP datagrams to B with each encapsulating frame addressed to the MAC address of B, will Cs adapter pr

6、ocess these frames? If so, will Cs adapter pass the IP datagrams in these frames to the network layer C? How would your answers change if A sends frames with the MAC broadcast address?不会,C会拆封帧从而读取报头的MAC,因为每一个host的MAC都唯一,C读取到数据报中的MAC和自己的不一样就不会继续拆封数据报,不会投递给C。当使用LAN口广播地址的时候,C的适配器就会拆封帧,向C传递数据。8. How big

7、 is the MAC address space? The IPv4 address space? The IPv6 address space?248,232,2128.9. Why is an ARP query sent within a broadcast frame? Why is an ARP response sent within a frame with a specific destination MAC address?因为新加入网络的主机是不知道路由器的IP的,自己也没有IP,所以只能广播才能得到IP。因为每个主机的MAC地址都是唯一的,而ARP建立转发表的时候会带上

8、MAC地址。12. In CSMA/CD, after the fifth collision, what is the probability that a node chooses K = 4? The result K = 4 corresponds to a delay of how many seconds on a 10 Mbps Ethernet?可能,因为第五次K的取值范围是0-(25-1)即0-31。Bit time = 1 bit / R = 1 bit / 10 Mbps = 1 msec,K = 4,wait time = 4 * 512 * 1 msec = 2048

9、 msec。Problems:Suppose the information content of a packet is the bit pattern 1110 1100 1000 1010 and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two-dimensional parity scheme? Your answer should be such that a minimum-length

10、 checksum field is used.假设一个数据包的信息含量是XXX,使用偶校验方案。采用二位奇偶校验方案的字段包含的奇偶校验位的字段的值是多少?答案要使用最小长度校验。10100101001010010111000112. Suppose the information portion of a packet (D in Figure 5.4) contains 10 bytes consisting of the 8-bit unsigned binary ASCII representation of the integers 0 through 9. Compute the

11、 Internet checksum for this data.假设一个包的信息的一部分包括10bytes组成的8-bit无符号二进制码表示的整数0-9,计算该数据的网络校验。算校验码先把0-9加起来0000 00000000 00010000 00100000 00110000 01000000 01010000 01100000 01110000 10000000 10010001 01000001 1001取反可得校验码为1110 10111110 01103. Consider the previous problem, but instead of containing the b

12、inary of the numbers 0 through 9 suppose these 10 bytes contain. Compute the Internet checksum for this data.a. the binary representation of the numbers 1 through 10.0000 00010000 00100000 00110000 01000000 01010000 01100000 01110000 10000000 10010001 01000001 10110001 1110取反可得1110 01001110 0001b. t

13、he ASCII representation of the letters A through J (uppercase).0100 00010100 00100100 00110100 01000100 01010100 01100100 01110100 10000100 10010100 10100101 10000101 1111取反可得1010 01111010 0000c. the ASCII representation of the letters a through j (lowercase).小写字母表示0110 00010110 00100110 00110110 01

14、000110 01010110 01100110 01110110 10000110 10010110 10101111 10011111 1101取反可得0000 01100000 00106. Consider the previous problem, but suppose that D has the valuea. 1001 0001.b. 1010 0011.c. 0101 0101.前一题题目:Consider the 7-bit generator, G=10011, and suppose that D has the value . What is the value o

15、f R?求余而已,记住不要做减法而是做与运算就好。a. R = 001b. R = 101c. R = 10112. Consider three LANs interconnected by two routers, as shown in Figure 5.38.a. Redraw the diagram to include adapters.重新画图b. Assign IP addresses to all of the interfaces. For Subnet 1 use addresses of the form 111.111.111.xxx; for Subnet 2 us

16、es addresses of the form 122.122.122.xxx; and for Subnet 3 use addresses of the form 133.133.133.xxx.所有的接口分配IP地址。c. Assign MAC addresses to all of the adapters.a.b.c如图d. Consider sending an IP datagram from Host A to Host F. Suppose all of the ARP tables are up to date. Enumerate all the steps, as d

17、one for the single-router example in Section 5.4.2.1. host A发送一个数据报,通过转发表查询F的IP,向路由器1发送,其中destination IP为133.133.133.12,MAC未知,source IP为111.111.111.12,source MAC为aa-aa-aa-aa-aa-aa。2. 适配器更改destination的IP为111.111.111.12,MAC地址变为gg-gg-gg-gg-gg-gg3. 路由器1发现目标IP和MAC不属于子网1中任何host,属于子网3(图中忘了画了,意会一下)。于是根据转发表向

18、路由器2进行转发。Destination的IP为122.122.122.20,MAC为ii-ii-ii-ii-ii-ii。4. 路由器2收到了数据报,发现host F在自己的子网内,于是修改destination的IP为133.133.133.12,MAC地址为ff-ff-ff-ff-ff-ff。修改source IP为133.133.133.20,MAC为jj-jj-jj-jj-jj-jj,然后向F发送数据报。5. F收到来自A的数据报。e. Repeat (d), now assuming that the ARP table in the sending host is empty (a

19、nd the other tables are up to date).发送方的ARP表为空,首先需要建立ARP表1. host A发送一个广播,destination IP是255.255.255.255,MAC为空。Source IP为111.111.111.12,MAC为aa-aa-aa-aa-aa-aa2. 适配器收到了来自host A的数据报,更新自己的ARP表,同时发送一个ACK给host A,告诉host A自己的IP、MAC。3. host A建立ARP表4. 如d小问所答,开始进行数据发送。14. Recall that with the CSMA/CD protocol,

20、the adapter waits K512 bit times after a collision, where K is drawn randomly. For K = 100, how long does the adapter wait until returning to Step 2 for a 10 Mbps Ethernet? For a 100 Mbps Ethernet?当网速 = 10 Mbps时,bit time = 1 bit / 10 Mbpst = 100 * 512 * 1 / (106) = 5.12 msec当网速 = 100 Mbps时,bit time

21、= 1 bit / 100 Mbpst = 100 * 512 * 1 / (107) = 0.512 msec15. Suppose nodes A and B are on the same 10 Mbps Ethernet bus, and the propagation delay between the two nodes is 225 bit times. Suppose A and B send frames at the same time, the frames collide, and then A and B choose different values of K in

22、 the CSMA/CD algorithm. Assuming no other nodes are active, can the retransmissions from A and B collide? For our purposes, it suffices to work out the following example. Suppose A and B begin transmission at t = 0 bit times. They both detect collisions at t = 225 bit times. They finish transmitting

23、 a jam signal at t = 225 + 48 = 273 bit times. Suppose KA = 0 and KB = 1. At what time does B schedule its retransmission? At what time does A begin transmission? (Note: The nodes must wait for an idle channel after returning to Step 2see protocol.) At what time does As signal reach B? Does B refrai

24、n from transmitting at its scheduled time?1. 因为A的K值 = 0,所以A从273 bit time开始检测是否冲突2. 由于传输延迟的问题,B的最后一个bit要等到273 + 225 = 498 bit time才能传到A,也就是说此时A检测到没有冲突。3. A传输前先等待96个bit time,即t = 498 + 96 = 594 bit time的时候A开始传输数据4. 因为propagation delay = 225 bit time,所以t = 594 +225 = 819 bit time的时候A传输完毕5. 因为KB = 1,当B等

25、待1 * 512 * 1 = 512 bit time的时候,B可以重传,此时B开始检测信道是否空闲,此时t = 273 + 512 = 785 bit time6. 此时B检测到信道忙,因此不能重传,等待信道空闲7. 当t = 819 bit time的时候信道空闲,此时B等待96 bit time,即t = 96+819= 915 bit time的时候B可以开始重传16. Suppose nodes A and B are on the same 10 Mbps Ethernet bus, and the propagation delay between the two nodes i

26、s 225 bit times. Suppose node A begins transmitting a frame and, before it finishes, node B begins transmitting a frame. Can A finish transmitting before it detects that B has transmitted? Why or why not? If the answer is yes, then A incorrectly believes that its frame was successfully transmitted w

27、ithout a collision. Hint: Suppose at time t = 0 bit times, A begins transmitting a frame. In the worst case, A transmits a minimum-sized frame of 512 + 64 bit times. So A would finish transmitting the frame at t = 512 + 64 bit times. Thus, the answer is no, if Bs signal reaches A before bit time t =

28、 512 + 64 bits. In the worst case, when does Bs signal reach A?因为A最快传输时间t = 512 + 64 bit time,看了答案,微积分神马的可以让我shi了Let Y be a random variable denoting the number of slots until a success:P(Y = m) = (1 -)(m - 1)Where is the probability of a success.This is a geometric distribution, which has mean 1 /.

29、The number of consecutive wasted slots is X = Y 1 that x = E X = E Y -1 = (1 -) / = Np(1 - p)(N - 1)x = 1 Np * (1 - p)(N - 1) / Np * (1 - p)(N - 1)efficiency = k / (k + x) = k / k + 1 Np * (1 - p)(N - 1) / Np(1 - p)(N - 1)19. Suppose two nodes, A and B, are attached to opposite ends of a 900 m cable

30、, and that they each have one frame of 1,000 bits (including all headers and preambles) to send to each other. Both nodes attempt to transmit at time t = 0. Suppose there are four repeaters between A and B, each inserting a 20-bit delay. Assume the transmission rate is 10 Mbps, and CSMA/CD with back

31、off intervals of multiples of 512 bits is used. After the first collision, A draws K = 0 and B draws K = 1 in the exponential backoff protocol. Ignore the jam signal and the 96-bit time delay.a. What is the one-way propagation delay (including repeater delays) between A and B in seconds? Assume that

32、 the signal propagation speed is 2108 m/sec.传输时间t0 = 900 m / 2 * (108) m / sec = 4.5 secRepeater 传输延迟 t1 = 4 * 20 bit / 10 Mbps = 8 secT = t0 + t1 = 12.5 secb. At what time (in seconds) is As packet completely delivered at B? (为什么这里答案没有96个bit time的等待?)1 bit time = 1 / 10 Mbps = 0.1 sec当t = 12.5 sec

33、时,A、B检测到冲突,停止传输。A的K值 = 0,于是A立即开始检测信道是否空闲,当B传输延迟结束后,信道空闲,此时t2 = 12.5 +12.5 = 25 secA等待两个96 bit time,即 25 + 9.6 = 34.6 sec时,A开始重传B在A的传输延迟:34.6 + 12.5 sec = 47.1 sec之后,检测到A的第一个bitB等待的K值 = 1,即B在512 * 0.1 sec = 51.2 sec之后重传,此时A已经传输,信道忙,B侦听信道,等待信道空闲A的传输时间tA = 1000 bit / 10 MbpsA传输完毕的时间T = 1000 bit / 10 Mb

34、ps + 47.1 sec= 147.1 secc. Now suppose that only A has a packet to send and that the repeaters are replaced with switches. Suppose that each switch has a 20-bit processing delay in addition to a store-and-forward delay. At what time, in seconds, is As packet delivered at B? (repeater和switch和router区别

35、在哪里?)t = 12.5 sec + 5 * 100 sec = 512.5sec21. Suppose now that the leftmost router in Figure 5.38 is replaced by a switch. Hosts A, B, C, and D and the right router are all star-connected into this switch. Give the source and destination MAC addresses in the frame encapsulating this IP datagram as the frame is transmitted (i) from A to the switch, (ii) from the switch to the

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论