02 Internet Protocols
02 Internet Protocols
Computer Networks
CS4054 - 2025I
PROF.: [email protected]
SRC: KUROSE – COMPUTER NETWORKS BOOK
PETERSON AND DAVIE – COMPUTER NETWORKS BOOK
Executive Summary
2
CS4054-COMPUTER NETWORKS
Outline
3
Introduction
HTTP
SMTP
Conclusions
CS4054-COMPUTER NETWORKS
Recall: OSI Architecture
4
CS4054-COMPUTER NETWORKS
Recall: Layered Internet protocol stack
5
server:
• always-on host
• permanent IP address
• data centers for scaling
clients:
• communicate with server client/server
• may be intermittently connected
• may have dynamic IP addresses
• do not communicate directly with each other
Outline
8
Introduction
HTTP
SMTP
Conclusions
CS4054-COMPUTER NETWORKS
Processes communicating
9
Introduction
HTTP
SMTP
Conclusions
CS4054-COMPUTER NETWORKS
App-layer protocol defines
12
We are
here
“Hourglass shape”
CS4054-COMPUTER NETWORKS
Recall: Protocols and Interfaces
14
• Defines the interfaces between the layers (more later) in the same system
and with the layers of peer system
• Building blocks of a network architecture
1. data integrity
some apps (e.g., file transfer, web transactions) require 100% reliable data transfer
other apps (e.g., audio) can tolerate some loss
2. security
encryption, data integrity, …
3. throughput
some apps (e.g., multimedia) require minimum amount of throughput to be “effective”
other apps (“elastic apps”) make use of whatever throughput they get
Transport service requirements: common apps
16
application underlying
application layer protocol transport protocol
Introduction
HTTP
SMTP
Conclusions
CS4054-COMPUTER NETWORKS
Web and HTTP
19
First, a review…
• 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, e.g.,
www.someschool.edu/someDept/pic.gif
uses TCP:
HTTP is “stateless”
▪ client initiates TCP connection server maintains no information about past client
(creates socket) to server, port requests
80
▪ server accepts TCP connection aside
from client
protocols that maintain
▪ HTTP messages (application-layer “state” are complex!
protocol messages) exchanged ▪ past history (state) must be
between browser (HTTP client) maintained
and Web server (HTTP server) ▪ if server/client crashes, their
views of “state” may be
▪ TCP connection closed inconsistent, must be reconciled
HTTP request message
22
status line
(protocol
status code HTTP/1.1 200 OK\r\n
status phrase) Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
header ETag: "17dc6-a5c-bf716880"\r\n
Accept-Ranges: bytes\r\n
lines Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=ISO-8859-
1\r\n
data, e.g., \r\n
requested data data data data data ...
HTML file
example:
▪ Susan always access Internet from PC
▪ visits specific e-commerce site for first time
▪ when initial HTTP requests arrives at site, site creates
• unique ID
• entry in backend database for ID
Cookies: keeping “state” (cont.)
25
Outline
26
Introduction
HTTP
SMTP
Conclusions
CS4054-COMPUTER NETWORKS
Electronic mail
27
User Agent
• a.k.a. “mail reader”
• composing, editing, reading mail messages
• e.g., Outlook, Thunderbird, iPhone mail client
• outgoing, incoming messages stored on server
Electronic Mail: SMTP [RFC 2821]
28
• uses TCP to reliably transfer email message from client to server, port 25
• direct transfer: sending server to receiving server
• three phases of transfer
• handshaking (greeting)
• transfer of messages
• closure
• command/response interaction (like HTTP)
• commands: ASCII text
• response: status code and phrase
• messages must be in 7-bit ASCI
SMTP: final words
29
user
mail access user
SMTP SMTP protocol agent
agent
(e.g., POP,
IMAP)
Course Logistics
Introduction
Internet Structure
Internet as a Service
Internet Architecture
Conclusions
CS4054-COMPUTER NETWORKS
Summary
33
Application perspective
•
•Both perspectives are important, each one relies on the other for
standarization.
•Internet is a network of computer network, that follow protocols and it is
organized (by astraction) as layers.
CS4054-COMPUTER NETWORKS