Chapter 5作业题,请同学们注意题目描述。
1.(R1)What are some of the possible services that a link-layer protocol can offerto the network layer? Which of these link-layer services have corresponding services in IP? In TCP?答:可能提供的服务:链路接入,成帧,可靠传输,流量控制,差错检测,差错纠正,半双工和全双工;In IP:成帧,差错检测;In TCP: 成帧,可靠传输,差错检测,半双工和全双工。
2.(R2)If all the links in the Internet were to provide reliable delivery service,would the TCP reliable delivery service be redundant? Why or why not?答:不会多余,因为TCP保证的是传输层的数据传送,而link提供稳定可靠传输保证链路层的传输稳定,二者不完全重叠,所以TCP可靠传输也不会多余。
例如,链路层协议不能保证端到端的顺序,就需要TCP协议进行排序;路由器缓存溢出丢包,链路层协议无法解决这个问题,但是TCP可以。
3.(R8)How big is the MAC address space? The IPv4 address space? The IPv6 addressspace?答:248个MAC addresses; 232个IPv4 addresses; 2128个IPv6 addresses4.(R9)Why is an ARP query sent within a broadcast frame? Why is an ARP responsesent within a frame with a specific destination MAC address?答:因为新加入网络的主机是不知道路由器的IP的,自己也没有IP,所以只能广播才能得到IP,特定的主机就会特定响应。
因为每个主机的MAC地址都是唯一的,而ARP建立转发表的时候会带上MAC地址。
5.(P5)Consider the 4-bit generator, G, shown in Figure 5.8, and suppose that Dhas the value 11111010. What is the value of R? G=1001答:的余数,∴ R=1106.(P11)Consider a broadcast channel with N nodes and a transmission rate of R bps.Suppose the broadcast channel uses polling (with an additional polling node) for multiple access. Suppose the amount of time from when a node completes transmission until the subsequent node is permitted to transmit (that is, the polling delay) is d poll. Suppose that within a polling round, a given node is allowed to transmit at most Q bits. What is the maximum throughput of the broadcast channel?答:情况1:情况2:两种极端情况进行比较,明显情况2为最大值;情况1为最小值。
7.(P12)Consider three LANs interconnected by two routers, as shown in Figure 5.38.a. Redraw the diagram to include adapters.Figure 5.38 Three subnets, interconnected by routersb. Assign IP addresses to all of the interfaces. For Subnet I use addresses ofthe form 111.111.111.xxx; for Subnet 2 uses addresses of the form122.222.222.xxx;and for Subnet 3 use addresses of the form 133.333.333.xxx. (注:本题目略有修改,见红色标注)c. Assign MAC addresses to all of the adapters.d. Consider sending an IP datagram from Host A to Host F. Suppose all of the ARPtables are up to date. Enumerate all the steps, as done for the single-router example in Section 5.4.2.e. Repeat (d), now assuming that the ARP table in the sending host is empty(andthe other tables are up to date).答:a.b.c.d. 1. 由A 的转发表决定了数据报应该被转发到路由器端口111.111.111.002.2. 由A 的适配器生成一个携带以太网目的地址22-22-22-22-22-22的以太网分组.3. 第一个路由器即收到该分组并且解析了数据报。
该路由器中的转发表提示该数据报应该被转发到122.222.222.003.4. 第一个路由器发送带有目的地址为55-55-55-55-55-55并且源地址为33-33-33-33-33-33的以太网分组,经过IP 地址为122.222.222.002的端口。
5. 过程以此类推,直到分组到达主机F .e. 主机A 的ARP 模块一定知道本网段网关的IP 地址为 111.111.111.002。
主机A 发送一个ARP 请求(包含在一个以太网广播帧中)。
第一个路由器接收到这个请求分组并且发送给主机A 一个ARP 响应分组。
这个ARP 响应分组装载于一个包含以太网目的地址00-00-00-00-00-00的以太网帧上。
得知了路由器端口的MAC 地址后,以他作为目的地址成帧,以后的步骤与上一问相同。
8. (P15)Suppose nodes A and B are on the same 10 Mbps Ethernet bus, and thepropagation 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 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 a jam signal at t = 225 + 48 = 273 bit times. Suppose 0=A K and 1=B K , 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 2-see protocol.) At what time does A's signal reach B? Does B refrain from transmitting at its scheduled time?答:9. (P16)Suppose nodes A and B are on the same 10 Mbps Ethernet bus, and thepropagation delay between the two nodes is 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 without 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 B's signal reachesA before bit time t = 512 + 64 bits. In the worst case, when does B's signal reach A?答:假设在 t = 0 时刻 A 开始传输。