ebook img

Computer Networks: A Systems Approach Fifth Edition Solutions Manual PDF

122 Pages·2011·1.07 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Computer Networks: A Systems Approach Fifth Edition Solutions Manual

Computer Networks: A Systems Approach Fifth Edition Solutions Manual Larry Peterson and Bruce Davie 2011 1 DearInstructor: ThisInstructors’Manualcontainssolutionstomostoftheexercisesinthefifthedition ofPetersonandDavie’sComputerNetworks: ASystemsApproach. Exercises are sorted (roughly) by section, not difficulty. While some exercises are moredifficultthan others, none are intendedto be fiendishly tricky. A few exercises (notably,thoughnotexclusively,theonesthatinvolvecalculatingsimpleprobabilities) requireamodestamountofmathematicalbackground;mostdonot. Thereisasidebar summarizingmuchoftheapplicablebasicprobabilitytheoryinChapter2. Anoccasionalexerciseisawkwardlyorambiguouslywordedinthetext. Thismanual sometimessuggestsbetterversions;alsoseetheerrataatthewebsite. Whereappropriate,relevantsupplementalfilesforthesesolutions(e.g.programs)have beenplacedonthetextbookwebsite,http://mkp.com/computer-networks. Useful other material can also be found there, such as errata, sample programming assignments,PowerPointlectureslides,andEPSfigures. If youhaveany questionsaboutthese supportmaterials, please contactyourMorgan Kaufmann sales representative. If you would like to contribute your own teaching materialstothissite,pleasecontactourAssociateEditorDavidBevans, [email protected]. We welcome bug reports and suggestions as to improvementsfor both the exercises andthesolutions;[email protected]. LarryPeterson BruceDavie March,2011 Chapter1 1 Solutions for Chapter 1 3. Wewillcountthetransferascompletedwhenthelastdatabitarrivesatitsdesti- nation.AnalternativeinterpretationwouldbetocountuntilthelastACKarrives backatthesender,inwhichcasethetimewouldbehalfanRTT(25ms)longer. (a) 2initialRTT’s(100ms)+1000KB/1.5Mbps(transmit)+RTT/2(propaga- tion=25ms) 0.125 + 8Mbit/1.5Mbps= 0.125+5.333 sec = 5.458 sec. If we pay ≈ morecarefulattentiontowhenamegais106versus220,weget 8,192,000bits/1,500,000bps=5.461sec,foratotaldelayof5.586sec. (b) Totheaboveweaddthetimefor999RTTs(thenumberofRTTsbetween when packet 1 arrives and packet 1000 arrives), for a total of 5.586 + 49.95=55.536. (c) Thisis49.5RTTs,plustheinitial2,for2.575seconds. (d) Rightafterthehandshakingisdonewesendonepacket.OneRTTafterthe handshakingwesendtwopackets. AtnRTTspasttheinitialhandshaking wehavesent1+2+4+ +2n =2n+1 1packets. Atn=9wehave ··· − thusbeenabletosendall1,000packets;thelastbatcharrives0.5RTTlater. Totaltimeis2+9.5RTTs,or.575sec. 4. Theanswerisinthebook. 5. Propagationdelayis4 103m/(2 108m/s)=2 10−5sec=20µs.100bytes/20µs × × × is5bytes/µs,or5MBps,or40Mbps.For512-bytepackets,thisrisesto204.8Mbps. 6. Theanswerisinthebook. 7. Postaladdressesarestronglyhierarchical(withageographicalhierarchy,which network addressing may or may not use). Addresses also provide embedded “routing information”. Unlike typical network addresses, postal addresses are longandofvariablelengthandcontainacertainamountofredundantinforma- tion. Thislastattributemakesthemmoretolerantofminorerrorsandinconsis- tencies. Telephonenumbers,atleastthoseassignedtolandlines,aremoresim- ilar to network addresses: they are (geographically)hierarchical, fixed-length, administrativelyassigned, andin more-or-lessone-to-onecorrespondencewith nodes. 8. One might want addresses to serve as locators, providinghints as to how data shouldberouted.Oneapproachforthisistomakeaddresseshierarchical. Another property might be administratively assigned, versus, say, the factory- assigned addresses used by Ethernet. Other address attributes that might be relevant are fixed-length v. variable-length, and absolute v. relative (like file names). Chapter1 2 Ifyouphoneatoll-freenumberforalargeretailer,anyofdozensofphonesmay answer. Arguably,then,allthesephoneshavethesamenon-unique“address”.A moretraditionalapplicationfornon-uniqueaddressesmightbeforreachingany ofseveralequivalentservers(orrouters). Non-uniqueaddressesarealsouseful whenglobalreachabilityisnotrequired,suchastoaddressthecomputerswithin a single corporationwhenthosecomputerscannotbe reachedfromoutside the corporation. 9. Video oraudioteleconferencetransmissionsamonga reasonablylargenumber ofwidelyspreadsiteswouldbeanexcellentcandidate: unicastwouldrequirea separateconnectionbetweeneachpairofsites, whilebroadcastwouldsendfar toomuchtraffictositesnotinterestedinreceivingit. Deliveryofvideoandaudio streamsforatelevisionchannelonlytothosehouseholdscurrentlyinterestedin watchingthatchannelisanotherapplication. Tryingtoreachanyofseveralequivalentservers,eachofwhichcanprovidethe answer to some query, would be anotherpossible use, althoughthe receiverof manyresponsestothequerywouldneedtodealwiththepossiblylargevolume ofresponses. 10. STDMandFDMbothworkbestforchannelswithconstantanduniformband- width requirements. For both mechanismsbandwidththat goesunusedby one channelissimplywasted,notavailabletootherchannels. Computercommuni- cationsareburstyandhavelongidleperiods;suchusagepatternswouldmagnify thiswaste. FDM andSTDMalso requirethatchannelsbeallocated(and,forFDM,beas- signedbandwidth)wellinadvance.Again,theconnectionrequirementsforcom- putingtendtobetoodynamicforthis;attheveryleast,thiswouldprettymuch precludeusingonechannelperconnection. FDM waspreferredhistoricallyforTV/radiobecauseit is verysimple to build receivers;italsosupportsdifferentchannelsizes. STDMwaspreferredforvoice because it makes somewhat more efficient use of the underlyingbandwidth of the medium, and because channelswith differentcapacities was not originally anissue. 11. 10Gbps=1010bps,meaningeachbitis10−10 sec(0.1ns)wide. Thelengthin thewireofsuchabitis.1ns 2.3 108m/sec=0.023mor23mm × × 12. xKBis8 1024 xbits. yMbpsisy 106bps;thetransmissiontimewould × × × be8 1024 x/y 106sec=8.192x/yms. × × × 13. (a) TheminimumRTTis2 385,000,000m/3 108m/s=2.57seconds. × × (b) Thedelay bandwidthproductis2.57s 1Gbps=2.57Gb=321MB. × × (c) Thisrepresentstheamountofdatathesendercansendbeforeitwouldbe possibletoreceivearesponse. Chapter1 3 (d) We require at least one RTT from sending the request before the first bit ofthepicturecouldbeginarrivingattheground(TCPwouldtakelonger). 25 MB is 200Mb. Assuming bandwidth delay only, it would then take 200Mb/1000Mbps=0.2secondstofinishsending,foratotaltimeof0.2+ 2.57=2.77secuntilthelastpicturebitarrivesonearth. 14. Theanswerisinthebook. 15. (a) Delay-sensitive;themessagesexchangedareshort. (b) Bandwidth-sensitive,particularlyforlargefiles. (Technicallythisdoespre- sumethattheunderlyingprotocolusesalargemessagesizeorwindowsize; stop-and-waittransmission(asinSection2.5ofthetext)withasmallmes- sagesizewouldbedelay-sensitive.) (c) Delay-sensitive;directoriesaretypicallyofmodestsize. (d) Delay-sensitive; a file’s attributesare typicallymuch smaller than the file itself. 16. (a) On a 100 Mbpsnetwork, each bit takes 1/108 = 10 ns to transmit. One packetconsistsof12000bits, andso isdelayedduetobandwidth(serial- ization) by 120µs along each link. The packet is also delayed 10µs on eachofthetwolinksduetopropagationdelay,foratotalof260µs. (b) Withthreeswitchesandfourlinks,thedelayis 4 120µs+4 10µs=520µs × × (c) With cut-through,the switch delays the packetby 200 bits = 2µs. There is still one 120µs delay waiting for the last bit, and 20µs of propagation delay,sothetotalis142µs. Toputitanotherway,thelastbitstillarrives 120µs after the first bit; the first bit now faces two link delays and one switchdelaybutneverhastowaitforthelastbitalongtheway. 17. Theanswerisinthebook. 18. (a) The effective bandwidth is 100Mbps; the sender can send data steadily at this rate and the switches simply stream it along the pipeline. We are assuming here that no ACKs are sent, and that the switches can keep up andcanbufferatleastonepacket. (b) Thedatapackettakes520µsasin16(b)abovetobedelivered;the400bit ACKstake4µs/linktobesentback,pluspropagation,foratotalof4 4µs × +4 10µs=56µs; thusthetotalRTTis576µs. 12000bitsin576µsis × about20.8Mbps. (c) 100 4.7 109bytes/12hours=4.7 1011bytes/(12 3600s) 10.9MBps × × × × ≈ =87Mbps. 19. (a) 100 106bps 10 10−6sec=1000bits=125bytes. × × × Chapter1 4 (b) The first-bit delay is 520µs through the store-and-forward switch, as in 16(a).100 106bps 520 10−6sec=52000bits=650bytes. × × × (c) 1.5 106bps 50 10−3sec=75,000bits=9375bytes. × × × (d) The path is through a satellite, i.e. between two ground stations, not to asatellite;thisground-to-satellite-to-groundpathmakesthetotalone-way travel distance 2 35,900,000 meters. With a propagation speed of c = × 3 108meters/sec,theone-waypropagationdelayisthus2 35,900,000/c × × =0.24sec. Bandwidth delayisthus1.5 106bps 0.24sec=360,000 × × × bits 45KBytes ≈ 20. (a) Per-link transmit delay is 104bits / 108bps = 100 µs. Total transmission timeincludinglinkandswitchpropagationdelays=2 100+2 20+35= × × 275 µs. (b) Whensendingastwopackets,thetimetotransmitonepacketiscutinhalf. Hereisatableoftimesforvariousevents: T=0 start T=50 Afinishessendingpacket1,startspacket2 T=70 packet1finishesarrivingatS T=105 packet1departsforB T=100 Afinishessendingpacket2 T=155 packet2departsforB T=175 bit1ofpacket2arrivesatB T=225 lastbitofpacket2arrivesatB Thisissmallerthantheanswertopart(a)becausepacket1startstomake itswaythroughtheswitchwhilepacket2isstillbeingtransmittedonthe firstlink,effectivelygettinga50µsheadstart. Smallerisfaster,here. 21. (a) Withoutcompression the total time is 1MB/bandwidth. When we com- pressthefile,thetotaltimeis compression time+compressed size/bandwidth Equatingtheseandrearranging,weget bandwidth=compression size reduction/compression time =0.5MB/1sec=0.5MB/secforthefirstcase, =0.6MB/2sec=0.3MB/secforthesecondcase. (b) Latencydoesn’taffecttheanswerbecauseitwouldaffectthecompressed anduncompressedtransmissionequally. 22. Thenumberofpacketsneeded,N,is 106/D ,whereDisthepacketdatasize. ⌈ ⌉ Given that overhead= 50 N and loss = D (we have already counted the lost × packet’sheaderintheoverhead),wehaveoverhead+loss=50 106/D +D. ×⌈ ⌉ D overhead+loss 1000 51000 10000 15000 20000 22500 Chapter1 5 Theoptimalsizeis10,000byteswhichminimizestheabovefunction. 23. Comparisonofcircuitsandpacketsresultasfollows: (a) Circuitspayanup-frontpenaltyof1024bytesbeingsentononeroundtrip for a total data count of 2048+n, whereas packets pay an ongoing per packetcostof24bytesforatotalcountof1024 n/1000.Sothequestion × really asks how many packet headers does it take to exceed 2048 bytes, whichis86. Thusforfiles86,000bytesorlonger,usingpacketsresultsin moretotaldatasentonthewire. (b) The total transfer latency for packets is the sum of the transmit delays, wheretheper-packettransmittimetisthepacketsizeoverthebandwidthb (8192/b),introducedbyeachofsswitches(s t),totalpropagationdelay × forthelinks((s+2) 0.002),theperpacketprocessingdelaysintroduced × byeachswitch(s 0.001),andthetransmitdelayforallthepackets,where × the total packet count c is n/1000, at the source (c t). Resulting in a × totallatencyof(8192s/b)+0.003s+0.004+(8.192n/b)=(0.02924+ 0.000002048n)seconds.Thetotallatencyforcircuitsisthetransmitdelay forthewholefile(8n/b),thetotalpropagationdelayforthelinks,andthe setup cost for the circuit which is just like sending one packet each way on the path. Solving the resulting inequality 0.02924 + 8.192(n/b) > 0.076576+8(n/b)fornshowsthatcircuitsachievealowerdelayforfiles largerthanorequalto987,000B. (c) Only the payload to overhead ratio size effects the number of bits sent, andtheretherelationshipissimple. Thefollowingtableshowthelatency resultsofvaryingtheparametersbysolvingforthenwherecircuitsbecome faster, as above. This table does not show how rapidly the performance diverges;forvaryingpitcanbesignificant. s b p pivotaln 5 4Mbps 1000 987000 6 4Mbps 1000 1133000 7 4Mbps 1000 1280000 8 4Mbps 1000 1427000 9 4Mbps 1000 1574000 10 4Mbps 1000 1721000 5 1Mbps 1000 471000 5 2Mbps 1000 643000 5 8Mbps 1000 1674000 5 16Mbps 1000 3049000 5 4Mbps 512 24000 5 4Mbps 768 72000 5 4Mbps 1014 2400000 (d) Manyresponsesare probablyreasonablehere. The modelonlyconsiders thenetworkimplications,anddoesnottakeintoaccountusageofprocess- ing or state storage capabilities on the switches. The model also ignores thepresenceofothertrafficorofmorecomplicatedtopologies. Chapter1 6 24. The time to send one 12000-bitpacket is 12000bits/100Mbps = 120 µs. The lengthofcableneededtoexactlycontainsuchapacketis120 µs 2 108m/sec × × =24,000meters. 12000bitsin24000metersis50bitsper100m.Withanextra10bitsofdelayin each100m, we havea totalof60bits/100mor0.6bits/m. A 12000-bitpacket nowfills12000/(.6bits/m)=20,000meters. 25. For music we would need considerably more bandwidth, but we could toler- ate high (but bounded) delays. We could not necessarily tolerate higher jitter, though;seeSection6.5.1. We mightacceptan audibleerrorin voice traffic everyfew seconds; we might reasonably want the error rate during music transmission to be a hundredfold smaller. Audible errors would come either from outright packet loss, or from jitter(apacket’snotarrivingontime). Latency requirements for music, however, might be much lower; a several- seconddelaywouldbeinconsequential.Voicetraffichasatleastatenfoldfaster requirementhere. 26. (a) 640 480 3 30bytes/sec=26.4MB/sec × × × (b) 160 120 1 5=96,000bytes/sec=94KB/sec × × × (c) 650MB/75min=8.7MB/min=148KB/sec (d) 8 10 72 72pixels=414,720bits=51,840bytes. At14,400bits/sec, × × × thiswouldtake28.8seconds(ignoringoverheadforframingandacknowl- edgments). 27. Theanswerisinthebook. 28. (a) A file server needs lots of peak bandwidth. Latency is relevant only if itdominatesbandwidth;jitterandaveragebandwidthareinconsequential. Nolostdataisacceptable,butwithoutreal-timerequirementswecansim- plyretransmitlostdata. (b) A print server needs less bandwidth than a file server (unless images are extremelylarge).Wemaybewillingtoaccepthigherlatencythan(a),also. (c) Afileserverisadigitallibraryofasort,butingeneraltheworldwideweb getsalongreasonablywellwith muchless peakbandwidththanmostfile serversprovide. (d) Forinstrumentmonitoringwedon’tcareaboutlatencyorjitter.Ifdatawere continually generated, rather than bursty, we might be concerned mostly withaveragebandwidthratherthanpeak,andifthedatareallywereroutine wemightjustacceptacertainfractionofloss. (e) For voice we need guaranteedaverage bandwidth and bounds on latency and jitter. Some lost data might be acceptable; e.g. resulting in minor dropoutsmanysecondsapart. Chapter1 7 (f) Forvideoweareprimarilyconcernedwithaveragebandwidth.Forthesim- plemonitoringapplicationhere,relativelymodestvideoofExercise26(b) might suffice; we could even go to monochrome (1bit/pixel), at which point160 120 5frames/secrequires12KB/sec. Wecouldtoleratemulti- × × secondlatencydelays; theprimaryrestrictionis thatif themonitoringre- vealedaneedforinterventionthenwestillhavetimetoact. Considerable loss,evenofentireframes,wouldbeacceptable. (g) Full-scaletelevisionrequiresmassivebandwidth. Latency,however,could behours.Jitterwouldbelimitedonlybyourcapacitytoabsorbthearrival- time variations by buffering. Some loss would be acceptable, but large losseswouldbevisuallyannoying. 29. In STDM the offeredtimeslices are always the same length, and are wasted if they are unused by the assigned station. The round-robin access mechanism would generally give each station only as much time as it needed to transmit, or noneif the station hadnothingto send, andso networkutilizationwouldbe expectedtobemuchhigher. 30. (a) Intheabsenceofanypacketlossesorduplications,whenweareexpecting the Nth packet we get the Nth packet, and so we can keep track of N locallyatthereceiver. (b) The scheme outlined here is the stop-and-wait algorithm of Section 2.5; asisindicatedthere,a headerwithatleastonebitofsequencenumberis needed(todistinguishbetweenreceivinganewpacketandaduplicationof thepreviouspacket). (c) With out-of-orderdeliveryallowed, packetsup to 1 minuteapartmustbe distinguishablevia sequence number. Otherwise a very old packetmight arriveandbeacceptedascurrent. Sequencenumberswouldhavetocount ashighas bandwidth 1minute/packet size × 31. Ineachcaseweassumethelocalclockstartsat1000. (a) Latency:100.Bandwidth:highenoughtoreadtheclockevery1unit. 1000 1100 1001 1101 1002 1102 1003 1104 tinybitofjitter: latency=101 1004 1104 (b) Latency=100; bandwidth: only enough to read the clock every 10 units. Arrivaltimesfluctuateduetojitter. 1000 1100 1020 1110 latency=90 1040 1145 1060 1180 latency=120 1080 1184 Chapter1 8 (c) Latency=5;zerojitterhere: 1000 1005 1001 1006 1003 1008 welost1002 1004 1009 1005 1010 32. Generally, with MAX PENDING =1, one or two connectionswill be accepted andqueued;thatis,thedatawon’tbedeliveredtotheserver. Theotherswillbe ignored;eventuallytheywilltimeout. Whenthefirstclientexits,anyqueuedconnectionsareprocessed. 34. Note that UDP accepts a packet of data from any source at any time; TCP re- quires an advance connection. Thus, two clients can now talk simultaneously; theirmessageswillbeinterleavedontheserver.

Description:
Computer Networks: A Systems Approach Fifth Edition Solutions Manual Larry Peterson and Bruce Davie 2011 1
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.