COE 341 Data Computer Communications T 081 Dr

  • Slides: 48
Download presentation
COE 341: Data & Computer Communications (T 081) Dr. Marwan Abu-Amara Chapter 2: Protocols

COE 341: Data & Computer Communications (T 081) Dr. Marwan Abu-Amara Chapter 2: Protocols and Architecture

Agenda n n Need For Protocol Architecture q Key Elements of a Protocol Architecture

Agenda n n Need For Protocol Architecture q Key Elements of a Protocol Architecture q Simplified File Transfer Architecture q A Three Layer Model q Protocol Architectures and Networks q Protocols in Simplified Architecture q Standardized Protocol Architectures OSI q The Model q Standardization within the OSI Framework q OSI Layers The TCP/IP Protocol Architecture q TCP/IP Layers q TCP & UDP q TCP/IP Applications q Protocol Interfaces COE 341 – Dr. Marwan Abu-Amara 2

Need For Protocol Architecture n What’s a protocol? q n Example: File transfer q

Need For Protocol Architecture n What’s a protocol? q n Example: File transfer q q n n Convention between two communicating entities governing exchange of data (e. g. conversation) Source must activate communications path or inform network of destination Source must check destination is prepared to receive data File transfer application on source must check destination file management system will accept and store file for user May need file format translation Task broken into subtasks Implemented separately in layers in stack Functions needed in both systems Peer layers communicate COE 341 – Dr. Marwan Abu-Amara 3

Key Elements of a Protocol n Syntax q q n Semantics q q n

Key Elements of a Protocol n Syntax q q n Semantics q q n Data formats Signal levels Control information for coordination Error handling Timing q q Speed matching Sequencing COE 341 – Dr. Marwan Abu-Amara 4

Protocol Architecture n n Task of communication broken up into modules For example file

Protocol Architecture n n Task of communication broken up into modules For example file transfer could use three modules q q q File transfer application Communication service module Network access module COE 341 – Dr. Marwan Abu-Amara 5

Simplified File Transfer Architecture COE 341 – Dr. Marwan Abu-Amara 6

Simplified File Transfer Architecture COE 341 – Dr. Marwan Abu-Amara 6

A Three Layer Model n n n Network Access Layer Transport Layer Application Layer

A Three Layer Model n n n Network Access Layer Transport Layer Application Layer COE 341 – Dr. Marwan Abu-Amara 7

Network Access Layer n n Exchange of data between the computer and the network

Network Access Layer n n Exchange of data between the computer and the network Sending computer provides address of destination May invoke levels of service Dependent on type of network used (LAN, packet switched etc. ) COE 341 – Dr. Marwan Abu-Amara 8

Transport Layer n n n Reliable data exchange Independent of network being used Independent

Transport Layer n n n Reliable data exchange Independent of network being used Independent of application COE 341 – Dr. Marwan Abu-Amara 9

Application Layer n n Support for different user applications e. g. e-mail, file transfer

Application Layer n n Support for different user applications e. g. e-mail, file transfer COE 341 – Dr. Marwan Abu-Amara 10

Protocol Architectures and Networks COE 341 – Dr. Marwan Abu-Amara 11

Protocol Architectures and Networks COE 341 – Dr. Marwan Abu-Amara 11

Addressing Requirements n n n Two levels of addressing required Each computer needs unique

Addressing Requirements n n n Two levels of addressing required Each computer needs unique network address Each application on a (multi-tasking) computer needs a unique address within the computer q q The service access point or SAP The port on TCP/IP stacks COE 341 – Dr. Marwan Abu-Amara 12

Protocols in Simplified Architecture COE 341 – Dr. Marwan Abu-Amara 13

Protocols in Simplified Architecture COE 341 – Dr. Marwan Abu-Amara 13

Protocol Data Units (PDU) n n At each layer, protocols are used to communicate

Protocol Data Units (PDU) n n At each layer, protocols are used to communicate Control information is added to user data at each layer Transport layer may fragment user data Each fragment has a transport header added q q q n Destination SAP Sequence number Error detection code This gives a transport protocol data unit COE 341 – Dr. Marwan Abu-Amara 14

Protocol Data Units COE 341 – Dr. Marwan Abu-Amara 15

Protocol Data Units COE 341 – Dr. Marwan Abu-Amara 15

Network PDU n Adds network header q q network address for destination computer Facilities

Network PDU n Adds network header q q network address for destination computer Facilities requests COE 341 – Dr. Marwan Abu-Amara 16

Operation of a Protocol Architecture COE 341 – Dr. Marwan Abu-Amara 17

Operation of a Protocol Architecture COE 341 – Dr. Marwan Abu-Amara 17

Standardized Protocol Architectures n n Required for devices to communicate Vendors have more marketable

Standardized Protocol Architectures n n Required for devices to communicate Vendors have more marketable products Customers can insist on standards based equipment Two standards: q OSI Reference model n q TCP/IP protocol suite n n Never lived up to early promises Most widely used Also: IBM Systems Network Architecture (SNA) COE 341 – Dr. Marwan Abu-Amara 18

OSI n n n Open Systems Interconnection Developed by the International Organization for Standardization

OSI n n n Open Systems Interconnection Developed by the International Organization for Standardization (ISO) Seven layers A theoretical system delivered too late! TCP/IP is the de facto standard COE 341 – Dr. Marwan Abu-Amara 19

OSI - The Model n n n A layer model Each layer performs a

OSI - The Model n n n A layer model Each layer performs a subset of the required communication functions Each layer relies on the next lower layer to perform more primitive functions Each layer provides services to the next higher layer Changes in one layer should not require changes in other layers COE 341 – Dr. Marwan Abu-Amara 20

OSI Layers COE 341 – Dr. Marwan Abu-Amara 21

OSI Layers COE 341 – Dr. Marwan Abu-Amara 21

The OSI Environment COE 341 – Dr. Marwan Abu-Amara 22

The OSI Environment COE 341 – Dr. Marwan Abu-Amara 22

OSI as Framework for Standardization COE 341 – Dr. Marwan Abu-Amara 23

OSI as Framework for Standardization COE 341 – Dr. Marwan Abu-Amara 23

Layer Specific Standards COE 341 – Dr. Marwan Abu-Amara 24

Layer Specific Standards COE 341 – Dr. Marwan Abu-Amara 24

Elements of Standardization n Protocol specification q q q Operates between the same layer

Elements of Standardization n Protocol specification q q q Operates between the same layer on two systems May involve different operating system Protocol specification must be precise n n n Service definition q n Format of data units Semantics of all fields Functional description of what is provided Addressing q Referenced by SAPs COE 341 – Dr. Marwan Abu-Amara 25

Service Primitives and Parameters n n n Services between adjacent layers expressed in terms

Service Primitives and Parameters n n n Services between adjacent layers expressed in terms of primitives and parameters Primitives specify function to be performed Parameters pass data and control info COE 341 – Dr. Marwan Abu-Amara 26

Primitive Types REQUEST A primitive issued by a service user to invoke some service

Primitive Types REQUEST A primitive issued by a service user to invoke some service and to pass the parameters needed to specify fully the requested service INDICATION A primitive issued by a service provider either to: indicate that a procedure has been invoked by the peer service user on the connection and to provide the associated parameters, or notify the service user of a provider-initiated action RESPONSE A primitive issued by a service user to acknowledge or complete some procedure previously invoked by an indication to that user CONFIRM A primitive issued by a service provider to acknowledge or complete some procedure previously invoked by a request by the service user COE 341 – Dr. Marwan Abu-Amara 27

Timing Sequence for Service Primitives COE 341 – Dr. Marwan Abu-Amara 28

Timing Sequence for Service Primitives COE 341 – Dr. Marwan Abu-Amara 28

OSI Layers (1) n Physical q Physical interface between devices n n n Mechanical

OSI Layers (1) n Physical q Physical interface between devices n n n Mechanical Electrical Functional Procedural Data Link q q q Means of activating, maintaining and deactivating a reliable link Error detection and control Higher layers may assume error free transmission COE 341 – Dr. Marwan Abu-Amara 29

OSI Layers (2) n Network q q q n Transport of information Higher layers

OSI Layers (2) n Network q q q n Transport of information Higher layers do not need to know about underlying technology Not needed on direct links Transport q q q Exchange of data between end systems Error free In sequence No losses No duplicates Quality of service COE 341 – Dr. Marwan Abu-Amara 30

OSI Layers (3) n Session q q n Presentation q q q n Control

OSI Layers (3) n Session q q n Presentation q q q n Control of dialogues between applications Dialogue discipline Grouping Recovery Data formats and coding Data compression Encryption Application q Means for applications to access OSI environment COE 341 – Dr. Marwan Abu-Amara 31

Use of a Relay COE 341 – Dr. Marwan Abu-Amara 32

Use of a Relay COE 341 – Dr. Marwan Abu-Amara 32

TCP/IP Protocol Architecture n n n Developed by the US Defense Advanced Research Project

TCP/IP Protocol Architecture n n n Developed by the US Defense Advanced Research Project Agency (DARPA) for its packet switched network (ARPANET) Used by the global Internet No official model but a working one. q q q Application layer Host to host or transport layer Internet layer Network access layer Physical layer COE 341 – Dr. Marwan Abu-Amara 33

Physical Layer n n n Physical interface between data transmission device (e. g. computer)

Physical Layer n n n Physical interface between data transmission device (e. g. computer) and transmission medium or network Characteristics of transmission medium Signal levels Data rates etc. COE 341 – Dr. Marwan Abu-Amara 34

Network Access Layer n n n Exchange of data between end system and network

Network Access Layer n n n Exchange of data between end system and network Destination address provision Invoking services like priority COE 341 – Dr. Marwan Abu-Amara 35

Internet Layer (IP) n n n Systems may be attached to different networks Routing

Internet Layer (IP) n n n Systems may be attached to different networks Routing functions across multiple networks Implemented in end systems and routers COE 341 – Dr. Marwan Abu-Amara 36

Transport Layer (TCP) n n Reliable delivery of data Ordering of delivery COE 341

Transport Layer (TCP) n n Reliable delivery of data Ordering of delivery COE 341 – Dr. Marwan Abu-Amara 37

Application Layer n n Support for user applications e. g. HTTP, SMTP COE 341

Application Layer n n Support for user applications e. g. HTTP, SMTP COE 341 – Dr. Marwan Abu-Amara 38

Example: Hosts, Bridges & Routers n n n Hosts: Implement all layers Bridges, Switches:

Example: Hosts, Bridges & Routers n n n Hosts: Implement all layers Bridges, Switches: Layer-2 devices Routers: Layer-3 devices After Kurose & Ross, Computer Networking-A top-down Approach, Figure 1. 24, p. 57 COE 341 – Dr. Marwan Abu-Amara 39

OSI v TCP/IP COE 341 – Dr. Marwan Abu-Amara 40

OSI v TCP/IP COE 341 – Dr. Marwan Abu-Amara 40

TCP n Usual transport layer is Transmission Control Protocol q n Connection q n

TCP n Usual transport layer is Transmission Control Protocol q n Connection q n Reliable connection Temporary logical association between entities in different systems TCP PDU q q Called TCP segment Includes source and destination port (c. f. SAP) n n n Identify respective users (applications) Connection refers to pair of ports TCP tracks segments between entities on each connection COE 341 – Dr. Marwan Abu-Amara 41

UDP n n n Alternative to TCP is User Datagram Protocol Not guaranteed delivery

UDP n n n Alternative to TCP is User Datagram Protocol Not guaranteed delivery No preservation of sequence No protection against duplication Minimum overhead Adds port addressing to IP COE 341 – Dr. Marwan Abu-Amara 42

TCP/IP Concepts COE 341 – Dr. Marwan Abu-Amara 43

TCP/IP Concepts COE 341 – Dr. Marwan Abu-Amara 43

Addressing level n n n Level in architecture at which entity is named Unique

Addressing level n n n Level in architecture at which entity is named Unique address for each end system (computer) and router Network level address q q n IP or internet address (TCP/IP) Network service access point or NSAP (OSI) Process within the system q q Port number (TCP/IP) Service access point or SAP (OSI) COE 341 – Dr. Marwan Abu-Amara 44

Trace of Simple Operation n n Process associated with port 1 in host A

Trace of Simple Operation n n Process associated with port 1 in host A sends message to port 2 in host B Process at A hands down message to TCP to send to port 2 in host B TCP hands down to IP to send to host B IP hands down to network access layer (e. g. Ethernet) to send to router J Generates a set of encapsulated PDUs COE 341 – Dr. Marwan Abu-Amara 45

PDUs in TCP/IP COE 341 – Dr. Marwan Abu-Amara 46

PDUs in TCP/IP COE 341 – Dr. Marwan Abu-Amara 46

Example Header Information n Destination port Sequence number Checksum COE 341 – Dr. Marwan

Example Header Information n Destination port Sequence number Checksum COE 341 – Dr. Marwan Abu-Amara 47

Some Protocols in TCP/IP Suite COE 341 – Dr. Marwan Abu-Amara 48

Some Protocols in TCP/IP Suite COE 341 – Dr. Marwan Abu-Amara 48