0% found this document useful (0 votes)
2 views

02 Internet Protocols

The document provides an overview of the application layer in computer networks, emphasizing the relationship between network protocols and applications like HTTP and SMTP. It discusses the layered network architecture, client-server models, and the importance of protocols in ensuring reliable communication. The summary concludes that understanding both structural and application perspectives is crucial for standardization in networking.

Uploaded by

caverosotomayor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

02 Internet Protocols

The document provides an overview of the application layer in computer networks, emphasizing the relationship between network protocols and applications like HTTP and SMTP. It discusses the layered network architecture, client-server models, and the importance of protocols in ensuring reliable communication. The summary concludes that understanding both structural and application perspectives is crucial for standardization in networking.

Uploaded by

caverosotomayor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Application Layer

Computer Networks

CS4054 - 2025I
PROF.: [email protected]
SRC: KUROSE – COMPUTER NETWORKS BOOK
PETERSON AND DAVIE – COMPUTER NETWORKS BOOK
Executive Summary
2

• Motivation: Network conceptual and implementation aspects can lead


to complex applications.
• Problem: We need details of the layered network abstraction and its
relationship with applications.
• Overview:
- Layered network review.
- Application layer and transport relationship
- Review of two important applications: HTTP and STMP
• Conclusion: We introduced fundamental aspects of well-known
applications such as web HTTP and mail.

CS4054-COMPUTER NETWORKS
Outline
3

Introduction

Processes and sockets

Application layer and protocols

HTTP

SMTP

Conclusions

CS4054-COMPUTER NETWORKS
Recall: OSI Architecture
4

OSI 7-layer Model


OSI – Open Systems Interconnection

• As a layer standard for


network architecture.

CS4054-COMPUTER NETWORKS
Recall: Layered Internet protocol stack
5

▪ application: supporting network applications


• HTTP, IMAP, SMTP, DNS application
application
▪ transport: process-process data transfer
• TCP, UDP transport
transport
▪ network: routing of datagrams from source to
destination network
• IP, routing protocols
link
▪ link: data transfer between neighboring
network elements physical
• Ethernet, 802.11 (WiFi), PPP
▪ physical: bits “on the wire”
CS4054-COMPUTER NETWORKS
Some network apps
6

• e-mail possible structure of applications:


• web •client-server: usual architecture
• text messaging •peer-to-peer (P2P): we will cover
• remote login this in detail next week
• P2P file sharing
• multi-user network games
• streaming stored video
(YouTube, Hulu, Netflix)
Client-server architecture
7

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

Processes and sockets

Application layer and protocols

HTTP

SMTP

Conclusions

CS4054-COMPUTER NETWORKS
Processes communicating
9

process: program running within a clients, servers


host client process: process that initiates
communication
• within same host, two processes server process: process that waits to
communicate using inter-process be contacted
communication (defined by OS)
• processes in different hosts communicate
by exchanging messages
Sockets
10
• process sends/receives messages to/from its socket
• socket analogous to door
•sending process shoves message out door
•sending process relies on transport infrastructure on other side of
door to deliver message to socket at receiving process
Outline
11

Introduction

Processes and sockets

Application layer and protocols

HTTP

SMTP

Conclusions

CS4054-COMPUTER NETWORKS
App-layer protocol defines
12

• types of messages exchanged,


• e.g., request, response open protocols:
defined in RFCs
• message syntax:
allows for interoperability
• what fields in messages & how fields are e.g., HTTP, SMTP
delineated proprietary protocols:
• message semantics e.g., Skype
• meaning of information in fields
• rules for when and how processes send &
respond to messages
Recall: Internet Architecture Protocol Graph
13

We are
here

“Hourglass shape”

Alternative view of the


Internet architecture. The
Internet Protocol Graph “Network” layer shown here is
sometimes referred to as the
“sub-network” or “link” layer.

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

• Each protocol object has


two different interfaces
1. service interface: operations
on this protocol
2. peer-to-peer interface:
messages exchanged with
peer
CS4054-COMPUTER NETWORKS Service and Peer Interfaces
Transport layer provides to the App layer
15

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 data loss throughput time sensitive

file transfer no loss elastic no


e-mail no loss elastic no
Web documents no loss elastic no
real-time audio/video loss-tolerant audio: 5kbps-1Mbps yes, 100’s msec
video:10kbps-5Mbps
stored audio/video loss-tolerant same as above yes, few secs
interactive games loss-tolerant few kbps up yes, 100’s msec
text messaging no loss elastic yes and no
Internet apps: application, transport protocols
17

application underlying
application layer protocol transport protocol

e-mail SMTP [RFC 2821] TCP


remote terminal access Telnet [RFC 854] TCP
Web HTTP [RFC 2616] TCP
file transfer FTP [RFC 959] TCP
streaming multimedia HTTP (e.g., YouTube), TCP or UDP
RTP [RFC 1889]
Internet telephony SIP, RTP, proprietary
(e.g., Skype) TCP or UDP
Outline
18

Introduction

Processes and sockets

Application layer and protocols

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

host name path name


HTTP overview
20

HTTP: hypertext transfer protocol


• Web’s application layer protocol
• client/server model
PC running
• client: browser that requests, Firefox browser
receives, (using HTTP
protocol) and “displays” Web
objects server
• server: Web server sends (using running
HTTP protocol) objects in Apache Web
server
response to requests
iPhone running
Safari browser
HTTP overview (continued)
21

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

• two types of HTTP messages: request, response


• HTTP request message:
• ASCII (human-readable format) carriage return character
line-feed character
request line
(GET, POST, GET /index.html HTTP/1.1\r\n
HEAD commands) Host: www-net.cs.umass.edu\r\n
User-Agent: Firefox/3.6.10\r\n
Accept: text/html,application/xhtml+xml\r\n
header Accept-Language: en-us,en;q=0.5\r\n
lines Accept-Encoding: gzip,deflate\r\n
carriage return, Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n
line feed at start Keep-Alive: 115\r\n
Connection: keep-alive\r\n
of line indicates \r\n
end of header lines
HTTP response message
23

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

* Check out the online interactive exercises for more


examples: http://gaia.cs.umass.edu/kurose_ross/interactive/
User-server state: cookies Why?
24 HTTP is “stateless”
server maintains no information about past client
many Web sites use cookies requests
four components:
1) cookieheader line of HTTP response message
2) cookie header line in next HTTP request message
3) cookie file kept on user’s host, managed by user’s browser
4) back-end database at Web site

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

Processes and sockets

Application layer and protocols

HTTP

SMTP

Conclusions

CS4054-COMPUTER NETWORKS
Electronic mail
27

Three major components:


• user agents
• mail servers
• simple mail transfer protocol: SMTP

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

• SMTP uses persistent connections


• SMTP requires message (header & body) to be in 7-bit ASCII
• SMTP server uses CRLF.CRLF to determine end of message

comparison with HTTP:


• HTTP: pull
• SMTP: push
• both have ASCII command/response interaction, status codes
• HTTP: each object encapsulated in its own response message
• SMTP: multiple objects sent in multipart message
Mail message format
30

SMTP: protocol for exchanging


email messages
header
RFC 822: standard for text blank
message format: line
•header lines, e.g.,
• To:
body
• From:
• Subject:
different from SMTP MAIL FROM,
RCPT TO: commands!
• Body: the “message”
• ASCII characters only
Mail access protocols
31

user
mail access user
SMTP SMTP protocol agent
agent
(e.g., POP,
IMAP)

sender’s mail receiver’s mail


server server

• SMTP: delivery/storage to receiver’s server


• mail access protocol: retrieval from server
• POP: Post Office Protocol [RFC 1939]: authorization, download
• IMAP: Internet Mail Access Protocol [RFC 1730]: more features, including manipulation of
stored messages on server
• HTTP: gmail, Hotmail, Yahoo! Mail, etc.
Outline
32

Course Logistics

Introduction

Internet Structure

Internet as a Service

Internet Architecture

Conclusions

CS4054-COMPUTER NETWORKS
Summary
33

We review the Internet, from the:


Structure perspective

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

You might also like