Presentation is loading. Please wait.

Presentation is loading. Please wait.

Last Week TCP/IP and OSI Describe the definition of a protocol;

Similar presentations


Presentation on theme: "Last Week TCP/IP and OSI Describe the definition of a protocol;"— Presentation transcript:

1 ITC242 – Introduction to Data Communications Internet Based Applications

2 Last Week TCP/IP and OSI Describe the definition of a protocol;
Discuss the need and benefits of using protocol architectures; Describe the TCP/IP protocol architecture Describe the OSI reference model.

3 Topic 6 Internet Based Applications
Learning Objectives describe electronic mail and the basic function of SMTP explain the need for MIME explain the role of HTTP in the operation of the Web describe the functions of proxies, gateways and tunnels in HTTP recognise the role of SIP

4 Question Which layer of OSI we will study in this class?

5 Layering: The OSI Model
layer-to-layer communication Application Application 7 7 Presentation Presentation 6 6 Session Session 5 5 Peer-layer communication Transport Transport Router Router 4 4 Network Network Network Network 3 3 Link Link Link Link 2 2 Physical Physical Physical Physical 1 1

6 Electronic Mail Features
Message Preparation Word processing Annotation Message Sending User directory Timed delivery Multiple addressing Message priority Status information Interface to other facilities Message Receiving Mailbox scanning Message selection Message notification Message reply Message rerouting

7 Public vs Private Email
Provided by a 3rd party vendor Available over one or more public networks Examples: MCI Mail, AOL Private Integrated with user’s computer equipment Often part of an integrated tool, eg PROFS Used for internal messaging Internet mail does not fit into either of these categories; it is a transfer mechanism rather than a contained system

8 Electronic Mail SMTP SMTP SMTP Three major components: user agents
user mailbox outgoing message queue user agent Three major components: user agents mail servers simple mail transfer protocol: SMTP User Agent a.k.a. “mail reader” composing, editing, reading mail messages e.g., Eudora, Outlook, elm, Mozilla Thunderbird outgoing, incoming messages stored on server mail server user agent SMTP mail server user agent SMTP mail server SMTP user agent user agent user agent

9 Electronic Mail: mail servers
user agent Mail Servers mailbox contains incoming messages for user message queue of outgoing (to be sent) mail messages SMTP protocol (see the next) mail server user agent SMTP mail server user agent SMTP mail server SMTP user agent user agent user agent

10 SMTP [RFC 2821] messages must be in 7-bit ASCII
uses TCP to reliably transfer message from client to server, port 25 direct transfer: sending server ( “client”) to receiving server( “server”) three phases of transfer handshaking (greeting) transfer of messages closure command/response interaction commands: ASCII text response: status code and phrase messages must be in 7-bit ASCII

11 Scenario: Alice sends message to Bob
1) Alice uses UA to compose message and “to” 2) Alice’s UA sends message to her mail server; message placed in message queue 3) Client side of SMTP opens TCP connection with Bob’s mail server 4) SMTP client sends Alice’s message over the TCP connection 5) Bob’s mail server places the message in Bob’s mailbox 6) Bob invokes his user agent to read message mail server mail server 1 user agent user agent 2 3 6 4 5

12 Sample SMTP interaction
SMIT Client: C SMIT server: S S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: S: 250 Sender ok C: RCPT TO: S: Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection Sending message Status code: 220 Service Ready 250 OK 421 Service Not Available Commands: HELO(HELLO), MAIL FROM, RCPT TO, DATA, QUIT

13 SMTP Connection Setup Sender opens TCP connection to receiver
Receiver acknowledges connection with “220 Service Ready” or “421 Service Not Available” If connection is made, sender identifies itself with the “HELO” command Receiver accepts identification with “250 OK”

14 SMTP Mail Transfer MAIL command identifies originator, provides reverse path for error reporting RCPT commands identify recipient(s) for message Receiver has several positive or negative responses to RCPT Sender will not send message until it is sure at least one copy can be delivered DATA command transfers message

15 SMTP Connection Closing
Sender sends a QUIT command to initiate TCP close operation Receiver sends a reply to the QUIT command, then initiates its own close

16 Single System

17 Single System Only allows users of a shared system to exchange messages Each user has unique identifier and mailbox Sending a message simply puts it into recipients’ box Example: AOL

18 Multiple Systems E-Mail

19 Multiple Systems E-Mail
Distributed system enables mail servers to connect over a network to exchange mail Functions split User agent handles preparation, submission, reading, filing, etc Transfer agent receives mail from user, determines routing, communicates with remote systems Interconnection requires standards

20 Request For Comments Form the basis of the Internet's technical documentation. Conceptually, the Internet as a layered series of protocols, each is documented by one or more RFCs. RFCs don’t change. Updates documented by new RFCs. Not all RFCs document protocols; Some for discussion, informational purposes, April Fools' RFCs distinguished by their date. There are more than 2000 RFCs in existence, dating back to ARPANET in the 1970s. Most RFCs are available as large text files, with graphics made out of typewriter characters.

21 Basic E-Mail Operation
User creates message with user agent program Text includes RFC 822 header and body of message List of destinations derived from header Messages are queued and sent to SMTP sender program running on a host

22 SMTP Mail Flow SMTP server transmits messages to appropriate hosts via TCP Multiple messages to same host can be sent on one connection Errors handling necessary for faulty addresses and unreachable hosts SMTP protocol attempts to provide error-free transmission, but does not provide end-to-end acknowledgement SMTP receiver accepts messages, places it in mailbox or forwards

23 Mail access protocols SMTP SMTP access protocol
user agent user agent sender’s mail server receiver’s mail server SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: gmail, Hotmail, Yahoo! Mail, etc.

24 RFC 822 Defines format for text messages via electronic mail
Used by SMTP as accepted mail format Specifies both envelope and contents Includes a variety of headers that can be included in the message header lines

25 Mail message format SMTP: protocol for exchanging email msgs header
RFC 822: standard for text message format: header lines, e.g., To: From: Subject: different from SMTP commands! body the “message”, ASCII characters only header blank line body

26 SMTP: final words SMTP uses persistent connections
SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses CRLF.CRLF to determine end of message

27 Question Why we are able to send emails with attached image files?
RFC 822 was defined for sending ordinary ASCII text, but not sufficiently rich for multimedia messages, or for carrying non-ASCII text formats( for example, characters used by language other than English)

28 Limitations of SMTP and RFC822
Cannot transmit executables or binary files without conversion into text through non-standard programs (e.g. UUENCODE) Cannot transmit diacritical marks Transfers limited in size Gateways do not always map properly between EBCDIC and ASCII Cannot handle non-text data in X.400 messages Not all SMTP implementations adhere completely to RFC821 (tabs, truncation, etc)

29 MIME (Multipurpose Internet Mail Extensions)
Intended to resolve problems with SMTP and RFC822 Specifies five new header fields, providing info about body of message Defines multiple content formats Defines encodings to enable conversion of any type of content into transferable form

30 MIME Header Fields MIME-Version: Indicates compliance with RFCs 1521 and 1522 Content-Type: Describes data in sufficient detail for receiver to pick method for representation Content-Transfer-Encoding: Indicates type of transformation used to represent content Content-ID: Used to uniquely identify MIME entities Content-Description: Plain text description for use when object is not readable

31 Message format: multimedia extensions
MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type From: To: Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......base64 encoded data MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data

32 HTTP Overview Stateless protocol Flexible in format handling
TCP connection terminated as soon as transaction completes Flexible in format handling

33 Web and HTTP First some jargon Web page consists of objects
Object can be HTML file, JPEG image, Java applet, audio file,… Web page consists of base HTML-file which includes several referenced objects Each object is addressable by a URL Example URL: host name path name

34 HTTP overview HTTP: hypertext transfer protocol
Web’s application layer protocol client/server model client: browser that requests, receives, “displays” Web objects server: Web server sends objects in response to requests HTTP 1.0: RFC 1945 HTTP 1.1: RFC 2068 HTTP request PC running Explorer HTTP response HTTP request Server running Apache Web server HTTP response Mac running Navigator

35 HTTP overview (continued)
HTTP is “stateless” server maintains no information about past client requests Uses TCP: client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) TCP connection closed Protocols that maintain “state” are complex! past history (state) must be maintained if server/client crashes, their views of “state” may be inconsistent, must be reconciled

36 HTTP connections Nonpersistent HTTP
At most one object is sent over a TCP connection. HTTP/1.0 uses nonpersistent HTTP Persistent HTTP Multiple objects can be sent over single TCP connection between client and server. HTTP/1.1 uses persistent connections in default mode

37 Nonpersistent HTTP (contains text, references to 10 jpeg images) Suppose user enters URL 1a. HTTP client initiates TCP connection to HTTP server (process) at on port 80 1b. HTTP server at host waiting for TCP connection at port 80. “accepts” connection, notifying client 2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index 3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket time

38 Nonpersistent HTTP (cont.)
4. HTTP server closes TCP connection. 5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects time 6. Steps 1-5 repeated for each of 10 jpeg objects

39 Non-Persistent HTTP: Response time
Definition of RTT: time to send a small packet to travel from client to server and back. Response time: one RTT ( round-trip time) to initiate TCP connection one RTT for HTTP request and first few bytes of HTTP response to return file transmission time total = 2RTT+transmit time time to transmit file initiate TCP connection RTT request received time

40 Persistent HTTP Nonpersistent HTTP issues: Persistent HTTP
requires 2 RTTs per object OS overhead for each TCP connection browsers often open parallel TCP connections to fetch referenced objects Persistent HTTP server leaves connection open after sending response subsequent HTTP messages between same client/server sent over open connection

41 HTTP request message two types of HTTP messages: request, response
ASCII (human-readable format) request line (GET, POST, HEAD commands) GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) header lines Carriage return, line feed indicates end of message

42 Uploading form input Post method: Web page often includes form input
Input is uploaded to server in entity body URL method: Uses GET method Input is uploaded in URL field of request line:

43 Method types HTTP/1.0 GET POST HEAD HTTP/1.1 GET, POST, HEAD PUT
asks server to leave requested object out of response HTTP/1.1 GET, POST, HEAD PUT uploads file in entity body to path specified in URL field DELETE deletes file specified in the URL field

44 HTTP response message status line (protocol status code status phrase)
HTTP/ OK Connection close Date: Thu, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data ... header lines data, e.g., requested HTML file

45 HTTP response status codes
In first line in server->client response message. A few sample codes: 200 OK request succeeded, requested object later in this message 301 Moved Permanently requested object moved, new location specified later in this message (Location:) 400 Bad Request request message not understood by server 404 Not Found requested document not found on this server 505 HTTP Version Not Supported

46 HTTP Operation

47 HTTP Intermediate Systems
Proxy Forwarding agent Security intermediary Different versions of HTTP Gateway Non-HTTP server Tunnel Relay point between two TCP connections Cache Facility storing previous requests and responses

48 Intermediate System Examples

49 SMTP and HTTP HTTP: pull SMTP: push
both have ASCII command/response interaction, status codes HTTP: each object encapsulated in its own response msg SMTP: multiple objects sent in multipart msg

50 Session Initiation Protocol (SIP)
Defined in RFC 3261 Manages real-time sessions over IP data network Intended to enable Internet telephony/VoIP Based on HTTP-like request/response transaction model Five facets User location User availability User capabilities Session setup Session management

51 SIP Components and Protocols
Client/server elements Client sends/receives SIP messages Includes user agents, proxies Network elements User agent (client/UAC, server/UAS) Redirect server Proxy server Registrar Location service

52 SIP Component Illustration

53 Session Description Protocol
Media Streams Addresses Ports Payload types Start and stop times Originator

54 Summary SMTP - transmits messages to appropriate hosts via TCP, attempts to provide error-free transmission. MIME - Intended to resolve problems with SMTP, provides info about body of message, defines multiple content formats, and encodings HTTP - Stateless protocol, flexible format handling, Proxy, Gateway, Tunnel, Cache SIP - Manages real-time sessions over IP, enable Internet telephony/VoIP, HTTP-like request/response transaction model

55 Topic 7 – Client Server and Intranet Computing
Learning Objectives describe the features, characteristics and architecture of client/server applications; and define intranets and extranets.

56 What is Client/Server? Client Server Network
How is client/server different from other distributed computing? Heavy reliance on user-friendly applications Emphasis on centralizing databases and management functions Commitment to openness/modularity Networking fundamental to operation

57 Client-Server Environment

58 Why is Client-Server Different?
Emphasis on user-friendly client applications Focus on access to centralized databases Commitment to open and modular applications Networking is fundamental to the organization

59 Client/Server Applications
Emphasis on GUI for users Database Example Database on server, applications for access on client, “glue” (like SQL) enables requests) Application logic can be client-only, or split between client and server

60 Intranets Implementation of internet-based client/server technology within an organization, rather than for global connectivity Immensely successful in corporate computing contexts

61 Advantages of Intranets
Rapid prototyping Scales effectively Little training required Can be implemented on variety of systems Open architecture allows interaction across platforms Supports a range of distributed servers Allows integration of legacy systems on client and server side Supports a range of media types Inexpensive to implement

62 The Intranet Web Web Content Web/Database Connectivity Electronic Mail
The web can be used to effectively distribute content in a way that requires no new training for end-users Web/Database Connectivity Multiple tools exist to serve as middleware between web servers and data sources Electronic Mail Network News

63 Web/Database Connectivity

64 Web/Database Connectivity
Advantages Ease of administration Deployment Development speed Flexible information presentation Disadvantages Limited functionality Stateless operation makes tracking difficult

65 Intranet Disadvantages
Long development cycles Difficulty in partitioning applications, and modifying based on user feedback Effort in distributing upgrades to clients Difficult in scaling servers to respond to increased load Continuous requirement for more powerful desktop machines

66 Other Intranet Technologies
Electronic Mail Closed internal mail systems (delivery verification, etc) Internal mailing lists Network news (USENET) Can be adopted for internal intranet uses

67 The Extranet Web Extends the intranet concept to provide information and services to selected outside populations, such as customers and suppliers Enables the sharing of information between companies A TCP/IP enabled form of EDI

68 Advantages of Extranets
Reduced costs More marketable products Increased productivity Enhanced profits Reduced inventories Faster time to market

69 Methods for Converting Intranets to Extranets
Long-distance dial-up access Internet access to intranet with security Internet access to an external server that duplicates some of a company’s intranet data Internet access to an external server that originates database queries to internal servers Virtual private network

70 Summary Client/server - user-friendly client applications, centralized databases, open and modular applications, the network is fundamental Intranet - internet-based client/server technology within an organization, immensely successful Extranets – Extend intranet concept to outside community, e.g customers and suppliers, enables sharing of information between companies, TCP/IP enabled form of EDI.


Download ppt "Last Week TCP/IP and OSI Describe the definition of a protocol;"

Similar presentations


Ads by Google