part 2 - vietnamese_new
DESCRIPTION
Part 2 - Vietnamese_newTRANSCRIPT
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 1/69
Mạng Internet và các
ứng dụng
GVHD: Lưu Thanh Trà
Email: luu hcmut.edu.vn
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 2/69
Backbone NAPs ISPBackbone network
Companies 2
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 3/69
national ISP=> NAP (Network Access Point)
national ISP. Do phải thực hiện việc chuyển
mạch cho lưu lượng lớn, nên việc thường tậptrung trong 1 vùng địa lý nhỏ
Các thuê bao sẽ tr ả tiền cho bên cung cấp
ư ng ruy n ay c uy n mạc m ngcần biết phần còn lại của thế giới chạy như
3
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 4/69
ạng v c c ng ụng
Có khoảng 400M host Backbone đạt 10Gbps
Telnet Email FTP WWW
Everything on IP
Ứng dụng: rlogin, telnet, IP, , , ,
VoIP
Nhiều kỹ thuật truyền dữ li u khác nhau cho hé Ethernet FDDIWireless
tối ưu việc truyền dữ liệuvới giá thành ngày càng r ẻ hơn
4
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 5/69
X.25 Được ITU phát triển và chuẩn hóa từ năm 1970
nh m tạo một giao thức cho mạng WAN
X.25 thực hiện việc truyền dữ liệu theo mode
-
mạng ảo (Virtual Circuit)
.
DTE ( Data Terminal Equipment): thiết bị đầu cuối như
terminal, PC
DCE (Data-circuit terminating equipment): thi t bị giao ti pgiữa thiết bị đầu cuối (DTE) và thiết bị chuyển mạch (PSE)
PSE Packet-switchin exchan e
5
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 6/69
. PLP
Thiết lập, quản lý Virtual Circuit (VC) ruy n u g a c c , ực n p n- oạn g p-n
dữ liệu, chèn bit, phát hiện lỗi, và kiểm soát luồng
LAP-B
Bảo đảm việc truyền frame giữa DTE và DCE theo đúng
thứ tự và không lỗi ở lớp data link
ực n v c m so u ng, m so
6
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 7/69
.
Là một giao thức phức tạp, cồng kềnh
luồng, kiểm soát lỗi
truyền dữ liệu
7
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 8/69
Frame Relay Tại sao cần Frame Relay ?
Sự cải thiện đáng kể của môi tr ường truyền do sự phát triển củacông nghệ nên không cần ki m soát lỗi quá chặt chẽ
Xuất hiện yêu cầu một phương thức truyền mới:
T ốc độ cao và r ẻ hơ n trong vi ệc nối k ết các mạng LAN
Ch p nhận t c độ bộc phát (burst data)
Đơ n gi ản, gi ảm đ i ều khi ển
Frame Relay: Không cung c p ki m tra l i ở lớp 2, giúp cải thiện t c độ truy n
Hỗ tr ợ tốc độ bộc phát: cho phép người dùng có tốc độ thay đổibộc phát
c ư c ung n n y es c o p p c a c c ungcủa mạng LAN nhưng tạo ra độ tr ễ khác nhau giữa các khungnên chỉ thích cho truyền dữ liệu hơn là tín hiệu thời gian thực
8
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 9/69
.
Connection Lớp 2 Không
Kiểm soát luồng Lớp 2 & 3 ---
Kiểm soát lỗi Lớp 2 & 3 ---
Kiểm soát nghẽn Không Cần thiết
9
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 10/69
Chỉ có 1 loại mạch ảo: Permanent VC và không được thiết lập bởiFrame Relay mà bởi lớp cao hơn
M i VC tại một DTE được xác định b ng DLCI (Data Link ConnectionIdentifier)
15
87
102
2 26
108
Interface DLCI Interface DLCI
1 12 2 564
12
3
2368
65
31
2
2445
46
10
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 11/69
Do kích thước các khung có chiều dài thay đổi
=> Không thích hợp cho việc truyền tính hiệu thời
ian th c như voice video
11
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 12/69
,
mạng điện thoại chiếm một phần r ất lớn trong truyềnthông tin và mạng truyền dữ liệu bắt đầu phát triển
ATM phát tri n đ có th truy n tính hiệu thoại vàdữ liệu
công ty, đạt tốc độ chuyển mạch đến terabit/s.
Giá thành cao dẫn đến việc không thích hợp cho
việc khai thác PC, bị cạnh tranh gay g t b i cácphương thức cho access network giá r ẻ tốc độ caoe. . Gi abit Ethernet
12
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 13/69
53 bytes chứa 5 bytes header và 48 byte dữ liệu. Các cellđược coi như 1 đơn vị xử lý thay vì byte như trong các hệ thống thông thường
Các virtual circuit được gọi là virtual channel, và được xácđịnh bởi Virtual Path Identifier (VPI) và Virtual ChannelIdentifier VCI
ATM không thực hiện việc gởi lại cell khi phát hiện lỗi mà cógắng sửa lỗi dùng error correcting code, nếu thất bại thì sẽ
y ce
Cho phép sử lý nghẽn mạch bằng cách thông báo cho 2 đầu
Có thể chạy trên bất cứ mạng vật lý nào
13
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 14/69
Constant Bit Rate (CBR): tốc độ không đổi
Variable Bit Rate- Non real-time VBR-NRT : cho hé tốc
độ thay đổi trong phạm vi cho phép
Variable Bit Rate- Real-time (VBR-RT):cho phép tốc độ
Available Bit Rate (ABR): cho phép người dùng chia sẻ
băng thông, tận dụng tối đa băng thông và yêu cầu 1 tốc
p n . Unspecified Bit Rate (UBR): Sử dụng băng thông còn lại
14
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 15/69
p mạng: n erne ro oco
15
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 16/69
p g ao v n ranspor
Thực hiện multiplexing/demultiplexing, cho phép
khác nhau để trao đổi dữ liệu đồng thời
Thực hiện multiplexing/demultiplexing như UDP
Kiểm soát luồng, nghẽn
16
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 17/69
TCP segment 17
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 18/69
ng ụng
Network a lication: Tiến trình chạy trên thiết bị đầu cuối
Các tiến trình chạy trên các thiết bị đầu cuối khác nhau sẽ giaotiếp với nhau thông qua các giao thức ứng dụng (application-ayer pro oco
Network application protocol:
Loại thông điệp ,
Cách thức xử lý thộng điệp và các sự kiện
Thông thường chạy theo mô hình client/server
Sử d n các chức năn đư c hỗ tr bởi các lớ dưới để trao đổi
dữ liệu User agent:
Giao diện giữa người dùng và ứng dụng
18
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 19/69
oc e
interface để yêu cầu những hỗ tr ợ về dịch vụ mạng
định ngh ĩ a cho mỗi hệ điều hành API BSD, API
Linux, Windows Các API cho phép network application layer:
Chọn loại giao thức vận chuyển
ay m s ng s c a g ao c Chọn các cách thức nhận sự kiện (e.g. packet đến, packet
gởi xong). Có 2 cách thức chính: blocking, non-blocking
19
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 20/69
Ứng dụng và giao thức ứng
ụng
Application
ao c ng ụng c c uy n
vận
remote terminal access
Web
file transfer
telnet [RFC 854]
http [RFC 2068]
ft RFC 959
TCP
TCP
TCP
Internet telephony
remote file server
H.323, SIP
NFS
TCP/UDP
TCP or UDP
streaming multimedia RTP/RTCP (RFC1889)(RFC4751)
UDP
20
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 21/69
c y u c u c a ng ụng
Application Data Loss Bandwidth Time sensitive?
file transfer no elastic no
electronic mail no elastic no
Web documents no elastic no
-
audio/video
- -
video: 10Kbps -
5Mbps
interactive games loss-tolerant 1Kbps-100kbps <150ms
21
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 22/69
n en erver
Client: Xác định “v ị trí” của server
Liên hệ với server tr ước
Yêu cầu các dịch vụ củaserver
Server
Cung cấp các dịch vụ theo
Có thể phục vụ cho một số lượng lớc các client trongcùng một lúc
Có th đóng vai trò là clientvới những server khác để có thể hoàn thành yêu cầu
22
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 23/69
or w e we
23
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 24/69
Được xem như là một trong ba kỹ thuật liên
ạc m ay g n oạ , v , we
Cho phép người dùng lấy được thông tineo y u c u
Nội dung web được trình bày linh động, dễ
ng Giá thành r ẻ
24
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 25/69
rang we
chỉ và có thể bao gồm nhiều objects.
ao g m n os , por , n ư ng n
Browser (IExplorer, Firefox,…) Server: Apache, IIS
25
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 26/69
HTTP: Hypertext Transfer
ro oco
cho phép browsernhận, gởi thông tin với IExplorer
Sử dụng TCP
Model Client/Server:
Client: yêu cầu, nhận vàtrình bày web objects
Server: gởi các object
Server(e.g.Apache Web
Server)
eo y u c u c a c enFirefox
26
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 27/69
Server chờ đ i kết nối với client th ờn trên
port 80) Client khởi độn connection TCP với server
Sau đã kết nối, client gởi yêu cầu (request)
và server sẽ gởi tr ả lời (response) Đóng connection
Client phân tích tr ả lời để tìm các object và
gởi yêu c u nhận từng object một. Client/Server có thể hoạt động theo 2 dạng:
pers s en v non-pers s en
27
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 28/69
HTTP Request Message: General
Format
28
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 29/69
eques
GET somedir a e.html HTTP 1.1
request lineGET POST
Host: www.somechool.edu
Connection: close
User-agent: Mozilla/4.0
HEAD commands)
header Accept: text/html, image/gif, image/jpeg
Accept-language: fr
nes
Carriage return,
(extra carriage return, line feed)
indicates endof message
29
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 30/69
esponse
30
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 31/69
HTTP/1.1 200 OK
Date: Thu, 06 Aug 1998 12:00:15 GMT
(protocolstatus code
status hraseServer: Apache/1.3.0 (Unix)
Last-Modified: Mon, 22 Jun 1998 …...
Content-Length: 6821
headerlines
Content-Type: text html
data data data data data ..., . .,
requestedhtml file
31
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 32/69
200: OK
400: bad request
505: http version not supported
32
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 33/69
oo es
browser Browser sẽ gởi cookie này tr ở lại cho server khi
được yêu c u
Mục đích: ,
password, username của user, số lần user truy cập vàotrang web
,món hàng mà user đã xác nhận mua
Có thể kết hợp với nhiều thông tin khác nhau để nhận biết
33
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 34/69
Cache
Tránh vi c ởi l i cácclient server
object up-to-date
client: thông báo thờihttp request msgIf-modified-since:
<date>object
g an n n o ec n
tr ước đó
If-modified-since:
http responseHTTP/1.0
304 Not Modified
modified
<date>
server: thông báo nếuhttp request msg- -
nhật mới HTTP/1.0 304 Not
<date>
http responseHTTP/1.1 200 OK
objectmodified
…
<data>34
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 35/69
roxy
tiếp connect vào web
server: nhận trang web
thôn ua m t trun
originserver
gian (proxy)
Proxy gởi các object
đư c êu cầu đến
client
roxyserver
browser nếu object đã
được proxy ghi lại lần
tr ước
clientorigin
35
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 36/69
e rans er ro oco
36
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 37/69
Server Client
GUI
Server PI Client PI
Control Canal
File
SystemServer
DTP
User
DTP
Data Canal
DTP: Data Transfer Protocol : Thiết lập connection qua port 20 để truyền file
37
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 38/69
giữa các máy tính.
ser ược x c n ng m user name v
một password. (chú ý: user có thể là vô danh
Hoạt động theo một trong 2 modes active và
38
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 39/69
c ve mo e
connect trên port 21 Client thực hiện kết nối
vào server qua port 21từ một port ngẫu nhiên
N của mình vd: 1026và lắng nghe trên portN+1
để truyền data qua portN+1
39
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 40/69
ass ve mo e
Tránh việc firewall chặn kếtnối từ server đến client để truyền data
Passive mode
Client thực hiện kết nối qua
port N với server và thôngbáo mình sử dụng modepassive
Server mở một port P chờ n c en v ng
báo P cho client
Client thực hiện kết nối với
40
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 41/69
Được định ngh ĩ a Paul Mockapetris
s an
Một domain name: Bao gồm nhiều node, mỗi node (label)
Không quá 63 ký tự
. .
Domain name không quá 256 ký tự Không phân biệt chữ hoa, thường
Domain name có thể không mang 1 ngữ
ngh ĩ a nào hết.
Domain name ở mức đầu tiên được quiđịnh: Com: tổ chức có lợi nhuận
Edu: giáo dục
vn
ov: c c c a c n p
Mil: tổ chức quân đội net: tổ chức về mạng
Org: tổ chức phi lợi nhuậnhcmut
, ,fr…) tech
41
N
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 42/69
Name space
com edu gov int mil net org
""
nominum metainfo berkeley nwu nato army uu
dakota
west
tornado
east www
... 1 81 ...
"+"
... 202
381 779
650 808
3489
3 4 852
6003 6003 5226 2024
42
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 43/69
- Một domain là subdomain khi nó có phần gốc thuộc về một
domain khác Ví d : marketin .cnn.com là subdomain của cnn.com và
.com; cnn.com là subdomain của .com
Một admin có thể tạo ra subdomain để thuận lợi cho việc
quản lý (điều kiện địa lý, phân bổ về chức danh,…) y quy n (delegation)
Admin có thể ủy quyền cho ai đó phụ trách các subdomaincủa mình
Admin c n ghi nhớ lại mình đã ủy quy n cho ai đ tr ả lờikhi được hỏi
Các subdomain còn có thể được xem như các zone
43
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 44/69
nominum.com
domain
nominum.com
zone""
ams.nominum.com
zone
.arpa .com .edu
rwc www ftp ams
molokai skye gouda cheddar
44
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 45/69
ng ụng
như con người ơ s u c o p p a c ương
ứng với một IP hostname bất kỳ
n c : o n c u, ương quan, an n n ,
linh động
ụng cac e g m c o v c m
45
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 46/69
ame server
liên quan đến những đơn vị gọi là vùng
Một zone có thể được quản lý bởi nhiều
Một server có thể quản lý nhiều zone
46
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 47/69
128.8.10.5
. . .
data for both
nominum.com
and isc.or zonesnominum.com
202.12.28.129
202.12.28.129
isc.org
nominum.com
zone only
204.152.187.11
204.152.187.11
serves data for
.
47
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 48/69
n oạ name server
Authoritative- quản lý thông tin về name space
Cache: lưu giữ thông tin về name space
Authoritative và Cache một lúc
48
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 49/69
u r c ame server Zone
Master
Zone transfer
a a
file
rom
disk Authoritative Data
Name Server Process
slave zones)
Cache Data(responses from
other name servers)
Agent
(looks up queries
on behalf of resolvers)
49
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 50/69
Authoritative Data
Name Server Process
Response
(primary master and
slave zones)
ac e a a
(responses from
other name serversother
Response
Resolver
Agent
(looks up queries
name
serversQuery
Query on behalf of resolvers)
50
Chuyển đổi name & địa chỉ IP
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 51/69
Chuyển đổi name & địa chỉ IP
name reso u on
local.hcmut.edu
a ress
www.cnn.com?
nary.hcmut.edu
51
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 52/69
IP address of
local.hcmut.edu
www.cnn.com?
nary.hcmut.edu
52
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 53/69
m.root-servers.net
IP address of
www.cnn.com?
local.hcmut.edu
nary. hcmut.edu
53
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 54/69
m.root-servers.net
’
com name servers.
Ask one of them.
local.hcmut.edu
nary. hcmut.edu
54
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 55/69
IP address of
m.root-servers.net
www.cnn.com?
local.hcmut.edu
f.gtld-servers.net
nary. hcmut.edu
55
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 56/69
Here’s a list of the
m.root-servers.net
cnn.com name
servers. Ask one
of them.
local.hcmut.edu
f.gtld-servers.net
nary. hcmut.edu
56
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 57/69
IP address of
m.root-servers.net
www.cnn.com?
local.hcmut.edu
f.gtld-servers.net
. .
nary. hcmut.edu
57
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 58/69
m.root-servers.net
local.hcmut.edu
f.gtld-servers.net
. . a ress or
www.cnn.com
nary. hcmut.edu
58
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 59/69
IP address for
www.cnn.com
m.root-servers.net
local.hcmut.edu
f.gtld-servers.net
ns .cnn.ne
nary. hcmut.edu
59
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 60/69
ac ng
IP address of
ftp.cnn.com?
m.root-servers.net
local.hcmut.edu
f.gtld-servers.net
ns .cnn.ne
nary.hcmut.edu
60
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 61/69
m.root-servers.net
IP address for
local.hcmut.edu
ftp.cnn.com
f.gtld-servers.net
ns .cnn.ne
nary. hcmut.edu
61
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 62/69
IP address for
ftp.cnn.com
m.root-servers.net
local.hcmut.edu
f.gtld-servers.net
ns .cnn.ne
nary. hcmut.edu
62
outgoingmessage queue
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 63/69
g q
ec ron c aThree major
user ma ox
user
components: User agents useragent
server
Protocols
Giữa mail servers
mailserver user
agentSMTP
SMTP
Giữa mail server và useragent
useragent
mailserver
SMTP
: os ce ro oco
[RFC 1939] IMAP: Internet Mail Access
Protocol [RFC 1730] useruser
POP3 orIMAP
63
agentagent
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 64/69
- vS: 220 mr1.its.yale.edu
C: HELO cyndra.yale.edu
S: 250 Hello cyndra.cs.yale.edu, pleased to meet you
C: MAIL FROM: <[email protected]>
S: 250 [email protected]... Sender ok
C: RCPT TO: <[email protected]>
. ...
C: DATA
S: 354 Enter mail, end with "." on a line by itself
C: Date: Wed, 18 Jan 2006 11:20:27 -0500 (EST)
C: From: "Y. R. Yang" <[email protected]>
C: To: "Y. R. Yang" <[email protected]>C: Subject: This is subject
C:
C: This is the message body!
C: Please don’t spoof!
C:
C: .
S: 250 Message accepted for delivery
C: QUIT
S: 221 mr1.its.yale.edu closing connection
64
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 65/69
a essage orma
RFC 822: chuẩn message format:blankline
header
, . .,
To:
From: body
u ec :
Body
the “message”, ASCII
65
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 66/69
essage orma : u me a x ens ons MIME: multimedia mail extension, RFC 2045, 2056
From: [email protected]
Subject: Photo of class.
MIME- ersion: 1.0
multimedia data
MIME version
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
ype, su ype,parameter declaration
method usedase enco e a a .....
.........................
......base64 encoded data
to encode data
encoded data
66
Multi art T e: How Attachment Works
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 67/69
Multi art T e: How Attachment Works
From: [email protected]
Subject: Photo of students.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=98766789
--98766789
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain
Hi,
Attached is an image.
--98766789
Content-Transfer-Encoding: base64
Content-Type: image/jpeg
base64 encoded data .....
.........................
67
......base64 encoded data
--98766789--
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 68/69
ro oco : a ccess Authorization phase S: +OK POP3 server ready
client commands:
user: username pass: password
C: user alice
S: +OK
C: pass hungryS: +OK user successfully logged on
server responses
+OK
-
C: list
S: 1 498
S: 2 912
Transaction phase, client:
list: list message numbers
S: .
C: retr 1
S: <message 1 contents>
S: .
retr: lấy message number
dele: delete
uit
C: dele 1
C: retr 2
S: <message 1 contents>
S: .
68
C: dele 2
C: quit
S: +OK POP3 server signing off
7/21/2019 Part 2 - Vietnamese_new
http://slidepdf.com/reader/full/part-2-vietnamesenew 69/69
ưu
Các protocols khác nhau
email retrieval (e.g., POP3, IMAP)
mail transmission (SMTP)
Các request r ất đơn giản để thực hiện điều khiển trao đổi thôngtin đơn giản. Các ph n đi u khi n phức tạp n m trong ASCII
header
Giao thức dễ dọc/sửa lỗi/mở r ộng
status code trong response khiến message dễ dàng phân tích
Vài đặc tính về an ninh còn thiếu
69