last lesson
play

Last lesson Moving beyond individual computers Networks Layer - PDF document

11/21/2009 Last lesson Moving beyond individual computers Networks Layer model The Internet IP addresses Domain names 1 11/21/2009 This week Application Protocols Email SMTP, POP, IMAP The Web HTTP


  1. 11/21/2009 Last lesson  Moving beyond individual computers  Networks  Layer model  The Internet  IP addresses  Domain names 1

  2. 11/21/2009 This week  Application Protocols  Email  SMTP, POP, IMAP  The Web  HTTP The Layer Model 2

  3. 11/21/2009 Application protocols  Protocol: set of rules for communication  Messages over Internet via application layer  Examples... Email  Message headers  From, To, Subject, Date, ...  Message body  Actual text, plus attachments 3

  4. 11/21/2009 MIME Multipu tipurpose ose Internet et Mail Exten ensio sions  Emails encoded in ASCII  Non-ASCII character sets?  Non-text attachments? (e.g. images)  Non-ASCII data can be MIME encoded  Translated to ASCII  Transmitted as part of email header/body  Header gives decoding information SMTP Simple e Mail Transf sfer er Prot otoc ocol  Used to send emails  Extended protocol ESMTP  Client-server communication  Client makes requests, server responds  1. User’s client to local server  2. Local server (as client) to destination server 4

  5. 11/21/2009 SMTP Finding ding the Destination tination  account@domain  DNS: MX record for domain is mail server  mas02jg@gold.ac.uk  Domain: gold.ac.uk  MX record: mailhub.gold.ac.uk  Sends to destination server via SMTP SMTP Request uests & Responses onses Client Requests Server Responses  End: QUIT  2xx (Accept)  Greeting: HELO, (ESMTP: EHLO)  3xx, 4xx (Temporary Reject)  Envelope: MAIL FROM, RCPT TO  5xx (Permanent Reject)  Data: DATA 5

  6. 11/21/2009 <C initiates connection> S: 220 mail.gold.ac.uk ESMTP Goldsmiths C: EHLO gmail.com S: 250 Hello gmail.com C: MAIL FROM andy@gmail.com S: 250 OK C: RCPT TO: bob@gold.ac.uk S: 250 Accepted C: DATA S: 354 Enter message, ending with “.” <C sends email headers and body> S: 250 OK id=1L4kge-0001ud-SC C: QUIT S: 221 mail.gold.ac.uk closing connection POP Post st Office ce Prot otoc ocol ol  Used to receive emails  Mail server places emails into account’s mailbox  Email client accesses mailbox via POP  Typically move all messages to email client  Some servers allow mail to be left there  But no information kept about emails 6

  7. 11/21/2009 POP Request uest & Responses onses Client Requests Server Responses  Security: USER, PASS,  Accept: +OK APOP  Error: – ERR  Info: STAT, LIST, UIDL  Fetch: RETR, DELE  QUIT <C initiates connection> S: +OK POP3 server ready pop.gold.ac.uk C: USER mas03jg S: +OK Name is a valid mailbox C: PASS mypassword S: +OK Mailbox locked and ready C: LIST S: +OK 1 message (321 octets) S: 1 321 S: . C: RETR 1 S: +OK Message follows <S sends message 1> C: DELE 1 S: +OK message 1 deleted C: QUIT S: +OK POP3 server signing off (maildrop empty) 7

  8. 11/21/2009 IMAP Inter erne net t Message age Acces ess s Prot otocol ocol  Used to receive emails (alternative to POP)  Emails remain on mail server  Organised in IMAP mail folders  Knows which have been read or flagged  Multiple email clients can access server  Can access all your email from different locations A sends an email to B and C 8

  9. 11/21/2009 Hypermedia  Interlinked documents  Text, images, audio/video  User chooses own path by selecting links  Since 1960s, e.g. NLS  Many single-machine systems, e.g. Hypercard The World Wide Web  A distributed collection of hypermedia documents  accessed over the Internet  Invented in 1990 by Tim Berners-Lee at CERN  URLs, HTTP, HTML  Estimated 100 million pages by 2008 9

  10. 11/21/2009 URL Un Uniform orm Resour urce ce Locator or  Every web page has a URL (an address)  http://doc.gold.ac.uk/~mas02jg/fy04/labs/lab s08.html  Protocol: http  Domain name of web server: doc.gold.ac.uk  Directory path: ~mas02jg/fy04/labs/  Document file name: labs08.html  Web browser uses URL to fetch page from server HTTP Hyper erText xt Transf sfer er Prot otocol ocol  Used to access documents over the Web  Stateless protocol  each request/response is independent  protocol does not remember previous 10

  11. 11/21/2009 HTTP Client ent Requests uests (Meth ethods) ods)  GET (gets a resource)  HEAD (gets resource header only)  PUT (uploads a resource)  DELETE (deletes a resource)  POST (submits data)  TRACE (echoes request)  OPTIONS (displays server options)  CONNECT (used to make connection secure) HTTP Server r Responses onses (Statu tus s Codes)  1xx (Informational)  2xx (Success): 200 OK  3xx (Redirect)  301 Moved Permanently  303 See Other 304 Not Modified  4xx (Client Error)  403 Forbidden  404 Not Found  5xx (Server Error) 11

  12. 11/21/2009 HTTP Headers ers Request headers Response headers  Host: domain name of  Content-Type: e.g. server text/html, image/gif  Referer: address of  Location: for redirect linking page  Date: when served  User-Agent: details of  ETag: resource ID browser, OS  ....  .... C: GET /~mas02jg/fy04/labs/lab08.html HTTP/1.1 C: Host: doc.gold.ac.uk S: HTTP/1.1 200 OK S: Content-Type: text/html S: Content-Length: 2339 <S sends rest of header and lab08.html text> C: GET /~mas02jg/fy04/labs/lab80.html HTTP/1.1 C: Host: doc.gold.ac.uk S: HTTP/1.1 404 Not Found S: Content-Type: text/html; charset=iso-8859-1 <S sends rest of header and 404 page text> 12

  13. 11/21/2009 Summary  Application protocols  Emails have headers, body; MIME  SMTP sends emails  POP, IMAP receive emails  HTTP transfers web pages  Client-server protocols  Reading: Brookshear 4.2, 4.3 (also White 30) 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend