Presentation on Application layer_201.pdfprince2412001
A Network application is an application running on one host and provides a
communication to another application running on a different host.
▪ A network application development is writing programs that run on different
end systems and communicate with each other over the network.
▪ In the Web application there are two different programs that communicate with each other:
✔ Browser program running in the user's host.
✔ Web server program running in the Web server host.
Host
Host
2
Network Applications - Examples
▪ Email
▪ Web
▪ Remote Login
▪ P2P File Sharing
▪ Multi-user Network Games
▪ Streaming Stored Video (YouTube)
▪ Voice Over IP (Skype)
▪ Real-time Video Conference
▪ Social Networking
3
Network Application Architecture
1. Client-Server architecture
2. P2P (Peer to Peer) architecture
4
1. Client-Server Architecture
Client
Server:
✔ Its always-on host.
✔ It has a fixed IP address.
✔ Large cluster of host – Data Centers.
✔ E.g. Web Server
Client:
✔ It communicate with server.
✔ Its not like continuously connected.
✔ May have dynamic IP addresses.
✔ Do not communicate directly with each other.
✔ E.g. PCs, Mobiles
Server
5
2. P2P Architecture
Peer
▪ Peers (end systems) directly communicate.
▪ Get peers request service from other peers, provide service to other peers.
✔ Self Scalability – New peers bring new service capacity, as well as new service demands.
▪ Peers are alternatingly connected and change IP addresses.
✔ Complex management 6
Peer
Peer
Process Communicating
▪ What is Process?
▪ A process is an instance of a program running in a computer.
▪ We can say that process is program under execution.
▪ Within same host, two processes communicate using inter-process communication (IPC).
▪ Process in different hosts communicate by exchanging messages.
▪ Client process: A process that initiates communication.
▪ Server process: A process that waits to be contacted.
Process P1
Process P2
7
Socket
▪ A process sends messages into, and receives messages from; the
network through a software interface called a socket.
▪ A process is similar to a house and its socket is similar to its door.
✔ Sending process passes message out door.
✔ Sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process.
Process
application
proce ss
transport
network
link
physical
application
proce ss
transport
network
link
physical
socket
controlled by app developer
controlled
by OS
Internet
Socket
8
Transport Services to Applications
▪ Recall that a socket is the interface between the application process and the transport layer protocol.
▪ For develop an application, choose available transport layer protocol.
▪ Pick the protocol with the services that best match the needs of your application.
Presentation on Application layer_201.pdfprince2412001
A Network application is an application running on one host and provides a
communication to another application running on a different host.
▪ A network application development is writing programs that run on different
end systems and communicate with each other over the network.
▪ In the Web application there are two different programs that communicate with each other:
✔ Browser program running in the user's host.
✔ Web server program running in the Web server host.
Host
Host
2
Network Applications - Examples
▪ Email
▪ Web
▪ Remote Login
▪ P2P File Sharing
▪ Multi-user Network Games
▪ Streaming Stored Video (YouTube)
▪ Voice Over IP (Skype)
▪ Real-time Video Conference
▪ Social Networking
3
Network Application Architecture
1. Client-Server architecture
2. P2P (Peer to Peer) architecture
4
1. Client-Server Architecture
Client
Server:
✔ Its always-on host.
✔ It has a fixed IP address.
✔ Large cluster of host – Data Centers.
✔ E.g. Web Server
Client:
✔ It communicate with server.
✔ Its not like continuously connected.
✔ May have dynamic IP addresses.
✔ Do not communicate directly with each other.
✔ E.g. PCs, Mobiles
Server
5
2. P2P Architecture
Peer
▪ Peers (end systems) directly communicate.
▪ Get peers request service from other peers, provide service to other peers.
✔ Self Scalability – New peers bring new service capacity, as well as new service demands.
▪ Peers are alternatingly connected and change IP addresses.
✔ Complex management 6
Peer
Peer
Process Communicating
▪ What is Process?
▪ A process is an instance of a program running in a computer.
▪ We can say that process is program under execution.
▪ Within same host, two processes communicate using inter-process communication (IPC).
▪ Process in different hosts communicate by exchanging messages.
▪ Client process: A process that initiates communication.
▪ Server process: A process that waits to be contacted.
Process P1
Process P2
7
Socket
▪ A process sends messages into, and receives messages from; the
network through a software interface called a socket.
▪ A process is similar to a house and its socket is similar to its door.
✔ Sending process passes message out door.
✔ Sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process.
Process
application
proce ss
transport
network
link
physical
application
proce ss
transport
network
link
physical
socket
controlled by app developer
controlled
by OS
Internet
Socket
8
Transport Services to Applications
▪ Recall that a socket is the interface between the application process and the transport layer protocol.
▪ For develop an application, choose available transport layer protocol.
▪ Pick the protocol with the services that best match the needs of your application.
Module 2: Application layer
Principles of network applications, Web and HTTP, File transfer protocol, Electronic mail, Domain name system, DDNS, SSH, SNMP ,Internet Applications.
Module 2: Application layer
Principles of network applications, Web and HTTP, File transfer protocol, Electronic mail, Domain name system, DDNS, SSH, SNMP ,Internet Applications.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
2. Application Layer 2-2
Outline
❑ Principles of Network Applications
❑ The Web and HTTP
❑ Electronic mail in the Internet
o SMTP, POP3, IMAP
❑ DNS-The Internet Directory
• Text book 2: Computer Networking: A Top down Approach-
James F Kurose 7th Edition
3. Principles of Network Applications
➢Network-applications are the driving forces for
the explosive development of the internet.
➢Examples:
4. Creating a network app
Write Programs That:
• run on (different) end systems
• communicate over network
• e.g., web server software
communicates with browser
software.
Possible Structure of Applications:
• client-server
• peer-to-peer (P2P)
application
transport
network
data link
physical
application
transport
network
data link
physical
application
transport
network
data link
physical
5. Client-Server Architecture
Server:
➢ always-on host
➢ permanent IP address
➢ data centers for scaling
Clients:
➢ Randomly on
➢ communicate with server
➢ may be intermittently
connected
➢ do not communicate directly
with each other.
➢ Examples: FTP, Web, e-mail
client/server
6. Data Center
➢ A data-center is used to create a powerful virtual server.
➢ In date center, hundreds of servers must be powered and
maintained.
➢ example: Google has around 50 data-centers distributed around the world.
These 50 data-centers handle : search, YouTube, Gmail etc.
7. P2P architecture
➢ No dedicated server
➢ Pairs of hosts are called peers.
➢ The peers communicate directly with
each other.
➢ The peers are not owned by the service-
provider, instead these are laptops
controlled by users.
➢ Ex file sharing (BitTorrent), Internet
telephone (Skype)
➢ self-scalability ,Cost effective
➢ Challenges: ISP friendly : P2P traffic
does not conform to traditional ISP
traffic policies.
➢ Security: Openness & distribution
➢ Incentives: convincing users to volunteer
bandwidth & resources to the
applications.
peer-peer
8. Processes Communicating
Process: program running within
a host.
• within same host, two
processes communicate using
IPC (defined by OS).
• processes in different hosts
communicate by exchanging
messages.
Client process: process that
initiates communication
Server process: process that
waits to be contacted
9. Application Layer 2-9
App-layer protocol defines
• types of messages exchanged,
– e.g., request, response
• message syntax:
– what fields in messages &
how fields are delineated
• message semantics
– meaning of information in
fields
• rules for when and how
processes send & respond to
messages
open protocols:
• defined in RFCs
• allows for interoperability
• e.g., HTTP, SMTP
proprietary protocols:
• e.g., Skype
10. Transport Services Available to Applications
1. Reliable Data Transfer
some apps (e.g., file transfer,
web transactions) require
100% reliable data transfer
• other apps (e.g., audio) can
tolerate some loss
3. Timing
• some apps (e.g., Internet
telephony, interactive
games) require low delay to
be “effective”
2.Throughput
❖ BW sensitive app:
Guaranteed throughput
(e.g., multimedia)
❖ Elastic app: May not need
guarantee throughput file
transfer, email
4. Security
❖ encryption, data integrity,
…
11.
12. 2-12
Internet Transport Protocols Services
TCP service:
• reliable transport between
sending and receiving process
• flow control: sender won’t
overwhelm receiver
• congestion control: throttle
sender when network
overloaded
• connection-oriented: setup
required between client and
server processes
UDP service:
• unreliable data transfer
between sending and
receiving process
• does not provide: reliability,
flow control, congestion
control, timing, throughput
guarantee, security, or
connection setup,
13. Web and HTTP
➢web page consists of objects(HTML)
➢object is a file - HTML file, JPEG image, audio file,…
➢web page consists of HTML-file & several
referenced objects.
➢object is addressable by a URL,
www.someschool.edu/someDept/pic.gif
host name path name
14. HTTP overview
HTTP: hypertext transfer
protocol( port 80)
• client/server model
– client: browser that
requests, receives, and
“displays” Web objects
– server: Web server sends
objects in response to
requests
PC running
Firefox browser
server
running
Apache Web
server
iphone running
Safari browser
15. 2-15
HTTP overview (continued)
uses TCP:
• client initiates TCP
connection (creates socket)
to server, port 80
• server accepts TCP
connection from client
• HTTP messages exchanged
between browser (HTTP
client) and Web server (HTTP
server)
• TCP connection closed
HTTP is “stateless”
• server maintains no
information about
past client requests
16. HTTP connections
non-persistent HTTP
• at most one object sent
over TCP connection
– connection then
closed
• downloading multiple
objects required
multiple connections
persistent HTTP(default)
• multiple objects can be
sent over single TCP
connection between
client, server
17. Non-persistent HTTP: 1Req->1Resp
suppose user enters URL:
1a. HTTP client initiates TCP
connection to HTTP server
(process) at
www.someSchool.edu on port
80
2. HTTP client sends HTTP request
message (containing URL) intoTCP
connection socket. Message
indicates that client wants object
someDepartment/home.index
1b. HTTP server at host
www.someSchool.edu waiting for
TCP connection at port 80.
“accepts” connection, notifying
client
3. HTTP server receives request message,
forms response message containing
requested object, and sends message
into its socket
time
(contains text,
references to 10
jpeg images)
www.someSchool.edu/someDepartment/home.index
18. Non-persistent HTTP (cont.)
5. HTTP client receives response
message containing html file,
displays html. Parsing html file,
finds 10 referenced jpeg objects
6. Steps 1-5 repeated for each of 10
jpeg objects
4. HTTP server closesTCP connection.
time
19. Non-persistent HTTP: response time
RTT: Time for a small packet to
travel from client to server and
back
HTTP response time:
• one RTT: To initiate TCP
connection
• one RTT: HTTP request and
first few bytes of HTTP
response to return
• file transmission time
• non-persistent HTTP response
time =
2RTT+ file transmission
time
time to
transmit
file
initiate TCP
connection
RTT
request
file
RTT
file
received
time time
20. 2-20
Persistent HTTP
non-persistent HTTP
issues:
• requires 2 RTTs per object
• OS overhead for each TCP
connection
• browsers often open
parallel TCP connections to
fetch referenced objects
persistent HTTP:
• server leaves connection
open after sending response
• subsequent HTTP messages
between same client/server
sent over open connection
• client sends requests as soon
as it encounters a referenced
object
• as little as one RTT for all the
referenced objects
22. HTTP request message
GET: Browser requests an object from the server.
POST: User fills out a form & sends to the server.
PUT: Upload objects to servers. DELETE: Allows application to delete object on a
server.
request line
(GET, POST,
,PUT,DELETE)
header
lines
carriage return,
line feed at start
of line indicates
end of header lines
GET /index.html HTTP/1.1rn
Host: www-net.cs.umass.edurn→ obj residing
User-Agent: Firefox/3.6.10rn →browser
Accept: text/html,application/xhtml+xmlrn
Accept-Language: en-us,en;q=0.5rn
Accept-Encoding: gzip,deflatern
Accept-Charset: ISO-8859-1,utf-8;q=0.7rn
Keep-Alive: 115rn
Connection: keep-alivern
rn
carriage return character
line-feed character
24. Application Layer 2-24
HTTP response message
status line
(protocol
status code
status phrase)
header
lines
data, e.g.,
requested
HTML file
HTTP/1.1 200 OKrn
Date: Sun, 26 Sep 2010 20:09:20 GMTrn
Server: Apache/2.0.52 (CentOS)rn
Last-Modified: Tue, 30 Oct 2007 17:00:02 GMTrn
Accept-Ranges: bytesrn
Content-Length: 2652rn
Keep-Alive: timeout=10, max=100rn
Connection: Keep-Alivern
Content-Type: text/html; charset=ISO-8859-1rn
rn
data data data data data ...
25. User-server Interaction: cookies
Websites to keep track of user
Small text file created by website,
stored in user
computer(temporarily/perman
ent)
four components:
1) cookie header 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 DB 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 DB for ID
26. Cookies: keeping “state” (cont.)
Client
Host
Server
Host
usual http response msg
usual http response msg
cookie file
one week later:
usual http request msg
cookie: 1678 cookie-
specific
action
access
ebay 8734
usual http request msg Amazon server
creates ID
1678 for user create
entry
usual http response
Header set-cookie: 1678
ebay 8734
amazon 1678
usual http request msg
cookie: 1678 cookie-
specific
action
access
ebay 8734
amazon 1678
backend
database
Browser
tores ID into
cookie file
Browser put
ID in http
request
27. Web caching (Proxy Server)
• user sets browser: Web
accesses via cache
• browser sends all HTTP
requests to cache
– object in cache: cache
returns object
– else cache requests object
from origin server, then
returns object to client
– Advantages
1) To reduce response-time
for client-request.
2) To reduce traffic on an
institution’s access-link to
the Internet.
3) To reduce Web-traffic in
the Internet.
Goal: satisfy client request without involving origin server
client
Web Cache/
proxy
server
client origin
server
origin
server
28. The Conditional GET
• It is a mechanism that allows
a cache to verify that the
objects are up to date.
• cache: specify date of cached
copy in HTTP request
If-modified-since:
<date>
• server: response contains no
object if cached copy is up-
to-date:
HTTP/1.0 304 Not
Modified
HTTP request msg
If-modified-since: <date>
HTTP response
HTTP/1.0
304 Not Modified
object
not
modified
before
<date>
HTTP request msg
If-modified-since: <date>
HTTP response
HTTP/1.0 200 OK
<data>
object
modified
after
<date>
client server
29. The Conditional GET
❖It is a mechanism that allows a cache to verify that the
objects are up to date.
❖An HTTP request-message is called conditional GET if
1) Request-message uses the GET method and
2) Response-message includes an If-Modified-Since:
header-line.
30. File Transfer: FTP
• Used by local host to transfer files to or from a remote-host over
the network.
• FTP uses client-server architecture
• FTP uses 2 parallel TCP connections
1) Control Connection : User ID, password ,commands to change
directory , put & get files.
2) Data Connection: To transfer files.
FTP commands & replies: USER,PASS,LIST(all files), RETR, STOR
31. FTP commands, responses
sample commands:
• USER username
• PASS password
• LIST return list of file in
current directory
• RETR filename
retrieves (gets) file
• STOR filename stores
(puts) file onto remote host
sample return codes
• 331 Username OK,
password required
• 125 data connection
already open;
transfer starting
• 425 Can’t open data
connection
• 452 Error writing
file
32. Electronic mail
Three major components:
• User agents(UA)
• Mail servers(MS)
• Simple mail transfer protocol:
SMTP
User Agent
• Read, reply, forward save
compose messages
• e.g., Outlook, Thunderbird,
iPhone mail client
user mailbox
outgoing
message queue
mail
server
mail
server
mail
server
SMTP
SMTP
SMTP
user
agent
user
agent
user
agent
user
agent
user
agent
user
agent
33. 2-33
Electronic mail: mail servers
Mail servers:
• mailbox contains incoming
messages for user
• message queue of outgoing
(to be sent) mail messages
SMTP protocol:
• Between mail servers to send
email messages , TCP , port -
25
mail
server
mail
server
mail
server
SMTP
SMTP
SMTP
user
agent
user
agent
user
agent
user
agent
user
agent
user
agent
user mailbox
outgoing
Message Q
34. user
agent
Scenario: Alice sends message to Bob
1) Alice uses UA to compose
message “to”
bob@someschool.edu
2) Alice’s UA sends message to her
mail server; message placed in
message queue
3) client side of SMTP opens TCP
connection with Bob’s mail
server
4) SMTP client sends Alice’s
message over the TCP connection
5) Bob’s mail server places the
message in Bob’s mailbox
6) Bob invokes his UA to read
message
mail
server
mail
server
1
2 3 4
5
6
Alice’s mail server Bob’s mail server
user
agent
SMTP
35. Mail Message Format
SMTP: protocol for exchanging
email msgs
standard for text message
format:
• header lines, e.g.,
– To:
– From:
– Subject:
• Body: the “message”
– ASCII characters only
header
body
blank
line
36. Mail Access Protocols
• SMTP: delivery/storage to receiver’s server
• Mail access protocol: retrieval from server
– POP: Post Office Protocol : authorization, download
– IMAP: Internet Mail Access Protocol : manipulation of stored msgs
on server, allows user to organize messages in folders
– HTTP: gmail, Hotmail, Yahoo! Mail, etc.
sender’s mail
server
SMTP SMTP
mail access
protocol
receiver’s mail
server
(e.g., POP,
IMAP)
user
agent
user
agent
37. POP3 protocol-port 110
1. Authorization phase
• client commands:
– user: username
– pass: password
• server responses
– +OK
– -ERR
2. Transaction phase, client:
• list: list message numbers
• retr: retrieve message by
number
• dele: delete
• Quit
3. Update
C: list
S: 1 498
S: 2 912
S: .
C: retr 1
S: <message 1 contents>
S: .
C: dele 1
C: retr 2
S: <message 1 contents>
S: .
C: dele 2
C: quit
S: +OK POP3 server signing off
S: +OK POP3 server ready
C: user bob
S: +OK
C: pass hungry
S: +OK user successfully logged on
38. DNS -The Internet’s Directory Service(port-53)
➢ Translates domain names → IP addresses.
➢ ex: domain-name(Host name) “www.google.com” →IP address
“198.105.232.4”.
➢ Because domain-names are alphabetic, easier to
remember for human being.
39. DNS provides following services
1) Host Aliasing : A host with a complicated hostname can
have one or more alias names.
2) Mail Server Aliasing: For obvious reasons, it is highly desirable that
e-mail addresses be mnemonic.
3) Load Distribution : It perform load distribution among replicated
servers.
40. Overview of How DNS Works
Distributed database design is more preferred over
centralized :
1) A Single Point of Failure : If the DNS server crashes then the
entire Internet will not stop.
2) Traffic Volume : A Single DNS Server cannot handle the huge
global DNS traffic.
3) Distant Centralized DB: A single DNS server cannot be
“close to” all the querying clients.
➢ If we put the single DNS server in Mysore, then all queries from USA must
travel to the other side of the globe, leads delay.
4) Maintenance: The single DNS server would have to keep
records for all Internet hosts.
41. Root DNS Servers
com DNS servers org DNS servers edu DNS servers
poly.edu
DNS servers
umass.edu
DNS servers
yahoo.com
DNS servers
amazon.com
DNS servers
pbs.org
DNS servers
DNS: a distributed, hierarchical database
client wants IP for www.amazon.com:
• client queries root server to find com DNS server
• client queries .com DNS server to get amazon.com DNS server
• client queries amazon.com DNS server to get IP address for
www.amazon.com
… …
Authoritative
42. requesting host
cis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS server
dns.poly.edu
1
2
3
4
5
6
authoritative DNS server
dns.cs.umass.edu
7
8
TLD DNS server
DNS name
resolution example
• host at cis.poly.edu wants
IP address for
gaia.cs.umass.edu
iterative query:
❖ contacted server
replies with name of
server to contact
❖ “I don’t know this
name, but ask this
server”
43. 4
5
6
3
recursive query:
❖ puts burden of name
resolution on
contacted name server
❖ heavy load at upper
levels of hierarchy?
requesting host
cis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS server
dns.poly.edu
1
2
7
authoritative DNS server
dns.cs.umass.edu
8
DNS name
resolution example
TLD DNS
server
44. DNS Record:
Instructions in authoritative DNS servers, provide info( Domain+ IP address )
DNS: distributed database storing resource records (RR)
type=NS(Name Server)
– name is domain
– value is hostname of
authoritative name server for
this domain
RR format: (name, value, type, ttl)
type=A(Address)
▪ name is hostname
▪ value is IP address
type=CNAME
▪ name is alias name for some “canonical”
(the real) name
▪ value is canonical name
type=MX(mail exchange)
▪ value is name of mailserver
associated with name
when a resource
should be removed
from a cache
45. DNS : Messages
• Query(Request) and reply messages, both with same message format
msg header
❖ identification: 16 bit # for query,
reply to query uses same #
❖ flags:
▪ 1.query(0) or reply(1)
▪ 2. Authoritative: set in
reply msg when DNS is
authoritative server
▪ 3. Recursion Desired: Set
when client desires DNS
performs recursion
identification flags
# questions
questions (variable # of questions)
# additional RRs
# authority RRs
# answer RRs
answers (variable # of RRs)
authority (variable # of RRs)
additional info (variable # of RRs)
2 bytes 2 bytes
Header
Section
(12bytes
Question
Section
46. Info about query: name, type fields
for a query
RRs in response
to query
records for
authoritative servers
additional “helpful”
info that may be used
identification flags
# questions
questions (variable # of questions)
# additional RRs
# authority RRs
# answer RRs
answers (variable # of RRs)
authority (variable # of RRs)
additional info (variable # of RRs)
DNS Protocol, Messages
2 bytes 2 bytes
domain-name
question being
asked about the
domain-name