版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
計算機(jī)網(wǎng)絡(luò)(第四版)習(xí)題答案第1頁共59頁1Theperformanceofaclient-serversystemisinfluencedbytwonetworkfactors:thebandwidthofthenetwork(howmanybits/secitcantransport)andthelatency(howmanysecondsittakesforthebittogetfromtheclienttotheserver).Giveanexampleofanetworkthatexhibitshighbandwidthandhighlatency.Thengiveanexampleofonewithlowbandwidthandlowlatency.客戶-服務(wù)器系統(tǒng)的性能會受到兩個網(wǎng)絡(luò)因素的影響:網(wǎng)絡(luò)的帶寬(每秒可以傳輸多少位數(shù)據(jù))和延遲(將第一個數(shù)據(jù)位從客戶端傳送到服務(wù)器端需要多少秒時間)。請給出一個網(wǎng)絡(luò)的例子,它具有高帶寬和高延遲。然后再給出另一個網(wǎng)絡(luò)的例子,它具有低帶寬和低延遲。答:橫貫大陸的光纖連接可以有很多千兆56kbpsBesidesbandwidthandlatency,whatotherparameterisneededtogiveagoodcharacterizationthequalityofserviceofferedbyanetworkusedfordigitizedvoicetraffic?除了帶寬和延遲以外數(shù)?聲音的傳輸需要相應(yīng)的固定時間1-6 Aclient-serversystemusesasatellitenetwork,withthesatelliteataheightof40,000km.Whatthebest-casedelayinresponsetoarequest?最佳情形下的延遲是什么?60,000光速為秒,約533。1-9 Agroupof2n-1routersareinterconnectedinacentralizedbinarytree,witharouterateachnode.Routericommunicateswithrouterjbysendingamessagetotherootofthetree.Therootthensendsthemessagebackdowntoj.Deriveanapproximateexpressionforthemeannumberofhopspermessageforlargen,assumingthatallrouterpairsareequallylikely.在一個集中式的二叉樹上,個路由器相互連接起來;每個樹節(jié)點(diǎn)上都有一個路由器。路由第2頁共59頁的路由器都是等概率出現(xiàn)的,請推導(dǎo)出很大時每條消息的平均跳數(shù)的一個近似表達(dá)式。,深度為n層需要n-1。從根到n-1層的路徑的路由器和n --2跳步。因此,路徑長l為或表達(dá)式歸約為l=n-2,平均的路由器到路由器路徑為2n-4。1-11Whataretworeasonsforusinglayeredprotocols?請說出使用分層協(xié)議的兩個理由?不會影響高層或低層的協(xié)議。Whatistheprincipaldifferencebetweenconnectionlesscommunicationandconnection-orientedcommunication?在無連接通信和面向連接的通信二者之間,最主要的區(qū)別是什么?答:主要的區(qū)別有兩條。其一:面向連接通信分為三個階段,第一是建立連接,在此階段,發(fā)出一個建立連接的請求。只有在連接成功建立之后,才能開始數(shù)據(jù)傳輸,這是第二階段。接著,當(dāng)數(shù)據(jù)傳輸完畢,必須釋放連接。而無連接通信沒有這么多階段,它直接進(jìn)行數(shù)據(jù)傳輸。據(jù)的順序一致。Twonetworkseachprovidereliableconnection-orientedservice.Oneofthemoffersareliablestreamandtheotheroffersareliablemessagestream.Aretheseidentical?Ifso,whyisthedistinctionmade?Ifnot,giveanexampleofhowtheydiffer.兩個網(wǎng)絡(luò)都可以提供可靠的面向連接的服務(wù)其。中一個提供可靠的字節(jié)流,另一個提供可靠的報第3頁共59頁個例子說明它們?nèi)绾尾煌?02410242048字節(jié)。對于報文流,接受方將得到兩個報文。每個報102420481-17Insomenetworks,thedatalinklayerhandlestransmissionerrorsbyrequestingdamagedframestoberetransmitted.Iftheprobabilityofaframe'sbeingdamagedisp,whatisthemeannumberoftransmissionsrequiredtosendaframe?Assumethatacknowledgementsareneverlost.幀請求正好是k次的概率Pk,就是起初的k-1次嘗試都失敗的概率。pk-1,乘以第k次傳輸成功的概率。平均傳輸次數(shù)就是1-22WhatisthemaindifferencebetweenTCPandUDP?TCP和UDP之間最主要的區(qū)別是什么?TCPUDP是一種數(shù)據(jù)報服務(wù)。1-25Whenafileistransferredbetweentwocomputers,twoacknowledgementstrategiesarepossible.Inthefirstone,thefileischoppedupintopackets,whichareindividuallyacknowledgedbythereceiver,butthefiletransferasawholeisnotacknowledged.Inthesecondone,thepacketsarenotacknowledgedindividually,buttheentirefileisacknowledgedwhenitarrives.Discussthesetwoapproaches.當(dāng)一個文件在兩臺計算機(jī)之間傳輸?shù)臅r候被確認(rèn)。在第二種策略中,這些分組并沒有被單獨(dú)地確認(rèn),但是當(dāng)整個文件到達(dá)的時候,它會被確認(rèn)。請討論這兩種方案。第4頁共59頁如果網(wǎng)絡(luò)容易丟失分組從而減少了確認(rèn)的次數(shù),節(jié)省了帶寬;不過,即使有單個分組丟失,也需要重傳整個文件。Howlongwasabitontheoriginal802.3standardinmeters?Useatransmissionspeedof10andassumethepropagationspeedincoaxis2/3thespeedoflightinvacuum.標(biāo)準(zhǔn)中,一位是多長(按米來計算)?請使電纜的傳播速度是真空中光速2/3.200,000km/sec,200m/μsec10Mbps,傳輸一位需要,0.1μsec,20米。Animageis1024x768pixelswith3bytes/pixel.Assumetheimageisuncompressed.Howdoesittaketotransmititovera56-kbpsmodemchannel?Overa1-Mbpscablemodem?Overa10-MbpsEthernet?Over100-MbpsEthernet?的電纜調(diào)制解調(diào)器(cablemodem)呢?通過10Mbps的因特網(wǎng)呢?通過100Mbps的因特網(wǎng)呢?圖像是×3bytes2,359,296bytes.就是18,874,368bits.56,000,337.042sec.1,000,000,要大約18.874sec.10,000,000bits/sec,需要大約1.887sec.100,000,000bits/sec,需要大約0.189sec.Wirelessnetworksareeasytoinstall,whichmakestheminexpensivesinceinstallationcostsusuallyfarovershadowequipmentcosts.Nevertheless,theyalsohavesomedisadvantages.Nametwothem.無線網(wǎng)絡(luò)很容易安裝比例。然而,它們也有一些缺點(diǎn)。請說出兩個缺點(diǎn)。第5頁共59頁一個缺點(diǎn)是安全性Listtwoadvantagesandtwodisadvantagesofhavinginternationalstandardsfornetworkprotocols.請列舉出網(wǎng)絡(luò)協(xié)議國際標(biāo)準(zhǔn)化的兩個優(yōu)點(diǎn)和缺點(diǎn)。優(yōu)點(diǎn)了新的更好的技術(shù)或方法,也難以替換。第6頁共59頁2Anoiseless4-kHzchannelissampledevery1msec.Whatisthemaximumdatarate?一條無噪聲4kHz信道按照每1ms一次進(jìn)行采樣,請問最大數(shù)據(jù)傳輸率是多少?2Hlog2V。因此最大數(shù)據(jù)傳輸率決定于每次采樣所產(chǎn)生的比特數(shù),如果每次采樣產(chǎn)的,其最大數(shù)據(jù)傳輸率由香農(nóng)定律給出。Televisionchannelsare6MHzwide.Howmanybits/seccanbesentiffour-leveldigitalareused?Assumeanoiselesschannel.噪聲信道。答:采樣頻率12MHz,每次采樣2bit,總的數(shù)據(jù)率為24Mbps。Ifabinarysignalissentovera3-kHzchannelwhosesignal-to-noiseratiois20dB,whatismaximumachievabledatarate?信道上發(fā)送一個二進(jìn)制信號,該信道的信噪比輸率為多少?答:信噪比20dB即S/N= 由于由香農(nóng)定理,該信道的信道容量3log2(1 +100) 。又根據(jù)乃奎斯特定理,發(fā)送二進(jìn)制信號3kHz信道的最大數(shù)據(jù)傳輸速率為2*3log22=6 。所以可以取得的最大數(shù)據(jù)傳輸速率為6kbps。Whatsignal-to-noiseratioisneededtoputaT1carrierona50-kHzline?答:為發(fā)送T1信號,我們需要第7頁共59頁所以,在50kHz線路上使用T1載波需要93dB的信噪比。Howmuchbandwidthistherein0.1micronofspectrumatawavelengthof1micron?答:因此,在0.1的頻段中可以有30THz。Itisdesiredtosendasequenceofcomputerscreenimagesoveranopticalfiber.Thescreenisx640pixels,eachpixelbeing24bits.Thereare60screenimagespersecond.Howmuchbandwidthisneeded,andhowmanymicronsofwavelengthareneededforthisbandat1.30microns?246幅屏幕圖像。請問,需要多少帶寬?1.3波長上,這段帶寬需要多少?答:數(shù)據(jù)速率480× 即。需要442Mbps的帶寬,對應(yīng)的波長范圍是 。2-18Asimpletelephonesystemconsistsoftwoendofficesandasingletollofficetowhicheachendofficeisconnectedbya1-MHzfull-duplextrunk.Theaveragetelephoneisusedtomakefourcallsper8-hourworkday.Themeancalldurationis6min.Tenpercentofthecallsarelong-distance(i.e.,pass第8頁共59頁throughthetolloffice).Whatisthemaximumnumberoftelephonesanendofficecansupport?(Assume4kHzpercircuit.)小時的工作日中,平均每部電話的呼叫是長途(即通過長途局)。請問一個端局能夠支持最多多少部電話?(假設(shè)每條線0.56分鐘。因此一部電話每小時占用一條電3分,即20200部電話占用一條完全時間的長途線路。局間干線復(fù)用1000000/4000=250200電話,因此,一個端局可以支持的電話部數(shù)。2-22AmodemconstellationdiagramsimilartoFig.2-25hasdatapointsatthefollowingcoordinates:(1,1),(1,-1),(-1,1),and(-1,-1).Howmanybpscanamodemwiththeseparametersachieveat1200baud?2.2的調(diào)制解調(diào)器星座圖有以下幾個坐標(biāo)點(diǎn))--)-,。請問一個具備這些參數(shù)的調(diào)制解調(diào)器每個波特有41200。Tensignals,eachrequiring4000Hz,aremultiplexedontoasinglechannelusingFDM.Howmuchminimumbandwidthisrequiredforthemultiplexedchannel?AssumethattheguardbandsareHzwide.最小要求多少帶寬?假設(shè)防護(hù)頻段寬。第9頁共59頁104000Hz9個防護(hù)頻段來避免干擾。最小帶寬需求=43,600Hz.WhyhasthePCMsamplingtimebeensetat12sc?答的采樣時間對應(yīng)于每8000次采樣。一個典型的電話通道。根據(jù)奈奎斯特理,為獲取一4kHz的通道中的全部信息需要每8000次的采樣頻率。實(shí)際上額定帶寬稍有些少,截止點(diǎn)并不清)WhatisthepercentoverheadonaT1carrier;thatis,whatpercentofthe1.544Mbpsaredeliveredtotheenduser?193位中的等于。Whatisthedifference,ifany,betweenthedemodulatorpartofamodemandthecoderpartofcodec?(Afterall,bothconvertanalogsignalstodigitalones.)(余弦)波,產(chǎn)生數(shù)字信號。第10頁共59頁Asignalistransmitteddigitallyovera4-kHznoiselesschannelwithonesampleeverys.Howmanybitspersecondareactuallysentforeachoftheseencodingmethods?(a)CCITT2.048Mbpsstandard.(b)DPCMwitha4-bitrelativesignalvalue.(c)Deltamodulation.答2.048Mbps標(biāo)準(zhǔn)用32個8位數(shù)據(jù)樣本組成一125 的基本幀個信道用傳信息個信道用于傳控制信號。在每一4kHz信道上發(fā)送的數(shù)據(jù)率就是。44kHz信道實(shí)際。st可以選擇一個合適的量化??1bit時對應(yīng)每個4kHz。2-39Whatistheessentialdifferencebetweenmessageswitchingandpacketswitching?將被拆分成多個報文。Threepacket-switchingnetworkseachcontainnnodes.Thefirstnetworkhasastartopologywith第11頁共59頁acentralswitch,thesecondisa(bidirectional)ring,andthethirdisfullyinterconnected,withawirefromeverynodetoeveryothernode.Whatarethebest-,average-,and-worstcasetransmissionpathsinhops?三個分組交換網(wǎng)絡(luò)每個包二個網(wǎng)絡(luò)是一個雙向環(huán)答:Thethreenetworkshavethefollowingproperties:,最差為,平均為,最差為,平均為如果考慮n為奇偶數(shù),則n為奇數(shù)時,最壞為n-/,平均為n為偶數(shù)時,最壞為平均為n2/4(n 1)全連接:最好為1,最差為1,平均為1。Comparethedelayinsendinganx-bitmessageoverak-hoppathinacircuit-switchednetworkandina(lightlyloaded)packet-switchednetwork.Thecircuitsetuptimeisssec,thepropagationisdsecperhop,thepacketsizeispbits,andthedatarateisbbps.Underwhatconditionsdoesthepacketnetworkhavealowerdelay?請比較一下在一個電路交換網(wǎng)絡(luò)中和在一個負(fù)載較輕的分組交換網(wǎng)絡(luò)中,x位消息的延遲情況。電路建立的時間b。在什么條件下分組網(wǎng)絡(luò)的延遲比較短?對于電路交換,t=s時電路建立起來t s+ x/d 時報文的最后一位發(fā)送完畢t =s+ x/b+kd時報文到達(dá)目的地。而對于分組交換,最后一位t=x/b 時發(fā)送完畢。為到達(dá)最終目的地,最后一個分組必須被中間的路由器重k 1次,每次重發(fā)花時p/以總的延遲為為了使分組交換比電路交換快,必須:第12頁共59頁所以:Supposethatxbitsofuserdataaretobetransmittedoverak-hoppathinapacket-switchednetworkasaseriesofpackets,eachcontainingpdatabitsandhheaderbits,withxp+h.Thebitratethelinesisbbpsandthepropagationdelayisnegligible.Whatvalueofpminimizesthetotaldelay?跳到路徑向前傳b值使總延遲最???x/p,因此總的數(shù)據(jù)加上頭信息交通量(p+h)x/p位。源端發(fā)送這些位需要時間(p+h (k-1)(p +h )/b因此我們得到的總的延遲為對該函數(shù)求p的導(dǎo)數(shù),得到令得到因?yàn)楣蕰r能使總的延遲最小。
/p第13頁共59頁Inatypicalmobilephonesystemwithhexagonalcells,itisforbiddentoreuseafrequencybandanadjacentcell.If840frequenciesareavailable,howmanycanbeusedinagivencell?在一個典型的移動電話系統(tǒng)中個頻率可以使用的話,則任何一個給定的單元內(nèi)可以使用多少個頻率?每個單元有6個鄰居。如果中間的單元使用頻段組合A,它的六個鄰居可以分別使用的頻段組合B,C,B,C,B,3個單一的單元。因此,每個單元可以使280個頻率。2-50SupposethatA,B,andCaresimultaneouslytransmitting0bits,usingaCDMAsystemwiththechipsequencesofFig.2-45(b).Whatistheresultingchipsequence?FIG2-45(b)結(jié)果是通過C求反再將這三個碼片序列相加得到的結(jié)果(+3+1+1 1 3 1 1+1).2-53ACDMAreceivergetsthefollowingchips:(-1+1-3+1-1-3+1+1).AssumingthechipsequencesdefinedinFig.2-45(b),whichstationstransmitted,andwhichbitsdideachonesend?CDM接收器得到了下面的時間片-1+1-3+1-1-3+1+)。假設(shè)時間片序列如2.45義,請問那些移動站傳輸了數(shù)據(jù)?每個站發(fā)送了什么位?Justcomputethefournormalizedinner號之誤?(1+13+113+1+1)d(1 1 1+1+1 1+1+1)/8=1(1+13+113+1+1)d(1 1+1 1+1+1+1 1)/8= 1( 1+13+113+1+1)d(1+1 1+1+1+1 1 1)/8=0( 1+1
3+1 1
3+1+1)d(
1+1 1 1 1 1+1 1)/8=1AD發(fā)送了1,B發(fā)送了0,C沒有發(fā)送。第14頁共59頁3Anupper-layerpacketissplitinto10frames,eachofwhichhasan80percentchanceofarrivingundamaged.Ifnoerrorcontrolisdonebythedatalinkprotocol,howmanytimesmustthemessagesentonaveragetogettheentirethingthrough?供錯誤控制的話,請問,該報文平均需要發(fā)送多少次才能完整地到達(dá)接收方?0.8。為使信息完整的到達(dá)接收方,發(fā)送一次成功的概率p,二次成功的概率三次成功概率(1-p )2次成功的概率(1-p)i-1 因此平均的發(fā)送次數(shù)等于:Thefollowingcharacterencodingisusedinadatalinkprotocol:A:01000111;B:11100011;FLAG:01111110;ESC:11100000Showthebitsequencetransmitted(inbinary)forthefour-characterframe:BESCFLAGwheneachofthefollowingframingmethodsareused:(a)Charactercount.(b)Flagbyteswithbytestuffing.(c)Startingandendingflagbytes,withbitstuffing.結(jié)果是(a)0000010001000111111000111110000001111110(b)0111111001000111111000111110000011100000111000000111111001111110(c)011111100100011111010001111100000001111101001111110Abitstring,0111101111101111110,needstobetransmittedatthedatalinklayer.Whatisstringactuallytransmittedafterbitstuffing?011110111110111111的是什么?第15頁共59頁輸出是1110111110011111010.Whenbitstuffingisused,isitpossiblefortheloss,insertion,ormodificationofasinglebittocauseanerrornotdetectedbythechecksum?Ifnot,whynot?Ifso,how?Doesthechecksumplayarolehere?假設(shè)使用了位填充成幀方法,請問,因?yàn)閬G失一位,插入一位,或者篡改一位而引起的錯誤是否有可能通過校驗(yàn)和檢測出來?如果不能的話請,問為什么?如果能的話,請問校驗(yàn)和長度在這里是如何起作用的?答:可能。假定原來的正文包含位序01111110作為數(shù)據(jù)。位填充之后,這個序列將變成0616位的內(nèi)容碰巧經(jīng)驗(yàn)證后仍然正確的概率。如果這種概率的條件成立了,就會導(dǎo)致不正確的幀被接收。顯然,檢驗(yàn)和段越長,傳輸錯誤不被發(fā)現(xiàn)的概率會越低,但該概率永遠(yuǎn)不等于零。DatalinkprotocolsalmostalwaysputtheCRCinatrailerratherthaninaheader.Why?數(shù)據(jù)鏈路協(xié)議幾乎總是將CRC放在尾部,而不是頭部,為什么?是在發(fā)送期間進(jìn)行計算的CRC編碼附CRC放在幀的頭部,那么就要在發(fā)送之前把整個幀先檢查一遍來計算CRC放在尾部就可以把處理時間減半。Achannelhasabitrateof4kbpsandapropagationdelayof20msec.Forwhatrangeofframe第16頁共59頁sizesdoesstop-and-waitgiveanefficiencyofatleast50percent?。請問幀的大小在什么范圍內(nèi),答:當(dāng)發(fā)送一幀的時間等于信道的傳播延遲2。或者說,當(dāng)發(fā)送?,F(xiàn)在發(fā)送速率為4Mb/s,發(fā)送一位需要0.25。只有在幀長不小于160kb時,停等協(xié)議的效率才會至少達(dá)到50%。A3000-km-longT1trunkisusedtotransmit64-byteframesusingprotocol5.Ifthepropagationspeedis6ec/km,howmanybitsshouldthesequencenumbersbe?字節(jié)的幀,兩端使用了協(xié)公里,則序列號應(yīng)該有多少位?答;為了有效運(yùn)行,序列空間(實(shí)際上就是發(fā)送窗口大?。┍仨氉銐虻拇?,以允許發(fā)送方在收到第一個確認(rèn)應(yīng)答之前可以不斷發(fā)送。信號在線路上的傳播時間為18000 ,即。在T1速率,發(fā)64字節(jié)的數(shù)據(jù)幀需花的時間648(1.536106) =0.33。所以,發(fā)送的第一幀從開始發(fā)送起18.33ms間(忽略不計)。發(fā)送方應(yīng)該有足夠大的窗口,從而能夠連續(xù)發(fā)送36.33ms。36.33/0.33=110也就是說,為充滿線路管道,需要至1107位。第17頁共59頁Inprotocol3,isitpossiblethatthesenderstartsthetimerwhenitisalreadyrunning?Ifso,mightthisoccur?Ifnot,whyisitimpossible?一個幀將在定時器仍在運(yùn)行的情況下被發(fā)送。Imagineaslidingwindowprotocolusingsomanybitsforsequencenumbersthatwraparoundneveroccurs.Whatrelationsmustholdamongthefourwindowedgesandthewindowsize,whichconstantandthesameforboththesenderandthereceiver.想象這樣一個滑動窗口協(xié)議,它的序列號有非常多的位,所以序列號幾乎永遠(yuǎn)不會回轉(zhuǎn)。4令發(fā)送方窗口為(Sl,Su)接收方窗口為(Rl,Ru),令窗口大小為W。二者必須保持的關(guān)系是:0≤Su?Sl+1≤W1Ru?Rl+1=WSl≤Rl≤Su+1Iftheprocedurebetweeninprotocol5checkedfortheconditionabcinsteadoftheconditionabc,wouldthathaveanyeffectontheprotocol'scorrectnessorefficiency?Explainyouranswer.有影響嗎?解釋你的答案。答:改變檢查條件后,協(xié)議將變得不正確。假定使3位序列號,考慮下列協(xié)議運(yùn)行過程:A站剛發(fā)出7A站收到,并發(fā)送0~6號B??疾霢站在r.rack=7next_frame_to_send_=。修改后的檢查條件將被置成“真”,不會報告已發(fā)現(xiàn)的丟失幀錯誤,而第18頁共59頁所以結(jié)論是:為保證協(xié)議的正確性,已接收的確認(rèn)應(yīng)答號應(yīng)該小于下一個要發(fā)送的序列號。Inprotocol6,whenadataframearrives,acheckismadetoseeifthesequencenumberfromtheoneexpectedandno_nakistrue.Ifbothconditionshold,aNAKissent.Otherwise,theauxiliarytimerisstarted.Supposethattheelseclausewereomitted.Wouldthischangeaffecttheprotocol'scorrectness?字句被省略掉,這種改變會影響協(xié)議的正確性嗎?答:可能導(dǎo)致死鎖。假定有一組幀正確到達(dá),并被接收。然后,接收方會向前移動窗口。現(xiàn)在假定所有的確認(rèn)幀都丟失了發(fā)送一個。然后NONAKNAKONAK為偽,所以不會再發(fā)送NA,從而產(chǎn)生死鎖。如果設(shè)置輔助計數(shù)器(ls”子句),NA,終究會使雙方重新獲得同步。Supposethatthethree-statementwhileloopneartheendofprotocol6wereremovedfromthecode.Wouldthisaffectthecorrectnessoftheprotocolorjusttheperformance?Explainyour中接近尾部的內(nèi)含三條語句還是僅僅影響協(xié)議的性能?請解釋答案。沒有這一段程序,發(fā)送方會一直保持超時條件,從而使得協(xié)議的運(yùn)行不能向前進(jìn)展。SupposethatthecaseforchecksumerrorswereremovedfromtheswitchstatementofprotocolHowwouldthischangeaffecttheoperationoftheprotocol?這樣將使得NAK的作用失效,于是我們將退回到超時。盡管效率會降低,正確性卻不會受到影響。NAK不是必不可少的。Inprotocol6thecodeforframe_arrivalhasasectionusedforNAKs.Thissectionisinvokedifthe第19頁共59頁incomingframeisaNAKandanotherconditionismet.Giveascenariowherethepresenceofthisotherconditionisessential.在協(xié)中,針frame_arrival 代碼中有一部分被用。如果收到的幀是一并且另一個條件也滿足的話是非常關(guān)鍵的。
考慮下列操作細(xì)節(jié):A站發(fā)送0號幀給BBACK幀,但ACKA站發(fā)生超時,重發(fā)0號幀。但B10A0不成立,所以用不著選擇性重01號幀。這個例子就說明了這段程序中的另一個條件,即也是重要的。Imaginethatyouarewritingthedatalinklayersoftwareforalineusedtosenddatatoyou,butfromyou.TheotherendusesHDLC,witha3-bitsequencenumberandawindowsizeofsevenframes.Youwouldliketobufferasmanyout-of-sequenceframesaspossibletoenhanceefficiency,butyouarenotallowedtomodifythesoftwareonthesendingside.Isitpossibletohaveareceiverwindowgreaterthan1,andstillguaranteethattheprotocolwillneverfail?Ifso,whatisthelargestwindowthatcanbesafelyused?想象你正在編寫一個數(shù)據(jù)鏈路層軟件幀的窗口。你希望將亂序的幀盡可0至670號0號幀到達(dá)接收方時,它將會被緩存保留,接收方確6號幀。當(dāng)7號幀到來的時70。Inprotocol6,MAX_SEQ=2n-1.Whilethisconditionisobviouslydesirabletomakeefficient第20頁共59頁useofheaderbits,wehavenotdemonstratedthatitisessential.DoestheprotocolworkcorrectlyforMAX_SEQ=4,forexample?這個條件確實(shí)很關(guān)鍵。例如,協(xié)議的時候也能夠正確地工作嗎?。因此在該協(xié)議中,偶數(shù)序號使用緩沖。這種映射意味著幀40034000中,變量MaxSeq是奇數(shù)才能正確的工作性質(zhì)。Framesof1000bitsaresentovera1-Mbpschannelusingageostationarysatellitewhosepropagationtimefromtheearthis270msec.Acknowledgementsarealwayspiggybackedontoframes.Theheadersareveryshort.Three-bitsequencenumbersareused.Whatisthemaximumachievablechannelutilizationfor(a)Stop-and-wait.(b)Protocol5.(c)Protocol6.(a(bc6答:對應(yīng)三種協(xié)議的窗口大小值分別7。使用衛(wèi)星信道端到端的典型傳輸延遲,以1Mb/s長的幀的發(fā)送時間為1m。我們用t=0t=1mst=271ms時,第一t=272mt=542m。如果在542ms內(nèi)可以發(fā)送k間為(a)k=1,最大信道利用率=1/542=0.18%第21頁共59頁=7/542=1.29%=4/542=0.74%Computethefractionofthebandwidththatiswastedonoverhead(headersandretransmissions)forprotocol6onaheavily-loaded50-kbpssatellitechannelwithdataframesconsistingof40headerand3960databits.Assumethatthesignalpropagationtimefromtheearthtothesatelliteis270msec.ACKframesneveroccur.NAKframesare40bits.Theerrorratefordataframesis1percent,andtheerrorforNAKframesisnegligible.Thesequencenumbersare8bits.答:使用選擇性重傳滑動窗口協(xié)議,序列號長度8。衛(wèi)星信道端到端的傳輸延遲是270m50kb/s4000bt3960+40.02*4000=80m。我們用t=0表示傳輸開始時間,那么t=80m,第一幀發(fā)送完畢;t=270+80=350m,第一幀完全到達(dá)接收方t=350+80=430m,對第一幀作捎帶確認(rèn)的反向數(shù)據(jù),發(fā)送128幀時間,對于3960404000*0.01=40NAK40*1/100=0.40位,所以每396080.4位。80.4/(3960+80.4)=1.99。3-32A100-km-longcablerunsattheT1datarate.Thepropagationspeedinthecableis2/3thespeedoflightinvacuum.Howmanybitsfitinthecable?答:在該電纜中的傳播速度是每秒鐘200000km,即每毫秒200km,因此100km的電纜將會在0.5ms內(nèi)填滿T1速率125 傳送一193位的幀0.5ms可以傳4個T1幀即193*4=772bt第22頁共59頁第23頁共59頁4Forthisproblem,useaformulafromthischapter,butfirststatetheformula.Framesarriveata100-Mbpschannelfortransmission.Ifthechannelisbusywhenaframearrives,itwaitsitsturninaqueue.Framelengthisexponentiallydistributedwithameanof10,000bits/frame.Foreachofthefollowingframearrivalrates,givethedelayexperiencedbytheaverageframe,includingbothqueueingtimeandtransmissiontime.(a)90frames/sec.(b)900frames/sec.(c)9000frames/sec.(timedelay,T// achannelofcapacityCbps// withanarrivalrateof frames/sec)這個公式是4.1.1段落給出的Markov排隊問題的標(biāo)準(zhǔn)公式也就是, 這里C=108、, (a)0.1msec,(b)0.11msec,(c)1msec.對于c的情況,我們操作一個帶來10倍延遲的排隊系統(tǒng)AgroupofNstationssharea56-kbpspureALOHAchannel.Eachstationoutputsa1000-bitframeonanaverageofonceevery100sec,evenifthepreviousonehasnotyetbeensent(e.g.,stationscanbufferoutgoingframes).WhatisthemaximumvalueofN?幀還沒有被送出,它也這樣進(jìn)行(比如這些站可以將送出的幀緩存起來)答:對于純可用的帶寬Kb/s =10.304 Kb/。每個站需要的帶寬為而所以最多可以1030個站即N的最大值ConsiderthedelayofpureALOHAversusslottedALOHAatlowload.Whichoneisless?youranswer.第24頁共59頁樣,平均會引入半個時隙的延遲。因此,ALOHA的延遲比較小。TenthousandairlinereservationstationsarecompetingfortheuseofasingleslottedALOHAchannel.Theaveragestationmakes18requests/hour.Aslotis1e.Whatistheapproximatechannelload?每個終端每10000200秒做10000508000。AlargepopulationofALOHAusersmanagestogenerate50requests/sec,includingbothoriginalsandretransmissions.Timeisslottedinunitsof40msec.(a)Whatisthechanceofsuccessonthefirstattempt?(b)Whatistheprobabilityofexactlykcollisionsandthenasuccess?(c)Whatistheexpectednumberoftransmissionattemptsneeded?(a)首次發(fā)送成功的幾率是多少(b次沖突之后成功的概率是多?(c是多少?k幀的概率服從泊松分布生成0幀的概率為e-G對于純的G=e-2G對于分隙的ALOHA,由于沖突危險區(qū)減少為原來的一半,任一幀時內(nèi)無其他幀發(fā)送的概率是e-G。40m2550G=因此,首次嘗試的成功率是e-2=1/e2第25頁共59頁(b)嘗試k次才能發(fā)送成功的概率(k-1次沖突,第k次才成功)為:那么每幀傳送次數(shù)的數(shù)學(xué)期望為MeasurementsofaslottedALOHAchannelwithaninfinitenumberofusersshowthat10oftheslotsareidle.(a)Whatisthechannelload,G?(b)Whatisthethroughput?(c)Isthechannelunderloadedoroverloaded?ALOH10(a該信道是載荷不足,還是過載?答:)peG,因此=-lnp0=-ln0.2.3e-G,G 因?yàn)槊慨?dāng)G>1時,信道總是過載的,因此在這里信道是過載的。4-8 Howlongdoesastation,s,havetowaitintheworstcasebeforeitcanstarttransmittingitsframeoveraLANthatuses(a)thebasicbit-mapprotocol?(b)MokandWard'sprotocolwithpermutingstationnumbers?使用了下列協(xié)議,請問在最差情況下,一個時間?)基本的位圖協(xié)議)Mok-War協(xié)議s是編號最小的站點(diǎn)N+(N-1)N+(N-1)d位時間;(b)s具有其中最小的虛擬站編號s在其它個站各發(fā)送了一個幀之后將獲得傳輸機(jī)會,以及每個大小og2N的N個爭用周期。等待時間是(N+1)×d+N×log2Nbits.第26頁共59頁4-10Sixteenstations,numbered1through16,arecontendingfortheuseofasharedchannelbyusingtheadaptivetreewalkprotocol.Ifallthestationswhoseaddressesareprimenumberssuddenlybecomereadyatonce,howmanybitslotsareneededtoresolvethecontention?號為素數(shù)的所有站突然間全部要發(fā)送幀,請問需要多少位時槽才能解決競爭?(見圖BCBD節(jié)點(diǎn)以下各站來競爭信道。本題中,站111313如下:733第27頁共59頁第十時隙:74-14Sixstations,AthroughF,communicateusingtheMACAprotocol.Isitpossiblethattwotransmissionstakeplacesimultaneously?Explainyouranswer.F發(fā)送時A也能向B送。ConsiderbuildingaCSMA/CDnetworkrunningat1Gbpsovera1-kmcablewithnorepeaters.Thesignalspeedinthecableis200,000km/sec.Whatistheminimumframesize?(無中繼器。請問最小的幀長度為多少?答對于1km電纜單程傳播時間1/200000 即5 來回路程傳播時間2t=10為了能夠按CSMA/CD工作,最小幀的發(fā)射時間不能小10 。以1Gb/s速率工作可以發(fā)送的比特數(shù)等于:10000bit1250字節(jié)長。AnIPpackettobetransmittedbyEthernetis60byteslong,includingallitsheaders.IfLLCisinuse,ispaddingneededintheEthernetframe,andifso,howmanybytes?字節(jié)長,其中包括所有的頭部。如果沒有使太網(wǎng)幀中需要填補(bǔ)字節(jié)碼?如果需要的話,請問需要填補(bǔ)多少字節(jié)?18bytes報文是6078bytes,已經(jīng)超過了64-byte的最小限制。因此,不需要填補(bǔ)。第28頁共59頁Ethernetframesmustbeatleast64byteslongtoensurethatthetransmitterisstillgoingintheofacollisionatthefarendofthecable.FastEthernethasthesame64-byteminimumframesizebutcangetthebitsouttentimesfaster.Howisitpossibletomaintainthesameminimumframesize?快速以太網(wǎng)的最大線路長度是以太網(wǎng)1/10。SomebooksquotethemaximumsizeofanEthernetframeas1518bytesinsteadof1500bytes.theywrong?Explainyouranswer.有效載荷是1500bytes,但將目的地址、源地址、類1518.ConsidertheinterconnectedLANsshownsinFig.4-44.AssumethathostsaandbareonLAN1,isonLAN2,anddisonLAN8.Initially,hashtablesinallbridgesareemptyandthespanningtreeshowninFig4-44(b)isused.Showhowthehashtablesofdifferentbridgeschangeaftereachofthefollowingeventshappeninsequence,first(a)then(b)andsoon.(a)asendstod.(b)csendstoa.(c)dsendstoc.(d)dmovestoLAN6.(e)dsendstoa.上。所示的生成樹。在下面給出的每個事件依次發(fā)生以后發(fā)送幀第一個幀會被每個網(wǎng)橋轉(zhuǎn)發(fā)為aDLAN2a第29頁共59頁被網(wǎng)橋B,D和A看到。這些網(wǎng)橋會在它們的散列表中添加一個目的地c的新項(xiàng)目。例如,網(wǎng)橋DLAN2c轉(zhuǎn)發(fā)幀的項(xiàng)目。第三個信息會被網(wǎng)橋H,D,A和B看到。這些網(wǎng)橋會在它們的散列表中添加一個目的地d被網(wǎng)橋E,C,B,和AE和CdD,B和Ad的散列表項(xiàng)目。OneconsequenceofusingaspanningtreetoforwardframesinanextendedLANisthatsomebridgesmaynotparticipateatallinforwardingframes.IdentifythreesuchbridgesinFig.4-44.Isanyreasonforkeepingthesebridges,eventhoughtheyarenotusedforforwarding?中使用生成樹來轉(zhuǎn)發(fā)幀的一個結(jié)果是,有的網(wǎng)橋可能根本不參與幀的轉(zhuǎn)發(fā)過留這些網(wǎng)橋呢?G,IJ沒有被用來轉(zhuǎn)發(fā)任何幀。在一個擴(kuò)展LAN中具有回路的主要原因是增加可靠)能包括一個或更多不屬于先前生成樹部分的網(wǎng)橋。Brieflydescribethedifferencebetweenstore-and-forwardandcut-throughswitches.存儲-轉(zhuǎn)發(fā)型交換機(jī)完整存儲輸入的每個幀,然后檢查并轉(zhuǎn)發(fā)。直通型交換機(jī)在輸入幀沒有全部到達(dá)之前就開始轉(zhuǎn)發(fā)。一得到目的地址,轉(zhuǎn)發(fā)就開始了。Store-and-forwardswitcheshaveanadvantageovercut-throughswitcheswithrespecttoframes.Explainwhatitis.Store-and-forwardswitchesstoreentireframesbeforeforwardingthem.Afteraframecomesin,thechecksumcanbeverified.Iftheframeisdamaged,itisdiscardedimmediately.Withcut=through,damagedframescannotbediscardedbytheswitchbecausebythetimetheerrorisdetected,theframeisalreadygone.Tryingtodealwiththeproblemislikelockingthebarndoorafterthehorsehasescaped.存儲-轉(zhuǎn)發(fā)型交換機(jī)在轉(zhuǎn)發(fā)幀之前存儲整個幀。當(dāng)一個幀到達(dá)時,校驗(yàn)和將被驗(yàn)證。如果幀已被損壞,它將被立即丟棄。在直通型交換機(jī),損壞的幀不能被交換機(jī)丟棄因。為當(dāng)錯誤被檢測到時,幀已經(jīng)過去了。想要處第30頁共59頁理這個問題就像是在馬已經(jīng)逃逸之后再鎖上牲口棚。第31頁共59頁5Givetwoexamplecomputerapplicationsforwhichconnection-orientedserviceisNowgivetwoexamplesforwhichconnectionlessserviceisbest.Arethereanycircumstanceswhenconnection-orientedservicewill(oratleastshould)packetsoutoforder?Explain.排在前面等待程序處理的任何數(shù)據(jù)(即已經(jīng)鍵入但尚未被程序讀取的數(shù)據(jù))。Datagramsubnetsrouteeachpacketasaseparateunit,independentofallothers.Virtual-circuitsubnetsdonothavetodothis,sinceeachdatapacketfollowsapredeterminedroute.Doesthisobservationmeanthatvirtual-circuitsubnetsdonotneedthecapabilitytorouteisolatedpacketsfromarbitrarysourcetoanarbitrarydestination?Explainyouranswer.能力。Considerthefollowingdesignproblemconcerningimplementationofvirtual-circuitservice.Ifvirtualcircuitsareusedinternaltothesubnet,eachdatapacketmusthavea3-byteheaderandeachmusttieup8bytesofstorageforcircuitidentification.Ifdatagramsareusedinternally,15-byteheadersareneededbutnoroutertablespaceisrequired.Transmissioncapacitycosts1centper106bytes,perhop.Veryfastroutermemorycanbepurchasedfor1centperbyteandisdepreciatedovertwoyears,assuminga40-hourbusinessweek.Thestatisticallyaveragesessionrunsfor1000sec,inwhichtime200packetsaretransmitted.Themeanpacketrequiresfourhops.Whichimplementationischeaper,andbyhowmuch?第32頁共59頁答:虛電路實(shí)現(xiàn)需要1000秒內(nèi)固定分5*8=40字節(jié)的存儲器。數(shù)據(jù)報實(shí)現(xiàn)需要比虛電路現(xiàn)多傳送的頭信息的容量等(15-3) 字跳段現(xiàn)在的問題就變成40000字秒的存儲器對9600字跳段的電路容量。如果存儲器的使用期為兩年,即秒一個字秒的代價為1/(=分那么40000字秒的代價為2.7毫分另一方面?zhèn)€字跳段代價是10-6分個字跳段的代為10-6× 分,即9.6毫分,即在1000秒內(nèi)的時間內(nèi)便宜大6.9毫分。Assumingthatallroutersandhostsareworkingproperlyandthatallsoftwareinbothisfreeoferrors,isthereanychance,howeversmall,thatapacketwillbedeliveredtothewrongdestination?答有可能大的突發(fā)噪聲可能破壞分組使用k位的檢驗(yàn)和差錯仍然有2 k的概率被漏檢。如果分組的目的地段或虛電路號碼被改組將會被投遞到錯誤的目的地并可能被接收為正確的分組換句話說偶然的突發(fā)噪聲可能把送往一個目的地的完全合法的分組改變成送往另個目的地的也是完全合法的分組。ConsiderthenetworkofFig.5-7,butignoretheweightsonthelines.Supposethatitusesastheroutingalgorithm.IfapacketsentbyAtoDhasamaximumhopcountof3,listalltheroutesitwilltake.Alsotellhowmanyhopsworthofbandwidthitconsumes.第33頁共59頁路徑將依次為下面的路:ABCD,ABCF,ABEF,ABEG,AGHD,AGHF,, AGEF.用到的跳數(shù)是24。ConsiderthesubnetofFig.5-13(a).Distancevectorroutingisused,andthefollowingvectorshavejustcomeintorouterC:fromB:(5,0,8,12,6,2);fromD:(16,12,6,0,9,10);andfromE:(7,6,3,9,4).ThemeasureddelaystoB,D,andE,are6,3,and5,respectively.WhatisC'snewroutingtable?Giveboththeoutgoinglinetouseandtheexpecteddelay.第34頁共59頁答:通過B給出通過D給出通過E給出取到達(dá)每一目的地的最小值C除外)Ifdelaysarerecordedas8-bitnumbersina50-routernetwork,anddelayvectorsareexchangedtwiceasecond,howmuchbandwidthper(full-duplex)lineischewedupbythedistributedroutingalgorithm?Assumethateachrouterhasthreelinestootherrouters.2次,因此即在每條線路的每個方向上消耗的帶寬都800。5-12Forhierarchicalroutingwith4800routers,whatregionandclustersizesshouldbechosentominimizethesizeoftheroutingtableforathree-layerhierarchy?Agoodstartingplaceisthehypothesisthatasolutionwithkclustersofkregionsofkroutersisclosetooptimal,whichmeansthatkisaboutthecuberootof4800(around16).Usetrialanderrortocheckoutcombinationswhereallthreeparametersareinthegeneralvicinityof16.所謂分級路由,就是將路由器按區(qū)REGIO)何為分組選擇路由到達(dá)目的地的細(xì)節(jié)第35頁共59頁結(jié)構(gòu)是不夠的,還可以把區(qū)組合成簇CLUSTE),把簇再組合成域ZON),對于等級式路由,在路由表中對應(yīng)
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024自然人之間借款合同范本
- 2025年度城市綜合體場地合作經(jīng)營合同
- 2025年度文化產(chǎn)業(yè)園物業(yè)管理與文化活動策劃服務(wù)協(xié)議3篇
- 2024版教育機(jī)構(gòu)裝潢工程合同樣本
- 二零二四年度9A文智能家居系統(tǒng)定制開發(fā)合同
- 2024版環(huán)評工程服務(wù)合同范本大全
- 2025年度生態(tài)農(nóng)業(yè)用地承包種植合作合同規(guī)范文本3篇
- 二零二四年度BIM可視化展示與演示合同
- 二零二五年度廁所改造工程環(huán)保標(biāo)準(zhǔn)制定合同2篇
- 二零二五年度金融借款合同電子化轉(zhuǎn)型的法律挑戰(zhàn)3篇
- 離職分析報告
- 春節(jié)家庭用電安全提示
- 醫(yī)療糾紛預(yù)防和處理?xiàng)l例通用課件
- 廚邦醬油推廣方案
- 乳腺癌診療指南(2024年版)
- 高三數(shù)學(xué)寒假作業(yè)1
- 保險產(chǎn)品創(chuàng)新與市場定位培訓(xùn)課件
- (完整文本版)體檢報告單模版
- 1例左舌鱗癌手術(shù)患者的圍手術(shù)期護(hù)理體會
- (完整)100道兩位數(shù)加減兩位數(shù)口算題(難)
- 鋼結(jié)構(gòu)牛腿計算
評論
0/150
提交評論