Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

FTP: separate control, data connections

TCP control connection


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

Electronic Mail outgoing


message queue
Electronic Mail: mail servers
user mailbox
Three major components: user user
agent Mail Servers agent
❒ user agents
mail ❒ mailbox contains incoming mail
user user
❒ mail servers server server
agent messages for user agent
❒ simple mail transfer SMTP
protocol: SMTP mail ❒ message queue of outgoing SMTP mail
server user (to be sent) mail messages server user
SMTP agent
SMTP agent
User Agent ❒ SMTP protocol between
❒ a.k.a. “mail reader” SMTP mail servers to send email SMTP
mail user user
❒ composing, editing, reading agent
messages mail
server server agent
mail messages ❍ client: sending mail
❒ e.g., Eudora, Outlook, elm, user server user
agent
Netscape Messenger user “server”: receiving mail
agent
❍ user
❒ outgoing, incoming messages agent server agent
stored on server
2: Application Layer 3 2: Application Layer 4

Scenario: Alice sends message to Bob


Electronic Mail: SMTP [RFC 2821]
1) Alice uses UA to compose 4) SMTP client sends Alice’s
❒ uses TCP to reliably transfer email message from client message and “to” message over the TCP
to server, port 25
bob@someschool.edu connection
2) Alice’s UA sends message 5) Bob’s mail server places
❒ direct transfer: sending server to receiving server
to her mail server; the message in Bob’s
❒ three phases of transfer
message placed in message mailbox
❍ handshaking (greeting) queue 6) Bob invokes his user agent
❍ transfer of messages 3) Client side of SMTP opens to read message
❍ closure TCP connection with Bob’s
❒ command/response interaction mail server
1
❍ commands: ASCII text mail mail
user
user server server
response: status code and phrase 2 3 6 agent
❍ agent 4 5
❒ messages must be in 7-bit ASCII
2: Application Layer 5 2: Application Layer 6

1
Mail access protocols DNS: Domain Name System
SMTP SMTP access Domain Name System:
user
user People: many identifiers:
agent protocol agent
❍ SSN, name, passport #
❒ distributed database
implemented in hierarchy of
sender’s mail receiver’s mail Internet hosts, routers: many name servers
server server
❍ IP address (32 bit) - ❒ application-layer protocol
❒ SMTP: delivery/storage to receiver’s server host, routers, name servers
used for addressing
❒ Mail access protocol: retrieval from server to communicate to resolve
datagrams
names (address/name
❍ POP: Post Office Protocol [RFC 1939] “name”, e.g.,
❍ translation)
• authorization (agent <-->server) and download ww.yahoo.com - used by ❍ note: core Internet
❍ IMAP: Internet Mail Access Protocol [RFC 1730] humans function, implemented as
• more features (more complex) Q: map between IP application-layer protocol
complexity at network’s
• manipulation of stored msgs on server addresses and name ? ❍
“edge”
❍ HTTP: Hotmail , Yahoo! Mail, etc. 2: Application Layer 7 2: Application Layer 8

DNS and Applications DNS

❒ Which applications use DNS? Why not centralize DNS?


❒ single point of failure
❒ HTTP ❒ traffic volume
❍ Browser extracts hostname ❒ distant centralized database
Sends hostname to DNS
❒ maintenance

❍ DNS does lookup and returns IP address


❍ Browser sends HTTP GET to IP address
doesn’t scale!

2: Application Layer 9 2: Application Layer 10

Distributed, Hierarchical Database


DNS: Root name servers
Root DNS Servers
❒ contacted by local name server that can not resolve name
❒ root name server:
com DNS servers org DNS servers edu DNS servers
❍ contacts authoritative name server if name mapping not known

pbs.org poly.edu umass.edu ❍ gets mapping


yahoo.com amazon.com DNS serversDNS servers
DNS servers DNS servers DNS servers ❍ returns mapping to local name server
a V erisign, Dulles, VA
c Cogent, Herndon, VA (also Los

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


Angeles)
k RIPE London (also Amsterdam,
d U Maryland College Park, MD
Frankfurt)
i Autonomic a, Stoc kholm
g US DoD Vienna, VA
(plus 3 other loc ations)
Client queries a root server to find com DNS
h ARL Aberdeen, MD
❒ j Verisign, ( 11 locations)
m WIDE T okyo

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

❒ Client queries com DNS server to get amazon.com 13 root name


DNS server b USC-ISI Marina del Rey, CA
servers worldwide
Client queries amazon.com DNS server to get IP
l ICANN Los Angeles, CA

address for www.amazon.com 2: Application Layer 11 2: Application Layer 12

2
TLD and Authoritative Servers Local Name Server
❒ Top-level domain (TLD) servers: responsible ❒ Does not strictly belong to hierarchy
for com, org, net, edu, etc, and all top-level
❒ Each ISP (residential ISP, company,
country domains uk, fr, ca, jp.
university) has one.
❍ Network solutions maintains servers for com TLD
❍ Also called “default name server”
❍ Educause for edu TLD
❒ Authoritative DNS servers: organization’s ❒ When a host makes a DNS query, query is
DNS servers, providing authoritative sent to its local DNS server
hostname to IP mappings for organization’s ❍ Acts as a proxy, forwards query into hierarchy.
servers (e.g., Web and mail).
❍ Can be maintained by organization or service
provider 2: Application Layer 13 2: Application Layer 14

Example root DNS server


Recursive queries root DNS server

2
recursive query:
❒ Host at cis.poly.edu 3 2 3
TLD DNS server
❒ puts burden of name
wants IP address 4
6
resolution on 7
for gaia.cs.umass.edu 5 TLD DNS server
contacted name
local DNS server server
dns.poly.edu
❒ heavy load? local DNS server
7 6 5 4
dns.poly.edu
1 8
iterated query: 1 8
authoritative DNS server
❒ contacted server
dns.cs.umass.edu authoritative DNS server
requesting host replies with name of dns.cs.umass.edu
cis.poly.edu server to contact requesting host
cis.poly.edu
gaia.cs.umass.edu ❒ “I don’t know this
name, but ask this gaia.cs.umass.edu

2: Application Layer 15 server” 2: Application Layer 16

DNS: caching and updating records DNS records


❒ once (any) name server learns mapping, it caches DNS: distributed db storing resource records (RR)
mapping RR format: (name, value, type, ttl)

❍ cache entries timeout (disappear) after some


time ❒ Type=A ❒ Type=CNAME
❍ name is hostname name is alias name for some
TLD servers typically cached in local name


❍ value is IP address “cannonical” (the real) name
servers
❒ Type=NS www.ibm.com is really
• Thus root name servers not often visited
❍ name is domain (e.g. servereast.backup2.ibm.com
❒ update/notify mechanisms under design by IETF foo.com) ❍ value is cannonical name
❍ RFC 2136 ❍ value is IP address of ❒ Type=MX
❍ http://www.ietf.org/html.charters/dnsind-charter.html authoritative name ❍ value is name of mailserver
server for this domain associated with name
2: Application Layer 17 2: Application Layer 18

You might also like