©2004CiscoSystems,Inc.Allrightsreserved.InternetworkingandTCP/IPIntroductiontoTCP/IPINTROv2.0—8-1©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-2Outline•Overview•DescribethepurposeandbasicoperationoftheprotocolsintheOSIandTCPmodels•Identifyandcorrectcommonnetworkproblemsatlayers1,2,3and7usingalayeredmodelapproach•DescribetheoperationandbenefitsofusingprivateandpublicIPaddressing©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-3TCP/IPandtheDoDModelTheDoDmodelisbasicallyacondensedversionoftheOSImodel—it’scomposedoffour,insteadofseven,layers:•Process/Applicationlayer•Host-to-Hostlayer•Internetlayer•NetworkAccesslayer©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-4TheDoDandOSIModel©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-5TCP/IPProtocolSuite©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-6TheProcess/ApplicationLayerProtocols•Telnet:allowsauseronaremoteclientmachinetoaccesstheresourcesofanothermachine•FTP:letsustransferfiles•TFTP:isthestripped-down,stockversionofFTP•NFS:isaprotocolspecializinginfilesharingandiswidelyusedinunixsystem•SMTP:usesaspooled,orqueued,methodofmaildelivery•LPD:isdesignedforprintersharing.•XWindow:definesaprotocolforwritingclient/serverapplicationsbasedonagraphicaluserinterface(GUI).•SNMP:collectsandmanipulatesvaluablenetworkinformation.•DNS:resolveshostnames—specifically,Internetnames•DHCP/BootP:assignsIPaddressesandotherTCP/IPconfigurationstohostsautomaticlly.©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-7TheHost-to-HostLayerProtocolsThefollowingsectionsdescribethetwoprotocolsatthislayer:•TransmissionControlProtocol(TCP)•UserDatagramProtocol(UDP)©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-8TransmissionControlProtocol(TCP)•TCPtakeslargeblocksofinformationfromanapplicationandbreaksthemintosegments.•Itnumbersandsequenceseachsegmentsothatthedestination’sTCPstackcanputthesegmentsbackintotheordertheapplicationintended.•Afterthesesegmentsaresent,TCPwaitsforanacknowledgmentofthereceivingend’sTCPvirtualcircuitsession,retransmittingthosethataren’tacknowledged.©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-9TCPSegmentFormat©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-10UserDatagramProtocol(UDP)•UDPisathinprotocol•UDPisconnectionlessandunreliableprotocol.•ThefollowingisUDPsegmentformat©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-11KeyFeaturesofTCPandUDP©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-12PortNumbers•TCPandUDPmustuseportnumberstocommunicatewiththeupperlayersbecausethey’rewhatkeeptrackofdifferentconversationscrossingthenetworksimultaneously.•Originatingsourceportnumbersaredynamicallyassignedbythesourcehostandwillequalsomenumberstartingat1024.•1023andbelowaredefinedinRFC3232,whichdiscusseswhatarecalledwell-knownportnumbers.©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-13PortnumbersforTCPandUDP©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-14KeyProtocolsThatUseTCPandUDP©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-15TheInternetLayerProtocols•TwomainreasonsfortheInternetlayer’sexistence:routingandprovidingasinglenetworkinterfacetotheupperlayers•TheprotocolsattheInternetlayer:•InternetProtocol(IP)•InternetControlMessageProtocol(ICMP)•AddressResolutionProtocol(ARP)•ReverseAddressResolutionProtocol(RARP)•ProxyARP©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-16InternetProtocol(IP)•IPlooksateachpacket’saddress.Then,usingaroutingtabletodecideswhereapacketistobesentnext(choosingthebestpath).•IPreceivessegmentsfromtheHost-to-Hostlayerandfragmentsthemintodatagrams(packets)ifnecessary.•EachdatagramisassignedtheIPaddressofthesenderandoftherecipient.•Eachrouterthatreceivesadatagrammakesroutingdecisionsbasedonthepacket’sdestinationIPaddress.©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-17IPHeader©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-18PossibleProtocolsFoundintheProtocolField©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-19InternetControlMessageProtocol(ICMP)•ICMPisamanagementprotocol•ICMPpacketshavethefollowingcharacteristics:•Theycanprovidehostswithinformationaboutnetworkproblems.•TheyareencapsulatedwithinIPdatagrams.•Ping:UsingICMPechorequestandreplymessagestocheckthephysicalandlogicalconnectivityofmachinesonaninternetwork.•Traceroute:UsingICMPtime-outs,Tracerouteisusedtodiscoverthepathapackettakesasittraversesaninternetwork.©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-20AddressResolutionProtocol(ARP)•ARPfindsthehardwareaddressofahostfromaknownIPaddress.•Hereishowitworks:1.WhenIPhasadatagramtosend,itmustknowthehardwareaddressofthedestinationhost2.IPfindthedestinationhost’shardwareaddressintheARPcache.3.IfIPdoesn‘tfindinARPcache,thenusesARPtofindthisinformation.4.ARPsendsoutabroadcastaskingthemachinewiththespecifiedIPaddresstoreplywithitshardwareaddress.©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-21LocalARPbroadcast©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-22RARPbroadcastexample©2004CiscoSystems,Inc.Allrightsreserved.INTROv2.0—8-23IPAddressing•AnIPaddressisanumericid