DOC PREVIEW
UW-Madison CS 640 - Network Applications

This preview shows page 1-2-3-4-5-6 out of 17 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17CS 640 1Network ApplicationsOutlineSimple Mail Transfer ProtocolThe Web, HTTPCS 640 2Simple Mail Transfer Protocol•Basic protocol for email exchange over the Internet•Runs on top of TCP•SMTP is NOT an interactive protocol, unlike, say, FTP–Messages are queued and spooled by SMTP agent•Users interact with email application–Lots!•Application interfaces with Message Transfer Agent or mail daemon–Sendmail on UNIX–Setup and configured by admins.•SMTP specifies how MTA’s pass email across the InternetCS 640 3Simple Mail Transfer Protocol•Client uses email application to construct and send messages–Addresses consist of machine name and mailbox address•Mailbox is usually the same as one’s login but you can have aliases•Destination machine can also be an [email protected]•Message is passed to mail spooler which is part of MTA–Application communicates with MTA via email transfer protocol•Post Office Protocol (POP3) is common, but not very secure•Our department uses IMAP•MTA’s on remote systems listen for incoming mail on well known port (25)•Messages are delivered in two parts – header and body–Header format has exact specification = RFC 822–Body content types are specified by MIMECS 640 4SMTP ExampleAditya AkellaUW-madisonSrini SeshanCMUFrom:[email protected]: “Srini" <[email protected]>Subject: HiDate: Tues, 11 Aug 2001 10:46:16 -0400MIME-Version: 1.0X-Mailer: Internet Mail Service (5.5.1960.3)Content-Type: text/plainContent-Transfer-Encoding: 7bitHi, Srini!Blah!-AdityaheaderbodyCS 640 5Sample SMTP Sessiontux34(21)% telnet smtp.cs.wisc.edu 25Trying 128.105.6.11...Connected to schroeder.cs.wisc.edu (128.105.6.11).220 schroeder.cs.wisc.edu ESMTP Sendmail 8.11.3; Tue, 11 Sep 2001 14:09:52 -0500HELO akella.cs.wisc.edu250 schroeder.cs.wisc.edu Hello tux34.cs.wisc.edu [128.105.111.134], pleased to meet youMAIL FROM:<[email protected]>250 2.1.0 <[email protected]> ... Sender okRCPT TO:<[email protected]>250 2.1.5 <[email protected]>... Recipient okDATA354 Enter mail, end with "." on a line by itselfTo: [email protected] for CS640.250 2.0.0. f8BJAeq14849 Message accepted for deliveryQUIT221 2.0.0 schroeder.cs.wisc.edu closing connectionConnection closed by foreign host.tux34(22)%EnvelopeHeaderBodyCS 640 6Web/WWW Components•Structural Components–Clients/browsers – to dominant implementations–Servers – run on sophisticated hardware–Caches – many interesting implementations–Internet – the global infrastructure which facilitates data transfer•Semantic Components–Hyper Text Transfer Protocol (HTTP)–Hyper Text Markup Language (HTML)•eXtensible Markup Language (XML)–Uniform Resource Identifiers (URIs)CS 640 7WWW Structure•Clients use browser application to send URIs via HTTP to servers requesting a Web page•Web pages constructed using HTML (or other markup language) and consist of text, graphics, sounds plus embedded files•Servers (or caches) respond with requested Web page–Or with error message•Client’s browser renders Web page returned by server–Page is written using Hyper Text Markup Language (HTML)–Displaying text, graphics and sound in browser–Writing data as well•The entire system runs over standard networking protocols (TCP/IP, DNS,…)CS 640 8Uniform Resource Identifiers•Web resources need names/identifiers – Uniform Resource Identifiers (URIs)–Resource can reside anywhere on the Internet•URIs are a somewhat abstract notion–A pointer to a resource to which request methods can be applied to generate potentially different responses•A request method is eg. fetching or changing the object•Instance: http://www.foo.com/index.html–Protocol, server, resource•Most popular form of a URI is the Uniform Resource Locator (URL)–Differences between URI and URL are beyond scope–RFC 2396CS 640 9HTTP Basics•Protocol for client/server communication–The heart of the Web–Very simple request/response protocol•Client sends request message, server replies with response message–Stateless–Relies on URI naming mechanism•Three versions have been used–09/1.0 •RFC 1945 (original RFC is now expired)–1.1 – developed to enhance performance, caching, compression•RFC 2068–1.0 dominates today but 1.1 is catching upCS 640 10HTTP Request Messages•GET – retrieve document specified by URL•PUT – store specified document under given URL•HEAD – retrieve info. about document specified by URL•POST – give information (eg. annotation) to the serverLess common ones…•OPTIONS – retrieve information about available options•DELETE – remove document specified by URL•TRACE – loopback request message•CONNECT – for use by cachesCS 640 11HTTP Request Format•First type of HTTP message: requests–Client browsers construct and send message•Typical HTTP request:–GET http://www.cs.wisc.edu/index.html HTTP/1.0request-line ( request request-URI HTTP-version)headers (0 or more)<blank line>body (only for POST request)CS 640 12HTTP Response Format•Second type of HTTP message: response–Web servers construct and send response messages•Typical HTTP response:–HTTP/1.0 301 Moved Permanently Location: http://www.wisc.edu/cs/index.htmlstatus-line (HTTP-version response-code response-phrase)headers (0 or more)<blank line>bodyCS 640 13HTTP Response Codes•1xx – Informational – request received, processing•2xx – Success – action received, understood, accepted•3xx – Redirection – further action necessary•4xx – Client Error – bad syntax or cannot be fulfilled•5xx – Server Error – server failedCS 640 14HTTP Headers•Both requests and responses can contain a variable number of header fields–Consists of field name, colon, space, field value–17 possible header types divided into three categories•Request•Response•Body•Example: Date: Friday, 27-Apr-01 13:30:01 GMT•Example: Content-length: 3001CS 640 15HTTP/1.0 Network Interaction•Clients make requests to port 80 on servers–Uses DNS to resolve server name•Clients make separate TCP connection for each URL–Some browsers open multiple TCP connections•Netscape default = 4•Server returns HTML page–Many types of servers with a variety of implementations–Apache is the most widely used•Freely available in source form•Client parses


View Full Document

UW-Madison CS 640 - Network Applications

Documents in this Course
Security

Security

21 pages

Mobile IP

Mobile IP

16 pages

Lecture 7

Lecture 7

36 pages

Multicast

Multicast

38 pages

Load more
Download Network Applications
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Network Applications and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Network Applications 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?