Presentation is loading. Please wait.

Presentation is loading. Please wait.

Networking CS 3470, Section 1 Sarah Diesburg

Similar presentations


Presentation on theme: "Networking CS 3470, Section 1 Sarah Diesburg"— Presentation transcript:

1 Networking CS 3470, Section 1 Sarah Diesburg
Protocols Networking CS 3470, Section 1 Sarah Diesburg

2 Applications Applications need their own protocols
Just like we are writing our chat program with a certain specification so that any two randomly-chosen chat 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 companion 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 Easter Egg #2 – Send an to with the RFC number for the protocol concerning avian carriers for an extra point on homework #2! (Must send before homework #2 due date to count.)

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 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 Keyword Arguments HELO
Sender’s Host Domain Name MAIL FROM: Address of sender RCPT TO: of Intended recipient DATA Body of the message QUIT

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 MAIL 250 OK RCPT

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

15 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?

16 HTTP Hypertext Transport Protocol TCP port 80 RFC 1945 ASCII 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

17 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

18 HTTP Request Operations
Description OPTIONS Request information about available options GET Retrieve document identified in URL HEAD Retrieve metainformation about document identified in URL POST Give information to server (e.g., submitting forms) PUT Upload document under specified URL

19 Status Codes 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

20 Demo $> telnet GET …<Lots of HTML code here….>

21 Demo Can we get a webpage? Do all the images come along?


Download ppt "Networking CS 3470, Section 1 Sarah Diesburg"

Similar presentations


Ads by Google