Download
protocols n.
Skip this Video
Loading SlideShow in 5 Seconds..
Protocols PowerPoint Presentation

Protocols

6 Vues Download Presentation
Télécharger la présentation

Protocols

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Protocols Networking CS 3470, Section 1 Sarah Diesburg

  2. Applications • Applications need their own protocols • Just like we are writing our network programs with a certain specification so that any two randomly-chosen network programs may work together

  3. Applications and Network Protocols • As an example, many browsers can interact with web servers • Firefox • IE • Chrome • Opera • Others…

  4. Networking Application Protocols • Many specialized network application protocols are defined • For a list, just take a look at /etc/services • Today we will discuss two • Simple Mail Transfer Protocol (SMTP) used to exchange electronic mail • HyperText Transport Protocol (HTTP) is used to communicate between web browsers and web servers

  5. Networking Application Protocols • Both HTTP and SMTP have protocols that specify the format of the data that can be exchanged • SMTP • RFC821 – Actual SMTP protocol • RFC822 – Companion protocol that specifies standard message format • HTTP • HTTP is the protocol for fetching web pages • HTML (HyperText Markup Language) is the companion protocol that defines the form of web pages

  6. SMTP • Goal of SMTP is to transfer mail reliably and efficiently on TCP port 25 • Two main components • User Agents (UAs) prepare the message • Also called mail readers in the text • Mail Transfer Agents (MTAs) transfer the mail across the Internet • Also called mail daemons in the text (where daemon is just another word for process)

  7. SMTP UA UA Internet MTA MTA

  8. Gateways • Often the sender’s MTA doesn’t get to connect directly to the receiver’s MTA • Mail traverses one or more mail gateways • Stores and forwards email addresses • Example: Sending a mail to pizzahut.com first forwards to a global pizzahut gateway, then is sent to MTA specific to location (Cedar Falls area)

  9. SMTP Gateways UA UA MTA/Gateway MTA/Gateway MTA MTA

  10. RFC 822 • ARPA Internet Text Messages • Defines format of the messages being exchanged • Messages have two parts: header and body • Both parts are represented in ASCII text • Attachments like pictures are encoded • ASCII protocols can be tried by humans running telnet! • $> telnet some.mail.server 25

  11. How SMTP works • The Basics

  12. Status Codes • The Server responds with a 3 digit code that may be followed by text info • 2## - Success • 3## - Command can be accepted with more information • 4## - Command was rejected, but error condition is temporary • 5## - Command rejected, Bad User!

  13. Book’s Example $> telnet mail.cs.princeton.edu 25 HELO cs.princeton.edu 250 Hello daemon@mail.cs.princeton.edu MAIL FROM:<Bob@cs.princeton.edu> 250 OK RCPT TO:<Alice@cisco.com> 250 OK

  14. Book’s Example (Cont.) DATA 354 Start mail input; end with . Blah blah blah… . 250 OK QUIT 221 Closing connection…

  15. Before we move on… • Use of Computer Resources poicy: http://www.uni.edu/policies/954 • "Unauthorized or inappropriate use of the University of Northern Iowa computing resources is prohibited and is grounds for sanctions which can include suspension or loss of computing privileges, disciplinary action or, in extreme cases, legal action."

  16. Demo • Let’s find UNI’s SMTP server… • Can we send from any address (even fake ones)? • Can we send to anybody? • What’s in the headers?

  17. HTTP • Hypertext Transport Protocol • Protocol used for communication between web browsers and web servers • TCP port 80 • RFC 1945 • ASCII protocol • This means we can use our good friend, telnet! • $> telnet some.webserver.com 80

  18. HTTP - URLs • URL • Uniform Resource Locator • protocol (http, ftp, news) • host name (name.domain name) • port (usually 80 but many on 8080) • directory path to the resource • resource name • http://xxx.myplace.com/www/index.html • http://xxx.myplace.com:80/cgi-bin/t.exe

  19. HTTP Request Operations

  20. 200 OK 201 created 202 accepted 204 no content 301 moved perm. 302 moved temp 304 not modified 400 bad request 401 unauthorized 403 forbidden 404 not found 500 int. server error 501 not impl. 502 bad gateway 503 svc not avail Status Codes

  21. Demo $> telnet www.cs.uni.edu 80 GET http://www.cs.uni.edu …<Lots of HTML code here….>

  22. Demo • Can we get a webpage? • Do all the images come along?