0% found this document useful (0 votes)
170 views18 pages

FTP, SMTP and DNS: 2: Application Layer 1

FTP, SMTP, and DNS are important application layer protocols. [1] FTP uses separate control and data connections to transfer files between a client and server. [2] SMTP is used to transfer emails between mail servers using the TCP protocol. It involves handshaking, message transfer, and closure phases. [3] DNS is a distributed database that maps domain names to IP addresses, allowing applications like web browsers to lookup addresses for hostnames. It uses a hierarchical system of root, TLD, and authoritative name servers.

Uploaded by

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

FTP, SMTP and DNS: 2: Application Layer 1

FTP, SMTP, and DNS are important application layer protocols. [1] FTP uses separate control and data connections to transfer files between a client and server. [2] SMTP is used to transfer emails between mail servers using the TCP protocol. It involves handshaking, message transfer, and closure phases. [3] DNS is a distributed database that maps domain names to IP addresses, allowing applications like web browsers to lookup addresses for hostnames. It uses a hierarchical system of root, TLD, and authoritative name servers.

Uploaded by

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

FTP, SMTP and DNS

2: Application Layer 1
FTP: separate control, data connections
TCP control connection
 FTP client contacts FTP server port 21
at port 21, specifying TCP as
transport protocol
TCP data connection
 Client obtains authorization FTP port 20 FTP
over control connection client server
 Client browses remote
directory by sending commands  Server opens a second TCP
over control connection. data connection to transfer
 When server receives a another file.
command for a file transfer,  Control connection: “out of
the server opens a TCP data band”
connection to client  FTP server maintains “state”:
 After transferring one file, current directory, earlier
server closes connection. authentication

2: Application Layer 2
Electronic Mail outgoing
message queue
user mailbox
user
Three major components: agent
 user agents mail
user
 mail servers server
agent
 simple mail transfer protocol:
SMTP mail
SMTP
server user

User Agent SMTP agent

 a.k.a. “mail reader”


SMTP
 composing, editing, reading mail user
agent
mail messages server
 e.g., Eudora, Outlook, elm,
user
Netscape Messenger agent
 outgoing, incoming messages user
stored on server agent

2: Application Layer 3
Electronic Mail: mail servers
user
Mail Servers agent
 mailbox contains incoming
mail
user
messages for user server
agent
 message queue of outgoing
SMTP
(to be sent) mail messages mail
server user
 SMTP protocol between mail
servers to send email
SMTP agent

messages SMTP
 client: sending mail mail user
agent
server server
 “server”: receiving mail
user
server agent
user
agent

2: Application Layer 4
Electronic Mail: SMTP [RFC 2821]
 uses TCP to reliably transfer email message from client
to server, port 25
 direct transfer: sending server to receiving server
 three phases of transfer
 handshaking (greeting)
 transfer of messages
 closure
 command/response interaction
 commands: ASCII text
 response: status code and phrase

 messages must be in 7-bit ASCII

2: Application Layer 5
Scenario: Alice sends message to Bob
1) Alice uses UA to compose 4) SMTP client sends Alice’s
message and “to” message over the TCP
[email protected] connection
2) Alice’s UA sends message 5) Bob’s mail server places the
to her mail server; message message in Bob’s mailbox
placed in message queue 6) Bob invokes his user agent
3) Client side of SMTP opens to read message
TCP connection with Bob’s
mail server

1 mail
mail
server user
user server
2 agent
agent 3 6
4 5

2: Application Layer 6
Mail access protocols
SMTP SMTP access user
user
agent protocol agent

sender’s mail receiver’s mail


server server
 SMTP: delivery/storage to receiver’s server
 Mail access protocol: retrieval from server
 POP: Post Office Protocol [RFC 1939]
• authorization (agent <-->server) and download
 IMAP: Internet Mail Access Protocol [RFC 1730]
• more features (more complex)
• manipulation of stored msgs on server
 HTTP: Hotmail , Yahoo! Mail, etc.

2: Application Layer 7
DNS: Domain Name System

People: many identifiers: Domain Name System:


 SSN, name, passport #  distributed database
Internet hosts, routers: implemented in hierarchy of
many name servers
 IP address (32 bit) -  application-layer protocol
used for addressing
host, routers, name servers to
datagrams
communicate to resolve names
 “name”, e.g., (address/name translation)
ww.yahoo.com - used by  note: core Internet
humans
function, implemented as
Q: map between IP application-layer protocol
addresses and name ?  complexity at network’s
“edge”

2: Application Layer 8
DNS and Applications
 Which applications use DNS?

 HTTP
 Browser extracts hostname
 Sends hostname to DNS
 DNS does lookup and returns IP address
 Browser sends HTTP GET to IP address

2: Application Layer 9
DNS

Why not centralize DNS?


 single point of failure
 traffic volume
 distant centralized database
 maintenance

doesn’t scale!

2: Application Layer 10
Distributed, Hierarchical Database
Root DNS Servers

com DNS servers org DNS servers edu DNS servers

pbs.org poly.edu umass.edu


yahoo.com amazon.com
DNS servers DNS serversDNS servers
DNS servers DNS servers

Client wants IP for www.amazon.com; 1st approx:


 Client queries a 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
2: Application Layer 11
DNS: Root name servers
 contacted by local name server that can not resolve name
 root name server:
 contacts authoritative name server if name mapping not known
 gets mapping
 returns mapping to local name server
a Verisign, Dulles, VA
c Cogent, Herndon, VA (also Los Angeles)
d U Maryland College Park, MD k RIPE London (also Amsterdam,
g US DoD Vienna, VA
h ARL Aberdeen, MD i Frankfurt)
Autonomica, Stockholm (plus 3
j Verisign, ( 11 locations) other locations)

m WIDE Tokyo
e NASA Mt View, CA
f Internet Software C. Palo Alto,
CA (and 17 other locations)

13 root name
servers worldwide
b USC-ISI Marina del Rey, CA
l ICANN Los Angeles, CA

2: Application Layer 12
TLD and Authoritative Servers
 Top-level domain (TLD) servers: responsible
for com, org, net, edu, etc, and all top-level
country domains uk, fr, ca, jp.
 Network solutions maintains servers for com TLD
 Educause for edu TLD

 Authoritative DNS servers: organization’s


DNS servers, providing authoritative
hostname to IP mappings for organization’s
servers (e.g., Web and mail).
 Can be maintained by organization or service
provider

2: Application Layer 13
Local Name Server
 Does not strictly belong to hierarchy
 Each ISP (residential ISP, company,
university) has one.
 Also called “default name server”
 When a host makes a DNS query, query is
sent to its local DNS server
 Acts as a proxy, forwards query into hierarchy.

2: Application Layer 14
Example root DNS server

2
 Host at cis.poly.edu 3
TLD DNS server
wants IP address for 4
gaia.cs.umass.edu
5

local DNS server


dns.poly.edu
7 6
1 8

authoritative DNS server


dns.cs.umass.edu
requesting host
cis.poly.edu

gaia.cs.umass.edu

2: Application Layer 15
Recursive queries root DNS server

recursive query:
 puts burden of name 2 3
resolution on 7 6
contacted name TLD DNS server
server
 heavy load?
local DNS server
4
iterated query: dns.poly.edu 5
 contacted server 1 8
replies with name of
server to contact authoritative DNS server
 “I don’t know this dns.cs.umass.edu
requesting host
name, but ask this cis.poly.edu
server”
gaia.cs.umass.edu
2: Application Layer 16
DNS: caching and updating records
 once (any) name server learns mapping, it caches
mapping
 cache entries timeout (disappear) after some
time
 TLD servers typically cached in local name
servers
• Thus root name servers not often visited
 update/notify mechanisms under design by IETF
 RFC 2136
 http://www.ietf.org/html.charters/dnsind-charter.html

2: Application Layer 17
DNS records
DNS: distributed db storing resource records (RR)
RR format: (name, value, type, ttl)

 Type=A  Type=CNAME
 name is hostname  name is alias name for some
 value is IP address “cannonical” (the real) name
 Type=NS www.ibm.com is really
 name is domain (e.g. foo.com)
servereast.backup2.ibm.com
 value is IP address of
 value is cannonical name
authoritative name server
for this domain
 Type=MX
 value is name of mailserver
associated with name

2: Application Layer 18

You might also like