1 The Application Layer User Agents Client Server Model SocketsFunctions Application Layer Protocols Mail Protocols HTTP File Transfer Protocol Trivial File Transfer Protocol Network File System Telnet Domain Name System SNMP 27/10/10 07-Application
2 The Hybrid Reference ModelApplication Layer Transport Layer Network Layer Data Link Layer Physical Layer 27/10/10 07-Application
3 Application Layer Provides network services to applicationsIdentification of communication partners and determining their current availability Authentication of communication partners Establishing the authority to communicate Agreement on privacy (encryption) mechanisms Selection of dialogue discipline (simplex half or full duplex) Agreement on responsibility for error recovery Identification of constraints on data syntax 27/10/10 07-Application
4 User Agents A User Agent is an interface between a user and a network application Browsers (E.g. Netscape Navigator, Internet Explorer) which are clients to web servers and use the HTTP protocol Mail Readers (E.g. Outlook, Eudora, Mulberry etc.) which are clients to mail servers and use SMTP for sending mail and POP3 or IMAP for receiving mail 27/10/10 07-Application
5 Client Server Model Many applications use the Client Server ModelClient transmits a request for a service to a server Server executes request Server transmits reply to client A server normally serves many clients 27/10/10 07-Application
6 Sockets For applications running TCP/IP protocols the application programming interface between the Application Layer and the Transport Layer is known as a socket. Socket interfaces are provided by Operating Systems and are implemented as library functions The application programmer can control everything on the application side but can only choose the transport protocol he wishes to use and some transport layer parameters 27/10/10 07-Application
7 Application Layer FunctionsEncapsulation Addressing Connection Control Grade of Service Ordered Delivery Error Control Security Data Encoding Data Compression 27/10/10 07-Application
8 Application Layer - EncapsulationThe application layer will transmit user data preceded by an application layer header, specific to the application layer protocol being used E.g. HTTP headers and Mail headers 27/10/10 07-Application
9 Application Layer - AddressingThe application layer will support addressing relevant to the application itself E.g. Mail Readers will support addresses and Browsers will support Uniform Resource Locators (URLs) 27/10/10 07-Application
10 Application Layer - Connection ControlThe application layer is responsible for setting up a connection between two applications and terminating the connection when it is no longer needed The application layer will: Identify and determine the availability of the partner Establish the authority to communicate Determine the mode of communication (simplex / half duplex / full duplex) 27/10/10 07-Application
11 Application Layer - Grade of ServiceThe application layer will determine what sort of network service is required and will issue requests and/or negotiate to obtain the network resources required Choice of Transport Protocol Use of RSVP (ReSource reserVation Protocol) 27/10/10 07-Application
12 Services Applications NeedReliable Data Transfer Loss sensitive applications Loss tolerant applications Bandwidth Bandwidth sensitive applications Elastic applications Timing Delay sensitive applications Delay tolerant applications 27/10/10 07-Application
13 Services Applications NeedData Loss Bandwidth Time Sensitive File Transfer No loss Elastic No WWW Elastic (few kbit/s) Streamed Audio Loss tolerant Few kbit/s – 1 Mbit/s Yes, 100s of msec Streamed Video 10 kbit/s – 5 Mbit/s Interactive Games Few kbit/s – 10 kbit/s Yes 100s of msec Instant Messaging Yes and No © Kurose & Ross, Addison Wesley 27/10/10 07-Application
14 Choice of Transport ProtocolThe TCP/IP Protocol Stack offers two alternative transport protocols Transmission Control Protocol (TCP) Reliable Connection-oriented Complex and slow Variable delays User Datagram Protocol (UDP) Unreliable Connectionless Simple and fast Less variable Delays 27/10/10 07-Application
15 Choosing UnreliabilityApplications may choose an unreliable transport service for the following reasons: Real time applications can tolerate data loss more than they can tolerate delay Simple client server applications which consist of a short request and short response cannot justify the overhead of setting up and clearing down a connection Some security conscious applications do not trust the transport service and prefer to perform error detection and correction themselves A full complex protocol stack may be inappropriate for a simple device and require too much memory and processing 27/10/10 07-Application
16 Application Layer - Ordered DeliveryWhere an application uses an unreliable transport service, the application itself will be responsible for re-ordering data if it is received out of order 27/10/10 07-Application
17 Application Layer - Error ControlWhere an application uses an unreliable transport service or where the application does not trust the transport service, the application itself must provide error detection and recovery 27/10/10 07-Application
18 Application Layer - SecurityThe application layer will carry out authentication of one or both parties (E.g. password checks) and ensure that authenticated user only have access to those resources to which they are allowed Secure Electronic Transactions (SET) - used for credit card transactions Pretty Good Privacy (PGP) – freeware used to encrypt s SHTTP – Secure superset of HTTP HTTPS – developed by Netscape using Secure Sockets Layer (SSL - now called Transport Layer Security TLS). This is a transport layer protocol, but it has to be selected by the application layer 27/10/10 07-Application
19 Application Layer – Data EncodingThe application layer will determine how data is to be encoded in the application layer protocol Character Sets (ASCII / EBCDIC) HTML Abstract Syntax Notation One (ASN.1) 27/10/10 07-Application
20 Hyper Text Mark-up Language (HTML)HTML is the authoring language used to create documents on the World Wide Web. It defines the structure and layout of a Web document by using a variety of tags and attributes The correct structure for an HTML document starts with Header Body 27/10/10 07-Application
21 ASN.1 ASN.1 is an OSI standard widely used both in the development of OSI-related standards and TCP/IP standards ASN.1 is used to define the format of protocol data units (PDUs), the representation of distributed information, and operations performed on transmitted data ASN.1 defines an abstract syntax (like data declarations in a programming language) and a transfer syntax which is actually transmitted, based on Basic Encoding Rules which are applied to the abstract syntax 27/10/10 07-Application
22 ASN.1 Primitive Data TypesTag Type Description 1 BOOLEAN True or False 2 INTEGER Can be arbitrarily large 3 BITSTRING List of one or more bits 4 OCTET STRING List of one or more bytes 5 NULL No value 6 OBJECT IDENTIFIER ASN.1 standard name 9 REAL Floating point number © Kurose & Ross, Addison Wesley 27/10/10 07-Application
23 Abstract and Transfer Syntax© Stallings, Prentice Hall International 27/10/10 07-Application
24 ASN.1 Abstract and Transfer SyntaxExample: We want to send a person’s surname followed by his weight in kg. (smith, 259=010316) ASN.1 Abstract Syntax will be lastname::= OCTET STRING weight::=INTEGER ASN.1 Transfer Syntax will be 04 05 s m i t h (where 04 and the first 02 define the data types and 05 and the second 02 define the field lengths in bytes) © Kurose & Ross, Addison Wesley 27/10/10 07-Application
25 Application Layer – Data CompressionThe application layer will be responsible for compressing and decompressing data Huffman Codes use shorter codes to represent most frequently used symbols Lempel-Ziv-Welch Coding (LZW): loss-less compression technique used for compressing text making use of a dictionary and Huffman coding Joint Photographic Expert Group (JPEG): lossy compression technique for still photographs, using Huffman coding Motion Picture Expert Group (MPEG): video compression technique based on JPEG but interpolating between frames. MPEG-1 equivalent to VCR, MPEG-2 equivalent to broadcast TV, MPEG-4 low bit rate video compression (<64 kbit/s) 27/10/10 07-Application