一、網(wǎng)絡(luò)層
4.1 ~4.2 節(jié)
R1.
問題:Let's review some of the terms used in this book. Earlier, we talked about how the name of a packet at the transport layer is a message segment, and the name of a packet at the data link layer is a frame. What is the name of the network layer packet? As mentioned earlier routers and link layer switches are called packet switches. What is the fundamental difference between a router and a link layer switch? Recall that we use vocabulary routers for both datagram networks and virtual circuit networks
翻譯:我們回顧一下在本書中使用的某些術(shù)語。前面講過運(yùn)輸層的分組名字是報(bào)文段,數(shù)據(jù)鏈路層的分組名字是幀。網(wǎng)絡(luò)層分組的名字是什么?前面講過路由器和鏈路層交換機(jī)都被稱為分組交換機(jī)。路由器與鏈路層交換機(jī)間的根本區(qū)別是什么?回想我們對(duì)數(shù)據(jù)報(bào)網(wǎng)絡(luò)和虛電路網(wǎng)絡(luò)都使用詞匯路由器
答:網(wǎng)絡(luò)層的分組名字叫做數(shù)據(jù)報(bào)。
路由器和鏈路層交換機(jī)間的根本區(qū)別:路由器是基于網(wǎng)絡(luò)層字段中的值做決定,而鏈路層交換機(jī)是根據(jù)鏈路層字段中的值做轉(zhuǎn)發(fā)決定。
R2.
問題:What are the two most important functions of the network layer in a datagram network? What are the 3 most important functions of the network layer in a virtual circuit network?
翻譯:在數(shù)據(jù)報(bào)網(wǎng)絡(luò)中,網(wǎng)絡(luò)層的兩個(gè)最重要功能是什么?虛電路網(wǎng)絡(luò)中網(wǎng)絡(luò)層的3 個(gè)最重要的功能是什么?
答:數(shù)據(jù)報(bào)網(wǎng)絡(luò)中網(wǎng)絡(luò)層最重要的兩個(gè)功能:①轉(zhuǎn)發(fā),即當(dāng)一個(gè)分組到達(dá)路由器的一條輸入鏈路時(shí),路由器必須將該分組移動(dòng)到適當(dāng)?shù)妮敵鲦溌?;②路由選擇,即當(dāng)分組從發(fā)送方流向接受方時(shí),網(wǎng)絡(luò)層必須決定這些分組所采用的路由或路徑;
虛電路網(wǎng)絡(luò)中網(wǎng)絡(luò)層的3個(gè)最重要的功能是:①建立連接;②轉(zhuǎn)發(fā);③路由選擇。比在數(shù)據(jù)報(bào)網(wǎng)絡(luò)中多了一個(gè)功能,連接建立。
R3.
問題:What is the difference between routing and forwarding?
翻譯:路由選擇和轉(zhuǎn)發(fā)的區(qū)別是什么?
答:轉(zhuǎn)發(fā)是指將分組從一個(gè)輸入鏈路接口轉(zhuǎn)移到適當(dāng)?shù)妮敵鲦溌方涌诘穆酚善鞅镜貏?dòng)作。路由選擇是指網(wǎng)絡(luò)范圍的過程,以決定分組從源到目的地所采取的端到端路徑。
舉個(gè)例子,駕車從A到B,有很多路徑可以選擇,而最終選擇哪條路徑,這是路由選擇的概念;選好了路徑之后,按著這條路徑走的時(shí)候,中間遇到立交橋(連接很多路),要根據(jù)之間選好的路,正確地選擇立交橋的出口,從進(jìn)入立交橋到選擇出口出來,這個(gè)過程是轉(zhuǎn)發(fā)的概念。
R4.
問題:Do routers use forwarding tables in both datagram networks and virtual circuit networks? If yes, describe the forwarding tables used for both types of networks.
翻譯:在數(shù)據(jù)報(bào)網(wǎng)絡(luò)和虛電路網(wǎng)絡(luò)中,路由器都使用轉(zhuǎn)發(fā)表嗎?如果是,描述用于這兩類網(wǎng)絡(luò)的轉(zhuǎn)發(fā)表。
答:在數(shù)據(jù)報(bào)網(wǎng)絡(luò)和虛電路網(wǎng)絡(luò)中,路由器都使用轉(zhuǎn)發(fā)表。
在虛電路中,每當(dāng)跨越一個(gè)路由器創(chuàng)建一條新的虛電路時(shí),轉(zhuǎn)發(fā)表就建立一個(gè)新項(xiàng)。類似地,無論何時(shí)終止一條虛電路時(shí),就刪除沿著該路徑每個(gè)表中的相應(yīng)項(xiàng)。所以虛電路中的轉(zhuǎn)發(fā)表更新很快。但在數(shù)據(jù)報(bào)網(wǎng)絡(luò)中,轉(zhuǎn)發(fā)表是由選路算法修改的,所以更新速度比較慢。
R5.
問題:Describes some hypothetical service that some network layer can provide for a single packet. The same description is given for packet flows. Does the network layer of the Internet provide you with these hypothetical services, does the CBR service model of ATM provide this hypothetical service, and does the ABR service model of ATM provide this hypothetical service?
翻譯:描述某些網(wǎng)絡(luò)層能為單個(gè)分組提供的某些假想的服務(wù)。對(duì)于分組流進(jìn)行相同的描述。因特網(wǎng)的網(wǎng)絡(luò)層為你提供了這些假想服務(wù)嗎?ATM的CBR服務(wù)模型提供了該假想服務(wù)嗎?ATM的ABR服務(wù)模型提供類該假想服務(wù)嗎?
答:單個(gè)分組:無丟失保證,保證最大延遲。
分組流:按順序傳送,最小寬帶保證,定時(shí)保證。
因特網(wǎng)的網(wǎng)絡(luò)層提供的是盡力而為模型,無帶寬保證,無無丟包保證,不保證有序,不維護(hù)定時(shí),沒有擁塞指示。
CBR(Constant Bit Rate)保證恒定速率,提供無丟包保證,保證有序,維護(hù)定時(shí),不出現(xiàn)擁塞。
ABR(Available Bit Rate)保證最小速率,不提供無丟包保證, 不維護(hù)定時(shí),但保證有序,并提供擁塞指示。
R6
問題:List some of the applications that benefit from ATM's CBR service model.
翻譯:列出某些得益于ATM的CBR服務(wù)模型的應(yīng)用。
答:IP電話和視頻會(huì)議。CBR服務(wù)在承載實(shí)時(shí)、恒定比特率的音頻和視頻流量方面很適用。
4.3 節(jié)
R7.
問題:Discuss why a shadow copy of the forwarding table is stored on each input port of the high-speed router.
翻譯:討論為什么在高速路由器的每個(gè)輸入端口都存儲(chǔ)轉(zhuǎn)發(fā)表的影子副本。
答:因?yàn)橛辛擞白痈北?,轉(zhuǎn)發(fā)決策能在每個(gè)輸入端口本地做出,無須調(diào)用中央路由選擇處理器,可以避免集中式處理的瓶頸。(轉(zhuǎn)發(fā)表是由路由器選擇處理器計(jì)算和更新的,但每個(gè)輸入端口都會(huì)存儲(chǔ)一份轉(zhuǎn)發(fā)表的副本)。
R8.
問題:Three types of exchange structures are discussed in Section 4.3. List and briefly discuss each type of switching fabric. Which one (if any) is capable of sending multiple packets in parallel across the switching structure?
翻譯:4.3節(jié)中討論了3類交換結(jié)構(gòu)。列出并簡要討論每一類交換結(jié)構(gòu)。哪一種(如果有的話)能夠跨越交換結(jié)構(gòu)并行發(fā)送多個(gè)分組?
答:(1)經(jīng)內(nèi)存交換:這種就像是計(jì)算機(jī)(最簡單、最原始的路由器就是計(jì)算機(jī)),在輸入端口與輸出端口之間的交換是在CPU(路由選擇處理器)的直接控制下完成的。
(2)經(jīng)總線交換:輸入端口經(jīng)一根共享總線將分組直接傳送到輸出端口,不需要選路處理器的干預(yù)。因?yàn)槊總€(gè)分組必須跨越單一總線(同時(shí)只能有一個(gè)分組可以跨越總線),所以路由器的交換寬帶受總線速率的限制。
(3)經(jīng)互聯(lián)網(wǎng)絡(luò)交換:可以克服單一、共享式總線帶寬限制,可以并行轉(zhuǎn)發(fā)多個(gè)分組。但如果來自兩個(gè)不同輸入端口的兩個(gè)分組其目的地為相同的輸出端口,則一個(gè)分組必須在輸入端等待。
綜上,經(jīng)互聯(lián)網(wǎng)絡(luò)交換的縱橫式交換機(jī)可以跨越交換結(jié)構(gòu)并行發(fā)送多個(gè)分組。
R9.
問題:Describe the reasons why packet loss can occur at the input port. Describe how to eliminate packet loss at the input port (without using an infinite buffer).
翻譯:描述在輸入端口會(huì)出現(xiàn)分組丟失的原因。描述在輸入端口如何消除分組丟失(不使用無限大緩存區(qū))。
答:當(dāng)輸出端入的排隊(duì)情況太多,足以耗盡輸入端口的存儲(chǔ)空間,所以分組就被丟棄了。如果交換結(jié)構(gòu)的速率至少是輸入線路速率的n倍,則在輸入端口處不會(huì)出現(xiàn)排隊(duì)。
R10.
問題:Describe the reasons for packet loss at the output port. Can this loss be prevented by increasing the switching fabric rate?
翻譯:描述在輸出端口出現(xiàn)分組丟失的原因。通過增加交換結(jié)構(gòu)速率,能夠防止這種丟失嗎?
答:當(dāng)多個(gè)分組到達(dá)輸出端口,并在輸出端口排隊(duì)等候,當(dāng)耗盡輸出端口的存儲(chǔ)空間時(shí),分組就被丟棄了。通過增加交換結(jié)構(gòu)速率只會(huì)讓排隊(duì)的分組更多(其他條件相同),并不能防止這種丟失。
R11.
問題:What is HOL blocking? Does it appear on the input port or the output port?
翻譯:什么是HOL阻塞?它出現(xiàn)在輸入端口還是輸出端口?
答:HOL(Head-Of-the-Line),即在一個(gè)輸入隊(duì)列中排隊(duì)的分組必須等待通過交換結(jié)構(gòu)發(fā)送(即使輸出端口是空閑的),因?yàn)樗晌挥诰€路前部的另一個(gè)分組阻塞。HOL阻塞出現(xiàn)在輸入端口。
4.4 節(jié)
R12.
問題:Does the router have an IP address? If so, how many are there?
翻譯:路由器有IP地址嗎?如果有,有多少個(gè)?
答:有。路由器的每個(gè)接口都有一個(gè)全球唯一的IP地址。
R13.
問題:What is the 32-bit binary equivalent form of the IP address 223.1.3.27?
翻譯:IP地址223.1.3.27的32比特二進(jìn)制等價(jià)形式是什么?
答:11011111.00000001.00000011.00011100。
R14.
問題:Examine the host that uses DHCP to obtain its IP address, network mask, default router and the IP address of its local DNS server. List these values.
翻譯:考察使用DHCP獲得它的IP地址,網(wǎng)絡(luò)掩碼,默認(rèn)路由器和其本地DNS服務(wù)器的IP地址的主機(jī)。列出這些值。
答:TODO
R15.
問題:Suppose there are 3 routers between a source host and a destination host. How many ports will an IP message sent from the source host to the destination host pass through, regardless of fragmentation? How many forwarding tables need to be retrieved in order to move the datagram from the source to the destination?
翻譯:假設(shè)在一個(gè)源主機(jī)和一個(gè)目的主機(jī)之間有3臺(tái)路由器。不考慮分片,一個(gè)從源主機(jī)發(fā)送給目的主機(jī)的IP報(bào)文將通過多少個(gè)端口?為了將數(shù)據(jù)報(bào)從源移動(dòng)到目的地需要檢索多少個(gè)轉(zhuǎn)發(fā)表?
答:IP報(bào)文將通過8個(gè)端口:源主機(jī)和目的主機(jī)各一個(gè),每臺(tái)路由器各兩個(gè)(輸入端口和輸出端口);需要檢索3個(gè)轉(zhuǎn)發(fā)表(每臺(tái)路由器檢索一次)。
R16.
問題:Suppose an application generates a 40-byte block of data every 20ms, with each block encapsulated in a TCP message, and the TCP message encapsulated in an IP datagram. What is the overhead of each datagram? What is the percentage of application data?
翻譯:假設(shè)某應(yīng)用每20ms生成一個(gè)40字節(jié)的數(shù)據(jù)塊,每塊封裝在一個(gè)TCP報(bào)文中,TCP報(bào)文再封裝在一個(gè)IP數(shù)據(jù)報(bào)中。每個(gè)數(shù)據(jù)報(bào)的開銷有多大?應(yīng)用數(shù)據(jù)所占的百分比是多少?
答:每個(gè)數(shù)據(jù)包的開銷是80個(gè)字節(jié):20字節(jié)的IP首部(假設(shè)首部無選項(xiàng),且數(shù)據(jù)包無分片) + 20字節(jié)的TCP首部 + 應(yīng)用層報(bào)文(40字節(jié)),所以應(yīng)用數(shù)據(jù)所占的百分比是50%。
R17.
問題:Suppose that Host A sends a TCP message segment encapsulated in an IP datagram to Host B. When Host B receives that datagram, how should the network layer in Host B know that it should give that message segment (i.e., the datagram payload) to TCP instead of UDP or some other thing?
翻譯:假設(shè)主機(jī)A向主機(jī)B發(fā)送封裝在一個(gè)IP數(shù)據(jù)報(bào)中的TCP報(bào)文段。當(dāng)主機(jī)B接收到該數(shù)據(jù)報(bào)時(shí),主機(jī)B中的網(wǎng)絡(luò)層應(yīng)該如何知道它應(yīng)當(dāng)將該報(bào)文段(即數(shù)據(jù)報(bào)的有效載荷)交給TCP而不是UDP或某個(gè)其他東西呢?
答:通過數(shù)據(jù)包中的協(xié)議字段:該字段指示了IP數(shù)據(jù)報(bào)的數(shù)據(jù)部分應(yīng)該交給哪個(gè)特定的運(yùn)輸層協(xié)議。例如,值為6表明數(shù)據(jù)部分要交給TCP,而值為17表明數(shù)據(jù)要交給UDP。
R18.
問題:Assume that you purchased a wireless router and connected it to a cable modem, and that your ISP dynamically assigns an IP address to the device you are connected to (i.e., your wireless router). Assume also that you have 5 PCs in your house, all connected wirelessly to the wireless router using 802.11. How do I assign IP addresses to these 5 PCs? Does the wireless router use NAT? Why?
翻譯:假定你購買了一個(gè)無線路由器并將其與電纜調(diào)制解調(diào)器相連,并且你的ISP動(dòng)態(tài)地為你連接的設(shè)備(即你的無線路由器)分配一個(gè)IP地址。還假定你家有5臺(tái)PC,均使用802.11以無線方式與該無線路由器相連。怎樣為這5臺(tái)PC分配IP地址?該無線路由器使用NAT嗎?為什么?
答:①使用DHCP(動(dòng)態(tài)主機(jī)配置協(xié)議,Dynamic Host Configuration)給設(shè)備分配地址,DHCP允許主機(jī)自動(dòng)獲取一個(gè)IP地址。
②使用NAT(網(wǎng)絡(luò)地址轉(zhuǎn)換,Network Address Translation),因?yàn)樗荒軓腎SP獲得一個(gè)IP地址。從本質(zhì)上講,NAT使能路由器對(duì)外界隱藏了家庭網(wǎng)絡(luò)的細(xì)節(jié)。
R19.
問題:Compare IPv4 and IPv6 prefix fields. Do they have certain fields that are the same?
翻譯:比較IPv4和IPv6首部字段。它們有某些字段是相同的嗎?
答:有,除了分片,首部檢驗(yàn)和和選項(xiàng),其它字段在IPv6中都存在。
R20.
問題:Some people say that when IPv6 builds a tunnel through an IPv4 router. IPv6 uses the IPv4 tunnel as a link layer protocol. Do you agree with this statement? Why?
翻譯:有人說當(dāng)IPv6通過IPv4路由器建隧道時(shí)。IPv6將IPv4隧道作為鏈路層協(xié)議。你同意這種說法嗎?為什么?
答:可以這樣認(rèn)為,因?yàn)镮Pv6數(shù)據(jù)報(bào)被封裝在IPv4數(shù)據(jù)報(bào)中。
4.5 節(jié)
R21.
問題:Compare and contrast link state and distance vector routing algorithms?
翻譯:比較和對(duì)照鏈路狀態(tài)和距離向量路由選擇算法?
答:鏈路狀態(tài)路由選擇算法:以所有結(jié)點(diǎn)之間的連通性及所有鏈路的費(fèi)用的完整信息為輸入,計(jì)算本身可在某個(gè)場點(diǎn)進(jìn)行或在多個(gè)場點(diǎn)重復(fù)進(jìn)行。
距離向量算法:沒有結(jié)點(diǎn)擁有關(guān)于所有網(wǎng)絡(luò)鏈路費(fèi)用的完整信息,每個(gè)結(jié)點(diǎn)僅有與其直接相連鏈路的費(fèi)用知識(shí)即可,每個(gè)節(jié)點(diǎn)維護(hù)到網(wǎng)絡(luò)中所有其他結(jié)點(diǎn)的費(fèi)用(距離)估計(jì)的向量。
R22.
問題:Discuss how the hierarchical organization of the Internet has enabled it to scale to millions of users.
翻譯:討論因特網(wǎng)的等級(jí)制組織是怎樣使得其能夠擴(kuò)展為數(shù)以百萬計(jì)用戶的。
答:通過路由器組織進(jìn)自治系統(tǒng)(Autonomous System)來解決。每個(gè)AS由一組通常處在相同管理控制下的路由器組成,在相同的AS中的路由器都全部運(yùn)行同樣的路由選擇算法,且擁有彼此的信息。而這些AS又彼此互聯(lián),這樣,就將數(shù)以百萬級(jí)的用戶連接起來。
R23.
問題:Is it necessary to use the same AS internal routing algorithm for each autonomous system? Why?
翻譯:每個(gè)自治系統(tǒng)使用相同的AS內(nèi)部路由選路算法是必要的嗎?為什么?
答:有必要:①一個(gè)AS內(nèi)部路由器僅需要知道被AS內(nèi)的路由器,擴(kuò)展性得到了解決;②因?yàn)橐粋€(gè)組織可運(yùn)行它選擇的任何AS內(nèi)部路由選擇協(xié)議,管理責(zé)任的問題得到了解決;③相連的每對(duì)AS需要運(yùn)行相同的AS間路由選擇協(xié)議以交換可達(dá)性信息。
4.6 節(jié)
R24.
問題:Consider Figure 4-37. Starting with the initial table in D, assume that D receives the following notice from A:Does the table in D change? If so, how does it change?
翻譯:考慮圖4-37。從D中的初始表開始,假設(shè)D收到來自A的下面的通告:
D中的表會(huì)改變嗎?如果是,怎樣變化?
答:不會(huì)。因?yàn)楦鶕?jù)圖4-36,由路由器D到沿著最短路徑到目的子網(wǎng)z的為7跳距離,雖然此時(shí)收到來自A的通知,但通知中顯示,路由器假設(shè)下一跳到路由器C,到目的子網(wǎng)z有10跳的距離,比原來更遠(yuǎn),因此不會(huì)D不會(huì)更新其轉(zhuǎn)發(fā)表。
R25.
問題:Compare the announcements used by RIP and OSPF.
翻譯:比較RIP和OSPF使用的通告。
答:RIP是各路由器相鄰之間相互廣播。而OSPF是路由器向自治系統(tǒng)內(nèi)所有其他路由器廣播路由選擇信息,而不僅僅是向其相鄰路由器廣播。
R26.
問題:Fill in the blanks: RIP announcements usually declare the number of hops to each destination. BGP, on the other hand, advertises the number of _____ hops to each destination?
翻譯:填空:RIP通告通常宣稱到各目的地的跳數(shù)。另一方面,BGP則是通告到各目的地的_____?
答:路由上的AS序列。
R27.
問題:Why are different types of inter-AS and intra-AS routing protocols used in the Internet?
翻譯:為什么在因特網(wǎng)中用到了不同類型的AS間與AS內(nèi)部選路協(xié)議?
答:(1)策略:在AS之間,策略問題起主導(dǎo)作用, 而策略問題在AS內(nèi)部微不足道。
(2)規(guī)模:擴(kuò)展一個(gè)路由選擇算法及其數(shù)據(jù)結(jié)構(gòu)以處理大量網(wǎng)絡(luò)或大量網(wǎng)絡(luò)之間的路由選擇的這種能力,是AS間路由選擇的一個(gè)關(guān)鍵問題。而在一個(gè)AS內(nèi),可擴(kuò)展性不是關(guān)注的焦點(diǎn)。
(3)性能:AS間路由選擇是面向策略的,不太關(guān)心性能或質(zhì)量,然而在一個(gè)AS內(nèi)部,更多關(guān)注于一條路由實(shí)現(xiàn)的性能級(jí)別的實(shí)現(xiàn)。
R28.
問題:Why are policy considerations as important for intra-AS protocols (such as OSPF and RIP) as they are for inter-AS routing protocols (such as BGP)?
翻譯:為什么策略考慮對(duì)于AS內(nèi)部協(xié)議(如OSPF和RIP)與對(duì)于AS間路由選擇協(xié)議(如BGP)一樣重要呢?
答:在AS之間,策略問題是至關(guān)重要的。但在AS內(nèi)部,策略問題是微不足道的。
R29.
問題:Define and compare the following terms: subnets, prefixes, and BGP routes.
翻譯:定義和對(duì)比下列術(shù)語:子網(wǎng),前綴和BGP路由。
答:子網(wǎng)是較大網(wǎng)絡(luò)的一部分,不包含路由器,其邊界由路由器和主機(jī)接口定義。
前綴是地址的網(wǎng)絡(luò)部分,以a.b.c.d / x的形式寫入,每個(gè)前綴表示一個(gè)子網(wǎng)或多個(gè)子網(wǎng)的集合。
當(dāng)路由器在BGP會(huì)話中通告前綴時(shí),該前綴包含許多BGP屬性。 在BGP術(shù)語中,帶有屬性的前綴被稱為一條BGP路由。
R30.
問題:How does BGP use the NEXT-HOP attribute? How does it use the AS-PATH attribute?
翻譯:BGP是怎樣使用NEXT-HOP屬性的?它是怎樣使用AS-PATH屬性的?
答:AS-PATH屬性包含了前綴的通告已經(jīng)通過的那些AS,路由器使用該屬性來做三件事:①檢測通告;②阻止循環(huán)通知;③在多條路徑中選擇相同的前機(jī)綴。
NEXT-HOP是一個(gè)開始某AS-PATH的路由接口,路由器使用該屬性正確地配置轉(zhuǎn)發(fā)表。
R31.
問題:Describe how a network administrator at a higher-level ISP implements policies when configuring BGP.
翻譯:描述一個(gè)較高層ISP的網(wǎng)絡(luò)管理員在配置BGP時(shí)是如何實(shí)現(xiàn)策略的。
答:ISP的網(wǎng)絡(luò)管理員通過將已知的路由設(shè)置到其路由信息庫中,并向客戶通告這些信息。目前還沒有強(qiáng)制主干ISP之間如何路由選擇的官方標(biāo)準(zhǔn)。但商業(yè)運(yùn)行的ISP們都遵從的一個(gè)經(jīng)驗(yàn)法則是:任何穿越某ISP主干網(wǎng)的流量必須是其源或目的(或兩者)位于該ISP的某個(gè)客戶網(wǎng)絡(luò)中。
二、傳輸層
3. 1 ~3.3 節(jié)
R1
問題:The following services are assumed to be provided by the network layer. The network layer in the source host accepts a message segment with a maximum length of 1200 bytes and the address of the destination host from the transport layer. The network layer then ensures that the segment is delivered to the transport layer at the destination host. Assume that many network application processes can run on the destination host.
a Design the simplest possible transport layer protocol that will allow application data to reach the desired process at the destination host. Assume
Assume that the operating system in the destination host has assigned a 4-byte port number to each running application process.
b. Modify this protocol so that it provides a "return address" to the destination process.
c. In your protocol, does the transport layer "have to do anything" at the heart of the computer network?
翻譯:假定網(wǎng)絡(luò)層提供了下列服務(wù)。在源主機(jī)中的網(wǎng)絡(luò)層接受最大長度 1200 字節(jié)和來自運(yùn)輸層的目的主機(jī)地址的報(bào)文段。網(wǎng)絡(luò)層則保證將該報(bào)文段交付給位于目的主機(jī)的運(yùn)輸層。假定在目的主機(jī)上能夠運(yùn)行許多網(wǎng)絡(luò)應(yīng)用進(jìn)程。
a 設(shè)計(jì)可能最簡單的運(yùn)輸層協(xié)議,該協(xié)議將使應(yīng)用程序數(shù)據(jù)到達(dá)位于目的主機(jī)的所希望的進(jìn)程。假
設(shè)在目的主機(jī)中的操作系統(tǒng)已經(jīng)為每個(gè)運(yùn)行的應(yīng)用進(jìn)程分配了一個(gè) 4 字節(jié)的端口號(hào)。
b. 修改這個(gè)協(xié)議,使它向目的進(jìn)程提供一個(gè)的“返回地址”。
c. 在你的協(xié)議中,該運(yùn)輸層在計(jì)算機(jī)網(wǎng)絡(luò)的核心中“必須做任何事" 嗎?
答:a. 將此協(xié)議稱為簡單傳輸協(xié)議(STP)。在發(fā)送方,STP從發(fā)送進(jìn)程接受不超過1196字節(jié)的數(shù)據(jù)塊、目標(biāo)主機(jī)地址和目標(biāo)端口號(hào)。STP在每個(gè)塊中添加一個(gè)4字節(jié)的頭,并將目標(biāo)進(jìn)程的端口號(hào)放在這個(gè)標(biāo)頭中。然后,STP將目標(biāo)主機(jī)地址和結(jié)果段提供給網(wǎng)絡(luò)層。網(wǎng)絡(luò)層將段傳送到目標(biāo)主機(jī)上的STP,STP然后檢查段中的端口號(hào),從段中提取數(shù)據(jù),并將數(shù)據(jù)傳遞給由端口號(hào)標(biāo)識(shí)的進(jìn)程。
b. 段現(xiàn)在有兩個(gè)頭字段:源端口字段和目標(biāo)端口字段。在發(fā)送方,STP接受不超過1192字節(jié)的數(shù)據(jù)塊、目標(biāo)主機(jī)地址、源端口號(hào)和目標(biāo)端口號(hào)。STP創(chuàng)建一個(gè)段,其中包含應(yīng)用程序數(shù)據(jù)、源端口號(hào)和目標(biāo)端口號(hào)。然后,它將段和目標(biāo)主機(jī)地址捉供給網(wǎng)絡(luò)展。在接收到段后,接收主機(jī)上的STP給出應(yīng)用程序的應(yīng)用程序數(shù)據(jù)和源端口號(hào)。
c. 不,傳輸層不需要在核心中做任何事情;傳輸層“生命”在最終系統(tǒng)中。
R2.
問題:Consider a planet where each person belongs to some family of six, each family lives in its own house, each house has a unique
Each house has a unique address, and each person in a given family has a unique name. Assume that the planet has a postal service that delivers mail from the source family to the destination family.
A postal service delivers mail from the source home to the destination home. The mail service requires: a letter in an envelope; the address of the destination family clearly written on the envelope (and nothing else). Assume that each household has a family member representative who collects and distributes the letters for the other members of the household.
a. Using the solution to review problem R1 above as inspiration, describe the protocol that the family member representative can use to deliver letters from the sending family
member to the receiving family member for delivery of the letter.
b. In your protocol, must the Postal Service open the envelope and inspect the contents of the letter in order to provide its services?
翻譯:考慮有一個(gè)星球,每個(gè)人都屬于某個(gè)六口之家,每個(gè)家庭都住在自己的房子里,每個(gè)房子都一個(gè)唯
一的地址,并且某給定家庭中的每個(gè)人有一個(gè)獨(dú)特的名字。假定該星球有一個(gè)從源家庭到目的家庭
交付信件的郵政服務(wù)。該郵件服務(wù)要求: 個(gè)信封中有一封信; 在信封上清楚地寫上目的家庭的地址(并且沒有別的東西)。假設(shè)每個(gè)家庭有一名家庭成員代表為家庭中的其他成員收集和分發(fā)信件這些信沒有必要提供任何有關(guān)信的接收者的指示。
a. 使用對(duì)上面復(fù)習(xí)題 R1 的解決方案作為啟發(fā),描述家庭成員代表能夠使用的協(xié)議,以從發(fā)送家庭
成員向接收家庭成員交付信件。
b. 在你的協(xié)議中,該郵政服務(wù)必須打開信封并檢查信件內(nèi)容才能提供它的服務(wù)嗎?
答:a. 在寄信時(shí),家庭成員必須將信件本身、目的地住所的地址和收件人的姓名交給代表。委托將收件人的姓名清楚地寫在信函的頂部。然后,委托將信放入信封中,1并在信封上寫入目標(biāo)住宅的地址。然后,代表將這封信交給地球的郵件服務(wù)部門。在接收方,委托收到來自郵件服務(wù)的信函,從信封中取出信件,并記下在信件頂部寫的收件人姓名。然后,代表將這封信交給具有此名稱的家庭成員。
b. 不,郵件服務(wù)部門不必打開信封;它只檢查信封上的地址。
R3.
問題:Consider a TCP connection between host A and host B. Assume that the TCP message segment from Host A to Host 8 has a source port number, and a port number for h. What are the source and destination port numbers for the message segment from Host B to Host A?
翻譯:考慮在主機(jī) A 和主機(jī) B 之間有一條 TCP 連接。假設(shè)從主機(jī) A 傳送到主機(jī) 8 的 TCP 報(bào)文段具有源端口號(hào),和h的端口號(hào)外 對(duì)于從主機(jī) B 傳送到主機(jī) A 的報(bào)文段,源端口號(hào)和目的端口號(hào)分別是多少?
答:源端口號(hào)y和目標(biāo)端口號(hào)x。
R4.
問題:Describe the reasons why an application developer might choose to run the application on UDP rather than TCP.
翻譯:描述應(yīng)用程序開發(fā)者為什么可能選擇在 UDP 上運(yùn)行應(yīng)用程序而不是在 TCP 上運(yùn)行的原因。
答:應(yīng)用程序開發(fā)人員可能不希望其應(yīng)用程序使用TCP的擁塞控制,這會(huì)在擁塞時(shí)限制應(yīng)用程序的發(fā)送速率。通常,IP電話和IP視頻會(huì)議應(yīng)用程序的設(shè)計(jì)者選擇在UDP上運(yùn)行他們的應(yīng)用程序,因?yàn)樗麄兿M苊釺CP的擁塞控制。另外,有些應(yīng)用程序不需要TCP提供的可靠數(shù)據(jù)傳輸。
R5.
問題:Why is it that in today's Internet, voice and image traffic is often sent over TCP rather than over UDP. (Hint: The answer we are looking for has nothing to do with TCP's congestion control mechanism.)
翻譯:在今天的因特網(wǎng)中,為什么語音和圖像流量常常是經(jīng)過 TCP 而不是經(jīng) UDP 發(fā)送。(提示:我們尋找的答案與 TCP 的擁塞控制機(jī)制沒有關(guān)系。)
答:由于大多數(shù)防火墻都被配置為阻止UDP通信,因此使用TCP進(jìn)行視頻和語音通信可以讓通信通過防火墻。
R6.
問題:When an application runs on UDP, is it possible for the application to get reliable data transfer? If so, how is it possible?
翻譯:當(dāng)某應(yīng)用程序運(yùn)行在 UDP 上時(shí),該應(yīng)用程序可能得到可靠數(shù)據(jù)傳輸嗎?如果能,如何實(shí)現(xiàn)?
答:是的。應(yīng)用程序開發(fā)人員可以將可靠的數(shù)據(jù)傳輸放到應(yīng)用層中協(xié)議。然而,這需要大量的工作和調(diào)試。
R7.
問題:Assume that a process on host C has a UDP socket with port number 6789. Assume that both Host A and Host B send a UDP message segment to Host C on destination port number 6789. Are these segments for both hosts described as the same socket at host C? If so, how would the process at host C know that the two segments originated from two different hosts?
翻譯:假定在主機(jī) C 上的一個(gè)進(jìn)程有一個(gè)具有端口號(hào) 6789 的 UDP 套接字。假定主機(jī) A 和主機(jī) B 都用目的端口號(hào)6789 向主機(jī) C 發(fā)送一個(gè) UDP 報(bào)文段。這兩臺(tái)主機(jī)的這些報(bào)文段在主機(jī) C 都被描述為相同的套接字嗎?如果是這樣的話,在主機(jī) C 的該進(jìn)程將怎樣知道源于兩臺(tái)不同主機(jī)的這兩個(gè)報(bào)文段?
答:是的,兩個(gè)段將指向同一個(gè)套接字。對(duì)于每個(gè)接收到的段。在套接字接口上,操作系統(tǒng)將為進(jìn)程提供IP地址,以確定各個(gè)段的來源。
R8.
問題:Assume a web server running on port 80 on host C. Assume that this web server is using a persistent connection and is receiving requests from two different hosts, A and B. Are all the requests being sent through the same socket on host C? If they are passed through different sockets, do both sockets have port 80? Discuss and explain.
翻譯:假定在主機(jī) C 端口 80 上運(yùn)行的一個(gè) Web 服務(wù)器。假定這個(gè) Web 服務(wù)器使用持續(xù)連接,并且正在接收來自兩臺(tái)不同主機(jī) A 和 B 的請(qǐng)求。被發(fā)送的所有請(qǐng)求都通過位于主機(jī) C 的相同套接字嗎?如果它們通過不同的套接字傳遞,這兩個(gè)套接字都具有端口 80 嗎?討論和解釋之。
答:對(duì)于每個(gè)持久連接,Web服務(wù)器創(chuàng)建一個(gè)單獨(dú)的"連接插座"。每個(gè)連接套接字被標(biāo)識(shí)為具有四個(gè)元組:(源IP地址,源端口號(hào)、目標(biāo)IP地址、目標(biāo)端口號(hào))。當(dāng)主機(jī)C接1收和IP數(shù)據(jù)報(bào),它檢查數(shù)據(jù)報(bào)/段中的這四個(gè)字段確定哪個(gè)套接字應(yīng)該通過TCP段的有效負(fù)載。因此,來自A和B的請(qǐng)求通過不同的套接字。這兩個(gè)參數(shù)的標(biāo)識(shí)符用于目標(biāo)端1口的套接字具有80;但是,這些套接字的標(biāo)識(shí)符源IP地址的不同值。與UDP不同,傳輸層通過時(shí)TCP段對(duì)應(yīng)用程序進(jìn)程的有效負(fù)載,它不指定源IP地址,因?yàn)檫@是由套接1字標(biāo)識(shí)符隱式指定的。
3.4 節(jié)
R9.
問題:Why do we need to introduce serial numbers in our hernia protocol?
翻譯:在我們的疝協(xié)議中,為什么需要引入序號(hào)?
答:接收機(jī)需要序列號(hào)來確定到達(dá)的數(shù)據(jù)包是包含新數(shù)據(jù)還是是重傳。
R10.
問題:Why do we need to introduce timers in our point protocol?
翻譯:在我們的點(diǎn)協(xié)議中,為什么需要引入定時(shí)器?
答:處理通道中的損失。如果在該分組的計(jì)時(shí)器持續(xù)時(shí)間內(nèi)未接收到發(fā)送分組的ACK,則假定該分組(或其ACK或NACK)已丟失。因此,分組被重傳。
R11.
問題:Assume that the round-trip delay between sender and receiver is fixed and known to the sender. Assuming that packets can be lost, is a timer still necessary in protocol rdt3.0? Try to explain it.
翻譯:假定發(fā)送方和接收方之間的往返時(shí)延是固定的并且為發(fā)送方所知。假設(shè)分組能夠丟失的話,在協(xié)議rdt3.0 中,一個(gè)定時(shí)器仍是必需的嗎?試解釋之。
答:在RDT3.0協(xié)議中仍然需要計(jì)時(shí)器。如果知道往返時(shí)間,那么唯一的優(yōu)勢是,發(fā)送方肯定知道數(shù)據(jù)包或數(shù)據(jù)包的ACK(或Nack)已經(jīng)丟失,而實(shí)際情況是,在計(jì)時(shí)器過期后,ACK(或Nack)可能仍在發(fā)送方的途中。然而,要檢測丟失,對(duì)于每個(gè)包,一個(gè)持續(xù)時(shí)間不變的定時(shí)器仍然需要在發(fā)送者。
R12.
問題:Use the Go- Back- N (Back N steps) Java applet on the companion website.
a. Have the source send 5 packets and pause the animation before any of the 5 packets reach their destination. Then destroy the first group
and continue the animation. Try to describe what happens.
b. Repeat the experiment, except now let the first packet reach its destination and destroy the first confirmation. Describe what happens again.
c. Finally, try to send 6 packets. What happens?
翻譯:在配套網(wǎng)站上使用 Go- Back- N(回退 N 步)Java 小程序。
a. 讓源發(fā)送5 個(gè)分組,在這5 個(gè)分組的任何一個(gè)到達(dá)目的地之前暫停該動(dòng)畫。然后毀掉第一個(gè)分組
并繼續(xù)該動(dòng)畫。試描述發(fā)生的情況。
b. 重復(fù)該實(shí)驗(yàn),只是現(xiàn)在讓第一個(gè)分組到達(dá)目的地并毀掉第一個(gè)確認(rèn)。再次描述發(fā)生的情況。
c. 最后,嘗試發(fā)送6 個(gè)分組。發(fā)生了什么情況?
答:a. 丟包造成一段時(shí)間后,所有五個(gè)包都被重傳。
b. 由于Go-Back-N使用累積數(shù)據(jù),ACK的丟失沒有觸發(fā)任何重傳承認(rèn)。
c. 發(fā)送方無法發(fā)送第六個(gè)分組,因?yàn)榘l(fā)送窗口大小固定為5。
R13.
問題:Repeat review question R12, but now use the Selective Repeal Java applet. What is the difference between Selective Repeal and N-step back?
翻譯:重復(fù)復(fù)習(xí)題 R12, 但是現(xiàn)在使用 Selective Repeal(選擇重傳)Java 小程序。選擇重傳和回退 N 步有什么不同?
答:a. 當(dāng)分維丟失時(shí),接收的4個(gè)分組被緩沖接收器。完成后超時(shí),發(fā)送方重新發(fā)送丟失的數(shù)據(jù)包,接收方傳送緩沖的數(shù)據(jù)包數(shù)據(jù)包以正確的順序應(yīng)用。
b. 接收器為丟失的ACK發(fā)送了重復(fù)ACK.
c. 發(fā)送窗口大小固定為5時(shí),發(fā)送方無法發(fā)送第六數(shù)據(jù)包當(dāng)分組丟失時(shí),返回-N重傳所有的分組,而選擇性地重傳所有的分組。僅重發(fā)丟失的數(shù)據(jù)包。在丟失確認(rèn)的情況1下,選擇性重復(fù)發(fā)送重復(fù)ACK,并作為返回-N使用的累積確認(rèn),不需要重復(fù)ACK.
3.5 節(jié) ?
R14.
問題:Right or wrong judgment question:
a. Host A sends a large file to Host B over a TCP connection. Assume that Host B has no data to send to Host A. Because Host B cannot piggyback an acknowledgment with the data, Host B will not send an acknowledgment to Host A.
b. The length of TCP's rwnd never changes during the entire connection.
c. Suppose that Host A sends a large file to Host B over a TCP connection. The number of bytes sent but not acknowledged by Host A does not exceed the size of the receive cache.
d. Assume that Host A sends a large file to Host B over a TCP connection. If the sequence of a message segment for this connection is
for this connection is 6, then the sequence number for subsequent segments will necessarily be plus + 1.
e. A TCP message segment has a stomach hole field in its header.
f. Assuming that the last SampleRTT in a TCP connection is equal to 1 second, then the current value of Timeoutinterval for that connection must be greater than or equal to 1 second.
g. Assume that Host A sends a 4-byte message segment with the serial number 38 to Host B over a TCP connection. In this same message segment, the acknowledgement number must be 42.
翻譯:是非判斷題:
a. 主機(jī) A 經(jīng)過一條 TCP 連接向主機(jī) B 發(fā)送一個(gè)大文件。假設(shè)主機(jī) B 沒有數(shù)據(jù)發(fā)往主機(jī) A。因?yàn)橹鳈C(jī) B 不能隨數(shù)據(jù)捎帶確認(rèn),所以主機(jī) B 將不向主機(jī) A 發(fā)送確認(rèn)。
b. 在連接的整個(gè)過程中,TCP 的 rwnd 的長度決不會(huì)變化。
c. 假設(shè)主機(jī) A 通過一條 TCP 連接向主機(jī) B 發(fā)送一個(gè)大文件。主機(jī) A 發(fā)送但未被確認(rèn)的字節(jié)數(shù)不會(huì)超過接收緩存的大小。
d. 假設(shè)主機(jī) A 通過一條 TCP 連接向主機(jī) B 發(fā)送一個(gè)大文件。如果對(duì)于這條連接的一個(gè)報(bào)文段的序
號(hào)為 6,則對(duì)于后繼報(bào)文段的序號(hào)將必然是 加+ 1。
e.TCP 報(bào)文段在它的首部中有一個(gè)胃洞 字段。
f. 假定在一條 TCP 連接中最后的 SampleRTT 等于 1 秒,那么對(duì)于該連接的 Timeoutinterval 的當(dāng)前值必定大于等于1 秒。
g. 假設(shè)主機(jī) A 通過一條 TCP 連接向主機(jī) B 發(fā)送一個(gè)序號(hào)為 38 的4 個(gè)字節(jié)的報(bào)文段。在這個(gè)相同的報(bào)文段中,確認(rèn)號(hào)必定是42。
答:a假 b假 c真 d假 e真 f假 g假
R15.
問題:Suppose that Host A sends two immediately following TCP message segments to Host B over a TCP connection. The first segment is numbered 90, and the second segment is numbered 110.
a. How much data is in the first message segment?
b. Suppose the first segment is lost and the second segment arrives at Host B. In the acknowledgment message from Host B to Host A, what should be the acknowledgment number?
What should the acknowledgment number be?
翻譯:假設(shè)主機(jī) A 通過一條TCP 連接向主機(jī) B 發(fā)送兩個(gè)緊接著的 TCP 報(bào)文段。第一個(gè)報(bào)文段的序號(hào)為90,第二個(gè)報(bào)文段序號(hào)為 110。
a. 第一個(gè)報(bào)文段中有多少數(shù)據(jù)?
b. 假設(shè)第一個(gè)報(bào)文段丟失而第二個(gè)報(bào)文段到達(dá)主機(jī) B。那么在主機(jī) B 發(fā)往主機(jī) A 的確認(rèn)報(bào)文中,
確認(rèn)號(hào)應(yīng)該是多少?
答:a.?20 bytes
b. ack number = 90
R16.
問題:Consider the example of Telnet discussed in Section 3.5. A few seconds after the user types the character C, the user types the character R. How many message segments are sent after the user types the character R, and what should be entered in the sequence number and acknowledgment fields of these message segments?
翻譯:考慮在3.5 節(jié)中討論的 Telnet 的例子。在用戶鍵入字符 C 數(shù)秒之后,用戶又鍵入字符 R。那么在用戶鍵入字符 R 之后,總共發(fā)送了多少個(gè)報(bào)文段,這些報(bào)文段中的序號(hào)和確認(rèn)字段應(yīng)該填入什么?
答:3段,第一段:SEQ=4, ack=80; 第二段:SEQ = 80, ack = 44; 第三段: seq = 44, ack = 81;
3.7 節(jié)
R17.
問題:Assume that two TCP connections exist on a bottleneck link with a bandwidth of Kbps. They both want to send a very large file (in the same direction over the bottleneck link), and they both start sending the file at the same time. What transfer rate will TCP assign to each connection?
翻譯:假設(shè)兩條 TCP 連接存在于一個(gè)帶寬為 Kbps的瓶頸鏈路上。它們都要發(fā)送一個(gè)很大的文件(以相同方向經(jīng)過瓶頸鏈路),并且兩者是同時(shí)開始發(fā)送文件。那么 TCP 將為每條連接分配什么樣的傳輸速率?
答:R/2
R18.
問題:It is a non-judgmental question. Consider TCP's congestion control. When the sender timer times out, its ssthresh value will be set to half of its original value.
翻譯:是非判斷題??紤]TCP 的擁塞控制。當(dāng)發(fā)送方定時(shí)器超時(shí)時(shí),其 ssthresh 的值將被設(shè)置為原來值的一半。
答:否,設(shè)置為擁塞窗口的當(dāng)前值的一半。
R19.
問題:In the "TCP Bifurcation" discussion in Section 3.7, the response time for a TCP bifurcation is asserted to be approximately 4 * RTTFE + RTTFE +?processing time. Evaluate this assertion.
翻譯:在 3.7 節(jié)的 “TCP 分岔”討論中,對(duì)于 TCP 分岔的響應(yīng)時(shí)間,斷言大約是 4 * RTTFE + RTTFE +?處理時(shí)間。評(píng)價(jià)該斷言。
答:讓X=RTTTFE,Y=RTTTBE和 ST=搜索時(shí)間??紤]以下時(shí)序圖。
?文章來源地址http://www.zghlxwxcb.cn/news/detail-487933.html
客戶端和服務(wù)器(后端)之間使用代理(前端)之間的TCP數(shù)據(jù)包交換圖。
從這個(gè)圖中我們可以看到,總時(shí)間是4XYST=4*RTTFERTTBE?搜索時(shí)間。文章來源:http://www.zghlxwxcb.cn/news/detail-487933.html
?
到了這里,關(guān)于計(jì)算機(jī)網(wǎng)絡(luò)--網(wǎng)絡(luò)層傳輸層復(fù)習(xí)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!