14.1CHAPTER14:CHAPTER14:NETWORKINGANDINTERNETWORKINGNETWORKINGANDINTERNETWORKINGObjectiveszzTCP/IPIPz/zzshellzfinger,ftp,ifconfig,nslookup,ping,rcp,rlogin,rsh,ruptime,rusers,rwho,talk,telnet,traceroute114.2IntroductionIntroductionInthelate1960s,AdvancedResearchProjectsAgency(ARPA)startedfundingnetworkingresearchInthelate1970s,awideareanetwork,ARPANETwasdevelopedTheearlyinternet,usingtheTCP/IPprotocolsuitebecameoperationalin1982Theearlyinternetconnectedafewacademic,researchandU.Smilitaryorganizations214.3Introduction(contIntroduction(cont))In1983only562siteswereconnectedtotheInternetIn1991,thefirstwebbrowser,MosaicwasdevelopedBy1996,thenumberofcomputersconnectedtotheInternethasreachedto9.5millionToday,almost300million3?,30computers,and1millionnetworksareconnectedtotheInternetMostnetworkingtechnologiesandprotocolswereinitiallyimplementedonLinuxorUnixplatforms314.4ComputerNetworksandComputerNetworksandInternetworksInternetworksIftwoormorehardwareresources(computers,printers,etc)areconnectedtoeachother,theyformacomputernetworkEachhardwareresourceonacomputernetworkiscalledahost414.5ComputerNetworksandComputerNetworksandInternetworks(contInternetworks(cont))Computernetworkcategoriesaccordingtothedistancebetweenhosts:zLAN(LocalAreaNetworks):Connecthostsinaroom,inabuildingorinacampuszMAN(MetropolitanAreaNetworks):ConnecthostswithinacityzWAN(WideAreaNetworks):Connecthostsacrosscities,countries,continents514.6ComputerNetworksandComputerNetworksandInternetworks(contInternetworks(cont))(router)(gateway)Internet614.7bit714.8NetworkModelsNetworkModelsz(ISOOSI)zTCP/IPUsedintheInternet14.914.10TCP/IPTCP/IPTCP/IPProtocolTCP/IPProtocolAprotocolis:zThesetofrulesthatboththesenderandthereceiveragreetouseduringdatacommunicationBothpartiesmustusethesameprotocolsoftwareinordertocommunicateEachprotocolperformsacertainpartofthenetworkingprocessSeveralprotocolsareinvolvedineverycomputernetwork,andtheyareknownasprotocolsuites1014.11TCP/IPProtocolTCP/IPProtocolTheTCP/IPprotocolsuiteTCP/IPisthemostwidelyusedoneThepublicInternetusestheTCP/IPprotocolsuiteTheTCP/IPprotocolsuiteandtherelationshipsbetweenindividualprotocols,canbeillustratedinalayereddiagramThislayereddiagramiscalledtheTCP/IPLayeredModel1114.12TCP/IPProtocolTCP/IPProtocol14.3TCP/IP1214.13TCP/IPProtocolTCP/IPProtocolAtthetopoftheTCP/IPlayeredmodelistheapplicationlayerthatcontainsapplicationprogramsandutilitiesthatprovidesvariousinternetservicestotheuser:ze-mail,zwebbrowsing,zfiletransfer,zremotelogin,etc1314.14TCP/IPProtocolTCP/IPProtocolThetransportlayerisresponsibleforthedeliveryoftheapplicationdatatotheotherpartyzTCPprotocoloffersaconnectionoriented,completelyreliableandin-sequencedelivery(mostinternetapplicationsusethisprotocolattransportlayer.E.g.Telnet,ftp)zUDPprotocoloffersaconnectionless,fast,andunreliabledelivery1414.15TCP/IPProtocolTCP/IPProtocolOnamultiprocesssystem,usuallymorethanoneprocess(application)useTCPorUDPprotocolsatthesametime(Forex:Webbrowsingandtelnet)Protocolsusea16-bitnumber(0-65535)calledportnumbers,toidentifywhichdatapacketgoestowhichapplicationPortnumbers0-1024arecalledwell-knownportnumbersandaredistributedbyInternetAssignedNumbersAuthority(IANA)1514.16TCP/IPProtocolTCP/IPProtocolSomewell-knownTCPportnumbers:zFtp:21zTelnet:22zWebserver:801614.17TCP/IPProtocolTCP/IPProtocolThenetworklayerisresponsiblefortheroutingofapplicationsdatatothedestinationInternetprotocol(IP)isusedtoperformthistaskIPprotocolusesanaddressingschemecalledIPAddressingzIPv4uses32-bitnumberszIpv6uses128-bitnumbersEveryhostontheInternetmusthaveatleastoneIPaddress1714.18TCP/IPProtocolTCP/IPProtocolAnIPaddressisa32-bitbinarynumber,usuallywrittenindotteddecimalnotationz11000000011001100000101000010101iswrittenasz192.102.10.21indotteddecimalnotationThenumberofIPaddressesassignedtoasinglehostcorrespondstothenumberofnetworkconnectionsthathosthas1814.19TCP/IPProtocolTCP/IPProtocolEachIPv4addressisdividedintothreeparts:zAddressclasszThenetworkid(prefix)(mustbeuniquewithintheInternet)zThehostid(suffix)inthatnetwork(mustbeuniquewithintheLAN)IPABCDEABCIPDE1914.20TCP/IPProtocolTCP/IPProtocol2014.21TCP/IPProtocolTCP/IPProtocol2114.22TCP/IPProtocolTCP/IPProtocolThedivisionpointofthenetworkidandhostidisdeterminedbythesubnetmask(orAddressmask)Subnetmaskisanother32-bitbinarynumbersimilartotheIPaddress2214.23TCP/IPProtocolTCP/IPProtocolIPaddress-Subnetmaskexample:zIPAddress:11000000011001100000101000010101(or192.102.10.21indotteddecimalnotation)zNetmask:11111111111111111111111100000000(or255.255.255.0indotteddecimalnotation)zThenetworknumberis:192.102.10zThehostnumberis:212314.24TCP/IPProtocolTCP/IPProtocol14.5Net1ANet3BNet2Net4C2414.25TCP/IPProtocolTCP/IPProtocolIP127.0.0.0(127.*.*.**0255)Internet25514.26TCP/IPProtocolTCP/IPProtocolTheDomainNameSystem(DNS)zAlthoughInternetsoftwareusesIPaddresses,peopleprefertousesymbolicnameszThetranslationfromsymbolicnamestoIPaddressesisperformedbydomainnamesystem(DNS)zOrganizationsusededicatednameservers,thatmapdoma