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

1.Client Server Application Layer-Introduction

Chapter 2 of the document focuses on the Application Layer in computer networking, detailing various application protocols such as HTTP, FTP, and SMTP, along with their implementation aspects. It discusses different application architectures, including client-server and peer-to-peer models, and introduces socket programming for network applications. The chapter also outlines the transport service requirements of common applications and the differences between TCP and UDP protocols.

Uploaded by

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

1.Client Server Application Layer-Introduction

Chapter 2 of the document focuses on the Application Layer in computer networking, detailing various application protocols such as HTTP, FTP, and SMTP, along with their implementation aspects. It discusses different application architectures, including client-server and peer-to-peer models, and introduces socket programming for network applications. The chapter also outlines the transport service requirements of common applications and the differences between TCP and UDP protocols.

Uploaded by

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

Chapter 2

Application Layer

A note on the use of these ppt slides:


We’re making these slides freely available to all (faculty, students, readers).
They’re in PowerPoint form so you can add, modify, and delete slides
(including this one) and slide content to suit your needs. They obviously
Computer Networking:
represent a lot of work on our part. In return for use, we only ask the A Top Down Approach,
following:
❖ If you use these slides (e.g., in a class) in substantially unaltered form, that
5th edition.
you mention their source (after all, we’d like people to use our book!) Jim Kurose, Keith Ross
❖ If you post any slides in substantially unaltered form on a www site, that
you note that they are adapted from (or perhaps identical to) our slides, and
Addison-Wesley, April
note our copyright of this material. 2009.
Thanks and enjoy! JFK/KWR

All material copyright 1996-2010


J.F Kurose and K.W. Ross, All Rights Reserved
Application 2-1
Chapter 2: Application Layer
Our goals: ❖ learn about protocols
❖ conceptual, by examining popular
implementation application-level
aspects of network protocols
application protocols ▪ HTTP
▪ transport-layer ▪ FTP
service models ▪ SMTP / POP3 / IMAP
▪ DNS
▪ client-server
paradigm ❖ programming network
▪ peer-to-peer applications
paradigm ▪ socket API

Application 2-3
Some network apps
❖ e-mail ❖ voice over IP
❖ web ❖ real-time video
❖ instant messaging conferencing
❖ remote login ❖ cloud computing
❖ P2P file sharing ❖ …
❖ multi-user network ❖ …
games ❖
❖ streaming stored video
(YouTube)

Application 2-4
Creating a network app application
transport
network
data link

write programs that physical

▪ run on (different) end


systems
▪ communicate over network
▪ e.g., web server software
communicates with browser
software application

No need to write software


transport
network
data link
for network-core devices
application
physical
transport
network
▪ network-core devices do data link
physical
not run user applications
▪ applications on end systems
allows for rapid app
development, propagation

Application 2-5
Chapter 2: Application layer
2.1 Principles of network 2.6 P2P applications
applications 2.7 Socket programming
2.2 Web and HTTP with TCP
2.3 FTP 2.8 Socket programming
2.4 Electronic Mail with UDP
SMTP, POP3, IMAP
2.5 DNS

Application 2-6
Application architectures
❖ client-server
❖ peer-to-peer (P2P)
❖ hybrid of client-server and P2P

Application 2-7
Client-server architecture
server:
▪ always-on host
▪ permanent IP address
▪ server farms for
scaling
clients:
client/server ▪ communicate with server
▪ may be intermittently
connected
▪ may have dynamic IP
addresses
▪ do not communicate
directly with each other
Application 2-8
Pure P2P architecture
❖ no always-on server
❖ arbitrary end systems
directly communicate peer-peer
❖ peers are intermittently
connected and change IP
addresses

highly scalable but


difficult to manage

Application 2-9
Hybrid of client-server and P2P
Skype
▪ voice-over-IP P2P application
▪ centralized server: finding address of remote
party:
▪ client-client connection: direct (not through
server)
Instant messaging
▪ chatting between two users is P2P
▪ centralized service: client presence
detection/location
• user registers its IP address with central
server when it comes online
• user contacts central server to find IP
addresses of buddies

Application 2-10
Processes communicating
process: program running client process: process
within a host. that initiates
❖ within same host, two
communication
processes communicate server process: process
using inter-process that waits to be
communication (defined contacted
by OS).
❖ processes in different ❖ aside: applications with
hosts communicate by P2P architectures have
exchanging messages client processes &
server processes

Application 2-11
Sockets
❖ process sends/receives host or
host or
messages to/from its server server
socket
controlled by
❖ socket analogous to door app developer
process process
▪ sending process shoves
message out door socket socket

▪ sending process relies on TCP with


Internet
TCP with
transport infrastructure buffers, buffers,
variables variables
on other side of door which
brings message to socket
at receiving process controlled
by OS

❖ API: (1) choice of transport protocol; (2) ability to fix


a few parameters (lots more on this later)
Application 2-12
Addressing processes
❖ to receive messages,
process must have
identifier
❖ host device has unique
32-bit IP address
❖ Q: does IP address of
host on which process
runs suffice for
identifying the process?

Application 2-13
Addressing processes
❖ to receive messages, ❖ identifier includes both
process must have IP address and port
identifier numbers associated with
❖ host device has unique process on host.
32-bit IP address ❖ example port numbers:
❖ Q: does IP address of ▪ HTTP server: 80
host on which process ▪ Mail server: 25
runs suffice for ❖ to send HTTP message
identifying the process? to gaia.cs.umass.edu web
▪ A: No, many server:
processes can be ▪ IP address: 128.119.245.12
running on same host ▪ Port number: 80
❖ more shortly…
Application 2-14
App-layer protocol defines
❖ types of messages public-domain protocols:
exchanged, ❖ defined in RFCs
▪ e.g., request, response ❖ allows for
❖ message syntax: interoperability
▪ what fields in messages & ❖ e.g., HTTP, SMTP
how fields are delineated
proprietary protocols:
❖ message semantics
▪ meaning of information in ❖ e.g., Skype
fields
❖ rules for when and how
processes send &
respond to messages

Application 2-15
What transport service does an app need?
Data loss Throughput
❖ some apps (e.g., audio) can ❖ some apps (e.g.,
tolerate some loss multimedia) require
❖ other apps (e.g., file minimum amount of
transfer, telnet) require throughput to be
100% reliable data “effective”
transfer
❖ other apps (“elastic apps”)
Timing make use of whatever
❖ some apps (e.g., throughput they get
Internet telephony,
interactive games) Security
require low delay to be ❖ encryption, data integrity,
“effective” …

Application 2-16
Transport service requirements of common apps

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
instant messaging no loss elastic yes and no

Application 2-17
Internet transport protocols services

TCP service: UDP service:


❖ connection-oriented: setup ❖ unreliable data transfer
required between client and between sending and
server processes receiving process
❖ reliable transport between ❖ does not provide:
sending and receiving process connection setup,
❖ flow control: sender won’t reliability, flow control,
overwhelm receiver congestion control, timing,
throughput guarantee, or
❖ congestion control: throttle
security
sender when network
overloaded
❖ does not provide: timing, Q: why bother? Why is
minimum throughput there a UDP?
guarantees, security

Application 2-18
Internet apps: application, transport protocols

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) typically UDP

Application 2-19

You might also like