[计算机网络:自顶向下方方法](中文版课件)第七章
- 格式:ppt
- 大小:2.12 MB
- 文档页数:106
计算机网络讲义参考文献:【1】James F. Kurose著, 鸣译. 计算机网络—自顶向下方法与Internet特色. : 机械工业, 2005 【2】Andrew S. Tanenbaum著,熊桂喜等译. 计算机网络〔第四版〕.:清华大学,2004【3】高传善等编. 数据通信与计算机网络. :高等教育,2001【4】William A. Shay著. 高传善等译. 数据通信与网络教程. :机械工业,2000第一章概述1.1 建立计算机网络的目的1.目的●资源共享●高可靠性●节约经费●通信手段2.计算机网络与分布式系统的区别分布式系统是建立在计算机网络之上的软件系统,它具有高度的整体性和透明性。
因此计算机网络和分布式系统的区别在于软件〔尤其是操作系统〕而不是硬件。
1.2 计算机网络的开展过程〔四代〕1.2.1 通信与计算机的结合——产生计算机网络〔电路交换〕●通信网络为计算机之间的数据传递和交换提供了必要的手段。
●数字计算机技术的开展渗透到通信技术中,又提高了通信网络的各种性能。
●电路交换:建立连接数据通信释放连接●电路交换的分类:空分交换是交换比特流所经过的端口号;时分交换是交换比特所在的时隙;波分交换是交换荷载比特的光的波长。
1.2.2 分组交换网的出现〔包交换〕●传统的电路交换技术不适合计算机数据的传输。
●分组交换网的试验成功:存储转发原理——即断续〔或动态〕分配传输带宽。
●分组交换的主要特点:高效、灵活、迅速、可靠。
●分组交换网:以通信子网为中心,主机和终端都处在网络的外围。
●电路交换、报文交换和分组交换的主要区别:参见课本P5图1-4。
1.2.3 计算机网络体系结构的形成:OSI/RM〔ISO〕、TCP/IP〔Internet〕、SNA〔IBM〕、DNA〔Digital〕等。
〔分层网络体系结构的形成〕●OSI/RM:开放系统互联根本参考模型。
●TCP/IP:INTERNET的体系结构。
WRI 研究生06017复习题1.流式存储音频/视频:暂停/恢复,重新定位,快进,实时交互的音频视频:人们进行实时的通信和响应。
2.第一阵营:TCP/IP协议中的基本原理没有变化,按照需求增加带宽,仍然使用有超高速缓存,内容分布,多点覆盖的网络。
第二阵营:提供一个可以使应用在网络中节省带宽的网络服务。
第三阵营:有区别的服务:提出了在网络边缘的简单分类和维护方案。
并且根据他们在路由队列中的级别给出了不同的数据包和级别。
3. 6.1:简单,不需要meta file 和流媒体服务器6.2:允许媒体播放器通过web服务器直接进行交互,不需要流媒体服务器。
6.3:媒体播放器直接与流媒体服务器进行交互,以满足一些特殊的流媒体应用。
4.端到端时延是分组从源经过网络到目的地所需要的时间。
分组时延抖动是这个分组与下个分组的端到端时延的波动。
5.在预定的播放时间之后收到的分组不能被播放,所以,从应用的观点来看,这个分组可以认为是丢失了。
6.第一种方案:在每n个数据块之后发送一个冗余的数据块,这个冗余的被。
【the redundant chunk is obtained byexclusive OR-ing the n original chunks】第二种方案:随起始的数据流发送一个低分辨率,低比特率的方案,这种交错不会增加数据流的带宽需求。
7.不同会话中的RTP流:不同的多播地址同一会话中不同流:SSRC fieldRTP和RTCP分组通过端口号区别。
8.传达报告分组:包括分组丢失部分的信息,最后序列号,两次到达时间间隔的抖动。
发送报告分组:大部分目前产生的RTP分组的时间戳和wall clock time ,发送分组的数量,发送字节的数量,源描述分组:发送方的e-mail地址,发送方的姓名,产生RTP流的应用。
9.在非抢占式优先级排队中,一旦开始分组的发送,它就不会被打断。
在抢占式优先级排队中,当一个比目前分组有着更高优先级的分组到达时,即使目前的分组没有传送完毕,也会被打断,来传送更高优先级的分组。
20210911#_《计算机⽹络-⾃顶向下》第1章计算机⽹络1.1 什么是因特⽹1.1.1 具体构成描述计算机⽹络(computer network)主机(host)或端系统(end system)通信链路(communication link)和分组交换机(packet switch)传输速率(transmission rate)分组(packet)路由器(router)链路层交换机(link-layer switch)路径(mute或path)因特⽹服务提供商(Internet Service Provider, ISP)协议(protocol)TCP (Transmission Control Protocol,传输控制协议)和IP (Internet Protocol,⽹际协议)因特⽹标准(Internet standard)由因特⽹⼯程任务组(Internet Engineering Task Force, IETF )请求评论(Request For Comment, RFC)1.1.2 服务描述分布式应⽤程序(distributed applicalion)套接字接⼝( socket interface),1.1.3 什么是协议1.2 ⽹络边缘客户(client)和服务器(server)数据中⼼(data center)1.2.1 接⼊⽹接⼊⽹边缘路由器(edge router)1.家庭接⼊:DSL、电缆、FTTH、拨号和卫星数字⽤户线(Digital Subscriber Line,DSL)复⽤器(DSLAM)电缆因特⽹接⼊(cable Internet access)所以它经常被称为混合光纤同轴(Hybrid Fiber Coax, HFC)系统。
电缆因特⽹接⼊需要特殊的调制解调器,这种调制解调器称为电缆调制解调器(cablemodem)电缆调制解调器端接系统(Cable Modem Termination System, CMTS)光纤到户(Fiber To The Home, FTTH)进⾏这种分配有两种有竞争性的光纤分布体系结构:主动光纤⽹络(Active Optical Network,AON)被动光纤⽹络(Passive Optical Network, P0N)光纤⽹络端接器(Optical Network Terminator, ONT)分配器(splitter)光纤线路端接器(Optical Line Tenninator, OLT)2.企业(和家庭)接⼊:以太⽹和WiFi3.⼴域⽆线接⼊:3G和LTELTE (长期演进“Long-Term Evolution”的缩写,被评为最差⾸字母缩写词年度奖候选者)1.2.2 物理媒体HFC使⽤了光缆和同轴电缆相结合的技术。
计算机网络(第三版)习题答案-自顶向下方法与Internet特色1复习题1.没有不同。
主机和端系统可以互换。
端系统包括PC,工作站,WEB服务器,邮件服务器,网络连接的PDA,网络电视等等。
(张士波)2.假设爱丽丝是国家A的大使,想邀请国家B的大使鲍勃吃晚餐。
爱丽丝没有简单的打个电话说“现在我们一起吃晚餐吧”。
而是她先打电话给鲍勃建议吃饭的日期与时间。
鲍勃可能会回复说那天不行,另外一天可以。
爱丽丝与鲍勃不停的互发讯息直到他们确定一致的日期与时间。
鲍勃会在约定时间(提前或迟到不超过15分钟)出现在大使馆。
外交协议也允许爱丽丝或者鲍勃以合理的理由礼貌的退出约会。
3.联网(通过网络互联)的程序通常包括2个,每一个运行在不同的主机上,互相通信。
发起通信的程序是客户机程序。
一般是客户机请求和接收来自服务器程序的服务。
4.互联网向其应用提供面向连接服务(TCP)和无连接服务(UDP)2种服务。
每一个互联网应用采取其中的一种。
面相连接服务的原理特征是:①在都没有发送应用数据之前2个端系统先进行“握手”。
②提供可靠的数据传送。
也就是说,连接的一方将所有应用数据有序且无差错的传送到连接的另一方。
③提供流控制。
也就是,确保连接的任何一方都不会过快的发送过量的分组而淹没另一方。
④提供拥塞控制。
即管理应用发送进网络的数据总量,帮助防止互联网进入迟滞状态。
无连接服务的原理特征:①没有握手②没有可靠数据传送的保证③没有流控制或者拥塞控制5.流控制和拥塞控制是两个面向不同的对象的不同的控制机理。
流控制保证连接的任何一方不会因为过快的发送过多分组而淹没另一方。
拥塞控制是管理应用发送进网络的数据总量,帮助防止互联网核心(即网络路由器的缓冲区里面)发生拥塞。
6.互联网面向连接服务通过使用确认,重传提供可靠的数据传送。
当连接的一方没有收到它发送的分组的确认(从连接的另一方)时,它会重发这个分组。
7.电路交换可以为呼叫的持续时间保证提供一定量的端到端的带宽。
计算机⽹络⾃顶向下第七版第七章答案Computer Networking: A Top-Down Approach,7th Edition计算机⽹络⾃顶向下第七版Solutions to Review Questions and ProblemsChapter 7 Review Questions1.In infrastructure mode of operation, each wireless host is connected to the largernetwork via a base station (access point). If not operating in infrastructure mode, a network operates in ad-hoc mode. In ad-hoc mode, wireless hosts have noinfrastructure with which to connect. In the absence of such infrastructure, the hosts themselves must provide for services such as routing, address assignment, DNS-like name translation, and more.2.a) Single hop, infrastructure-basedb) Single hop, infrastructure-lessc) Multi-hop, infrastructure-basedd) Multi-hop, infrastructure-less3.Path loss is due to the attenuation of the electromagnetic signal when it travelsthrough matter. Multipath propagation results in blurring of the received signal at the receiver and occurs when portions of the electromagnetic wave reflect off objects and ground, taking paths of different lengths between a sender and receiver. Interference from other sources occurs when the other source is also transmitting in the samefrequency range as the wireless network.4.a) Increasing the transmission powerb) Reducing the transmission rate5.APs transmit beacon frames. An AP’s beacon frames will be transmitted over one ofthe 11 channels. The beacon frames permit nearby wireless stations to discover and identify the AP.6.False7.APs transmit beacon frames. An AP’s beacon frames will be transmitted over one ofthe 11 channels. The beacon frames permit nearby wireless stations to discover and identify the AP.8.False9.Each wireless station can set an RTS threshold such that the RTS/CTS sequence isused only when the data frame to be transmitted is longer than the threshold. This ensures that RTS/CTS mechanism is used only for large frames.10.No, there wouldn’t be any advantage. Suppose there are two stations that want totransmit at the same time, and they both use RTS/CTS. If the RTS frame is as long asa DATA frames, the channel would be wasted for as long as it would have beenwasted for two colliding DATA frames. Thus, the RTS/CTS exchange is only useful when the RTS/CTS frames are significantly smaller than the DATA frames.11.Initially the switch has an entry in its forwarding table which associates the wirelessstation with the earlier AP. When the wireless station associates with the new AP, the new AP creates a frame with the wireless station’s MAC address and broadcasts the frame. The frame is received by the switch. This forces the switch to update itsforwarding table, so that frames destined to the wireless station are sent via the new AP.12.Any ordinary Bluetooth node can be a master node whereas access points in 802.11networks are special devices (normal wireless devices like laptops cannot be used as access points).13.False14.“Opportunistic Scheduling” refers to matching the physical layer protocol to channelconditions between the sender and the receiver, and choosing the receivers to which packets will be sent based on channel condition. This allows the base station to make best use of the wireless medium.15.UMTS to GSM and CDMA-2000 to IS-95.16.The data plane role of eNodeB is to forward datagram between UE (over the LTEradio access network) and the P-GW. Its control plane role is to handle registration and mobility signaling traffic on behalf of the UE.The mobility management entity (MME) performs connection and mobility management on behalf of the UEs resident in the cell it controls. It receives UE subscription information from the HHS.The Packet Data Network Gateway (P-GW) allocates IP addresses to the UEs and performs QoS enforcement. As a tunnel endpoint it also performs datagram encapsulation/decapsulation when forwarding a datagram to/from a UE.The Serving Gateway (S-GW) is the data-plane mobility anchor point as all UE traffic will pass through the S-GW. The S-GW also performs charging/billing functions and lawful traffic interception.17.In 3G architecture, there are separate network components and paths for voice anddata, i.e., voice goes through public telephone network, whereas data goes through public Internet. 4G architecture is a unified, all-IP network architecture, i.e., both voice and data are carried in IP datagrams to/from the wireless device to several gateways and then to the rest of the Internet.The 4G network architecture clearly separates data and control plane, which is different from the 3G architecture.The 4G architecture has an enhanced radio access network (E-UTRAN) that is different from 3G’s radio access network UTRAN.18.No. A node can remain connected to the same access point throughout its connectionto the Internet (hence, not be mobile). A mobile node is the one that changes its point of attachment into the network over time. Since the user is always accessing theInternet through the same access point, she is not mobile.19.A permanent address for a mobile node is its IP address when it is at its homenetwork. A care-of-address is the one its gets when it is visiting a foreign network.The COA is assigned by the foreign agent (which can be the edge router in theforeign network or the mobile node itself).20.False21.The home network in GSM maintains a database called the home location register(HLR), which contains the permanent cell phone number and subscriber profileinformation about each of its subscribers. The HLR also contains information about the current locations of these subscribers. The visited network maintains a database known as the visitor location register (VLR) that contains an entry for each mobile user that is currently in the portion of the network served by the VLR. VLR entries thus come and go as mobile users enter and leave the network.The edge router in home network in mobile IP is similar to the HLR in GSM and the edge router in foreign network is similar to the VLR in GSM.22.Anchor MSC is the MSC visited by the mobile when a call first begins; anchor MSCthus remains unchanged during the call. Throughout the call’s duration and regardless of the number of inter-MSC transfers performed by the mobile, the call is routed from the home MSC to the anchor MSC, and then from the anchor MSC to the visited MSC where the mobile is currently located.23.a) Local recoveryb) TCP sender awareness of wireless linksc) Split-connection approachesChapter 7 ProblemsProblem 1Output corresponding to bit d 1 = [-1,1,-1,1,-1,1,-1,1]Output corresponding to bit d 0 = [1,-1,1,-1,1,-1,1,-1]Problem 2Sender 2 output = [1,-1,1,1,1,-1,1,1]; [ 1,-1,1,1,1,-1,1,1]Problem 3181111)1()1(111111)1()1(1112=?+?+-?-+?+?+?+-?-+?=d 181111)1()1(111111)1()1(1122=?+?+-?-+?+?+?+-?-+?=dProblem 4Sender 1: (1, 1, 1, -1, 1, -1, -1, -1)Sender 2: (1, -1, 1, 1, 1, 1, 1, 1)Problem 5a) The two APs will typically have different SSIDs and MAC addresses. A wirelessstation arriving to the café will associate with one of the SSIDs (that is, one of the APs). After association, there is a virtual link between the new station and the AP. Label the APs AP1 and AP2. Suppose the new station associates with AP1. When the new station sends a frame, it will be addressed to AP1. Although AP2 will alsoreceive the frame, it will not process the frame because the frame is not addressed to it. Thus, the two ISPs can work in parallel over the same channel. However, the two ISPs will be sharing the same wireless bandwidth. If wireless stations in different ISPs transmit at the same time, there will be a collision. For 802.11b, the maximum aggregate transmission rate for the two ISPs is 11 Mbps.b) Now if two wireless stations in different ISPs (and hence different channels) transmitat the same time, there will not be a collision. Thus, the maximum aggregatetransmission rate for the two ISPs is 22 Mbps for 802.11b.Problem 6Suppose that wireless station H1 has 1000 long frames to transmit. (H1 may be an AP that is forwarding an MP3 to some other wireless station.) Suppose initially H1 is the onlystation that wants to transmit, but that while half-way through transmitting its first frame, H2 wants to transmit a frame. For simplicity, also suppose every station can hear every other station’s signal (that is, no hidden terminals). Before transmitting, H2 will sense that the channel is busy, and therefore choose a random backoff value.Now suppose that after sending its first frame, H1 returns to step 1; that is, it waits a short period of times (DIFS) and then starts to transmit the second frame. H1’s second frame will then be transmitted while H2 is stuck in backoff, waiting for an idle channel. Thus, H1 should get to transmit all of its 1000 frames before H2 has a chance to access the channel. On the other hand, if H1 goes to step 2 after transmitting a frame, then it too chooses a random backoff value, thereby giving a fair chance to H2. Thus, fairness was the rationale behind this design choice.Problem 7A frame without data is 32 bytes long. Assuming a transmission rate of 11 Mbps, the time to transmit a control frame (such as an RTS frame, a CTS frame, or an ACK frame) is (256 bits)/(11 Mbps) = 23 usec. The time required to transmit the data frame is (8256 bits)/(11 Mbps) = 751DIFS + RTS + SIFS + CTS + SIFS + FRAME + SIFS + ACK= DIFS + 3SIFS + (3*23 + 751) usec = DIFS + 3SIFS + 820 usecProblem 8a) 1 message/ 2 slotsb) 2 messages/slotc) 1 message/slota)i) 1 message/slotii) 2 messages/slotiii) 2 messages/slotb)i) 1 message/4 slotsii) slot 1: Message A→ B, message D→ Cslot 2: Ack B→ Aslot 3: Ack C→ D= 2 messages/ 3 slotsiii)slot 1: Message C→ Dslot 2: Ack D→C, message A→ BRepeatslot 3: Ack B→ A= 2 messages/3 slotsProblem 10a)10 Mbps if it only transmits to node A. This solution is not fair since only A is gettingserved. By “fair” it m eans that each of the four nodes should be allotted equal number of slots.b)For the fairness requirement such that each node receives an equal amount of dataduring each downstream sub-frame, let n1, n2, n3, and n4 respectively represent the number of slots that A, B, C and D get. Now,data transmitted to A in 1 slot = 10t Mbits(assuming the duration of each slot to be t)Hence,Total amount of data transmitted to A (in n1 slots) = 10t n1Similarly total amounts of data transmitted to B, C, and D equal to 5t n2, 2.5t n3, and t n4 respectively.Now, to fulfill the given fairness requirement, we have the following condition:10t n1 = 5t n2 = 2.5t n3 = t n4Hence,n2 = 2 n1n3 = 4 n1n4 = 10 n1Now, the total number of slots is N. Hence,n1+ n2+ n3+ n4 = Ni.e. n1+ 2 n1 + 4 n1 + 10 n1 = Ni.e. n1 = N/17Hence,n2 = 2N/17n3 = 4N/17n4 = 10N/17The average transmission rate is given by:(10t n1+5t n2+ 2.5t n3+t n4)/tN= (10N/17 + 5 * 2N/17 + 2.5 * 4N/17 + 1 * 10N/17)/N= 40/17 = 2.35 Mbpsc)Let node A receives twice as much data as nodes B, C, and D during the sub-frame.Hence,10tn1 = 2 * 5tn2 = 2 * 2.5tn3 = 2 * tn4i.e. n2 = n1n3 = 2n1n4 = 5n1Again,n1 + n2 + n3 + n4 = Ni.e. n 1+ n1 + 2n1 + 5n1 = Ni.e. n1 = N/9Now, average transmission rate is given by:(10t n1+5t n2+ 2.5t n3+t n4)/tN= 25/9 = 2.78 MbpsSimilarly, considering nodes B, C, or D receive twice as much data as any other nodes, different values for the average transmission rate can be calculated.Problem 11a)No. All the routers might not be able to route the datagram immediately. This isbecause the Distance Vector algorithm (as well as the inter-AS routing protocols like BGP) is decentralized and takes some time to terminate. So, during the time when the algorithm is still running as a result of advertisements from the new foreign network, some of the routers may not be able to route datagrams destined to the mobile node.b)Yes. This might happen when one of the nodes has just left a foreign network andjoined a new foreign network. In this situation, the routing entries from the oldforeign network might not have been completely withdrawn when the entries from the new network are being propagated.c)The time it takes for a router to learn a path to the mobile node depends on thenumber of hops between the router and the edge router of the foreign network for the node.Problem 12If the correspondent is mobile, then any datagrams destined to the correspondent would have to pass through the correspondent’s home agent. The foreign agent in the network being visited would also need to be involved, since it is this foreign agent thatnotifies the correspondent’s home agent of the location of the correspondent. Datagrams received by the correspondent’s home agent would need to be encapsulated/tunneled between the correspondent’s home agent and for eign agent, (as in the case of the encapsulated diagram at the top of Figure 6.23.Problem 13Because datagrams must be first forward to the home agent, and from there to the mobile, the delays will generally be longer than via direct routing. Note that it is possible, however, that the direct delay from the correspondent to the mobile (i.e., if the datagram is not routed through the home agent) could actually be smaller than the sum of the delay from thecorrespondent to the home agent and from there to the mobile. It would depend on the delays on these various path segments. Note that indirect routing also adds a home agent processing (e.g., encapsulation) delay.Problem 14First, we note that chaining was discussed at the end of section 6.5. In the case of chaining using indirect routing through a home agent, the following events would happen: ?The mobile node arrives at A, A notifies the home agent that the mobile is now visiting A and that datagrams to the mobile should now be forwarded to thespecified care-of-address (COA) in A.The mobile node moves to B. The foreign agent at B must notify the foreign agent at A that the mobile is no longer resident in A but in fact is resident in Band has the specified COA in B. From then on, the foreign agent in A willforward datagrams it receives that are addressed to the mobile’s COA in A to t he mobile’s COA in B.The mobile node moves to C. The foreign agent at C must notify the foreign agent at B that the mobile is no longer resident in B but in fact is resident in C and has the specified COA in C. From then on, the foreign agent in B will forwarddatagrams it receives (from the foreign agent in A) that are addressed to themobile’s COA in B to the mobile’s COA in C.Note that when the mobile goes offline (i.e., has no address) or returns to its home network, the datagram-forwarding state maintained by the foreign agents in A, B and C must be removed. This teardown must also be done through signaling messages. Note that the home agent is not aware of the mobile’s mobility beyond A, and that the correspondent is not at all aware of the mobil e’s mobility.In the case that chaining is not used, the following events would happen: ?The mobile node arrives at A, A notifies the home agent that the mobile is now visiting A and that datagrams to the mobile should now be forwarded to thespecified care-of-address (COA) in A.The mobile node moves to B. The foreign agent at B must notify the foreign agent at A and the home agent that the mobile is no longer resident in A but infact is resident in B and has the specified COA in B. The foreign agent in A can remove its state about the mobile, since it is no longer in A. From then on, thehome agent will forward datagrams it receives that are addressed to the mobile’sCOA in B.The mobile node moves to C. The foreign agent at C must notify the foreign agent at B and the home agent that the mobile is no longer resident in B but in fact is resident in C and has the specified COA in C. The foreign agent in B canremove its state about the mobile, since it is no longer in B. From then on, thehome agent will forward datagrams it receives that are addressed to the mobile’sCOA in C.When the mobile goes offline or returns to its home network, the datagram-forwarding state maintained by the foreign agent in C must be removed. This teardown must also bedone through signaling messages. Note that the home agent is always aware of the mobile’s cu rrent foreign network. However, the correspondent is still blissfully unaware of the mobile’s mobility.Problem 15Two mobiles could certainly have the same care-of-address in the same visited network. Indeed, if the care-of-address is the address of the foreign agent, then this address would be the same. Once the foreign agent decapsulates the tunneled datagram and determines the address of the mobile, then separate addresses would need to be used to send the datagrams separately to their different destinations (mobiles) within the visited network.Problem 16If the MSRN is provided to the HLR, then the value of the MSRN must be updated in the HLR whenever the MSRN changes (e.g., when there is a handoff that requires the MSRN to change). The advantage of having the MSRN in the HLR is that the value can be provided quickly, without querying the VLR. By providing the address of the VLR Rather than the MSRN), there is no need to be refreshing the MSRN in the HLR.。