0% found this document useful (0 votes)
27 views59 pages

2.application Layer

The document discusses several application layer protocols including DHCP, DNS, email (SMTP), HTTP, peer-to-peer (P2P), FTP, and SNMP. It provides details on DHCP including the ports used, what DHCP is, and how it assigns IP addresses. It also discusses DNS in depth including hostnames, IP address translation, the distributed database and protocol, record types like A, CNAME, MX, and NS records. HTTP is covered including the client-server model, methods like GET and POST, and message formats.

Uploaded by

Jojo Leo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views59 pages

2.application Layer

The document discusses several application layer protocols including DHCP, DNS, email (SMTP), HTTP, peer-to-peer (P2P), FTP, and SNMP. It provides details on DHCP including the ports used, what DHCP is, and how it assigns IP addresses. It also discusses DNS in depth including hostnames, IP address translation, the distributed database and protocol, record types like A, CNAME, MX, and NS records. HTTP is covered including the client-server model, methods like GET and POST, and message formats.

Uploaded by

Jojo Leo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 59

Application layer

Contents
• 1. DHCP
• 2. DNS
• 3. E-MAIL
• 4. HTTP
• 5. P2P
• 6.FTP
• 7.SNMP
DHCP

Story ?

Dynamic host configuration protocol

Ports used are 67(server)--- 68(clint)


What is DHCP?
• Dynamic Host Configuration Protocol

• It is a method for assigning Internet


Protocol (IP) addresses permanently
or to individual computers in an
organization’s network

• DHCP lets a network administrator


supervise and distribute IP
addresses from a central point and
automatically sends a new IP
address when a computer is plugged
into a different place in the network
• DETAILED DHCP(DORA)
Demonstration of KLE-Tech DHCP Server
DNS(S m Krishna website story)

• Hostnames—such as cnn.com, www.yahoo

• a directory service that translates hostnames to IP addresses. this is the main task of the
Internet’s domain name system (DNS).

• The DNS is (1) a distributed database implemented in a hierarchy of DNS servers, and
• (2) an application-layer protocol that allows hosts to query the distributed database.
• The DNS servers are often UNIX machines running the Berkeley Internet Name
• Domain (BIND) software [BIND 2012]. The DNS protocol runs over UDP and uses
• port 53.
What else DNS …..
• Host aliasing.
• A host with a complicated hostname can have one or more alias names. For
example, a hostname such as relay1.west-coast.enterprise. com could have,
say, two aliases such as enterprise.com and coast.com. In this case, the
hostname relay1.westcoast.enterprise.com is said to be a canonical
hostname
• Mail server aliasing

• Load distribution.
The problems with a centralized design
include OF DNS:
• A single point of failure
• Traffic volume.
• Maintenance.
CLASSES OF DNS SERVERS
• ROOT DNS SERVER(13-567)
• TOP-LEVEL-DOMAIN SERVER(TLD)
• AUTHORITATIVE DNS SERVERS

• PUBLIC DNS/GOOGLE DNS???


<NAME>, <CLASS>, <TYPE>, <TTL>, <RD Length>, and
<RDATA>

example.com record type: value: TTL

@ A 192.0.2.1 14400

* Value field is cname at some


point
RR(RESOURCE RECORD)
• A
• CNAME
• MX
• NS

• AAAA,HINFO
• TXT
• PTR
• https://en.wikipedia.org/wiki/List_of_DNS_record_types
A –address record

• BVB.EDU ---210.192.18.35
NS-name server record
• An NS record is used to delegate a sub domain to a set of name
servers
• BVB.EDU -----A
• CSE.BVB.EDU----NS

• The more important function of the NS-record is delegation. Delegation means that
part of a domain is delegated to other DNS servers. For example, all ".com" sub-
names (such as "example.com") are delegated from the "com" zone. The "com" zone
contains NS-records for all ".com" sub-names.
• These records indicate which name servers are authoritative for the zone / domain.

• NS Records are primarily used if you want to break your domain into subdomains.

• Subdomains indicate you are delegating a portion of a domain name to a different


group of name servers, thus creating NS records to point the name of the subdomain
to different name servers.
CNAME
• CNAME stands for Canonical Name. CNAME records can be used to alias one name to another.

• if you have a server where you keep all of your documents online, it might normally be accessed through
docs.google.com .

• A Canonical Name or CNAME record is a type of DNS record that maps an alias name to a true or canonical
domain name. .

• Example : www.google.com ----------- google.com


• student.kletech.ac.in -------------- staff.kletech.ac.in
MX record
• MX Record. MX records are mail exchange records used for
determining the priority of email servers for a domain. ... Here
we will create a higher priority MXrecord that points to a
backup DNS Made Easy mail server

• MAIL.BVB.EDU
• Mail.kletech.ac.in
• MX record permits a company’s mail server and Web server
to have identical (aliased) hostnames; for example, a
company’s Web server and mail server can both be called
enterprise.com.
Demonstration of KLE-Tech DNS

KL ETe c h_DNS_named. tx t
SMTP
• STORY

• sabeer Bhatia

• Ports used are 25,465 and 587


Detailed
SMTP
SAMPLE OF MAIL TRANSFER
CODES
MAIL MESSAGE FORMAT
MAIL ACCESS PROTOCOL
HTTP

Story ?

Hyper text transfer protocol

Ports used are 80 and 443


Web and HTTP
First, a quick review…
 web page consists of objects, each of which can be stored on
different Web servers
 object can be HTML file, JPEG image, Java applet, audio file,…
 web page consists of base HTML-file which includes several
referenced objects, each addressable by a URL, e.g.,
www.someschool.edu/someDept/pic.gif

host name path name

Application Layer: 2-39


HTTP overview
HTTP: hypertext transfer protocol
 Web’s application-layer protocol HT
 client/server model: PC running
TP
req
ues
HT t
• client: browser that requests, Firefox browser TP
res
pon
receives, (using HTTP protocol) and se

“displays” Web objects ues


t
req
• server: Web server sends (using HTTP
p o ns
e server running
es Apache Web
HTTP protocol) objects in response HTTP
r
server
to requests
iPhone running
Safari browser

Application Layer: 2-40


HTTP overview (continued)
HTTP uses TCP:
 client initiates TCP connection
(creates socket) to server, port 80
 server accepts TCP connection
from client
 HTTP messages (application-layer
protocol messages) exchanged
between browser (HTTP client) and
Web server (HTTP server)
 TCP connection closed

Application Layer: 2-41


• HTTP is a stateless protocol, in other word the server will
forget everything related to client/browser state.

• HTTP is called a stateless protocol because each command is


executed independently, without any knowledge of the
commands that came before it.
HTTP connections: two types
Non-persistent HTTP Persistent HTTP
1. TCP connection opened  TCP connection opened to
2. at most one object sent a server
over TCP connection  multiple objects can be
3. TCP connection closed sent over single TCP
connection between client,
downloading multiple and that server
objects required multiple  TCP connection closed
connections

Application Layer: 2-43


HTTP MESSAGE FORMAT
Request message
Other HTTP request messages
POST method: HEAD method:
 web page often includes form  requests headers (only) that
input would be returned if specified URL
 user input sent from client to were requested with an HTTP
server in entity body of HTTP GET method.
POST request message
PUT method:
 uploads new file (object) to server
GET method (for sending data to server):  completely replaces file that exists
 include user data in URL field of HTTP at specified URL with content in
GET request message (following a ‘?’): entity body of POST HTTP request
www.somesite.com/animalsearch?monkeys&banana
message

Application Layer: 2-46


HTTP Response Message
• HTTP/1.1 200 OK
• Connection: close
• Date: Tue, 09 Aug 2011 15:44:04 GMT
• Server: Apache/2.2.3 (CentOS)
• Last-Modified: Tue, 09 Aug 2011 15:11:03 GMT
• Content-Length: 6821
• Content-Type: text/html
• (data data data data data ...)
Some common status codes
• 200 OK: Request succeeded and the information is returned in
the response.

• 301 Moved Permanently: Requested object has been


permanently moved
• 400 Bad Request: This is a generic error code indicating that
the request could not be understood by the server.
• 404 Not Found: The requested document does not exist on this
server.
• • 505 HTTP Version Not Supported: The requested HTTP
protocol version is not supported by the server.
Maintaining user/server state: cookies
client
server
ebay 8734
usual HTTP request msg Amazon server
cookie file creates ID
usual HTTP response 1678 for user backend
create
ebay 8734 set-cookie: 1678 entry database
amazon 1678

usual HTTP request msg


cookie: 1678 cookie- access
specific
usual HTTP response msg action

one week later:


access
ebay 8734 usual HTTP request msg
amazon 1678
cookie: 1678 cookie-
specific
usual HTTP response msg action
time time Application Layer: 2-51
HTTP cookies: comments
aside
What cookies can be used for:
 authorization
 shopping carts
 recommendations
 user session state (Web e-mail)

Application Layer: 2-52


Web caches(proxy servers)
Goal: satisfy client requests without involving origin server
 user configures browser to
point to a (local) Web cache HT T
P re
Web
uest
que cache P re
q
H s T nse
 browser sends all HTTP client T TP r
esp
ons
t H T
P resp o origin
T server
requests to cache est
e HT
u
• if object in cache: cache P req se
T T o n
H esp
returns object to client HT
TP
r

• else cache requests object


client
from origin server, caches
received object, then
returns object to client
Application Layer: 2-53
Web caches (aka proxy servers)
 Web cache acts as both Why Web caching?
client and server
 reduce response time for client
• server for original
requesting client request
• client to origin server • cache is closer to client
 reduce traffic on an institution’s
access link
 Internet is dense with caches
• enables “poor” content providers
to more effectively deliver content

Application Layer: 2-54


Caching example
Scenario:
 access link rate: 1.54 Mbps origin
 RTT from institutional router to server: 2 sec servers
public
 web object size: 100K bits Internet
 average request rate from browsers to origin
servers: 15/sec
 avg data rate to browsers: 1.50 Mbps
1.54 Mbps
access link
Performance:
problem: large institutional
 access link utilization = .97 queueing delays at network
1 Gbps LAN
 LAN utilization: .0015 high utilization!
 end-end delay = Internet delay +
access link delay + LAN delay
= 2 sec + minutes + usecs
Application Layer: 2-55
Option 2: install a web cache
Scenario:
 access link rate: 1.54 Mbps origin
 RTT from institutional router to server: 2 sec servers
public
 web object size: 100K bits Internet
 average request rate from browsers to origin
servers: 15/sec
 avg data rate to browsers: 1.50 Mbps
1.54 Mbps
access link
Cost: web cache (cheap!)
institutional
network
Performance: 1 Gbps LAN
 LAN utilization: .? How to compute link
 access link utilization = ? utilization, delay?
 average end-end delay = ? local web cache

Application Layer: 2-56


• Through the use of Content Distribution Networks (CDNs),
Web caches are increasingly playing an important role in the
Internet.

• A CDN company installs many geographically distributed


caches throughout the Internet, thereby localizing much of the
traffic.

• There are shared CDNs (such as Akamai and Limelight) and


dedicated CDNs (such as Google and Netflix).
Conditional
client
GET server

Goal: don’t send object if cache has


HTTP request msg
up-to-date cached version If-modified-since: <date> object
• no object transmission delay (or use not
modified
of network resources) HTTP response
before
HTTP/1.0
 client: specify date of cached copy 304 Not Modified <date>

in HTTP request
If-modified-since: <date>
 server: response contains no HTTP request msg
If-modified-since: <date> object
object if cached copy is up-to-date: modified
HTTP/1.0 304 Not Modified HTTP response after
HTTP/1.0 200 OK <date>
<data>
HTTP has a mechanism that allows a cache to verify that its objects are up
to date. This mechanism is called the conditional GET Application Layer: 2-58
Demonstration of HTTP and Its security Issues

HTTP https://en.wikipedia.org/wiki/HTTPS

(HTTP vs HTTPS(SSL/TLS)) Demonstration using Website of


(Ports used) YouTube/Info cell.

 Demonstrating using banking website


Additional resources to persistent and non-persistent
(https://www.youtube.com/watch?v=a-sBfyiXysI)

You might also like