通信网基本概念与主体结构(第二版)答案Ch8

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

CommunicationNetworks(2ndEdition)Chapter8SolutionsSolutionstoChapter88.1.TheIPheaderchecksumonlyverifiestheintegrityofIPheader.Discusstheprosandconsofdoingthechecksumontheheaderpartversusontheentirepacket.Solution:Errorcheckingintheheaderismoreimportantbecausethepacketisroutedaccordingtotheheaderinformation.Inaddition,thedeliveryofthedataatthedestinationtothehigherlayersalsorequirestheheaderinformation.Thuserrorcheckingoftheheaderprotectsagainstmisdeliveryoftheinformation.Restrictingtheerrorcheckingtotheheaderalsosimplifiestheimplementationinthenodes,requireslesschecksumbits,andpreventsunnecessarypacketdiscard.Somehigherlayerscantoleratesomedataerrors,andhigherlayersalsohavetheoptionofperformingretransmission.8.2.IdentifytheaddressclassofthefollowingIPaddresses:200.58.20.165;128.167.23.20;16.196.128.50;50.156.10.10;250.10.24.96.Solution:AnIPaddresshasafixedlengthof32bits,wherethemostsignificantbitsidentifytheparticularclass.Therefore,toidentifytheaddressclassweneedtoconvertthedotted-decimalnotationbackintoitsbinarycounterpart,andcomparethebinarynotationtotheclassprefixesshowninFigure8.5inthetext.(Recallthatthedotted-decimalnotationwasdevisedtocommunicateaddressesmorereadilytootherpeople.Inthisnotation,the32bitsaredividedintofourgroupsof8bits–separatedbyperiods–andthenconvertedtotheirdecimalcounterpart.)Thefirstfewbits(showninred)oftheaddresscanbeusedtodeterminetheclass.27262524232221201286432168421200.58.20.16511001000.00111010.00010100.10100101ClassC128.167.23.2010000000.10100111.00010111.00010100ClassB16.196.128.5000010000.11000100.10000000.00110010ClassA150.156.10.1010010110.10011100.00001010.00001010ClassB250.10.24.9611111010.00001010.00011000.01100000ClassELeon-Garcia/Widjaja1CommunicationNetworks(2ndEdition)Chapter8Solutions8.3.ConverttheIPaddressesinProblem8.2totheirbinaryrepresentation.Solution:27262524232221201286432168421200.58.20.16511001000.00111010.00010100.10100101128.167.23.2010000000.10100111.00010111.0001010016.196.128.5000010000.11000100.10000000.00110010150.156.10.1010010110.10011100.00001010.00001010250.10.24.9611111010.00001010.00011000.011000008.4.IdentifytherangeofIPv4addressesspannedbyClassA,ClassB,andClassC.Solution:TherangeofIPv4addressesspannedbyeachclassis:ClassA:1.0.0.0to127.255.255.255ClassB:128.0.0.0to191.255.255.255ClassC:192.0.0.0to223.255.255.2558.5.WhatareallthepossiblesubnetmasksfortheClassCaddressspace?Listallthesubnetmasksindotted-decimalnotation,anddeterminethenumberofhostspersubnetsupportedforeachsubnetmask.Solution:255.255.255.128supports126hosts(notincludingthebroadcastaddress)255.255.255.192supports62hosts255.255.255.224supports30hosts255.255.255.240supports14hosts255.255.255.248supports7hosts255.255.255.252supports3hosts255.255.255.254and255.255.255.255arenotpracticallyusable.Leon-Garcia/Widjaja2CommunicationNetworks(2ndEdition)Chapter8Solutions8.6.AhostinanorganizationhasanIPaddress150.32.64.34andasubnetmask255.255.240.0.Whatistheaddressofthissubnet?WhatistherangeofIPaddressesthatahostcanhaveonthissubnet?Solution:Address:10010110001000000100000000100010Mask:11111111111111111111000000000000Subnet:10010110001000000100000000000000Host:From:10010110001000000100000000000001To:100101100010000001001111111111108.7.Auniversityhas150LANswith100hostsineachLAN.Solutionsfollowquestions:(a)SupposetheuniversityhasoneClassBaddress.Designanappropriatesubnetaddressingscheme.AClassBaddresshas14bitsforthenetworkIDand16bitsforthehostID.TodesignanappropriatesubnetaddressingschemeweneedtodecidehowmanybitstoallocatetothehostIDversusthesubnetID.Wecanchooseeither7bitsor8bitstoidentifythehosts.Ifweallocate8bitsfortoidentifythehost,asshownbelow,thentherearesufficientsubnet-idbitstocoverupto28=256LANsandenoughhost-idbitstocoverupto256hostsforeachLAN.Thesubnetmaskinthiscaseis255.255.255.010Network-idSubnet-idHost-id011516232431Subnetmask:255.255.255.0Ifweallocate7bitsfortoidentifythehost,asshownbelow,thentherearesufficientsubnet-idbitstocoverupto29=512LANsandenoughhost-idbitstocoverupto128hostsforeachLAN.Thesubnetmaskinthiscaseis255.255.255.128.Thechoicebetween7or8bitstorepresentthehostsdependsonwhichislikelytogrowmore,thenumberofsubnetsorthenumberofhostsinaLAN.Alternativelyavariable-lengthprefixschemeusing7-bithostaddresses,andgroupingtheseformlargersubnetsprovidesgreaterflexibilityinaccommodatingfuturechanges.(b)DesignanappropriateCIDRaddressingscheme.CIDRaddressingschemeinvolvesdevisingaprefixlengththatindicatesthelengthofthenetworkmask.Inthiscase,8bitsarerequiredtoidentifyeachLAN(since127150255)and7bitsarerequiredtoidentifyeachhostineachLAN(since63100127).ThereforeaCIDRaddresswouldusea17-bitprefix,andthushaveanaddressoftheformaddress/17.Leon-Garcia/Widjaja3CommunicationNetworks(2ndEdition)Chapter8Solutions8.8.AsmallorganizationhasaClassCaddressforsevennetworkseachwith24hosts.Whatisanappropriatesubnetmask?Solution:AClassCaddressrequires21bitsforitsnetworkID,leaving8bitsforthehostIDandsubnetIDtoshare.Onepossibleschemewouldassign4bitstothehostand4tothesubnetID,asshownbelow.Thenumberofbit

1 / 35
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功