SlideShare a Scribd company logo
Module-V
Application
Layer
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
Principles of Network Applications
➢Network-applications are the driving forces for
the explosive development of the internet.
➢Examples:
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
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
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.
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
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
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
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,
…
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,
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
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
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
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
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
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
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
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
HTTP message: general format
Two types of HTTP messages: request, response
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
HTTP Response Message
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 ...
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
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
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
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
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.
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
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
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
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
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
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
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
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
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.
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.
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.
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
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”
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
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
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
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

More Related Content

Similar to Computer networks module 5 content covered in this ppt

4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
ZahouAmel1
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
Toushik Paul
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptx
ssuseraf60311
 
Appl layer
Appl layerAppl layer
Appl layer
rajanikant
 
Ch2 application layer Network
Ch2 application layer NetworkCh2 application layer Network
Ch2 application layer Network
cairo university
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
Kathirvel Ayyaswamy
 
CS-324-6-3 (2).pdf
CS-324-6-3 (2).pdfCS-324-6-3 (2).pdf
CS-324-6-3 (2).pdf
Rizulthakur2
 
CS-324-6-3 (1).pdf
CS-324-6-3 (1).pdfCS-324-6-3 (1).pdf
CS-324-6-3 (1).pdf
Rizulthakur2
 
Chapter_2_v8.3.pptx
Chapter_2_v8.3.pptxChapter_2_v8.3.pptx
Chapter_2_v8.3.pptx
InventiveMinecraft
 
Chapter2 l2 modified_um
Chapter2 l2 modified_umChapter2 l2 modified_um
Chapter2 l2 modified_um
Sajid Baloch
 
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptxCS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
farhanali32014
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
JUW Jinnah University for Women
 
Chapter_2_v8.1.pptx
Chapter_2_v8.1.pptxChapter_2_v8.1.pptx
Chapter_2_v8.1.pptx
WentworthMiller3
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Computer network network edge and network
Computer network network edge and networkComputer network network edge and network
Computer network network edge and network
rjnavallasca
 
Lec 6(Application Layer)
Lec 6(Application Layer)Lec 6(Application Layer)
Lec 6(Application Layer)
maamir farooq
 
6. Chapter_2_1_newversion1.pptxasasasdasdasda
6. Chapter_2_1_newversion1.pptxasasasdasdasda6. Chapter_2_1_newversion1.pptxasasasdasdasda
6. Chapter_2_1_newversion1.pptxasasasdasdasda
UsamaMushtaq15
 
Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...
smitha273566
 
HTTP
HTTPHTTP

Similar to Computer networks module 5 content covered in this ppt (20)

4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptx
 
Appl layer
Appl layerAppl layer
Appl layer
 
Ch2 application layer Network
Ch2 application layer NetworkCh2 application layer Network
Ch2 application layer Network
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
CS-324-6-3 (2).pdf
CS-324-6-3 (2).pdfCS-324-6-3 (2).pdf
CS-324-6-3 (2).pdf
 
CS-324-6-3 (1).pdf
CS-324-6-3 (1).pdfCS-324-6-3 (1).pdf
CS-324-6-3 (1).pdf
 
Chapter_2_v8.3.pptx
Chapter_2_v8.3.pptxChapter_2_v8.3.pptx
Chapter_2_v8.3.pptx
 
Chapter2 l2 modified_um
Chapter2 l2 modified_umChapter2 l2 modified_um
Chapter2 l2 modified_um
 
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptxCS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Chapter_2_v8.1.pptx
Chapter_2_v8.1.pptxChapter_2_v8.1.pptx
Chapter_2_v8.1.pptx
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Computer network network edge and network
Computer network network edge and networkComputer network network edge and network
Computer network network edge and network
 
Lec 6(Application Layer)
Lec 6(Application Layer)Lec 6(Application Layer)
Lec 6(Application Layer)
 
6. Chapter_2_1_newversion1.pptxasasasdasdasda
6. Chapter_2_1_newversion1.pptxasasasdasdasda6. Chapter_2_1_newversion1.pptxasasasdasdasda
6. Chapter_2_1_newversion1.pptxasasasdasdasda
 
Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...
 
HTTP
HTTPHTTP
HTTP
 

Recently uploaded

Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 

Recently uploaded (20)

Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 

Computer networks module 5 content covered in this ppt

  • 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
  • 21. HTTP message: general format Two types of HTTP messages: request, response
  • 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