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

Slides:



Advertisements
Similar presentations
1 Electronic Mail u Three major components: u user agents u mail servers u simple mail transfer protocol: SMTP u User Agent u a.k.a. “mail reader” u composing,
Advertisements

HyperText Transfer Protocol (HTTP)
Chapter 17: Client/Server Computing Business Data Communications, 4e.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Chapter 6: Distributed Applications Business Data Communications, 5e.
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Chapter 7: Client/Server Computing Business Data Communications, 5e.
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Electronic Mail and SMTP
Web, HTTP and Web Caching
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
Simple Mail Transfer Protocol
Chapter 7: Internet-Based Applications Business Data Communications, 6e.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
CSE401N: Computer Networks Lecture-5 Electronic Mail S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Review: –How do we address “a network end-point”? –What services are provided by the Internet? –What is the network logical topology observed by a network.
Application Layer Protocols Simple Mail Transfer Protocol.
Chapter 7: Internet-Based Applications Business Data Communications, 6e.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
CS 3830 Day 7 Introduction : Application Layer 2 Processes communicating Process: program running within a host. r within same host, two processes.
FTP (File Transfer Protocol) & Telnet
Mail (smtp), VoIP (sip, rtp)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
File Transfer Protocol (FTP)
Sockets process sends/receives messages to/from its socket
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
Chapter 17: Client/Server Computing Business Data Communications, 4e.
Chapter 16: Distributed Applications Business Data Communications, 4e.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
Chapter 16: Distributed Applications Business Data Communications, 4e.
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
COMP 431 Internet Services & Protocols
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Dr. Adil Yousif University of Alneelian – Master of CS - IT Electronic Mail.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
Application layer 1 Principles of network applications 2 Web and HTTP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Internet transport protocols services
Chapter 6: Distributed Applications
Computer Communication & Networks
Chapter 2: Application layer
The Application Layer: SMTP, FTP
Chapter 2 Application Layer
Presentation transcript:

ITC242 – Introduction to Data Communications Internet Based Applications

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.

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

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

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

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

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

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

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

SMTP [RFC 2821] messages must be in 7-bit ASCII uses TCP to reliably transfer email 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

Scenario: Alice sends message to Bob 1) Alice uses UA to compose message and “to” bob@someschool.edu 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

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: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... 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

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”

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

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

Single System E-Mail

Single System E-Mail 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

Multiple Systems E-Mail

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

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. http://www.freesoft.org/CIE/RFC/

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

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

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.

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

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

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

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)

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)

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

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

Message format: multimedia extensions MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type From: alice@crepes.fr To: bob@hamburger.edu 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

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

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: www.someschool.edu/someDept/pic.gif host name path name

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

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

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

Nonpersistent HTTP (contains text, references to 10 jpeg images) Suppose user enters URL www.someSchool.edu/someDepartment/home.index 1a. HTTP client initiates TCP connection to HTTP server (process) at www.someSchool.edu on port 80 1b. HTTP server at host www.someSchool.edu 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

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

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

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

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: www.someschool.edu 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

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: www.somesite.com/animalsearch?monkeys&banana

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

HTTP response message status line (protocol status code status phrase) HTTP/1.1 200 OK Connection close Date: Thu, 06 Aug 1998 12: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

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

HTTP Operation

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

Intermediate System Examples

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

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

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

SIP Component Illustration

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

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

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

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

Client-Server Environment

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

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

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

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

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

Web/Database Connectivity

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

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

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

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

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

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

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.