34
Winter 2005 CMPE 151: Network Administration Servers IV

CMPE 151: Network Administration

  • Upload
    ona

  • View
    31

  • Download
    1

Embed Size (px)

DESCRIPTION

CMPE 151: Network Administration. Servers IV. More servers: DNS and Mail. Domain Name System (DNS). Basic function: translation of names (ASCII strings) to network (IP) addresses and vice-versa. Example: zephyr.isi.edu 128.9.160.160. History. Original approach (ARPANET, 1970’s): - PowerPoint PPT Presentation

Citation preview

Page 1: CMPE 151: Network Administration

Winter 2005

CMPE 151: Network Administration

Servers IV

Page 2: CMPE 151: Network Administration

Winter 2005

More servers: DNS and Mail

Page 3: CMPE 151: Network Administration

Winter 2005

Domain Name System (DNS) Basic function: translation of

names (ASCII strings) to network (IP) addresses and vice-versa.

Example: zephyr.isi.edu <-> 128.9.160.160

Page 4: CMPE 151: Network Administration

Winter 2005

History Original approach (ARPANET, 1970’s):

File hosts.txt listed all hosts and their IP addresses.

Every night every host fetches file from central repository.

OK for a few hundred hosts. Scalability?

File size. Centrally managed.

Page 5: CMPE 151: Network Administration

Winter 2005

DNS Hierarchical name space. Distributed database. RFCs 1034 and 1035.

Page 6: CMPE 151: Network Administration

Winter 2005

How is it used? Client-server model.

Client DNS (running on client hosts), or resolver.

Application calls resolver with name. Resolver contacts local DNS server

(using UDP) passing the name. Server returns corresponding IP

address.

Page 7: CMPE 151: Network Administration

Winter 2005

Namespace Flat versus hierarchical. Flat:

Sequence of characters with no structure. Short, convenient names. But, doesn’t scale! Why?

Unique names. Hard to decentralize.

Hierarchical: Name space partitioned and decentralized. Portions delegated to different authorities.

Page 8: CMPE 151: Network Administration

Winter 2005

DNS Name Space Tree-based hierarchy.

int com edu gov mil org net us ca …

usc

cs ee

ibm

eng sales

Page 9: CMPE 151: Network Administration

Winter 2005

Name Space Structure

Top-level domains: Generic. Countries.

Leaf domains: no sub-domains. In practice all US organizations are

under a generic domain, while everything outside the US is under the corresponding country domain.

Page 10: CMPE 151: Network Administration

Winter 2005

DNS Names Domain names:

Concatenation of all domain names starting from its own all the way to the root separated by “.”.

Refers to a tree node and all names under it.

Case insensitive. Components up to 63 characters. Full name less than 255 characters.

Page 11: CMPE 151: Network Administration

Winter 2005

Name Space Management Domains are autonomous.

Organizational boundaries. Each domain manages its own name

space independently of other domains. Delegation:

When creating new domain: register with parent domain.

For name uniqueness. For name resolution.

Page 12: CMPE 151: Network Administration

Winter 2005

Resource Records Entry in the DNS database. Several types of entries or RRs. Example: RR “A” contains IP address. Name <-> several resource records. RR format: five-tuple.

Name. TTL (in seconds). Class (usually “IN” for Internet info). Type: type of RR. Value.

Page 13: CMPE 151: Network Administration

Winter 2005

RR Types 1 SOA: start of authority.

Marks beginning of zone’s database. Provides general info about the zone: e-mail

address of admin, default TTL, etc. A: address.

Contains 32-bit IP address. Single name <-> several A RRs.

MX: mail exchange. Name of mail server for this domain.

Page 14: CMPE 151: Network Administration

Winter 2005

RR Types 2 NS: name server.

Name of name server for this domain. CNAME: canonical name.

Alias. HINFO: host description.

Provides information about host, e.g., CPU type, OS, etc.

TXT: arbitrary string of characters. Generic description of the domain, where it

is located, etc.

Page 15: CMPE 151: Network Administration

Winter 2005

Name Servers Entire database in a single name server.

Practical? Why?

DNS database is partitioned into zones. Each zone contains part of the DNS tree. Zone <-> name server.

Each zone may be served by more than 1 server.

A server may serve multiple zones. Primary and secondary name servers.

Page 16: CMPE 151: Network Administration

Winter 2005

Name Resolution (1) Application wants to resolve name. Resolver sends query to local name server.

Resolver configured with list of local name servers.

Select servers in round-robin fashion. If name is local, local name server returns

matching authoritative RRs. Authoritative RR comes from authority

managing the RR and is always correct. Cached RRs may be out of date.

Page 17: CMPE 151: Network Administration

Winter 2005

Name Resolution (2) If information not available locally

(not even cached), local NS will have to ask someone else. It asks the server of the top-level

domain of the name requested.

Page 18: CMPE 151: Network Administration

Winter 2005

Recursive Resolution Recursive query:

Each server that doesn’t have info forwards it to someone else.

Response finds its way back. Alternative: iterative resolution

Name server not able to resolve query, sends back the name of the next server to try.

Some servers use this method. More control for clients.

Page 19: CMPE 151: Network Administration

Winter 2005

Example Suppose resolver on flits.cs.vu.nl wants to

resolve linda.cs.yale.edu. Local NS, cs.vu.nl, gets queried but cannot resolve

it. It then contacts .edu server. .edu server forwards query to yale.edu server. yale.edu contacts cs.yale.edu, which has the

authoritative RR. Response finds its way back to originator. cs.vu.nl caches this info.

Not authoritative (since may be out-of-date). RR TTL determines how long RR should be cached.

Page 20: CMPE 151: Network Administration

Winter 2005

Caching Name servers cache recent requests

and corresponding mappings. Also, cache server that provided

mapping. Cached information is non-

authoritative. Clients may choose to use them or go

to authoritative server for fresh copy.

Page 21: CMPE 151: Network Administration

Winter 2005

Cache consistency TTL: how long cached copy is valid. Specified by original server. May be different for each object. Long versus short TTLs.

Page 22: CMPE 151: Network Administration

Winter 2005

More details… RFC 1034 and 1035.

Page 23: CMPE 151: Network Administration

Winter 2005

Electronic Mail Non-interactive.

Deferred mail (e.g., destination temporarily unavailable).

Spooling: Message delivery as background

activity. Mail spool: temporary storage area

for outgoing mail.

Page 24: CMPE 151: Network Administration

Winter 2005

Mail system

Userinterface

Usersends mail

Userreads mail

Outgoingmailspool

Mailboxes incomingmail

Client(send)

Server(receive)

TCPconnection(outgoing)

TCPconnection(incoming)

Page 25: CMPE 151: Network Administration

Winter 2005

Observations When user sends mail, message

stored is system spool area. Client transfer runs on background. Initiates transfer to remote

machine. If transfer succeeds, local copy of

message removed; otherwise, tries again later (30 min) for a maximum interval (3 days).

Page 26: CMPE 151: Network Administration

Winter 2005

Mail alias expansion Mapping of e-mail identifiers to mail

addresses. Mail interface consults local alias database

and performs mapping before passing message to outgoing mail spool.

One-to-many (e.g., mailing lists) and many-to-one (e.g., multiple ways to refer to a single user) mapping.

Incoming mail also goes through alias expansion before delivery.

Page 27: CMPE 151: Network Administration

Winter 2005

SMTP Simple Mail Transfer Protocol How messages are transferred over

a TCP/IP internet. Defines commands used to

exchange mail between mail clients and servers.

Problems reported to user by e-mail.

Page 28: CMPE 151: Network Administration

Winter 2005

Example SMTP exchangeUser [email protected] sends message to jones, green, and [email protected].

S: 220 beta.gov readyC: Helo alpha.eduS: 250 beta.govC: MAIL FROM [email protected]: 250 OKC: RCPT TO: [email protected]: 250 OKC: RCPT TO: [email protected]: 550 no such userC: DATA …

Page 29: CMPE 151: Network Administration

Winter 2005

Mail retrieval SMTP implies server is always

listening. What about machines with

intermittent Internet access? 2-stage delivery: message delivered to

user permanent mailbox; then user connects to retrieve messages.

User needs protocol to retrieve messages from “permanent” mailboxes.

Page 30: CMPE 151: Network Administration

Winter 2005

More details… RFC 821 and 822 specify SMTP and

its message formats.

Page 31: CMPE 151: Network Administration

Winter 2005

sendmail Mail transport agent. Speaks SMTP. Interface between user- and

transport agent. Functions:

Manages mail queues, Manages/translates addresses, Talks to the transport agent, etc.

Page 32: CMPE 151: Network Administration

Winter 2005

IMAP and POP Protocols that retrieves user’s e-

mail from user’s permanent mailbox.

E.g., for hosts that are not always connected.

Require authentication.

Page 33: CMPE 151: Network Administration

Winter 2005

IMAP Internet Message Access Protocol. Delivers one message at a time.

Instead of all at once. Easier on the network. Easier on user…

Page 34: CMPE 151: Network Administration

Winter 2005

Post Office Protocol version 3 POP3. User invokes POP3 client; connects to POP3

server through TCP. Download the whole mailbox at once. Requires authentication (user id and

passwd). Commands to retrieve and delete

messages from permanent mailbox. Mail server needs to run SMTP and POP3.

Mailbox a shared data.