02 Protocols and TCP IP

59
 1 CS 408 Compute r Networks Chapter 2: Protocols and the TCP/IP Protocol Suite

description

Different Protocols

Transcript of 02 Protocols and TCP IP

  • *CS 408Computer NetworksChapter 2: Protocols and the TCP/IP Protocol Suite

  • *ProtocolsCooperative action is necessarycomputer networking is not only to exchange byteshuge system with several utilities and functions. For exampleserror detectionEncryptionRoutingetc.For proper communication, entities in different systems must speak the same languagethere must be mutually acceptable conventions and rules about the content, timing and underlying mechanismsThose conventions and associated rules are referred as PROTOCOLS

  • *Protocol ArchitectureTask of data transfer is broken up into some modulesWhy?How do these modules interact?For example, file transfer could use three modulesFile transfer applicationCommunication service moduleNetwork access module

  • *A Real World Example to Protocol Architecture philosopher-translator-secretary architectureIssues: peer-to-peer protocols are independent of each otherfor example, secretaries may change the comm. medium to emailor the translators may agree on using another common languageEach layer adds a header

  • *Simplified File Transfer ArchitectureFile Transfer Application Layer: Application specific commands, passwords and the actual file(s) high level dataCommunications Service Module: reliable transfer of those data error detection, ordered delivery of data packets, etc.Network Module: actual transfer of data and dealing with the network if the network changes, only this module is affected, not the whole system

  • *General protocol architecture principles that we have seen so farLayered structureProtocol stackEach layer provides services to upper layer; expect services from lower oneLayer interfaces should be well-definedPeer entities communicate using their own protocolpeer-to-peer protocolsindependent of protocols at other layersif one protocol changes, other protocols should not get affected

  • *A General Three Layer ModelGeneralize the previous example for a generic applicationwe can have different applications (e-mail, file transfer, )

    Network Access LayerTransport LayerApplication Layer

  • *Network Access LayerExchange of data between the computer and the networkSending computer provides address of destinationso that network can route

    Different switching and networking techniquesCircuit switchingPacket switchingLANsetc.This layer may need specific drivers and interface equipment depending on type of network used. But upper layers do not see these details independence property

  • *Transport LayerReliable data exchange to make sure that all the data packets arrived in the same order in which they are sent outPackets nor received or received in error are retransmitted

    Independent of network being usedIndependent of application

  • *Application LayerSupport for different user applicationse.g. e-mail, file transfer

  • *Addressing RequirementsTwo levels of addressing requiredEach computer needs unique network addressEach application on a (multi-tasking) computer needs a unique address within the computer The service access point or SAP The port number in TCP/IP protocol stack

  • *Protocol Architectures and Networksor ports

  • *Protocol Data Units (PDU)User data is passed from layer to layerControl information is added/removed to/from user data at each layerHeader (and sometimes trailer)each layer has a different header/trailerData + header + trailer = PDU (Protocol Data Unit)This is basically what we call packeteach layer has a different PDU

  • *Transport PDUTransport layer may fragment user dataEach fragment has a transport header addedDestination portSequence numbersince the transport layer may split application data into smaller packetsError detection code (generally at trailer)

  • *Network PDUAdds network headernetwork address for destination computeroptional facilities from network (e.g. priority level)

  • *Operation of a Protocol ArchitectureTransport HeaderNetwork HeaderNetwork HeaderTransport Header(Network PDU)

  • *Standard Protocol ArchitecturesCommon set of conventions Nonstandard vs. standard protocols Nonstandard: K sources and L receivers lead to K*L different protocolsIf common protocol used, we design only onceProducts from different vendors interoperateIf a common standard is not implemented in a product, then that products market is limited; customers like standard productsCustomers do not stick to a specific vendor

  • *Standard Protocol ArchitecturesTwo approaches (standard)OSI Reference modelnever used widelybut well knownTCP/IP protocol suiteMost widely usedAnother approach (proprietary) IBMs Systems Network Architecture (SNA)

  • *OSI Reference ModelOpen Systems InterconnectionReference modelprovides a general framework for standardizationdefines a set of layers and services provided by each layerone or more protocols can be developed for each layerDeveloped by the International Organization for Standardization (ISO)also published by ITU-T (International Telecommunications Union)

  • *OSI Reference ModelA layered modelSeven layers seven has been presented as the optimal number of layerDelivered too late (published in 1984)!by that time TCP/IP started to become the de facto standardAlthough no OSI-based protocol survived, the model is still valid (in the textbooks)

  • *OSI - The Layer ModelEach layer performs a subset of the required communication functionsEach layer relies on the next lower layer to perform more primitive functionsEach layer provides services to the next higher layerChanges in one layer should not require changes in other layers

  • *OSI as Framework for Standardizationlayer functionalities are described by ISO; different standards can be developed based on these functionalities

  • *Layer Specific Standards

  • *Elements of StandardizationProtocol specificationOperates between the same layer on two systemsMay involve different platformsProtocol specification must be preciseFormat of data unitsSemantics of all fieldsService definitionFunctional description of what is provided to the next upper layerAddressingReferenced by SAPs

  • *The OSI Environment

  • *OSI Layers (1)PhysicalPhysical interface between devicesCharacteristicsMechanical - interface specsElectrical - voltage levels for bits, transmission rateData LinkBasic services: error detection and control, flow control at the link level (point to point)Higher layers may assume error free transmission Later a sublayer is added to Data Link LayerMAC (Medium Access Control) sublayerto deal with broadcast networks

  • *OSI Layers (2)NetworkTransfer of information through communication networknetwork related issuesNetwork nodes (relays/routers) should perform switching and routing functionsQoS (Quality of Service) and congestion control are also addressed in this layerSeveral other internetworking issuese.g. differences in addressing, max. data length, etc. Higher layers do not need to know about underlying networking technologyNot needed on direct links

  • *Use of a Relay/Router

  • *OSI Layers (3)TransportEnd to end exchange of dataIn sequence, no losses, no duplicatesIf needed, upper layer data are split into smaller unitsSessionControl of dialogueswhose turn to talk?Dialogue discipline (full-duplex, half-duplex)Checkpointing and recovery

  • *OSI Layers (4)PresentationData formatsData compressionEncryptionApplicationSupport for various applications

  • *TCP/IP Protocol SuiteMost widely used interoperable network protocol architectureSpecified and extensively used before OSIOSI was slow to take place in the marketFunded by the US Defense Advanced Research Project Agency (DARPA) for its packet switched network (ARPANET)DoD automatically created an enormous market for TCP/IPUsed by the Internet and WWW

  • *TCP/IP Protocol SuiteTCP/IP does not have an official layer structureBut protocols imply oneApplication layerTransport (host to host) layerInternet layerNetwork access layerPhysical layer

    Actually TCP/IP reference model has been built on its protocolsThat is why that reference model is only for TCP/IP protocol suiteand this is why it is not so important to assign roles to each layer in TCP/IP; understanding TCP, IP and the application protocols would be enough

  • *OSI vs. TCP/IPTCP, UDPIPHTTP, SMTP,

  • *Network Access and Physical LayersTCP/IP reference model does not discuss these layers too muchthe node should connect to the network with a protocol such that it can send IP packetsthis protocol is not defined by TCP/IPmostly in hardwarea well known example is Ethernet

  • *Internet LayerConnectionless, point to point internetworking protocol (uses the datagram approach)takes care of routing across multiple networks each packet travels in the network independently of each otherthey may not arrive (if there is a problem in the network)they may arrive out of ordera design decision enforced by DoD to make the system more flexible and responsive to loss of some subnet devicesImplemented in end systems and routers as the Internet Protocol (IP)

  • *Transport LayerEnd-to-end data transferTransmission Control Protocol (TCP)connection orientedreliable delivery of data ordering of deliveryUser Datagram Protocol (UDP)connectionless servicedelivery is not guaranteedCan you give example applications that use TCP and UDP?

  • *Application LayerSupport for user applicationsA separate module for each different applicatione.g. HTTP, SMTP, telnet

  • *IP (Internet Protocol)The core of the TCP/IP protocol suiteTwo versions co-existv4 the widely used IP protocolv6 has been standardized in 1996, but still not widely deployedIP (v4) header minimum 20 octets (160 bits)

  • *IPv6IPv6Enhancements over IPv4 for modern high speed networksSupport for multimedia data streamsBut the driving force behind v6 was to increase address space128-bit as compared to 32-bit of v4Not backward compatibleall equipment and software must changethat is why it will take some more time to migrate into IPv6

  • *TCPTransmission Control Protocolend to end protocolReliable connection = provides flow and error controlIn TCP terms, a connection is atemporary association between entities in different systemsTCP PDU Called TCP segmentIncludes source and destination portIdentify respective users (applications)pair of ports (together with the IP addresses) uniquely identify a connection; such an identification is necessary in order TCP to track segments between entities.

  • TCP Header*

  • *UDPUser Datagram ProtocolAlternative to TCP end-to-end protocolNot guaranteed deliveryNo preservation of sequenceNo protection against duplicationMinimum overhead

  • *PDUs in TCP/IPDest. PortSequence numberChecksum.Dest. AddressSource address.Dest. Network AddressPriority info

  • *Operation of TCP and IP

  • *Some Protocols in TCP/IP Suite

  • *InternetworkingInterconnected set of networksMay be seemed as a large networkEach constituent network is a subnetwork Entire configuration referred to as an internetnot the Internetconceptually the same but by internet we do not mean a specific networkthe Internet is the most important example of an internet

  • *Internetworking DevicesEach subnetwork supports communication among the devices attached to that subnetworkEnd systems (ESs)Subnetworks connected by intermediate systems (ISs)In practice, ISs are routers that are used to relay and route packets between different subnetworksIf subnetworks use different Network Access Protocols, router should support all of the protocols In OSI terminology, a router works at layer 3 (network layer)

  • *RoutersInterconnect dissimilar subnetworks without any modifications on architecture of subnetworksMust accommodate differences among networks, such asAddressing schemesnetwork addresses may need to be translatedMaximum packet sizesif two subnetworks have different limits for max. packet sizes, then router may need fragment/reassemble the packetsWe have seen that subnetworks may have different network access and physical layers, but they have to speak the same (inter)network protocol implemented in all end systems and routersThe most important internetwork protocol is the IP protocol

  • *Configuration for TCP/IP ExampleWAN

  • *Action of Sender

  • *

    Action of Router

  • *Action ofReceiver

  • *StandardsRequired to allow for interoperability among equipmentsAdvantagesEnsures a large market for equipment and softwareAllows products from different vendors to communicateDisadvantageFreeze technology (???)

  • *Standards Organizations in NetworkingInternet SocietyISO (International Organization for Standardization)more formalNGO, but most members are from governmentsITU-T (formerly CCITT) International Telecommunications UnionUN agencygovernmental

  • *Internet Society (ISOC)Internet development and standardization3 suborganizationsIAB (Internet Architecture Board)overall Internet architectureIETF (Internet Engineering Task Force)protocol engineering and developmentIESG (Internet Engineering Steering Group)monitors IETF standardization efforts

  • *IETF OrganizationGrouped in arease.g. applications, security, routing, etc.each area has an Area Director, who is also member of IESGEach area has several working groupsworking groups actually contribute to standards/protocols, etc.Voluntary participation in IETF working groupsFor detail seewww.ietf.org or RFC 3160 - The Tao of IETF - A Novice's Guide to the Internet Engineering Task Force

  • *Internet Drafts and RFCsInternet DraftDraft and temporary documentsexpires in 6 months, if IESG does not approve it as an RFCcan be resubmittedpublished online comments are welcomeRFC (Request for Comments)final versioncan obsolete previous RFCs about the same topicactually an RFC can be of any type of documentnot necessarily a standardBest Current Practice, Experimental, Informational RFCsApril 1st RFCs (http://en.wikipedia.org/wiki/April_1_RFC )My favorite is IP over Avian Carriers (RFC 1149)

  • *Internet Standards TrackSteps involve increasing amount of scrutiny and testingStep 1: Internet DraftStep 2: Proposed standardInternet Draft approved as an RFC by IESGmust remain at least six months to advance Step 3: Draft standardat least two independent and interoperable implementations must remain at least 4 monthsStep 4: Internet standardSignificant operational experiencekey difference between ISOC and other standardization organizations Consensus needed

  • *Internet Assigned Numbers Authority (IANA)An ISOC entity responsible for all unique numbers on the Internetincluding IP addressesAlmost all protocols work with numeric parameters e.g. port numbers, error codes, status codes, message types, options, etc.the meanings of all numeric codes are mostly specified in RFCs, but number assignment is formalized by IANA

    *Answer to Why? Same reason as dividing a big program into smaller functions. It is difficult to attack big problems as a whole.Answer to interaction question? Modules have a layered structure. Each layer (module) provides service to upper layer and expects service from lower layer. Details are explained later in this ppt file.