Computer Network 1: HCM City University of Technology
Computer Network 1: HCM City University of Technology
Computer Network 1: HCM City University of Technology
Computer Network 1
Chapter 10:
Application Layer
Reference:
Chapter 7 - “Computer Networks”, Andrew S. Tanenbaum, 4th Edition,
Prentice Hall, 2003.
Part 1:
DNS and Email
Reference:
Chapter 7 - “Computer Networks”, Andrew S. Tanenbaum, 4th Edition,
Prentice Hall, 2003.
5
Domain Name System - DNS
IP addresses can be used to identify a host
machine on the Internet
As those machines move around, the
addresses need to be changed accordingly as
well
ASCII names have been used to decouple
host names and their IPs to provide more
flexibility
The network itself still understands only
numerical addresses 6
DNS: Characteristics
A file host.txt listed all the hosts and their
IP addresses, but issue some problems:
File size, load and latency
Host name conflict
Essence of DNS:
Hierarchical
Domain-based naming scheme
A distributed database system
7
DNS: A Brief
To map a name onto an IP address, an
application program:
Calls a library procedure called the resolver, passing
it the name as a parameter
The resolver sends a UDP packet to a local DNS
server
DNS server looks up the name and returns the IP
address to the resolver
Resolver returns it to the application
Armed with the IP address, the program can then
establish a TCP connection with the destination or 8
DNS Name Space
A portion of the Internet domain name
space
9
DNS naming
Domain names are case insensitive: edu,
Edu, EDU have the same meaning
Component name can be up to 63 characters
Full path names must not exceed 255
characters
Each domain name server manages its own
name space. It can create subdomain names
without asking for permission from upper
server. Examples: hcmut.edu.vn and
cse.hcmut.edu.vn 10
Resource Records
11
Resource Records (2)
13
Name Servers
• DNS Name Space is divided into non-overlapping zones
• Each zone has Name Servers holding information about it
14
DNS - Queryroot name server
iterated query
• recursive query 2
3
– puts burden of name 4
resolution on contacted
name server. 7
– heavy load ? local name server intermediate name server
dns.eurecom.fr dns.umass.edu
• iterated query 1
5 6
8
– contacted server
replies with name of authoritative name server
server to contact. dns.cs.umass.edu
requesting host
– “I don’t know this surf.eurecom.fr
name, but ask this
gaia.cs.umass.edu
server”
15
Electronic Mail – Email (or E-
mail)
Has been around since the early days of
Internet
Is widely used today
16
Electronic Mail (2)
17
Architecture and Services
Basic email functions
• Composition
• Transfer
• Reporting
• Displaying
• Disposition
18
Some email terms
mailbox – storage where incoming emails are
saved for later processing
mailing list – a representative email address of
a group of people. Email sent to this address
will be forwarded to all of its participants
CC, BCC ...
19
Email Message Structure
21
Reading E-mail
Address format: user@dns-address
An example display of the contents of a
mailbox.
22
Message Formats
23
Message Formats (2)
24
MIME – Multipurpose Internet Mail
Extensions
• Some problems when using ASCII formatted messages:
• Languages with accents
(French, German).
• Languages in non-Latin alphabets
(Hebrew, Russian).
• Languages without alphabets
(Chinese, Japanese).
• Messages not containing text at all
(audio or images).
• MINE adds structure to the message body and defines encoding rules
for non-ASCII messages
25
MIME (2)
26
MIME (3)
27
multipart/mixed
28
multipart/alternative
29
multipart/digest
30
Message Transfer
31
Message Transfer (2)
32
Final Delivery
(a) Sending and reading mail when the receiver has a permanent
Internet connection and the user agent runs on the same machine as
the message transfer agent. (b) Reading e-mail when the receiver has
a dial-up connection to an ISP. 33
POP3
34
IMAP (Internet Message Access
Protocol)
• POP3 is not convenient when
users frequently use different
machines to read email from
servers, as emails have to be
downloaded to different
computers more or less random
• IMAP can resolve this issues as
emails will be always on the
servers
• A comparison of POP3 and
IMAP.
35
Web Mail
HTTP SMTP HTTP user
user
agent
agent
ordinary
ordinary
sender’s mail receiver’s mail Web browser
Web browser
server server
36