tcp ip协议new

tcp ip协议new

ID:34475577

大小:808.69 KB

页数:709页

时间:2019-03-06

上传者:jjuclb
tcp ip协议new_第1页
tcp ip协议new_第2页
tcp ip协议new_第3页
tcp ip协议new_第4页
tcp ip协议new_第5页
资源描述:

《tcp ip协议new》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

ComputerNetworks(CS422)DouglasComerComputerScienceDepartmentPurdueUniversityWestLafayette,IN47907http://www.cs.purdue.edu/people/comerÓCopyright2003.Allrightsreserved.Thisdocumentmaynotbereproducedbyanymeanswithouttheexpresswrittenconsentoftheauthor. COMPUTERNETWORKS(CS422)2003ProfessorDouglasComerCS422--PART112003 PARTIIntroductionCS422--PART122003 TopicAndScopeComputernetworksandinternets:anoverviewofconcepts,terminology,andtechnologiesthatformthebasisfordigitalcommunicationinprivatecorporatenetworksandtheglobalInternetCS422--PART132003 YouWillLearnTerminologyCommunicationbasics±Mediaandsignals±Asynchronousandsynchronouscommunication±Relationshipsamongbandwidth,throughput,andnoise±Frequency-divisionandtime-divisionmultiplexingCS422--PART142003 YouWillLearn(continued)Networkingandnetworktechnologies±Packetswitching±Framing,parity,anderrordetection±Localandwideareatechnologies±Networkaddressing±Connectionandextension(repeaters,bridges,hubs,switches)±Topologiesandwiring(star,ring,bus)±Next-hopforwarding±Shortestpathcomputation±Measuresofdelayandthroughput±ProtocollayersCS422--PART152003 YouWillLearn(continued)InternetsandInternetworking±Motivationandconcept±InternetProtocol(IP)datagramformatandaddressing±Internetroutersandrouting±Addressbinding(ARP)±Internetcontrolmessages(ICMP)±UserDatagramProtocol(UDP)±TransmissionControlProtocol(TCP)±ProtocolportsanddemultiplexingCS422--PART162003 YouWillLearn(continued)Networkapplications±Client-serverparadigm±Domainnamesystem(DNS)±Filetransfer(FTP)±Mailtransfer(SMTP)±IPTelephony±Remotelogin(TELNET)±Webtechnologiesandprotocols(HTTP,CGI)±NetworksecurityCS422--PART172003 WhatYouWillNotLearnCommercialaspects±Products±Vendors±Prices±NetworkoperatingsystemsHowtopurchase/con®gure/operateHowtodesign/implementprotocolsoftwareCS422--PART182003 BackgroundRequiredAbilitytoprograminCKnowledgeoflow-levelprogrammingconstructs±Pointers±Bit®eldsinstructures±PrintfFamiliaritywithbasictools±Texteditor±Compiler/linker/loaderCS422--PART192003 BackgroundRequired(continued)Basicknowledgeofoperatingsystems±Terminology±Functionality±ProcessesandconcurrentprocessingDesiretolearnCS422--PART1102003 ScheduleOfTopicsSignals,media,bandwidth,throughput,andmultiplexing(~1weeks)Networking:concepts,technologies(~4weeks)Internetworkingfundamentals(~5weeks)Internetapplications(~5weeks)CS422--PART1112003 LabsAnessentialpartofthecourseYouwillgainhands-onexperiencewith±Networkprogrammingandapplications±Packetanalysis±Networkmeasurement±SocketprogrammingLabswillstartwithnetworkapplicationsrightaway!CS422--PART1122003 MotivationForNetworkingInformationaccessInteractionamongcooperativeapplicationprogramsResourcesharingCS422--PART1132003 PracticalResultsE-mailFiletransfer/accessWebbrowsingRemotelogin/executionIPTelephonyTheInternetCS422--PART1142003 WhatANetworkIncludesTransmissionhardwareSpecial-purposehardwaredevices±Interconnecttransmissionmedia±Controltransmission±RunprotocolsoftwareProtocolsoftware±Encodesandformatsdata±DetectsandcorrectsproblemsCS422--PART1152003 WhatANetworkDoesProvidescommunicationthatis±Reliable±Fair±Ef®cient±Secure±FromoneapplicationtoanotherCS422--PART1162003 WhatANetworkDoes(continued)Automaticallydetectsandcorrects±Datacorruption±Dataloss±Duplication±Out-of-orderdeliveryAutomatically®ndsoptimalpathfromsourcetodestinationCS422--PART1172003 NetworkProgrammingNetworkallowsarbitraryapplicationstocommunicateProgrammerdoesnotneedtounderstandnetworktechnologiesNetworkfacilitiesaccessedthroughanApplicationProgramInterfaceCS422--PART1182003 BasicParadigmForInternetCommunicationEstablishcontactExchangedata(bi-directional)TerminatecontactCS422--PART1192003 EstablishingContactPerformedbypairofapplicationsOneapplicationstartsandwaitsforcontact(calledserver)Otherapplicationinitiatescontact(calledclient)CS422--PART1202003 IdentifyingAWaitingApplicationConceptuallytwoitemsspeci®ed±Computer±ApplicationonthatcomputerTerminology±Computeridenti®edbydomainname±Applicationidenti®edbyprogramnameCS422--PART1212003 RepresentationsAndTranslationsHumansusenamessuchas±www.netbook.cs.purdue.edu(computer)±ftp(application)NetworkprotocolsrequirebinaryvaluesLibraryroutinesexisttotranslatefromnamestonumbersCS422--PART1222003 ExampleAPIOperationMeaningawait_contactusedbyaservertowaitforcontactfromaclientmake_contactusedbyaclienttocontactaservercname_to_compusedtotranslateacomputernametoanequivalentinternalbinaryvalueappname_to_appnumusedtotranslateaprogramnametoanequivalentinternalbinaryvaluesendusedbyeitherclientorservertosenddatarecvusedbyeitherclientorservertoreceivedatasend_eofusedbybothclientandserveraftertheyhavefinishedsendingdataCS422--PART1232003 Example#1:EchoUsefulfornetworktestingServerreturnsexactcopyofdatasentUseroncomputerXrunsechoserver22000UseronanothercomputerrunsechoclientX22000CS422--PART1242003 Example#2:ChatMiniatureversionofInternetchatserviceAllowstwouserstocommunicateUseroncomputerXrunschatserver25000UseronanothercomputerrunschatclientX25000CS422--PART1252003 ExampleApplication:WebServerUseroncomputerXrunswebserver27000UseronanothercomputerrunsbrowserandentersURL:http://X:27000/index.htmlCS422--PART1262003 ExampleCodeUsingAPI:Echoserver/*echoserver.c*/#include#include#include#include"win32.h"#defineBUFFSIZE256/*-----------------------------------------------------------------------**Program:echoserver*Purpose:waitforaconnectionfromanechoclientandechodata*Usage:echoserver**-----------------------------------------------------------------------*/intmain(intargc,char*argv[]){connectionconn;intlen;charbuff[BUFFSIZE];if(argc!=2){(void)fprintf(stderr,"usage:%s ",argv[0]);exit(1);}CS422--PART1272003 Echoserver(2of2)/*waitforaconnectionfromanechoclient*/conn=await_contact((appnum)atoi(argv[1]));if(conn<0)exit(1);/*iterate,echoingalldatareceiveduntilendoffile*/while((len=recv(conn,buff,BUFFSIZE,0))>0)(void)send(conn,buff,len,0);send_eof(conn);return0;}ActuallyworksontheInternetAPIcallsreplaceconventionalI/ONonetworkingknowledgerequiredCS422--PART1282003 ExampleCodeUsingAPI:Webserver/*webserver.c*/#include#include#include#include#include"win32.h"#ifdefined(LINUX)||defined(SOLARIS)#include#endif#defineBUFFSIZE256#defineSERVER_NAME"CNAIDemoWebServer"#defineERROR_400"

Error400

Theservercouldn'tunderstandyourrequest. "#defineERROR_404"

Error404

Document otfound. "#defineHOME_PAGE"

WelcometotheCNAIDemoServer

Whynotvisit:

  • NetbookHomePage
  • ComerBooksHomePage
"#defineTIME_PAGE"

Thecurrentdateis:%s

"intrecvln(connection,char*,int);CS422--PART1292003 Webserver(2of6)/*-----------------------------------------------------------------------**Program:webserver*Purpose:servehard-codedwebpagestowebclients*Usage:webserver**-----------------------------------------------------------------------*/intmain(intargc,char*argv[]){connectionconn;intn;charbuff[BUFFSIZE],cmd[16],path[64],vers[16];char*timestr;#ifdefined(LINUX)||defined(SOLARIS)structtimevaltv;#elifdefined(WIN32)time_ttv;#endifif(argc!=2){(void)fprintf(stderr,"usage:%s ",argv[0]);exit(1);}CS422--PART1302003 Webserver(3of6)while(1){/*waitforcontactfromaclientonspecifiedappnum*/conn=await_contact((appnum)atoi(argv[1]));if(conn<0)exit(1);/*readandparsetherequestline*/n=recvln(conn,buff,BUFFSIZE);sscanf(buff,"%s%s%s",cmd,path,vers);/*skipallheaders-readuntilwegetr alone*/while((n=recvln(conn,buff,BUFFSIZE))>0){if(n==2&&buff[0]=='r'&&buff[1]==' ')break;}/*checkforunexpectedendoffile*/if(n<1){(void)send_eof(conn);continue;}CS422--PART1312003 Webserver(4of6)/*checkforarequestthatwecannotunderstand*/if(strcmp(cmd,"GET")||(strcmp(vers,"HTTP/1.0")&&strcmp(vers,"HTTP/1.1"))){send_head(conn,400,strlen(ERROR_400));(void)send(conn,ERROR_400,strlen(ERROR_400),0);(void)send_eof(conn);continue;}/*sendtherequestedwebpageora"notfound"error*/if(strcmp(path,"/")==0){send_head(conn,200,strlen(HOME_PAGE));(void)send(conn,HOME_PAGE,strlen(HOME_PAGE),0);}elseif(strcmp(path,"/time")==0){#ifdefined(LINUX)||defined(SOLARIS)gettimeofday(&tv,NULL);timestr=ctime(&tv.tv_sec);#endif(void)sprintf(buff,TIME_PAGE,timestr);send_head(conn,200,strlen(buff));(void)send(conn,buff,strlen(buff),0);}else{/*notfound*/send_head(conn,404,strlen(ERROR_404));(void)send(conn,ERROR_404,strlen(ERROR_404),0);}(void)send_eof(conn);}}CS422--PART1322003 Webserver(5of6)/*-----------------------------------------------------------------------*send_head-sendanHTTP1.0headerwithgivenstatusandcontent-len*-----------------------------------------------------------------------*/voidsend_head(connectionconn,intstat,intlen){char*statstr,buff[BUFFSIZE];/*convertthestatuscodetoastring*/switch(stat){case200:statstr="OK";break;case400:statstr="BadRequest";break;case404:statstr="NotFound";break;default:statstr="Unknown";break;}CS422--PART1332003 Webserver(6of6)/**sendanHTTP/1.0responsewithServer,Content-Length,*andContent-Typeheaders.*/(void)sprintf(buff,"HTTP/1.0%d%sr ",stat,statstr);(void)send(conn,buff,strlen(buff),0);(void)sprintf(buff,"Server:%sr ",SERVER_NAME);(void)send(conn,buff,strlen(buff),0);(void)sprintf(buff,"Content-Length:%dr ",len);(void)send(conn,buff,strlen(buff),0);(void)sprintf(buff,"Content-Type:text/htmlr ");(void)send(conn,buff,strlen(buff),0);(void)sprintf(buff,"r ");(void)send(conn,buff,strlen(buff),0);}CS422--PART1342003 SummaryStudyingnetworksisimportantbecause±Theworldisinterconnected±ApplicationsnowoperateinadistributedenvironmentThiscourse±Coversallofnetworkingandinternetworking±Explainsthemystery±WillbehardworkCS422--PART1352003 Summary(continued)Computernetworks±Deliverdatafromsourcetodestination±Automatically®ndoptimalpaths±HandleproblemsthatoccurWewilllearnhownetworksdotheaboveCS422--PART1362003 PARTIISignals,Media,andDataTransmissionCS422--PART212003 TransmissionOfInformationWell-understoodbasicsFromphysics±Energy±ElectromagneticwavepropagationFrommathematics±CodingtheoryCS422--PART222003 TransmissionMediaCopperwire±Needtwowires±Possibilities*Twistedpair*CoaxialcableOptical®ber±Flexible±Light``staysin''Air/space±UsedforelectromagnetictransmissionCS422--PART232003 FormsOfEnergyUsedToTransmitDataElectriccurrentAudiblesoundsOmni-directionalelectromagneticwaves±RadioFrequency(RF)±InfraredCS422--PART242003 FormsOfEnergyUsedToTransmitData(continued)Directionalelectromagneticwaves±Point-to-pointsatellitechannel±Limitedbroadcast(spotbeam)±Microwave±LaserbeamCS422--PART252003 TypesOfSatellitesGeosynchronousEarthOrbit(GEO)LowEarthOrbit(LEO)±ArrayneededCS422--PART262003 TwoImportantPhysicalLimitsOfATransmissionSystemPropagationdelay±Timerequiredforsignaltotravelacrossmedia±Example:electromagneticradiationtravelsthroughspaceatthespeedoflight(C=3´108meterspersecond)Bandwidth±MaximumtimespersecondthesignalcanchangeCS422--PART272003 TransmissionOfDataNetworkhardwareencodesinformationfortransmissionTwotypesofencoding±Analog(amountofenergyproportionaltovalueofitemsent)±Digital(twoformsofenergytoencode0and1)ComputernetworksusethelatterCS422--PART282003 ExampleDigitalEncodingMedium±CopperwireEnergyform±ElectriccurrentEncoding±Negativevoltageencodes1±Positivevoltageencodes0CS422--PART292003 IllustrationOfDigitalEncodingvoltage+0...............................................................................................time-101001KnownaswaveformdiagramX-axiscorrespondstotimeY-axiscorrespondstovoltageCS422--PART2102003 EncodingDetailsAlldetailsspeci®edbyastandardSeveralorganizationsproducenetworkingstandards±IEEE±ITU±EIAHardwarethatadherestostandardinteroperableCS422--PART2112003 TheRS-232CStandardExampleuse±Connectiontokeyboard/mouse±SerialportonPCSpeci®edbyEIAVoltageis+15or-15Cablelimitedto~50feetNewerEIAstandardisRS-422(ITUstandardisV.24)UsesasynchronouscommunicationCS422--PART2122003 AsynchronousCommunicationSenderandreceivermustagreeon±Numberofbitspercharacter±DurationofeachbitReceiver±Doesnotknowwhenacharacterwillarrive±MaywaitforeverToensuremeaningfulexchangesend±Startbitbeforecharacter±OneormorestopbitsaftercharacterCS422--PART2132003 IllustrationOfRS-232voltage+15........................0....................................................................................................time......................-15..idlestart1011010stopidleStartbit±Sameas0±NotpartofdataStopbit±Sameas1±FollowsdataCS422--PART2142003 DurationOfABitInRS-232CDeterminedbybaudrate±Examplebaudrates:9.6Kbaud,28.8Kbaud,33.6Kbaud±Durationofbitis1/baud_rateSenderandreceivermustagreeaprioriReceiversamplessignalDisagreementresultsinframingerrorCS422--PART2152003 Two-WayCommunicationDesirableinpracticeRequireseachsidetohavetransmitterandreceiverCalledfullduplexCS422--PART2162003 IllustrationOfFull-DuplexCommunicationdatadataTTRRGGTransmitterononesideconnectedtoreceiveronotherSeparatewiresneededtocarrycurrentineachdirectionCommongroundwireDB-9,DB-15,orDB-25connectorused±Pin2istransmit±Pin3isreceiveCS422--PART2172003 ElectricalTransmission(TheBadNews)It'sanuglyworld±Electricalenergydissipatesasittravelsalong±Wireshaveresistance,capacitance,andinductancewhichdistortsignals±Magneticorelectricalinterferencedistortssignals±DistortioncanresultinlossormisinterpretationCS422--PART2182003 IllustrationOfDistortedSignalForASingleBitrealidealInpractice±DistortioncanbemuchworsethanillustratedCS422--PART2192003 ConsequencesRS-232hardwaremusthandleminordistortions±Takemultiplesamplesperbit±ToleratelessthanfullvoltageCannotuseelectricalcurrentforlong-distancetransmissionCS422--PART2202003 Long-DistanceCommunicationImportantfact:anoscillatingsignaltravelsfartherthandirectcurrentForlong-distancecommunication±Sendasinewave(calledacarrierwave)±Change(modulate)thecarriertoencodedataNote:modulatedcarriertechniqueusedforradioandtelevisionCS422--PART2212003 IllustrationOfACarriersignal...............................................................................................timeCarrier±Usuallyasinewave±OscillatescontinuouslyFrequencyofcarrier®xedCS422--PART2222003 TypesOfModulationAmplitudemodulation(usedinAMradio)Frequencymodulation(usedinFMradio)Phaseshiftmodulation(usedfordata)CS422--PART2232003 IllustrationOfAmplitudeModulationdata0...............................................................................................time1(a)signal...............................................................................................time(b)Strengthofsignalencodes0or1OnecycleofwaveneededforeachbitDataratelimitedbycarrierbandwidthCS422--PART2242003 IllustrationOfPhase-ShiftModulationsignal...............................................................................................timeChangeinphaseencodesKbitsDataratehigherthancarrierbandwidthCS422--PART2252003 Phase-ShiftExamplesignal...........................................................................................timesignal...........................................................................................timeSectionofwaveisomittedatphaseshiftDatabitsdeterminesizeofomittedsectionCS422--PART2262003 ModemHardwaredeviceUsedforlong-distancecommunicationContainsseparatecircuitryfor±Modulationofoutgoingsignal±DemodulationofincomingsignalNameabbreviatesmodulator/demodulatorCS422--PART2272003 IllustrationOfModemsUsedOverALongDistancelong-distanceconnectionmodem(4wires)modemcomputerMMcomputeratsite1atsite2DDRS-232RS-232canbecanbeusedusedOnemodemateachendSeparatewirescarrysignalsineachdirectionModulatorononemodemconnectstodemodulatoronotherCS422--PART2282003 TypesOfModemsConventional±Usefourwires±TransmitmodulatedelectricalwaveOptical±Useglass®bers±TransmitmodulatedlightWireless±Useair/space±TransmitmodulatedRFwaveCS422--PART2292003 TypesOfModems(continued)Dialup±Usevoicetelephonesystem±TransmitmodulatedaudiotoneNote:inpractice,adialupmodemusesmultipletonessimultaneouslyCS422--PART2302003 IllustrationOfDialupModemmodemmodemcomputerVoiceTelephonecomputeratsite1Systematsite2RS-232RS-232canbecanbeusedusedModemcan±Dial±AnswerCarrierisaudiotoneCS422--PART2312003 ModemTerminologyFull-duplexmodem±Provides2-waycommunication±Allowssimultaneoustransmission±UsesfourwiresHalf-duplexmodem±Provides2-waycommunication±Transmitsinonedirectionatanytime±UsestwowiresCS422--PART2322003 RecallPropagationdelay±Determinedbyphysics±TimerequiredforsignaltotravelacrossmediumBandwidth±Electricalpropertyofphysicaltransmissionsystem±MaximumtimespersecondsignalcanchangeCS422--PART2332003 FundamentalMeasuresOfADigitalTransmissionSystemDelay±Theamountoftimerequiredforabitofdatatotravelfromoneendtotheother±UsuallythesameasthepropagationdelayinunderlyinghardwareThroughput±Thenumberofbitspersecondthatcanbetransmitted±RelatedtounderlyinghardwarebandwidthCS422--PART2342003 RelationshipBetweenDigitalThroughputAndBandwidthGivenbyNyquist'stheorem:D=2Blog2Kwhere±Dismaximumdatarate±Bishardwarebandwidth±KisnumberofvaluesusedtoencodedataCS422--PART2352003 ApplicationsOfNyquist'sTheoremForRS-232±Kis2becauseRS-232usestwovalues,+15or-15volts,toencodedatabits±Dis2Blog22=2BForphase-shiftencoding±SupposeKis8(possibleshifts)±Dis2Blog28=2B´3=6BCS422--PART2362003 MoreBadNewsPhysicstellsusthatrealsystemsemitandabsorbenergy(e.g.,thermal)EngineerscallunwantedenergynoiseNyquist'stheorem±Assumesanoise-freesystem±OnlyworksintheoryShannon'stheoremcorrectsfornoiseCS422--PART2372003 Shannon'sTheoremGivescapacityinpresenceofnoise:C=Blog2(1+S/N)where±Cistheeffectivechannelcapacityinbitspersecond±Bishardwarebandwidth±Sistheaveragepower(signal)±NisthenoiseS/Nissignal-to-noiseratioCS422--PART2382003 ApplicationOfShannon'sTheoremConventionaltelephonesystem±Engineeredforvoice±Bandwidthis3000Hz±Signal-to-noiseratioisapproximately1000±Effectivecapacityis3000log2(1+1000)=~30000bpsConclusion:dialupmodemshavelittlehopeofexceeding28.8KbpsCS422--PART2392003 TheBottomLineNyquist'stheoremmeans®ndingawaytoencodemorebitspercycleimprovesthedatarateShannon'stheoremmeansthatnoamountofcleverengineeringcanovercomethefundamentalphysicallimitsofarealtransmissionsystemCS422--PART2402003 MultiplexingFundamentaltonetworkingGeneralconceptUsedin±Lowestleveloftransmissionsystems±Higherlevelsofnetworkhardware±Protocolsoftware±ApplicationsCS422--PART2412003 TheGeneralConceptOfMultiplexingsourcesdestinations112233multiplexorsharedchanneldemultiplexorSeparatepairsofcommunicationstravelacrosssharedchannelMultiplexingpreventsinterferenceEachdestinationreceivesonlydatasentbycorrespondingsourceCS422--PART2422003 MultiplexingTerminologyMultiplexor±Deviceormechanism±Acceptsdatafrommultiplesources±SendsdataacrosssharedchannelDemultiplexor±Deviceormechanism±Extractsdatafromsharedchannel±SendstocorrectdestinationCS422--PART2432003 TwoBasicTypesOfMultiplexingTimeDivisionMultiplexing(TDM)±Onlyoneitematatimeonsharedchannel±Itemmarkedtoidentifysource±DemultiplexorusesidentifyingmarktoknowwheretodeliverFrequencyDivisionMultiplexing(FDM)±Multipleitemstransmittedsimultaneously±Usesmultiple``channels''CS422--PART2442003 TransmissionSchemesBasebandtransmission±Usesonlylowfrequencies±EncodesdatadirectlyBroadbandtransmission±Usesmultiplecarriers±Canusehigherfrequencies±Achieveshigherthroughput±HardwaremorecomplexandexpensiveCS422--PART2452003 Scienti®cPrincipleBehindFrequencyDivisionMultiplexingTwoormoresignalsthatusedifferentcarrierfrequenciescanbetransmittedoverasinglemediumsimultaneouslywithoutinterference.Note:thisisthesameprinciplethatallowsacableTVcompanytosendmultipletelevisionsignalsacrossasinglecable.CS422--PART2462003 WaveDivisionMultiplexingFacts±FDMcanbeusedwithanyelectromagneticradiation±LightiselectromagneticradiationWhenappliedtolight,FDMiscalledwavedivisionmultiplexing±InformallycalledcolordivisionmultiplexingCS422--PART2472003 SummaryVarioustransmissionschemesandmediaavailable±Electricalcurrentovercopper±Lightoverglass±ElectromagneticwavesDigitalencodingusedfordataAsynchronouscommunication±Usedforkeyboardsandserialports±RS-232isstandard±SenderandreceiveragreeonbaudrateCS422--PART2482003 Summary(continued)Modems±Usedforlong-distancecommunication±Availableforcopper,optical®ber,dialup±Transmitmodulatedcarrier*Phase-shiftmodulationpopular±Classi®edasfull-orhalf-duplexTwomeasuresofdigitalcommunicationsystem±Delay±ThroughputCS422--PART2492003 Summary(continued)Nyquist'stheorem±Relatesthroughputtobandwidth±EncouragesengineerstousecomplexencodingShannon'stheorem±Adjustsfornoise±Speci®eslimitsonrealtransmissionsystemsCS422--PART2502003 Summary(continued)Multiplexing±Fundamentalconcept±Usedatmanylevels±Appliedinbothhardwareandsoftware±Twobasictypes*Time-divisionmultiplexing(TDM)*Frequency-divisionmultiplexing(FDM)Whenappliedtolight,FDMiscalledwave-divisionmultiplexingCS422--PART2512003 PARTIIIPackets,Frames,Parity,Checksums,andCRCsCS422--PART312003 TheProblemCannotaffordindividualnetworkconnectionperpairofcomputersReasons±Installingwiresconsumestimeandmoney±Maintainingwiresconsumesmoney(esp.long-distanceconnections)CS422--PART322003 SolutionACsharedresourceBDNetworkhas±Sharedcentralcore±ManyattachedstationsCS422--PART332003 TheProblemWithSharingDemandhighSomeapplicationshavelargetransfersSomeapplicationscannotwaitNeedmechanismforfairnessCS422--PART342003 PacketSwitchingPrincipleSolutionforfairness±Dividedataintosmallunitscalledpackets±AlloweachstationopportunitytosendapacketbeforeanystationsendsanotherFormoftime-divisionmultiplexingCS422--PART352003 IllustrationOfPacketSwitchingmultiplexingoccursComputer1usingchanneltosendapacketcomputer1computer2computer3(a)Computer2usingchanneltosendapacketcomputer1computer2computer3(b)AcquiresharedmediumSendonepacketAllowotherstationsopportunitytosendbeforesendingagainCS422--PART362003 PacketDetailsDependonunderlyingnetwork±Minimum/maximumsize±FormatHardwarepacketcalledaframeCS422--PART372003 ExampleFrameFormatUsedWithRS-232sohblockofdatainframeeotRS-232ischaracter-orientedSpecialcharacters±Startofheader(soh)±Endoftext(eot)CS422--PART382003 WhenDataContainsSpecialCharactersTranslatetoalternativeformCalledbytestuffingExampleCharacterCharactersInDataSentsohescxeotescyescesczCS422--PART392003 IllustrationOfFrameWithByteStuf®ngescsoheotesc(a)sohesczescxescyesczeot(b)StuffedframelongerthanoriginalNecessaryevilCS422--PART3102003 HandlingErrorsDatacanbecorruptedduringtransmission±Bitslost±BitvalueschangedFrameincludesadditionalinformationtodetect/correcterror±Setbysender±CheckedbyreceiverStatisticalguaranteeCS422--PART3112003 ErrorDetectionAndRecoveryTechniquesParitybit±Oneadditionalbitpercharacter±Canuse*Evenparity*Oddparity±CannothandleerrorthatchangestwobitsCS422--PART3122003 ErrorDetectionAndRecoveryTechniques(continued)Checksum±Treatdataassequenceofintegers±Computeandsendarithmeticsum±Handlesmultiplebiterrors±CannothandleallerrorsCS422--PART3132003 ErrorDetectionAndRecoveryTechniques(continued)CyclicRedundancyCheck(CRC)±Mathematicalfunctionfordata±Morecomplextocompute±HandlesmoreerrorsCS422--PART3142003 ExampleChecksumComputationHelloworld.48656C6C6F20776F726C642E4865+6C6C+6F20+776F+726C+642E+carry=71FCChecksumcomputedoverdataChecksumappendedtoframeCS422--PART3152003 IllustrationOfErrorsAChecksumFailsToDetectDataItemChecksumDataItemChecksumInBinaryValueInBinaryValue0001100113001020000000113000110001100113totals77SecondbitreversedineachitemChecksumisthesameCS422--PART3162003 BuildingBlocksForCRCExclusiveoraboutouta000011b101110(a)(b)Shiftregistershiftregistershiftregister11011011001101outputvaluetobeoutputinputvalueshiftedinchangesshiftsin(a)(b)±ashowsstatusbeforeshift±bshowsstatusaftershift±OutputsameastopbitCS422--PART3172003 ExampleOfCRCHardware0000000000000000inputComputes16-bitCRCRegistersinitializedtozeroBitsofmessageshiftedinCRCfoundinregistersCS422--PART3182003 ExampleCRCComputation0111111111111111inputofall1's1111111111111111inputofall1's1110111111011110inputofall1'sInputdataisall1bitsCRCshownafter15,16,and17bitsshiftedFeedbackintroduceszeroesinCRCCS422--PART3192003 IllustrationOfFrameUsingCRCsohblockofdatawithbytestuffingeotCRCCRCcoversdataonlyCS422--PART3202003 SummaryPackettechnology±Inventedtoprovidefairaccessinsharednetwork±SenderdividesdataintosmallpacketsHardwarepacketscalledframesCanusepacket-switchingwithRS-232±Specialcharactersdelimitbeginningandendofframe±Byte-stuf®ngneededwhenspecialcharactersappearindataCS422--PART3212003 Summary(continued)Todetectdatacorruption±Senderaddsinformationtopacket±ReceiverchecksTechniques±Paritybit±Checksum±CyclicRedundancyCheck(CRC)±ProvidestatisticalguaranteesCS422--PART3222003 PARTIVLocalAreaNetworks(LANs)CS422--PART412003 Classi®cationTerminologyNetworktechnologiesclassi®edintothreebroadcategoriesLocalAreaNetwork(LAN)MetropolitanAreaNetwork(MAN)WideAreaNetwork(WAN)LANandWANmostwidelydeployedCS422--PART422003 TheLocalAreaNetwork(LAN)Engineeringclassi®cationExtremelypopular(mostnetworksareLANs)ManyLANtechnologiesexistCS422--PART432003 KeyFeaturesOfALANHighthroughputRelativelylowcostLimitedtoshortdistanceOftenrelyonsharedmediaCS422--PART442003 Scienti®cJusti®cationForLocalAreaNetworksAcomputerismorelikelytocommunicatewithcomputersthatarenearbythanwithcomputersthataredistant.KnownasthelocalityprincipleCS422--PART452003 TopologyMathematicaltermRoughlyinterpretedas``geometryforcurvedsurfaces''CS422--PART462003 NetworkTopologySpeci®esgeneral``shape''ofanetworkHandfulofbroadcategoriesOftenappliedtoLANPrimarilyreferstointerconnectionsHidesdetailsofactualdevicesCS422--PART472003 StarTopologycomputersconnectedhubtonetworkCentralcomponentofnetworkknownashubEachcomputerhasseparateconnectiontohubCS422--PART482003 RingTopologyconnectionfromonecomputertoanotherNocentralfacilityConnectionsgodirectlyfromonecomputertoanotherCS422--PART492003 BusTopologyBus(sharedcable)SharedmediumformsmaininterconnectEachcomputerhasaconnectiontothemediumCS422--PART4102003 ExampleBusNetwork:EthernetMostpopularLANWidelyusedIEEEstandard802.3Severalgenerations±Sameframeformat±Differentdatarates±DifferentwiringschemesCS422--PART4112003 SharedMediumInALANSharedmediumusedforalltransmissionsOnlyonestationtransmitsatanytimeStations``taketurns''usingmediumMediaAccessControl(MAC)policyensuresfairnessCS422--PART4122003 IllustrationOfEthernetTransmissionEthernetCable(sharedbus)SendingcomputerdestinationcomputerSignalpropagatestransmitsbitsreceivesacopyalongtheentireofaframeofeachbitcableOnlyonestationtransmitsatanytimeSignalpropagatesacrossentirecableAllstationsreceivetransmissionCSMA/CDmediaaccessschemeCS422--PART4132003 CSMA/CDParadigmMultipleAccess(MA)±Multiplecomputersattachtosharedmedia±EachusessameaccessalgorithmCarrierSense(CS)±Waituntilmediumidle±BegintotransmitframeSimultaneoustransmissionpossibleCS422--PART4142003 CSMA/CDParadigm(continued)Twosimultaneoustransmissions±Interferewithoneanother±CalledcollisionCSMAplusCollisionDetection(CD)±Listentomediumduringtransmission±Detectwhetheranotherstation'ssignalinterferes±BackofffrominterferenceandtryagainCS422--PART4152003 BackoffAfterCollisionWhencollisionoccurs±Waitrandomtimet1,0£t1£d±UseCSMAandtryagainIfsecondcollisionoccurs±Waitrandomtimet2,0£t2£2dDoublerangeforeachsuccessivecollisionCalledexponentialbackoffCS422--PART4162003 MediaAccessOnAWirelessNetddcomputer1computer2computer3Limitedrange±Notallstationsreceivealltransmissions±CannotuseCSMA/CDExampleindiagram±Maximumtransmissiondistanceisd±Stations1and3donotreceiveeachother'stransmissionsCS422--PART4172003 CSMA/CAUsedonwirelessLANsBothsidessendsmallmessagefollowedbydatatransmission±``XisabouttosendtoY''±``YisabouttoreceivefromX''±DataframesentfromXtoYPurpose:informallstationsinrangeofXorYbeforetransmissionKnownasCollisionAvoidance(CA)CS422--PART4182003 Wi-FiWirelessLANTechnologyPopularUsesCSMA/CAformediaaccessStandardssetbyIEEE±802.11b(11Mbps,sharedchannel)±802.11a(54Mbps,sharedchannel)NamedWi-Fibyconsortiumofvendors(toenhancepopularappeal)CS422--PART4192003 IdentifyingADestinationAllstationsonshared-mediaLANreceivealltransmissionsToallowsendertospecifydestination±Eachstationassigneduniquenumber±Knownasstation'saddress±EachframecontainsaddressofintendedrecipientCS422--PART4202003 EthernetAddressingStandardizedbyIEEEEachstationassignedunique48-bitaddressAddressassignedwhennetworkinterfacecard(NIC)manufacturedCS422--PART4212003 EthernetAddressRecognitionEachframecontainsdestinationaddressAllstationsreceiveatransmissionStationdiscardsanyframeaddressedtoanotherstationImportant:interfacehardware,notsoftware,checksaddressCS422--PART4222003 PossibleDestinationsPacketcanbesentto:±Singledestination(unicast)±Allstationsonnetwork(broadcast)±Subsetofstations(multicast)AddressusedtodistinguishCS422--PART4232003 AdvantagesOfAddressAlternativesUnicast±Ef®cientforinteractionbetweentwocomputersBroadcast±Ef®cientfortransmittingtoallcomputersMulticast±Ef®cientfortransmittingtoasubsetofcomputersCS422--PART4242003 BroadcastOnEthernetAll1saddressspeci®esbroadcastSender±Placesbroadcastaddressinframe±Transmitsonecopyonsharednetwork±AllstationsreceivecopyReceiveralwaysacceptsframethatcontains±Station'sunicastaddress±ThebroadcastaddressCS422--PART4252003 MulticastOnEthernetHalfofaddressesreservedformulticastNetworkinterfacecard±Alwaysacceptsunicastandbroadcast±CanacceptzeroormoremulticastaddressesSoftware±Determinesmulticastaddresstoaccept±InformsnetworkinterfacecardCS422--PART4262003 PromiscuousModeDesignedfortesting/debuggingAllowsinterfacetoacceptallpacketsAvailableonmostinterfacehardwareCS422--PART4272003 IdentifyingFrameContentsIntegertypefieldtellsrecipientthetypeofdatabeingcarriedTwopossibilities±Self-identifyingorexplicittype(hardwarerecordstype)±Implicittype(applicationsendingdatamusthandletype)CS422--PART4282003 ConceptualFrameFormatFrameFrameDataAreaHeaderorPayloadHeader±Containsaddressandtypeinformation±Layout®xedPayload±ContainsdatabeingsentCS422--PART4292003 IllustrationOfEthernetFrameDest.SourceFramePreambleAddressAddressTypeDataInFrameCRC866246-15004HeaderPayloadSenderplaces±Sender'saddressinsource±Recipient'saddressindestination±Typeofdatainframetype±CyclicredundancycheckinCRCCS422--PART4302003 ExampleEthernetTypesValueMeaning0000-05DCReservedforusewithIEEELLC/SNAP0800InternetIPVersion40805CCITTX.250900Ungermann-BassCorporationnetworkdebugger0BADBanyanSystemsCorporationVINES1000-100FBerkeleyUNIXTrailerencapsulation6004DigitalEquipmentCorporationLAT6559FrameRelay8005HewlettPackardCorporationnetworkprobe8008AT&TCorporation8014SiliconGraphicsCorporationnetworkgames8035InternetReverseARP8038DigitalEquipmentCorporationLANBridge805CStanfordUniversityVKernel809BAppleComputerCorporationAppleTalk80C4-80C5BanyanSystemsCorporation80D5IBMCorporationSNA80FF-8103WellfleetCommunications8137-8138NovellCorporationIPX818DMotorolaCorporationFFFFReservedCS422--PART4312003 WhenNetworkHardwareDoesNotIncludeTypesSendingandreceivingcomputersmustagree±Toonlysendonetypeofdata±Toputtypeinformationin®rstfewoctetsofpayloadMostsystemsneedtypeinformationCS422--PART4322003 IllustrationOfTypeInformationAddedToDataframeheaderframedatatypeinformationInpractice±Typeinformationsmallcomparedtodatacarried±FormatoftypeinformationstandardizedCS422--PART4332003 AStandardForTypeInformationLLCSNAPAAAA0300000008003-octetOUIidentifies2-octetTYPEvalueastandardsdefinedbythatorganizationorganizationDe®nedbyIEEEUsedwhenhardwaredoesnotincludetype®eldCalledLLC/SNAPheaderCS422--PART4342003 DemultiplexingOnTypeNetworkinterfacehardware±Receivescopyofeachtransmittedframe±Examinesaddressandeitherdiscardsoraccepts±PassesacceptedframetosystemsoftwareNetworkdevicesoftware±Examinesframetype±PassesframetocorrectsoftwaremoduleCS422--PART4352003 NetworkAnalyzerDeviceusedfortestingandmaintenanceListensinpromiscuousmodeProduces±Summaries(e.g.,%ofbroadcastframes)±Speci®citems(e.g.,framesfromagivenaddress)CS422--PART4362003 EthernetWiringThreeschemes±Correspondtothreegenerations±AllusesameframeformatCS422--PART4372003 OriginalEthernetWiringthickEthernetcabletransceiverterminatorAUIcableUsedheavycoaxialcableFormalname10Base5CalledthicknetCS422--PART4382003 SecondGenerationEthernetWiringthinEthernetcableBNCconnectorterminatorUsedthinnercoaxialcableFormalname10Base2CalledthinnetCS422--PART4392003 ModernEthernetWiringhubtwistedpairwiringRJ-45connectorUsesahubFormalname10Base-TCalledtwistedpairEthernetCS422--PART4402003 EthernetWiringInAnOf®cewiringclosetoffice1office2office3office4office5office6office7office8(a)office1office2office3office4office5office6office7office8(b)huboffice1office2office3office4office5office6office7office8(c)CS422--PART4412003 ANoteAboutEthernetTopologyApparently±OriginalEthernetusedbustopology±ModernEthernetusesstartopologyInfact,modernEthernetis±Physicalstar±Logicalbus±Calledstar-shapedbusCS422--PART4422003 HigherSpeedEthernetsFastEthernet±Operatesat100Mbps±Formally100Base-T±Twowiringstandards±10/100EthernetdevicesavailableGigabitEthernet±Operatesat1000Mbps(1Gbps)±SlightlymoreexpensiveCS422--PART4432003 AnotherLANUsingBusTopologyLocalTalk±DevelopedbyAppleCorp.±Simpletouse±SlowbycurrentstandardsCS422--PART4442003 IllustrationOfLocalTalkshortcabletransceiverTransceiverrequiredperstationTransceiverterminatescableCS422--PART4452003 RingTopologyconnectionfromonecomputertoanotherOnceapopulartopologyforLANsBits¯owinsingledirectionCS422--PART4462003 TokenPassingDesignedforringtopologyGuaranteesfairaccessToken±Special(reserved)message±Small(afewbits)CS422--PART4472003 TokenPassingParadigmStation±Waitsfortokentoarrive±Transmitsonepacketaroundring±TransmitstokenaroundringWhennostationhasdatatosend±TokencirculatescontinuouslyCS422--PART4482003 TokenPassingRingTransmissioncomputernotholdingsenderholdingtokentokenpassesbitstransmitsbitsofframedestinationpassessenderreceivesandmakesacopybitsofframeStationwaitsfortokenbeforesendingSignaltravelsaroundentireringSenderreceivesitsowntransmissionCS422--PART4492003 StrengthsOfTokenRingApproachEasydetectionof±Brokenring±Hardwarefailures±InterferenceCS422--PART4502003 WeaknessesOfTokenRingApproachBrokenwiredisablesentireringPoint-to-pointwiring±Awkwardinof®ceenvironment±Dif®culttoadd/movestationsCS422--PART4512003 FailureRecoveryInRingNetworksAutomaticfailurerecoveryIntroducedbyFDDIUsestworingsTerminology±Dual-attached±Counterrotating±SelfhealingCS422--PART4522003 IllustrationOfFailureRecoveryouterringusedfordatainnerringunusedexceptduringfailure(a)NormaloperationusesoneoftworingsCS422--PART4532003 IllustrationOfFailureRecoverystationsadjacenttoouterringusedfordatafailedstationfailureloopbackinnerringunusedexceptduringfailure(a)(b)NormaloperationusesoneoftworingsSecondringusedforloopbackduringfailureCS422--PART4532003 TokenPassingRingTechnologiesProNet-10±Operatedat10MbpsIBMTokenRing±Originallyoperatedat4Mbps±Laterversionoperatedat16MbpsFiberDistributedDataInterconnect(FDDI)±Operatesat100MbpsAllarenowvirtuallyobsoleteCS422--PART4542003 ExampleOfAPhysicalStarTopologyAsynchronousTransferMode(ATM)DesignedbytelephonecompaniesIntendedtoaccommodate±Voice±Video±DataCS422--PART4552003 ATMcomputersattachedtoswitchATMswitch(electronic)BuildingblockknownasATMswitchEachstationconnectstoswitchSwitchescanbeinterconnectedCS422--PART4562003 DetailsOfATMConnectioncomputerfibercarryingfibercarryingdatatoswitchdatatocomputerATMswitchFull-duplexconnectionsTwo®bersusedCS422--PART4572003 ATMCharacteristicsHighdatarates(e.g.155Mbps)Fixedsizepackets±Calledcells±ImportantforvoiceCellsizeis53octets±48octetsofdata±5octetsofheaderCS422--PART4582003 SummaryLocalAreaNetworks±Designedforshortdistance±Usesharedmedia±ManytechnologiesexistTopologyreferstogeneralshape±Bus±Ring±StarCS422--PART4592003 Summary(continued)Address±Uniquenumberassignedtostation±Putinframeheader±RecognizedbyhardwareAddressforms±Unicast±Broadcast±MulticastCS422--PART4602003 Summary(continued)Typeinformation±Describesdatainframe±Setbysender±ExaminedbyreceiverFrameformat±Headercontainsaddressandtypeinformation±PayloadcontainsdatabeingsentCS422--PART4612003 Summary(continued)CurrentlypopularLANtechnology±Ethernet(bus)OlderLANtechnologies±IBMTokenRing±FDDI(ring)±ATM(star)CS422--PART4622003 Summary(continued)Wiringandtopology±Candistinguish*Logicaltopology*Physicaltopology(wiring)±Huballows*Star-shapedbus*Star-shapedringCS422--PART4632003 PARTVExtendingNetworks(Repeaters,Bridges,Switches)CS422--PART512003 MotivationRecall±EachLANtechnologyhasadistancelimitation±Example:CSMA/CDcannotworkacrossarbitrarydistanceHowever±Usersdesirearbitrarydistanceconnections±Example:twocomputersacrossacorporatecampusarepartofoneworkgroupCS422--PART522003 ExtensionTechniquesMustnotviolatedesignassumptionsOftenpartoforiginaldesignExampletechnique±UseconnectionwithlowerdelaythancopperCS422--PART532003 IllustrationOfExtensionForOneComputerAUIconnectionEthernetfromcomputeropticalfibersAUIconnectiontotransceiverfibermodemfibermodemOptical®ber±Haslowdelay±Hashighbandwidth±Canpasssignalswithinspeci®edboundsCS422--PART542003 Repeatermaximum-sizeEthernetsegmentmaximum-sizeEthernetsegmentdirectconnectionRHardwaredeviceConnectstwoLANsegmentsCopiessignalfromonesegmenttotheotherConnectioncanbeextendedwithFiberOpticIntra-RepeaterLinkCS422--PART552003 Repeater(continued)Ampli®essignalsfromonesegmentandsendstotheotherOperatesintwodirectionssimultaneouslyPropagatesnoiseandcollisionsCS422--PART562003 RepeatersAndTheOriginalEthernetWiringSchemesegmentonfloor3R1verticalsegmentsegmentonfloor2R2segmentonfloor1R3Designedforof®ceOnlytworepeatersbetweenanypairofstationsCS422--PART572003 HubPhysically±Smallelectronicdevice±Hasconnectionsforseveralcomputers(e.g.,4or20)Logically±Operatesonsignals±Propagateseachincomingsignaltoallconnections±Similartoconnectingsegmentswithrepeaters±DoesnotunderstandpacketsExtremelylowcostCS422--PART582003 ConnectionMultiplexingConcept±MultiplestationsshareonenetworkconnectionMotivation±Cost±ConvenienceofwiringHardwaredevicerequiredCS422--PART592003 IllustrationOfConnectionMultiplexingthickEthernetcabletransceiverAUIcablesmultiplexorMultiplexingdeviceattachedtonetworkStationsattachtodevicePredateshubsCS422--PART5102003 ModernEquivalentOfConnectionMultiplexingHubsusednowConnectionsonahub±Oneforeachattachedcomputer±OneforanotherhubMultiplehubs±Canbeinterconnectedinadaisychain±Operateasonegianthub±CalledstackingCS422--PART5112003 BridgeHardwaredeviceConnectstwoLANsegmentsForwardsframesDoesnotforwardnoiseorcollisionsLearnsaddressesand®ltersAllowsindependenttransmissionCS422--PART5122003 BridgeAlgorithmListeninpromiscuousmodeWatchsourceaddressinincomingframesMakelistofcomputersoneachsegmentOnlyforwardifnecessaryAlwaysforwardbroadcast/multicastCS422--PART5132003 IllustrationOfABridgestandardconnection(sameasothercomputers)segment1segment2BUVWXYZEventSegment1ListSegment2ListBridgeboots––UsendstoVU–VsendstoUU,V–ZbroadcastsU,VZYsendstoVU,VZ,YYsendstoXU,VZ,YXsendstoWU,VZ,Y,XWsendstoZU,V,WZ,Y,XBridgeusessourceaddresstolearnlocationofcomputersLearningiscompletelyautomatedCS422--PART5142003 ExtendingABridgebuilding1building2bridgeopticalfibersfiberbetweenbuildingsfibermodemmodemTypicallyoptical®berCanspanbuildingsCS422--PART5152003 SatelliteBridgingsatellitesegmentsegmentatsite1bridgebridgeatsite2CanspanarbitrarydistanceCS422--PART5162003 ApparentProblemsegmentasegmentbB1B2B3segmentcsegmentdB4B5B6B7segmentesegmentfsegmentgsegmenthComplexbridgeconnectionsmaynotbeapparentAddingonemorebridgeinadvertentlyintroducesacycleConsiderabroadcastframeCS422--PART5172003 SpanningTreeAlgorithmAllowscyclesUsedbyallbridgesto±Discoveroneanother±Breakcycle(s)KnownasDistributedSpanningTree(DST)CS422--PART5182003 SwitchElectronicdevicePhysicallysimilartoahubLogicallysimilartoabridge±Operatesonpackets±Understandsaddresses±OnlyforwardswhennecessaryPermitsseparatepairsofcomputerstocommunicateatthesametimeHighercostthanhubCS422--PART5192003 ConceptualSwitchFunctionportsforcomputersswitchConceptualoperation±OneLANsegmentperhost±BridgeinterconnectseachpairofsegmentsNOTanactualimplementationCS422--PART5202003 SummaryLANs±Havedistancelimitations±CanbeextendedFibercanbeusedbetweencomputerandLANRepeater±ConnectstwoLANsegments±Repeatsandampli®esallsignals±ForwardsnoiseandcollisionsCS422--PART5212003 Summary(continued)Bridge±ConnectstwoLANsegments±Understandsframes±Usesaddresses±Doesnotforwardnoiseorcollisions±AllowssimultaneoustransmissiononsegmentsCS422--PART5222003 Summary(continued)Hub±Centralfacilityinstar-shapednetwork±OperateslikearepeaterSwitch±Centralfacilityinstar-shapednetwork±OperateslikeasetofbridgedsegmentsCS422--PART5232003 PARTVILong-DistanceandLocalLoopDigitalConnectionTechnologiesCS422--PART612003 MotivationConnectcomputersacross±Largegeographicdistance±Publicright-of-way*Streets*Buildings*RailroadsCS422--PART622003 Long-DistanceTransmissionTechnologiesGeneralsolution:leasetransmissionfacilitiesfromtelephonecompany±Point-to-pointtopology±NOTpartofconventionaltelephonesystem±Copper,®ber,microwave,orsatellitechannelsavailable±CustomerchoosesanalogordigitalCS422--PART632003 EquipmentForLeasedConnectionsAnalogcircuit±ModemrequiredateachendDigitalcircuit±DSU/CSUrequiredateachendCS422--PART642003 DigitalCircuitTechnologyDevelopedbytelephonecompaniesDesignedforuseinvoicesystem±Analogaudiofromuser'stelephoneconvertedtodigitalformat±Digitalformatsentacrossnetwork±DigitalformatconvertedbacktoanalogaudioCS422--PART652003 IllustrationOfDigitizedSignal7.................................................................................................................6.................................................................................................................5.................................................................................................................4.................................................................................................................3.................................................................................................................2.................................................................................................................1.................................................................................................................0timePicknearestdigitalvalueforeachsampleTelephonestandardknownasPulseCodeModulation(PCM)CS422--PART662003 DSU/CSUPerformstwofunctions;usuallyasingle``box''NeededbecausetelephoneindustrydigitalencodingdiffersfromcomputerindustrydigitalencodingDSUportion±TranslatesbetweentwoencodingsCSUportion±Terminatesline±AllowsformaintenanceCS422--PART672003 IllustrationOfDSU/CSUDSU/CSUDSU/CSUPhoneCompanycomputerconnectiondigitalcircuitcomputerusingcomputerusingtelephonestandardsstandardsCostofdigitalcircuitdependson±Distance±CapacityCS422--PART682003 TelephoneStandardsForDigitalCircuitsSpeci®edbythetelephoneindustryineachcountryDifferaroundtheworldAreknownbytwo-characterstandardnameNote:engineersrefertocircuitcapacityas``speed''CS422--PART692003 ExampleCircuitCapacitiesNameBitRateVoicecallsLocation–0.064Mbps1T11.544Mbps24NorthAmericaT26.312Mbps96NorthAmericaT344.736Mbps672NorthAmericaE12.048Mbps30EuropeE28.448Mbps120EuropeE334.368Mbps480EuropeNote:T2notpopularCS422--PART6102003 CommonDigitalCircuitTerminologyMostcommoninNorthAmerica±T1circuit±T3circuit(28timesT1)Alsoavailable±FractionalT1(e.g.,64Kbpscircuit)CS422--PART6112003 InverseMultiplexingCombinestwoormorecircuitsProducesintermediatecapacitycircuitSpecialhardwarerequired±Neededateachend±CalledinversemultiplexorCS422--PART6122003 ExampleOfInverseMultiplexinginversemuxinversemuxPhoneCompanyconnectiontopairofT1computercomputercircuitsCanalternatebetweencircuitsfor±Everyotherbit±EveryotherbyteCS422--PART6132003 High-CapacityDigitalCircuitsAlsoavailablefromphonecompanyUseoptical®berElectricalstandardscalledSynchronousTransportSignal(STS)OpticalstandardscalledOpticalCarrier(OC)CS422--PART6142003 High-CapacityCircuitsStandardOpticalBitVoiceNameNameRateCallsSTS-1OC-151.840Mbps810STS-3OC-3155.520Mbps2430STS-12OC-12622.080Mbps9720STS-24OC-241,244.160Mbps19440STS-48OC-482,488.320Mbps38880STS-isstandardforelectricalsignalsOC-isstandardforopticalsignalsEngineersusuallyuseOC-terminologyforeverythingOC-3popularCS422--PART6152003 LocalLoopTelephoneterminologyReferstoconnectionbetweenresidence/businessandcentralof®ceCrossespublicright-of-wayOriginallyforanalogPOTS(PlainOldTelephoneService)CS422--PART6162003 DigitalLocalLoopTechnologiesIntegratedServicesDigitalNetwork(ISDN)±Handlesvoiceanddata±RelativelyhighcostforlowbandwidthDigitalSubscriberLine(DSL)CablemodemsHybridFiberCoaxCS422--PART6172003 AsymmetricDigitalSubscriberLine(ADSL)PopularDSLvariantRunsoverconventionalPOTSwiringHighercapacitydownstreamUsesfrequenciesabovePOTSCS422--PART6182003 IllustrationOfADSLWiringstandardtwistedpairconnectingresidenceADSLCO’sADSLmodemmodemdigitalconnectiondigitalconnectiontolocalnetworktoanalogtotelephonetoproviderphoneswitchResidenceTelephoneCentralOfficeDownstreamcanreach6.4MbpsUpstreamcanreach640KbpsCS422--PART6192003 CableModemsSend/receiveoverCATVwiringUseFDMGroupofsubscribersinneighborhoodsharebandwidthCS422--PART6202003 HybridFiberCoaxWiringschemeforcabletoallowdigitalaccessOptical®ber±Highestbandwidth±Extendsfromcentralof®cetoneighborhoodconcentrationpointsCoaxialcable±Lessbandwidth±Extendsfromneighborhoodconcentrationpointtoindividualsubscribers(e.g.,residence)CS422--PART6212003 SummaryTechnologiesexistthatspanlongdistances±Leasedanaloglines(requiremodems)±Leaseddigitalcircuits(requireDSU/CSUs)Digitalcircuits±Availablefromphonecompany±Costdependsondistanceandcapacity±PopularcapacitiescalledT1andT3±FractionalT1alsoavailableCS422--PART6222003 Summary(continued)Highcapacitycircuitsavailable±PopularcapacitiesknownasOC-3,OC-12Localloopreferstoconnectionbetweencentralof®ceandsubscriberLocallooptechnologiesinclude±DSL(especiallyADSL)±CablemodemsCS422--PART6232003 PARTVIIWideAreaNetworks(WANs),Routing,andShortestPathsCS422--PART712003 MotivationConnectmultiplecomputersSpanlargegeographicdistanceCrosspublicright-of-way±Streets±Buildings±RailroadsCS422--PART722003 BuildingBlocksPoint-to-pointlong-distanceconnectionsPacketswitchesCS422--PART732003 PacketSwitchHardwaredeviceConnectsto±Otherpacketswitches±ComputersForwardspacketsUsesaddressesCS422--PART742003 IllustrationOfAPacketSwitchusedtoconnectpacketusedtoconnecttootherpacketswitchtocomputersswitchesSpecial-purposecomputersystem±CPU±Memory±I/Ointerfaces±FirmwareCS422--PART752003 BuildingAWANPlaceoneormorepacketswitchesateachsiteInterconnectswitches±LANtechnologyforlocalconnections±Leaseddigitalcircuitsforlong-distanceconnectionsCS422--PART762003 IllustrationOfAWANswitchswitchatatsite1site2high-speedconnectionsbetweenswitchescomputersconnectedtonetworkswitchswitchatatsite3site4Interconnectionsdependon±Estimatedtraf®c±ReliabilityneededCS422--PART772003 StoreAndForwardBasicparadigmusedinpacketswitchednetworkPacket±Sentfromsourcecomputer±Travelsswitch-to-switch±DeliveredtodestinationSwitch±Storespacketinmemory±Examinespacket'sdestinationaddress±ForwardspackettowarddestinationCS422--PART782003 AddressingInAWANNeed±Uniqueaddressforeachcomputer±Ef®cientforwardingTwo-partaddress±Packetswitchnumber±ComputeronthatswitchCS422--PART792003 IllustrationOfWANAddressingaddress[2,1]address[1,2]switchswitch12address[1,5]address[2,6]Two-partaddressencodedasinteger±High-orderbitsforswitchnumber±Low-orderbitsforcomputernumberCS422--PART7102003 Next-HopForwardinginterface1interface4[1,2]AC[3,2]destinationnexthopswitchswitch13[1,2]interface1[1,5]BD[3,5][1,5]interface1[3,2]interface4switch2[3,5]interface4[2,1]computerE[2,1]EF[2,6][2,6]computerF(a)(b)PerformedbypacketswitchUsestableofroutesTablegivesnexthopCS422--PART7112003 ForwardingTableAbbreviationsDestinationNextHop(1,anything)interface1(3,anything)interface4(2,anything)localcomputerManyentriespointtosamenexthopCanbecondensed(default)Improveslookupef®ciencyCS422--PART7122003 SourceOfRoutingTableInformationManual±Tablecreatedbyhand±Usefulinsmallnetworks±UsefulifroutesneverchangeAutomaticrouting±Softwarecreates/updatestable±Neededinlargenetworks±ChangesrouteswhenfailuresoccurCS422--PART7132003 RelationshipOfRoutingToGraphTheory12123434destin-nextdestin-nextdestin-nextdestin-nextationhopationhopationhopationhop1-1(2,3)1(3,1)1(4,3)2(1,3)2-2(3,2)2(4,2)3(1,3)3(2,3)3-3(4,3)4(1,3)4(2,4)4(3,4)4-node1node2node3node4Graph±Nodemodelsswitch±EdgemodelsconnectionCS422--PART7142003 ShortestPathComputationAlgorithmsfromgraphtheoryNocentralauthority(distributedcomputation)Aswitch±Mustlearnroutetoeachdestination±OnlycommunicateswithdirectlyattachedneighborsCS422--PART7152003 IllustrationOfMinimumWeightPath3111234968235567Labelonedgerepresents``distance''Possibledistancemetric±Geographicdistance±Economiccost±InverseofcapacityDarkenedpathisminimum4to5CS422--PART7162003 AlgorithmsForComputingShortestPathsDistanceVector(DV)±SwitchesexchangeinformationintheirroutingtablesLink-state±SwitchesexchangelinkstatusinformationBothusedinpracticeCS422--PART7172003 DistanceVectorPeriodic,two-wayexchangebetweenneighborsDuringexchange,switchsends±Listofpairs±Eachpairgives(destination,distance)Receiver±Compareseachiteminlisttolocalroutes±ChangesroutesifbetterpathexistsCS422--PART7182003 DistanceVectorAlgorithmGiven:alocalroutingtable,aweightforeachlinkthatconnectstoanotherswitch,andanincomingroutingmessageCompute:anupdatedroutingtableMethod:Maintainadistancefieldineachroutingtableentry;Initializeroutingtablewithasingleentrythathasthedestinationequaltothelocalpacketswitch,thenext-hopunused,andthedistancesettozero;Repeatforever{waitforthenextroutingmessagetoarriveoverthenetworkfromaneighbor;LetNbethesendingswitch;foreachentryinthemessage{LetVbethedestinationintheentryandletDbethedistance;ComputeCasDplustheweightassignedtothelinkoverwhichthemessagearrived;Examineandupdatethelocalroutingtable:if(norouteexiststoV){addanentrytothelocalroutingtablefordestinationVwithnext-hopNanddistanceC;}elseif(arouteexiststhathasnext-hopN){replacethedistanceinexistingroutewithC;}elseif(arouteexistswithdistancegreaterthanC){changethenext-hoptoNanddistancetoC;}}CS422--PART7192003 DistanceVectorIntuitionLet±Nbeneighborthatsenttheroutingmessage±Vbedestinationinapair±Dbedistanceinapair±CbeDplusthecosttoreachthesenderIfnolocalroutetoVorlocalroutehascostgreaterthanC,installaroutewithnexthopNandcostCElseignorepairCS422--PART7202003 ExampleOfDistanceVectorRouting3111234968235567ConsidertransmissionofoneDVmessageNode2sendstonodes3,5,and6Node6installscost8routetonode2Later,node3sendsupdateNode6changesroutetomakenode3thenexthopfordestination2CS422--PART7212003 Link-StateRoutingOvercomesinstabilitiesinDVPairofswitchesperiodically±Testlinkbetweenthem±BroadcastlinkstatusmessageSwitch±Receivesstatusmessages±Computesnewroutes±UsesDijkstra'salgorithmCS422--PART7222003 ExampleOfLink-StateInformation3111234968235567Assumenodes2and3±Testlinkbetweenthem±BroadcastinformationEachnode±Receivesinformation±RecomputesroutesasneededCS422--PART7232003 Dijkstra'sShortestPathAlgorithmInput±Graphwithweightededges±NodenOutput±Setofshortestpathsfromntoeachnode±CostofeachpathCalledShortestPathFirst(SPF)algorithmCS422--PART7242003 Dijkstra'sAlgorithmGiven:agraphwithanonnegativeweightassignedtoeachedgeandadesignatedsourcenodeCompute:theshortestdistancefromthesourcenodetoeachothernodeandanext-hoproutingtableMethod:InitializesetStocontainallnodesexceptthesourcenode;InitializearrayDsothatD[v]istheweightoftheedgefromthesourcetovifsuchanedgeexists,andinfinityotherwise;InitializeentriesofRsothatR[v]isassignedvifanedgeexistsfromthesourcetov,andzerootherwise;while(setSisnotempty){chooseanodeufromSsuchthatD[u]isminimum;if(D[u]isinfinity){nopathexiststonodesinS;quit;}deleteufromsetS;foreachnodevsuchthat(u,v)isanedge{if(visstillinS){c=D[u]+weight(u,v);if(c#include#else#defineclosesocketclose#include#include#include#include#include#endif#include#include#definePROTOPORT5193/*defaultprotocolportnumber*/externinterrno;charlocalhost[]="localhost";/*defaulthostname*//*------------------------------------------------------------------------*Program:client**Purpose:allocateasocket,connecttoaserver,andprintalloutputCS422--PART15492003 ExampleClientCode(2)*Syntax:client[host[port]]**host-nameofacomputeronwhichserverisexecuting*port-protocolportnumberserverisusing**Note:Bothargumentsareoptional.Ifnohostnameisspecified,*theclientuses"localhost";ifnoprotocolportis*specified,theclientusesthedefaultgivenbyPROTOPORT.**------------------------------------------------------------------------*/main(argc,argv)intargc;char*argv[];{structhostent*ptrh;/*pointertoahosttableentry*/structprotoent*ptrp;/*pointertoaprotocoltableentry*/structsockaddr_insad;/*structuretoholdanIPaddress*/intsd;/*socketdescriptor*/intport;/*protocolportnumber*/char*host;/*pointertohostname*/intn;/*numberofcharactersread*/charbuf[1000];/*bufferfordatafromtheserver*/#ifdefWIN32WSADATAwsaData;WSAStartup(0x0101,&wsaData);#endifmemset((char*)&sad,0,sizeof(sad));/*clearsockaddrstructure*/sad.sin_family=AF_INET;/*setfamilytoInternet*/CS422--PART15502003 ExampleClientCode(3)/*Checkcommand-lineargumentforprotocolportandextract*//*portnumberifoneisspecified.Otherwise,usethedefault*//*portvaluegivenbyconstantPROTOPORT*/if(argc>2){/*ifprotocolportspecified*/port=atoi(argv[2]);/*converttobinary*/}else{port=PROTOPORT;/*usedefaultportnumber*/}if(port>0)/*testforlegalvalue*/sad.sin_port=htons((u_short)port);else{/*printerrormessageandexit*/fprintf(stderr,"badportnumber%s ",argv[2]);exit(1);}/*Checkhostargumentandassignhostname.*/if(argc>1){host=argv[1];/*ifhostargumentspecified*/}else{host=localhost;}CS422--PART15512003 ExampleClientCode(4)/*ConverthostnametoequivalentIPaddressandcopytosad.*/ptrh=gethostbyname(host);if(((char*)ptrh)==NULL){fprintf(stderr,"invalidhost:%s ",host);exit(1);}memcpy(&sad.sin_addr,ptrh->h_addr,ptrh->h_length);/*MapTCPtransportprotocolnametoprotocolnumber.*/if(((int)(ptrp=getprotobyname("tcp")))==0){fprintf(stderr,"cannotmap"tcp"toprotocolnumber");exit(1);}/*Createasocket.*/sd=socket(PF_INET,SOCK_STREAM,ptrp->p_proto);if(sd<0){fprintf(stderr,"socketcreationfailed ");exit(1);}/*Connectthesockettothespecifiedserver.*/if(connect(sd,(structsockaddr*)&sad,sizeof(sad))<0){fprintf(stderr,"connectfailed ");exit(1);}CS422--PART15522003 ExampleClientCode(5)/*Repeatedlyreaddatafromsocketandwritetouser'sscreen.*/n=recv(sd,buf,sizeof(buf),0);while(n>0){write(1,buf,n);n=recv(sd,buf,sizeof(buf),0);}/*Closethesocket.*/closesocket(sd);/*Terminatetheclientprogramgracefully.*/exit(0);}CS422--PART15532003 CodeForServerArgumentstoprogram±ProtocolportClanguage#ifdefsforsocketvariantsCS422--PART15542003 ExampleServerCode(1)/*server.c-codeforexampleserverprogramthatusesTCP*/#ifndefunix#defineWIN32#include#include#else#defineclosesocketclose#include#include#include#include#endif#include#include#definePROTOPORT5193/*defaultprotocolportnumber*/#defineQLEN6/*sizeofrequestqueue*/intvisits=0;/*countsclientconnections*//*------------------------------------------------------------------------*Program:server**Purpose:allocateasocketandthenrepeatedlyexecutethefollowing:*(1)waitforthenextconnectionfromaclient*(2)sendashortmessagetotheclient*(3)closetheconnection*(4)gobacktostep(1)CS422--PART15552003 ExampleServerCode(2)*Syntax:server[port]**port-protocolportnumbertouse**Note:Theportargumentisoptional.Ifnoportisspecified,*theserverusesthedefaultgivenbyPROTOPORT.**------------------------------------------------------------------------*/main(argc,argv)intargc;char*argv[];{structhostent*ptrh;/*pointertoahosttableentry*/structprotoent*ptrp;/*pointertoaprotocoltableentry*/structsockaddr_insad;/*structuretoholdserver'saddress*/structsockaddr_incad;/*structuretoholdclient'saddress*/intsd,sd2;/*socketdescriptors*/intport;/*protocolportnumber*/intalen;/*lengthofaddress*/charbuf[1000];/*bufferforstringtheserversends*/#ifdefWIN32WSADATAwsaData;WSAStartup(0x0101,&wsaData);#endifmemset((char*)&sad,0,sizeof(sad));/*clearsockaddrstructure*/sad.sin_family=AF_INET;/*setfamilytoInternet*/sad.sin_addr.s_addr=INADDR_ANY;/*setthelocalIPaddress*/CS422--PART15562003 ExampleServerCode(3)/*Checkcommand-lineargumentforprotocolportandextract*//*portnumberifoneisspecified.Otherwise,usethedefault*//*portvaluegivenbyconstantPROTOPORT*/if(argc>1){/*ifargumentspecified*/port=atoi(argv[1]);/*convertargumenttobinary*/}else{port=PROTOPORT;/*usedefaultportnumber*/}if(port>0)/*testforillegalvalue*/sad.sin_port=htons((u_short)port);else{/*printerrormessageandexit*/fprintf(stderr,"badportnumber%s ",argv[1]);exit(1);}/*MapTCPtransportprotocolnametoprotocolnumber*/if(((int)(ptrp=getprotobyname("tcp")))==0){fprintf(stderr,"cannotmap"tcp"toprotocolnumber");exit(1);}/*Createasocket*/sd=socket(PF_INET,SOCK_STREAM,ptrp->p_proto);if(sd<0){fprintf(stderr,"socketcreationfailed ");exit(1);}CS422--PART15572003 ExampleServerCode(4)/*Bindalocaladdresstothesocket*/if(bind(sd,(structsockaddr*)&sad,sizeof(sad))<0){fprintf(stderr,"bindfailed ");exit(1);}/*Specifysizeofrequestqueue*/if(listen(sd,QLEN)<0){fprintf(stderr,"listenfailed ");exit(1);}/*Mainserverloop-acceptandhandlerequests*/while(1){alen=sizeof(cad);if((sd2=accept(sd,(structsockaddr*)&cad,&alen))<0){fprintf(stderr,"acceptfailed ");exit(1);}visits++;sprintf(buf,"Thisserverhasbeencontacted%dtime%s ",visits,visits==1?".":"s.");send(sd2,buf,strlen(buf),0);closesocket(sd2);}}CS422--PART15582003 StreamInterfaceSender±Callssendrepeatedly±Speci®esnumberofoctetspercallTCP±DividesstreamintosegmentsReceiver±Callsrecvrepeatedly±Receivesoneormoreoctetspercall±Countofzeromeans``endof®le''±SizereceivedunrelatedtosizesentCS422--PART15592003 InternetApplicationsDomainNameSystemElectronicmailIPtelephonyRemoteloginFiletransferAlluseclient-servermodelCS422--PART15602003 NamesInternetcommunicationrequiresIPaddressesHumansprefertousecomputernamesAutomatedsystemavailabletotranslatenamestoaddressesKnownasDomainNameSystem(DNS)CS422--PART15612003 DNSFunctionalityGiven±NameofacomputerReturns±Computer'sInternetaddressMethod±Distributedlookup±Clientcontactsserver(s)asnecessaryCS422--PART15622003 DomainNameSyntaxAlphanumericsegmentsseparatedbydotsExampleswww.netbook.cs.purdue.eduwww.eg.bucknell.eduMostsigni®cantpartonrightCS422--PART15632003 ObtainingADomainNameOrganization±Choosesdesiredname±Mustbeunique±Registerswithcentralauthority±Placedunderonetop-leveldomainNamessubjecttointernationallawfor±Trademarks±CopyrightCS422--PART15642003 OriginalTop-LevelDomainsDomainNameAssignedTocomCommercialorganizationeduEducationalinstitutiongovGovernmentorganizationmilMilitarygroupnetMajornetworksupportcenterorgOrganizationotherthanthoseabovearpaTemporaryARPAdomain(stillused)intInternationalorganizationcountrycodeAcountryMeaningassignedtoeachThreedomainsconsideredgeneric.com.net.orgCS422--PART15652003 NewTop-LevelDomainsDomainNameAssignedToaeroAir-TransportIndustrybizBusinessescoopNon-ProfitCooperativesinfoUnrestrictedmuseumMuseumsnameIndividualsproProfessionals(accountants,lawyers,physicians)Addedbecauseproponentsclaimed.cominsuf®cientCS422--PART15662003 WithinOrganizationSubdivisionpossibleArbitrarylevelsallowedNotstandardizedControlledlocallybyorganizationCS422--PART15672003 ExampleNameStructureFirstlevelis.comSecondleveliscompanynameThirdlevelisdivisionwithincompanyFourthleveleither±Companysubdivision±IndividualcomputerCS422--PART15682003 AnExampleAssume±CompanyisFoobar±Hastwodivisions*Soapdivision*CandydivisionCandydivisionhassubdivisionsSoapdivisionhasnosubdivisionsCS422--PART15692003 AnExample(continued)Namesinsoapdivisionhaveformcomputer.soap.foobar.comNamesincandydivisionhaveformcomputer.subdivision.candy.foobar.comCS422--PART15702003 IllustrationOfFoobarNamingHierarchycomfoobarcandysoappeanutalmondwalnutCS422--PART15712003 ThePointAboutNamesThenumberofsegmentsinadomainnamecorrespondstothenaminghierarchy.Thereisnouniversalstandard;eachorganizationcanchoosehowtostructurenamesinitshierarchy.Furthermore,nameswithinanorganizationdonotneedtofollowauniformpattern;individualgroupswithintheorganizationcanchooseahierarchicalstructurethatisappropriateforthegroup.CS422--PART15722003 DNSClient-ServerInteractionClientknownasresolverMultipleDNSserversusedArrangedinhierarchyEachservercorrespondstocontiguouspartofnaminghierarchyCS422--PART15732003 TwoPossibleDNSHierarchiescomrootservercomrootserverserverforserverforserverforfoobarfoobar.comfoobar.comfoobarcandy.foobar.comcandysoapcandysoappeanutalmondwalnutpeanutalmondwalnutserverforwalnut.candy.foobar.comChoicemadebyorganizationCS422--PART15742003 Inter-ServerLinksAlldomainnameserversarelinkedtogethertoformaunifiedsystem.Eachserverknowshowtoreacharootserverandhowtoreachserversthatareauthoritiesfornamesfurtherdownthehierarchy.CS422--PART15752003 InPracticeDNSusesbackupserver(s)ISPsandothers±OfferDNSservicetosubscribersSmallorganizationsandindividuals±Onlyneeddomainnamesforcomputersrunningservers±ContractwithanISPfordomainserviceCS422--PART15762003 DNSLookupApplication±BecomesDNSclient±SendsrequesttolocalDNSserverLocalserver±Ifanswerknown,returnsresponse±Ifanswerunknown*Startsattop-levelserver*Followslinks*ReturnsresponseCallednameresolutionCS422--PART15772003 CachingInDNSServeralwayscachesanswersHostcancacheanswersCaching±Improvesef®ciency±Eliminatesunnecessarysearch±WorkswellbecausehighlocalityofreferenceCS422--PART15782003 DNSTypesEachentryinserverconsistsof±Domainname±DNStypeforname±ValuetowhichnamecorrespondsDuringlookup,clientmustsupply±Name±TypeServer±MatchesbothnameandtypeCS422--PART15792003 ThePointAboutTypesTheDomainNameSystemstoresatypewitheachentry.Whenaresolverlooksupaname,theresolvermustspecifythetypethatisdesired;aDNSserverreturnsonlyentriesthatmatchthespecifiedtype.CS422--PART15802003 ExampleDNSTypesTypeA(Address)±ValueisIPaddressfornamedcomputerTypeMX(MaileXchanger)±ValueisIPaddressofcomputerwithmailserverfornameTypeCNAME(ComputerNAME)±Valueisanotherdomainname±Usedtoestablishalias(www)CS422--PART15812003 DomainNameAbbreviationDNSlookupusesfullnamesUsersdesireabbreviationsTechnique±Con®gureresolverwithlistofsuf®xes±Trysuf®xesoneatatimeCS422--PART15822003 ExampleOfDNSAbbreviationSuf®xesare±cs.purdue.edu±purdue.edu±ecn.purdue.eduUserentersnamewwwResolvertries±www±www.cs.purdue.edu±www.purdue.edu±www.ecn.purdue.eduCS422--PART15832003 OtherInternetApplicationsInvokeddirectlybyuser±E-mail±IPtelephony±Remotelogin±Filetransfer±WebbrowsingCS422--PART15842003 ElectronicMailOriginally±MemosentfromoneusertoanotherNow±MemosenttooneormoremailboxesMailbox±Destinationpointformessages±Canbestorageorprogram±GivenuniqueaddressCS422--PART15852003 E-mailAddressTextstringSpeci®esmaildestinationGeneralformmailbox@computercomputer±Domainnameofcomputer±ActuallytypeMXmailbox±DestinationonthecomputerCS422--PART15862003 UseOfE-mailAddressEachelectronicmailboxhasauniqueaddress,whichisdividedintotwoparts:thefirstidentifiesauser'smailbox,andthesecondidentifiesacomputeronwhichthemailboxresides.E-mailsoftwareonthesender'scomputerusesthesecondparttoselectadestination;e-mailsoftwareontherecipient'scomputerusesthefirstparttoselectaparticularmailbox.CS422--PART15872003 MailMessageFormatHeader±Identi®essender,recipient(s),memocontents±Linesofformkeyword:informationBlanklineBody±ContainstextofmessageCS422--PART15882003 ExampleE-mailHeaderFieldsKeywordMeaningFromSender’saddressToRecipients’addressesCcAddressesforcarboncopiesDateDateonwhichmessagewassentSubjectTopicofthemessageReply-ToAddresstowhichreplyshouldgoX-CharsetCharactersetused(usuallyASCII)X-MailerMailsoftwareusedtosendthemessageX-SenderDuplicateofsender’saddressX-FaceEncodedimageofthesender’sfaceMostheaderlinesoptionalCS422--PART15892003 ExtendingE-mailOriginale-mail±MessagerestrictedtoASCIItextUsersdesiretosend±Image®les±Audioclips±Compiled(binary)programsSolution±Multi-purposeInternetMailExtensions(MIME)CS422--PART15902003 MIMEAllowstransmissionof±Binarydata±Multimedia®les(video/audioclips)±Multipletypesinsinglemessage±MixedformatsBackwardcompatibleCS422--PART15912003 MIMEEncodingSender±Insertsadditionalheaderlines±Encodesbinarydatain(printable)ASCIISentlikestandardmessageReceiver±Interpretsheaderlines±ExtractsanddecodespartsSeparatestandardsforcontentandencodingCS422--PART15922003 ExampleOfMIMEHeaderlinesaddedMIME-Version:1.0Content-Type:Multipart/Mixed;Boundary=xxxsepSpeci®es±UsingMIMEVersion1.0±LinexxxsepappearsbeforeeachmessagepartCS422--PART15932003 MailTransferProtocolisSimpleMailTransferProtocol(SMTP)RunsoverTCPUsedbetween±Mailtransferprogramonsender'scomputer±Mailserveronrecipient'scomputerSpeci®eshow±Clientinteractswithserver±Recipientsspeci®ed±MessageistransferredCS422--PART15942003 IllustrationOfMailTransferrecipient'smailboxuserinterfaceonsender'scomputermailtransferprogramserverononsender'scomputerrecipient'scomputerInternetServer±Requiredtoreceivemail±Placesmessageinuser'smailboxCS422--PART15952003 TerminologyMailexploder±Program±Acceptsincomingmessage±DeliverstomultiplerecipientsMailinglist±Database±UsedbyexploderMailgateway±ConnectstwomailsystemsCS422--PART15962003 IllustrationOfAMailingListListContentsfriendsJoe@foo.com,Jill@bar.gov,Tim@StateU.eduMary@acollege.edu,Hank@nonexist.com,customersgeorge@xyz.com,VP_Marketing@news.combball-interesthank@none.com,Linda_S_Smith@there.com,John_Q_Public@foobar.com,Connie@foo.eduSeparatepermissionsfor±Mailingtolist±Adding/deletingmembers*Public±anyonecanjoin*Private±accessrestrictedbyownerCS422--PART15972003 IllustrationOfAMailGatewaysender’se-mailrecipient’scomputergatewaycomputerrecipient'smailboxuserinterfacedatabasemailtransfermailserverprogrammailtransferexploderprogramInternetCanconnecttwo±Heterogeneoussystems±Internettonon-InternetCS422--PART15982003 ComputersWithoutMailServersTypically±Small,personalcomputer±NotcontinuouslyconnectedtoInternetToreceivee-mail,usermust±Establishmailboxonlargecomputer±AccessmailboxasnecessaryPostOfficeProtocol(POP)usedCS422--PART15992003 IllustrationOfPOPsendingcomputerwithuser’scomputermailboxcomputerrecipient'smailboxPOPclientmailtransferprogrammailserverPOPserverInternetCurrentversionnamedPOP3CS422--PART151002003 IPTelephonySendaudiotelephonecommunicationoveranIPnetworkNetworktypes±LocalIPnetwork(e.g.,withinanorganization)±GlobalInternetScopeofcommunication±WorkentirelywithinanIPnetwork±InteroperatewithPublicSwitchedTelephoneNetwork(PSTN)AlsoknownasVoiceoverIP(VoIP)CS422--PART151012003 IPTelephonyStandardsTwocompetinggroups±InternetEngineeringTaskForce(IETF)setsTCP/IPstandards±InternationalTelecommunicationsUnion(ITU)controlstelephonestandardsSeveralproposedstandards±SessionInitiationProtocol(SIP)fromIETF±H.323fromITU±MegacofromIETFandITUCS422--PART151022003 EncodingAndTransmissionGeneralagreementDigitalencoding±UsePulseCodeModulation(PCM)standard±SameasexistingtelephonesystemTransmission±UseReal-timeTransportProtocol(RTP)±EncapsulateRTPmessageinUDPdatagram±EncapsulateUDPdatagraminIPdatagramCS422--PART151032003 SignalingTelcotermReferstocallsetup,monitoring,andteardownCurrenttelephonesystemstandardisSignalingSystem7(SS7)Mayinvolve±Locationofcalledparty±Decidingwhethertoacceptincomingcall±AuthenticationandservicessuchascallerID±AccountingRequiresactivemechanismCS422--PART151042003 IllustrationOfBasicIPTelephoneSystemmediagatewayIPtelephonecontrollerIPtelephoneINTERNETMediagatewaycontrollerhandlessignalingOncecallisestablished,IPtelephonescancommunicatedirectlyCS422--PART151052003 InterconnectionWithPSTNDif®cultMusthandlemanypossibilities±CallsthatoriginateonIPtelephonesystemandterminateonPSTN±CallsthatoriginateonPSTNandterminateonIPtelephonesystem±Mobiletelephones±Servicessuchascallforwarding±Islands(e.g.,PSTNbetweentwoIPtelephonesystems)CS422--PART151062003 InterconnectionWithPSTN(continued)Threeconceptualfunctions±Mediagatewaypassesencodedvoice±Signalinggatewayhandlescallsetup±MediagatewaycontrollercoordinatesCS422--PART151072003 IllustrationOfPSTNInterconnectionIPtelephoneanalogtelephonemediagatewaycontrollermediagatewayhandlesvoice.......INTERNETPSTN.......signalinggatewayhandlessetupQuestions±Whatindividualfunctionsshouldbeprovided?±Howshouldfunctionsbedividedamonggateways?Eachproposedstandardde®nesasetofconceptualfunctionsandimplementationmechanismsCS422--PART151082003 SIPCharacteristicsDistributedsignalingsystemUsesDNStostorelocationinformationDe®nesmultipleservers±Useragent±Locationserver±Proxyserver±Redirectserver±RegistrarserverCS422--PART151092003 H.323CharacteristicsUsesmorecentralizedmodel(similartocurrenttelephonesystem)De®nes±Terminal±Gatekeeper±Gateway±MultipointControlUnit(tohandleconferencing)CS422--PART151102003 ExamplesOfLayering:H.323LayerSignalingRegistrationAudioVideoDataSecurity5H.225.0-Q.931H.225.9-RASG.711H.261T.120H.235H.250-AnnexGH.263H.323H.245G.722H.250G.723G.728RTP,RTCP4TCP,UDPUDPTCPTCP,UDP3IP,RSVP,andIGMPManyprotocolsAllowsdataandvideotobetransferredalongwithaudioCS422--PART151112003 ExampleMethods:SIPMethodPurposeINVITESessioncreation:anendpointisinvitedtoparticipateinthesession.ACKAcknowledgmentresponsetoINVITE.BYESessiontermination:callisended.CANCELPendingrequestcancellation(noeffectifrequesthasbeencompleted).REGISTERRegistrationofuser’slocation(i.e.,aURLatwhichtheusercanbereached).OPTIONSQuerytodeterminecapabilitiesofcalledparty.CS422--PART151122003 ExampleSIPSessionUserDNSProxyLocationUserAgentAServerServerServerAgentBDNSqueryDNSresponseINVITEtrying(100)QueryResponseINVITERinging(180)Ringing(180)OK(200)OK(200)ACK(200)ACK(200)mediasessionBYEBYEOK(200)OK(200)CS422--PART151132003 RemoteLoginProvideinteractiveaccesstocomputerfromremotesiteStandardprotocolisTELNETCS422--PART151142003 TELNETText-orientedinterfaceUser±Invokesclient±Speci®esremotecomputerClient±FormsTCPconnectiontoserver±Passeskeystrokesoverconnection±DisplaysoutputonscreenCS422--PART151152003 FileTransferComplete®lecopyMajorprotocolisFileTransferProtocol(FTP)±UsesTCP±Supportsbinaryortexttransfers±Largesetofcommands±Until1995wasmajorsourceofpacketsinInternetCS422--PART151162003 FTPParadigmCommand-lineinterfaceUser±FormsTCPconnectiontoserver(calledcontrolconnection)±Logsin±Enterscommandstolistdirectories,transfer®lesServer±EstablishesnewTCPconnectionforeachtransferCS422--PART151172003 IllustrationOfTCPConnectionsDuringAnFTPFileTransferFTPFTPserverclientdataconnectionInternetcontrolconnectionTwoTCPconnectionsusedCS422--PART151182003 SummaryApplicationsuseclient-serverparadigmforinteractionClient±Arbitraryapplication±Activelyinitiatescommunication±Mustknowserver's*IPaddress*ProtocolportnumberCS422--PART151192003 Summary(continued)Server±Specializedprogram±Runsforever±Usuallyoffersoneservice±Passivelywaitsforclients±CanhandlemultipleclientssimultaneouslyCS422--PART151202003 Summary(continued)SocketAPI±Standardized±Speci®esinterfacebetweenapplicationsandprotocolsoftwareSocket±Operatingsystemabstraction±Createddynamically±UsedbyclientsandserversCS422--PART151212003 Summary(continued)DomainNameSystem±MapsnametoIPaddress±Useson-lineservers±Usescachingforef®ciencyTwoe-mailtransferprotocols±SMTP±POP3CS422--PART151222003 Summary(continued)IPtelephony±Transmissionofvoicetelephonecalls±SeveralsetsofproposedstandardsRemotelogin±Remote,interactiveuse±ProtocolisTELNETFiletransfer±Copyofentire®le±ProtocolisFTPCS422--PART151232003 PARTXVIOtherTopics:(Webtechnologies;Middleware;NetworkManagement;Security;InitializationandCon®guration)CS422--PART1612003 WorldWideWebMajorapplicationprotocolusedontheInternetSimpleinterfaceTwoconcepts±Point±ClickCS422--PART1622003 WebComponentsBrowserWebserverHypermedialinksDocumentrepresentationTransferprotocolCS422--PART1632003 BrowserApplicationprogramUser'sinterfacetoWebBecomesWebclienttofetchinformationfromWebserverDisplaysinformationforuserCS422--PART1642003 WebServerRunningprogramStoressetofWebdocumentsRespondstorequestfrombrowserbysendingcopyofdocumentCS422--PART1652003 WebStandardsHyperTextMarkupLanguage(HTML)UniformResourceLocator(URL)HyperTextTransferProtocol(HTTP)CS422--PART1662003 HyperTextMarkupLanguage(HTML)ASCIIrepresentationTagstogivegenerallayoutguidelinesDoesnotspecifyexactplacementorformatAllowsdocumenttocontain±Text±Graphics±LinkstootherdocumentsCS422--PART1672003 UniformResourceLocator(URL)Speci®esdocumentontheWebEncodes±Protocolusedtoaccessdocument±Domainnameofserver±Protocolportnumberofserver±PathtodocumentCS422--PART1682003 GeneralFormOfURLprotocol://domain_name:port/item_namenameofaccessprotocolportprotocoltousenumberdomainnameofpathnameservercomputerofitemOnlydomainnamerequiredDefaults±Protocolishttp±Portis80±Pathisindex.htmlCS422--PART1692003 UseOfClient-ServerParadigmWebserver±Makessetofpagesavailable±Usesport80Webclient±Calledabrowser±CreatesTCPconnectiontoserver±SendsrequestsforitemsPrimaryprotocolknownasHyperTextTransferProtocolHTTP)CS422--PART16102003 InsideABrowserMaincontroller±Receivesinputfromuser±InvokesclientandinterpreterClient±Oneormorebuiltintobrowser±UsesnetworktofetchitemsInterpreter±Oneormorebuiltin±DisplaysitemsCS422--PART16112003 IllustrationOfABrowserinputfromHTMLdmouseandcontrollerinterpreterrkeyboardoutputisenttovdisplayoptionaleinterpreterrHTTPoptionalclientclientnetworkinterfacecommunicationwithremoteserverBrowsercontainsmanycomponentsCS422--PART16122003 AlternativeProtocolExampleFiletransferserviceProtocolisFTPExampleURLftp://ftp.cs.purdue.edu/pub/comer/netbook/client.cCanbespeci®edinanchortagCS422--PART16132003 CachingInBrowsersCacheforrecentlyaccessed±HTMLpages±ImagesItemnormallyfetchedfromcacheUsercanoverrideHTTPcanverifytimestampbeforefetchingnewcopyCS422--PART16142003 TypesOfWebPagesStatic±Storedin®le±UnchangingDynamic±Formedbyserver±Createdondemand±Outputfromaprogram±UseCommonGatewayInterface(CGI)technologyCS422--PART16152003 TypesOfWebPages(continued)Active±Executedatclient±Consistofacomputerprogram±Caninteractwithuser±UseJavatechnologyCS422--PART16162003 ExampleDynamicDocumentTechnology:CGIURLspeci®es±LocationofWebserver±CGIprogramonthatserver±ArgumentstoprogramWebserver±UsesTCPforcommunication±AcceptsHTTPrequestfromclient±Runsspeci®edCGIprogram±ReturnsoutputtoclientCS422--PART16172003 ExampleDynamicDocumentTechnology:CGI(continued)CGIprogram±Performsarbitrarycomputation±Oftenwritteninascriptinglanguage±Producesoutput®lewhenrun±StartsoutputwithheaderCS422--PART16182003 HeaderInCGIOutputStopsat®rstblanklineIdenti®es±Encodingused±TypeofdocumentFormatKeyword:informationCS422--PART16192003 CGIHeaderExamplesHTMLdocumentheaderContentType:text/htmlTextdocumentheaderContentType:text/plainRedirectionheaderLocation:/over_here/item4CS422--PART16202003 ExampleCGIscript#!/bin/sh##CGIscriptthatprintsthedateandtimeatwhichitwasrun##OutputthedocumentheaderfollowedbyablanklineechoContent-type:text/plainecho#OutputthedateechoThisdocumentwascreatedon`date`GeneratesdocumentDocumentcontainsthreelinesoftext±Header±Blankline±DocumentcreationdateCS422--PART16212003 Long-TermStateInformationProgramlifetime±CGIprograminvokedbyserver±ProgramexitsaftergeneratingoutputTomaintainpersistentdata±Writeto®leondisk±Readfrom®leondiskCS422--PART16222003 ExampleCGIScriptWithStateInformation#!/bin/shFILE=ipaddrsechoContent-type:text/plainecho#SeeifIPaddressofbrowser'scomputerappearsinourfileifgrep-s$REMOTE_ADDR$FILE>/dev/null2>&1thenechoComputer$REMOTE_ADDRhasrequestedthisURLpreviously.else#Appendbrowser'saddresstothefileecho$REMOTE_ADDR>>$FILEechoThisisthefirstcontactfromcomputer$REMOTE_ADDRfiClient'sIPaddressinenvironmentvariableCheckifaddressin®leRespondtoclientCS422--PART16232003 EncodingInformationInAURLURLcancontainargumentsQuestionmarkseparatesCGIpathfromargumentsArgumentscanencodeinformationCS422--PART16242003 ExampleOfArgumentsEncodingInformation#!/bin/shechoContent-type:text/htmlechoN=$QUERY_STRINGecho""case"x$N"inx)N=1echo"Thisistheinitialpage.

";;x[0-9]*)N=`expr$N+1`echo"Youhavedisplayedthispage$Ntimes.

";;*)echo"TheURLyouusedisinvalid."exit0;;esacecho""echo"Clickheretorefreshthepage.
"ArgumentencodesnumberoftimesexecutedCS422--PART16252003 ExampleOfScriptExecutionInitialdocumentContent-type:text/htmlThisistheinitialpage.

Clickheretorefreshthepage.ResultingdisplayThisistheinitialpage.Clickheretorefreshthepage.CS422--PART16262003 ExampleOfScriptExecution(continued)GeneratedoutputContent-type:text/htmlYouhavedisplayedthispage2times.

Clickheretorefreshthepage.ResultingdisplayYouhavedisplayedthispage2times.Clickheretorefreshthepage.CS422--PART16272003 GeneratedURLValuesWhenitgeneratesadocument,adynamicdocumentprogramcanembedstateinformationasargumentsinURLs.TheargumentstringispassedtotheprogramfortheURL,enablingaprogramtopassstateinformationfromoneinvocationtothenext.CS422--PART16282003 ActiveDocumentTechnologyServer±SendscomputerprogramtoclientClient±RunsprogramlocallyProgram±Controlsdisplay±InteractswithuserCS422--PART16292003 ActiveDocumentTranslationactivedocumentactivedocumentcompilerinsourceforminbinaryformrequestfordocumentbrowserserveractivedocumentdocumentininexecutableformbrowser'smemoryCompilerproducesmachine-independentbinaryBrowserinterpretsbinaryCS422--PART16302003 JavaTechnologyDevelopedbySunMicrosystemsUsedfor±Conventionalapplications±Activedocuments(applets)Includes±Programminglanguage±Run-timesystem±ClasslibraryCS422--PART16312003 JavaLanguageCharacteristicsHighLevelGeneralPurposeSimilartoC++ObjectOrientedDynamicStronglytypedStaticallytypecheckedConcurrentCS422--PART16322003 JavaRun-TimeEnvironmentCharacteristicsInterpretativeexecutionAutomaticgarbagecollectionMulti-threadedexecutionInternetaccessGraphicssupportCS422--PART16332003 JavaLibraryClassesfor±Graphicsmanipulation±Low-levelnetworkI/O±InteractionwithaWebserver±Run-timesystemaccess±FileI/O±Conventionaldatastructures±Eventcapture±ExceptionhandlingCS422--PART16342003 ChoiceOfGraphicsInterfaceJavaincludesanextensivegraphicstoolkitthatconsistsofrun-timesupportforgraphicsaswellasinterfacesoftware.Thetoolkitallowsaprogrammertochooseahigh-levelinterface,inwhichthetoolkithandlesdetails,oralow-levelinterface,inwhichtheapplethandlesdetails.CS422--PART16352003 ExampleJavaAppletWindowwithtwoitems±Textarea±ButtonChangetextwhenbuttonclickedCS422--PART16362003 IllustrationOfAppletDisplayInitialClickHereThebuttonhasnotbeenclickedatall.AfteruserclicksbuttonClickHereThebuttonhasbeenclicked1times.CS422--PART16372003 ExampleAppletCodeimportjava.applet.*;importjava.awt.*;publicclassclickcountextendsApplet{intcount;TextFieldf;publicvoidinit(){count=0;add(newButton("ClickHere"));f=newTextField("Thebuttonhasnotbeenclickedatall.");f.setEditable(false);add(f);}publicbooleanaction(Evente,Objectarg){if(((Button)e.target).getLabel()=="ClickHere"){count+=1;f.setText("Thebuttonhasbeenclicked"+count+"times.");}returntrue;}}CS422--PART16382003 AppletInvocationAvailableinHTMLUsesapplettagSpeci®es±Codebase(machineandpath)±Code(speci®cclasstorun)ExampleCS422--PART16392003 JavaFunctionalityHTMLinterface±Controlsdisplay±InteractswithuserHTTPinterface±AccessesremoteWebdocuments±InvokesotherappletsExceptions±Indicateunanticipatedcircumstances±CanbecaughtandhandledCS422--PART16402003 MiddlewareToolstohelpprogrammersMakesclient-serverprogramming±Easier±FasterMakesresultingsoftware±Lesserror-prone±MorereliableCS422--PART16412003 MiddlewareApproachAllowsprogrammertoworkwithfamiliarlanguageconstructsProvidestoolstohelpprogrammer±Specialtranslators±LibrariesAutomaticallygeneratescodefor±Networkcommunication±ConnectionmanagementCS422--PART16422003 RemoteProcedureCallUsesstandardprocedurecallparadigmDividesprogramalongprocedurecallboundaries±Mainprogramandproceduresforuserinteractioninclientside±OtherproceduresinserversideCS422--PART16432003 ReasonForRemoteProcedureCallIfaprogrammerfollowsthesameparadigmusedtobuildconventionalprogramswhenbuildingclientandserversoftware,theprogrammerwillfindthetaskeasierandwillmakefewermistakes.CS422--PART16442003 IllustrationOfConventionalProcedureCallGraphmainprogprocprocprocABCprocprocprocDEFArrowdenotesprocedurecallCS422--PART16452003 ProcedureCallGraphDividedIntoClientAndServerclientmainprogserverprocprocprocABCprocprocprocDEFDivisionoccursoncallboundaryMainprograminclientpieceCS422--PART16462003 CommunicationStubsInsertedtoenableremotecallAutomaticallygeneratedUseoriginalcallinterfaceAllowcallingandcalledproceduretoremainunchangedCS422--PART16472003 IllustrationOfClientAndServerStubsclientservermainmainserverprogprogstubforBprocclientprocBstubBforB(a)(b)Originalcallin(a)Sameinterfacewithstubsin(b)CS422--PART16482003 CreatingStubsProgrammerwrites±Codeforaprogram±Speci®cationofprocedureinterfacesusingInterfaceDefinitionLanguage(IDL)Middlewaregenerates±Clientandserverstubcode±Necessarysocketcalls±DatatranslationCS422--PART16492003 DataRepresentationNetworkcanconnectheterogeneouscomputersTwocomputersmayusedifferent±Integerrepresentations±Charactercodes±FloatingpointrepresentationsTranslationrequiredCS422--PART16502003 PossibleDataTranslationSchemesUsereceiver'srepresentation±SendertranslatesalloutgoingdataUsesender'srepresentation±ReceivertranslatesallincomingdataUseexternalrepresentation(popular)±Sendertranslatestoexternalformbeforesending±ReceivertranslatesfromexternalformafterreceptionCS422--PART16512003 Object-OrientedMiddlewareDesignedforusewithobject-orientedprogramminglanguagesSamegeneralschemeasRPC±InterfaceDe®nitionLanguage±Tooltobuildstubs±LibrariestohandlenetworkcommunicationUsesmethodinvocationinsteadofprocedurecallCS422--PART16522003 NetworkManagementUsedtocontrolandmonitorFollowsclient-servermodelProtocolisSimpleNetworkManagementProtocol(SNMP)CS422--PART16532003 SNMPTerminologyAgent±Server±Runsonnetworksystem(e.g.,router)±AcceptscommunicationfrommanagerstationManagerstation±Client±Cancontact/controlmultipleagentsCS422--PART16542003 SNMPOperationsUsesfetch-storeparadigmEachitemgivennameFetchoperationusedtoobtaincurrentvalueStoreoperationusedtocontroldeviceExample:IProutingtable±Fetchusedtoobtainroute±StoreusedtochangerouteCS422--PART16552003 SNMPVariableNamesNotde®nedbySNMPSeparatestandardknownasManagementInformationBase(MIB)NamesuseASN.1encodingCS422--PART16562003 SecurityIncreasinglyimportantAspects±Dataintegrity±Dataavailability±Datacon®dentiality±PrivacyCS422--PART16572003 MechanismsMessageAuthenticationCode(MAC)PasswordsDigitalsignaturesEncryptionPerimetersecurityCS422--PART16582003 PerimeterSecurityPlacedatconnectionbetweenorganizationandrestofInternetImplementssecuritypolicy±RestrictsarbitrarypacketsfromenteringorleavingCalledInternetfirewallCS422--PART16592003 FirewallImplementationPacketFilter±Con®gurable±Speci®eswhichpacketscanpass±Allowsmanagertospecifyaddresses,protocolports,andpackettypesOftenpartofrouterNote:twopacket®ltersandintermediatecomputerarerequiredforoptimal®rewallCS422--PART16602003 VirtualPrivateNetworkGoal:combineadvantages±Low-costofconventionalInternetconnection±Con®dentialityofleaseddatacircuitUsesInternettotransportdatagramsbetweensitesEncryptsdatatopreventsnoopingUsesIP-in-IPencapsulationCS422--PART16612003 IllustrationOfVPNsite1site2site1site2R1R2R1R2InternetR3R3site3site3(a)(b)(a)AVPNcreatedbyusingencryptionandrouterestriction(b)AnequivalentprivatenetworkcreatedfromleasedcircuitsCS422--PART16622003 IllustrationOfIP-in-IPsrc=XOriginal(Unencrypted)Payload(a)dst=YencryptEncryptedVersionOfOriginalDatagram(b)src=R1EncryptedDatagramEncapsulatedInIPForTransmission(c)dst=R2DatagrampassesacrossInternetfromrouteratonesitetorouteratanotherOriginalsourceanddestinationaddressesareencryptedCS422--PART16632003 InitializationCon®gureprotocolstackatstartupExampleparameters±LocalIPaddress(es)±DefaultIProuteraddress±Addressmask(s)±DNSserveraddress±PrintserveraddressCS422--PART16642003 Initialization(Continued)Usenetworktoobtaininformation±Broadcastrequest±ReceiveresponsefromconfigurationserverTwoprotocols±BOOTstrapProtocol(BOOTP)±DynamicHostConfigurationProtocol(DHCP)Note:responsedeliveredusingMACaddressbecausecomputerdoesnotyethaveanIPaddressCS422--PART16652003 BOOTPPacketFormat08162431OPHTYPEHLENHOPSTRANSACTIONIDENTIFIERSECONDSELAPSEDUNUSEDCLIENTIPADDRESSYOURIPADDRESSSERVERIPADDRESSROUTERIPADDRESSCLIENTHARDWAREADDRESS(16OCTETS)...SERVERHOSTNAME(64OCTETS)...BOOTFILENAME(128OCTETS)...VENDOR-SPECIFICAREA(64OCTETS)...CS422--PART16662003 DHCPPacketFormat08162431OPHTYPEHLENHOPSTRANSACTIONIDENTIFIERSECONDSELAPSEDFLAGSCLIENTIPADDRESSYOURIPADDRESSSERVERIPADDRESSROUTERIPADDRESSCLIENTHARDWAREADDRESS(16OCTETS)...SERVERHOSTNAME(64OCTETS)...BOOTFILENAME(128OCTETS)...OPTIONS(VARIABLE)...AllowsIPaddresstobeassigneddynamicallyCS422--PART16672003 SummaryWebismajorapplicationinInternetWebclientcalledbrowserWebserverstoresdocumentsHTML±Standardrepresentation±UsestagsformarkupCS422--PART16682003 Summary(continued)HTTP±StandardprotocolusedtofetchdocumentfromserverURL±ReferencetoWebdocument±Encodes*Protocol*Domainnameofserver*Protocolportnumber*Pathofitem*OnlydomainnameisrequiredCS422--PART16692003 Summary(continued)Threedocumenttypes±Static(unchanging)±Dynamic(generatedbyserver)±Active(programrunsinbrowser)ExampledynamicWebpagetechnology:CGIExampleactiveWebpagetechnology:JavaNote:somevendorsuseactivetorefertoserver-sidescriptingCS422--PART16702003 Summary(continued)Middleware±Toolstohelpbuildclientandserver±GeneratescommunicationstubsautomaticallyNetworkManagement±Allowsmanagertocontrolormonitordevice±ProtocolisSNMPCS422--PART16712003 Summary(continued)Security±Becomingmoreimportant±Mechanismsinclude®rewallsandencryptionInitialization±Con®guresprotocolstackduringstartup±Twoprotocols:BOOTPandDHCP±DHCPallowsdynamicaddressassignmentCS422--PART16722003 CONSIDERINGDROPPING?CS422--PART1712003 ImportantNote:Theprofessordidnotchoosetheclasstime.CS422--PART1722003 ReasonsYouShouldStayInSatisfyyourintellectualcuriosityUnderstandthenetworkrevolutionBecomeabetterprogrammerSatisfydegreerequirementsHelpkeepthecoursegoingIt'sbetterthannumericalanalysisorprovingtheoremsHighersalaryoffersAllthoseotherstudentscan'tbewrongIt'sgreatfunCS422--PART1732003 ReasonsYouShouldNotStayInYouhavenointellectualcuriosityReduceclassroomovercrowdingStayaroundformorebasketballseasonsContinuereceivingsupportfromyourparentsPostponerealworkandbigtaxbillsHelpin¯atetheegoofeveryonewhodoesstayBearoundlotsofotherstudentsAllthoseothercoursesdeservestudentsCS422--PART1742003 ReasonsYouShouldTakeThisCourseFromComerHehasarecordofhighteachingevaluationsHe'sanexpertHewrotethetextbookHeknowswhatindustrywantsHeistheonlyprofessorteachingitCS422--PART1752003 ReasonsYouShouldNOTTakeThisCourseFromComerHehasarecordofhighteachingevaluationsHe'sanexpertHewrotethetextbookHeknowswhatindustrywantsHeexpectsyouto:±Attendclass±Readthetextandlearnthematerial±WritecomputerprogramsHedoesnotacceptlateassignmentsCS422--PART1762003 SONETStandsforSynchronousOpticalNETworkDigitaltransmissiontechnologyDevelopedbyphonecompaniesHighcapacityIntendedformultiplexingdigitalvoicecallsFramesizedependsondatarateMagicconstant125msecCS422--PART1772003 SONETFrameoverheadpayload9rows90columnsEachframetakes125msecCS422--PART1782003 SnoopUtilityCapturesEthernetframesAppliesa®ltertoselectframesStoresselectedframesina®leondisk1May27,2003 SnoopFrameFormat(OnDisk)Multipleframesper®leFilebeginswith16-octetheader(ignore)Eachentryin®leconsistsof±Snoopheader±Frame±Zerotothreeoctetsofpaddingtonext4-octetboundarySnoopheaderspeci®eslengthofframe2May27,2003 SnoopHeaderFoundoneachentryin®le24octetslongSpeci®eslengthofframethatfollowsstructsnoophdr{/*addedbysnoop*/longsize;/*sizeofframeinbytes*/unsignedcharmisc[20];/*skipthis*/}3May27,2003 AlgorithmCapturepacketsin®leFOpen®leFandskippast16-octet®leheaderWhile®leFisnotempty±Readsnoopheader±Extractframelength,N±ComputeKasnext4-octetmultipleofN±ReadKoctetsintoframebuffer±Frameisin®rstNoctetsofbuffer4May27,2003 STOP

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
关闭