1. 1
H畛C VI畛N CNG NGH畛 B働U CHNH VI畛N THNG
BI GI畉NG MN
Internet v giao th畛c
(Internet and Protocols)
C10VT1-2-3
1-
Gi畉ng vi棚n: Ths. Nguy畛n Th畛 Thu H畉ng
i畛n tho畉i/E-mail: 04 33515 484 - 38549 352
ptitthuhang@gmail.com, hangntt@ptit.edu.vn, bomonmangvt1@yahoo.com
B畛 m担n: M畉ng vi畛n th担ng - KhoaVi畛n th担ng 1
H畛c k畛/Nm bi棚n so畉n: I/ 2012-2013 1
Internet v giao th畛cInternet v giao th畛c
Ch動董ng 1: Network Application Architecture
(Ki畉n tr炭c 畛ng d畛ng m畉ng)
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
N畛i dung ch動董ng 1
C叩c l畛p giao th畛c (Protocol Layers)
Client-Server v畛i Peer-to-Peer (Client-Server vs. Peer-to-Peer)
Ti畉n tr狸nh truy畛n th担ng (Process Communication)
T棚n, 畛a ch畛, c畛ng (Names, Addresses, Ports)
V畉n chuy畛n (Transports) 2
Internet v giao th畛cInternet v giao th畛c
Internet l g狸
Hng tri畛u thi畉t b畛 k畉t
n畛i v畛i nhau:
Mobile networkPC
s n畛i v畛i nhau:
hosts = end systems
running network
apps
Home network
Global ISP
Regional ISP
server
wireless
laptop
cellular
handheld
access
i ts
動畛ng/k棚nh truy畛n th担ng
fiber, copper, radio,
satellite
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
Institutional network
router
wired
links
points
sate te
T畛c 畛 truy畛n=
bandwidth
routers: chuy畛n ti畉p goi (c叩c
o畉n d畛 li畛u)
3
Internet v giao th畛cInternet v giao th畛c
M畉ng c坦 r畉t nhi畛u thnh ph畉n
Fibers
Links (li棚n k畉t)
Interfaces
(c叩c giao di畛n)
Switches/routers
Large router
Coaxial Cable
Ethernet card
g
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1- 4
Wireless card Telephone
switchTwisted Cable
2. 2
Internet v giao th畛cInternet v giao th畛c
p d畛ng 畛c 叩o tr棚n Internet
Khung 畉nh IP
http://www.ceiva.com/
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
Server web nh畛 nh畉t th畉 gi畛i
http://www-ccs.cs.umass.edu/~shri/iPic.html i畛n tho畉i Internet
5
Internet v giao th畛cInternet v giao th畛c
Internet l g狸
C叩c giao th畛c: i畛u khi畛n vi畛c
g畛i v nh畉n c叩c b畉n tin
Mobile network
Global ISP
g畛i v nh畉n c叩c b畉n tin
V鱈 d畛: TCP, IP, HTTP, Skype,
Ethernet
Internet: m畉ng c畛a c叩c m畉ng
T鱈nh ph但n c畉p l畛ng l畉o
Internet c担ng c畛ng v畛i intranet
ri棚ng bi畛t
Home network
Institutional network
Regional ISP
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
C叩c chu畉n Internet
RFC: Request for comments
IETF: Internet Engineering Task
Force
http://www.ietf.org/
6
Internet v giao th畛cInternet v giao th畛c
Internet l g狸: quan i畛m d畛ch v畛
C董 s畛 h畉 t畉ng truy畛n th担ng
(communication infrastructure) tri畛n( )
khai c叩c 畛ng d畛ng ph但n t叩n
Web, VoIP, email, games, e-
commerce, chia s畉 file
C叩c d畛ch v畛 truy畛n th担ng cung c畉p cho
c叩c 畛ng d畛ng:
Kh畉 nng chuy畛n d畛 li畛u tin
畉 畛 畛 畛 鱈
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
c畉y t畛 ngu畛n t畛i 鱈ch
Truy畛n d畛 li畛u n畛 l畛c t畛i a
best effort (kh担ng tin c畉y)
7
Internet v giao th畛cInternet v giao th畛c
Giao th畛c (protocol) l g狸?
C叩c giao th畛c c畛a con
ng動畛i :
C叩c giao th畛c c畛a m畉ng:
M叩 坦 h畛 kh担 h畉ing動畛i :
B但y gi畛 l m畉y gi畛?
T担i mu畛n h畛i
L畛i gi畛i thi畛u
b畉n tin 畉c bi畛t 動畛c g畛i
M叩y m坦c ch畛 kh担ng ph畉i con
ng動畛i
T畉t c畉 c叩c ho畉t 畛ng truy畛n
th担ng tr棚n Internet 動畛c qu畉n
l箪 th担ng qua c叩c giao th畛c
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
畉 畛 畛 g
i
c叩c hnh 畛ng c畛 th畛 khi
nh畉n 動畛c b畉n tin hay
khi c坦 c叩c s畛 ki畛n kh叩c
C叩c giao th畛c 畛nh ngh挑a khu担n
d畉ng, ti畉n tr狸nh g畛i v nh畉n
tin gi畛a c叩c th畛c th畛 trong
m畉ng v 動a ra c叩c hnh
畛ng t動董ng 畛ng th担ng qua c叩c
b畉n tin truy畛n v nh畉n 8
3. 3
Internet v giao th畛cInternet v giao th畛c
Giao th畛c (protocol) l g狸?
Giao th畛c c畛a con ng動畛i v m畉ng m叩y t鱈nh
Cho anh
Cho em
Anh 董i, b但y gi畛
l m畉y gi畛 畉?
Y棚u c畉u k畉t n畛iTCP
叩p 畛ng k畉t n畛iTCP
<truy畛n file>
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
Q: C嘆n giao th畛c no trong cu畛c s畛ng?
B但y gi畛 l 2gi畛
time
C叩c giao th畛c 畉c t畉 c炭 ph叩p (syntax) v ng畛 ngh挑a
(semantics)
Syntax: c叩ch c畉u tr炭c giao th畛c
Khu担n d畉ng, tr狸nh t畛 c叩c b畉n tin 動畛c
g畛i v nh畉n
Semantics: 箪 ngh挑a c畛a c叩c b鱈t
C叩ch th畛c ph畉n h畛i c叩c b畉n tin, s畛 ki畛n,
v.v.
9
Internet v giao th畛cInternet v giao th畛c
Ch動董ng 1: Network Application Architecture
C叩c l畛p giao th畛c (Protocol Layers)
畛ng畛ng d畛ngd畛ng
Tr狸nh di畛n
Phi棚n
Application
Presentation
Session
Data
Application
Header
Data
Presentation
Header
Data
Session
Header
T t
OSI model
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
V畉n chuy畛n
M畉ng
Li棚n k畉t d畛 li畛u
V畉t l箪
Transport
Network
Data Link
Physical
Data
Transport
Header
Data
Network
Header
0101101010110001
Data
Frame
Header
10
Internet v giao th畛cInternet v giao th畛c
M担 h狸nh ph但n l畛p OSI
Application7
Network
Routing, Call control
IP internetworking
Link
Transport
Network
Presentation
Session
4
3
6
5
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1- 11
Ethernet, FDDI
Circuit, ATM, FR switches
Physical
SONET, T1, T3
Physical
Link
1
2
Internet v giao th畛cInternet v giao th畛c
M担 h狸nh ph但n l畛p OSI
Session, Presentation,
Application7
, ,
Application
Data, voice encodings
Authentication
web/http, ftp, telnet
Transport
Transport
Network
Presentation
Session
4
3
6
5
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1- 12
p
Error and congestion
control
TCP, UDP
Physical
Link
1
2
4. 4
Internet v giao th畛cInternet v giao th畛c
Internet: c叩c l畛p x畉p ch畛ng gi畛ng nh動 畛ng h畛 c叩t
Giao th畛c 畛ng
畛ng d畛ng
Giao th畛c 畛ng
d畛ng
Chuy畛n g坦i kh担ng
tin c畉y
M畉ng l畛p th畉p
V畉n chuy畛n tin c畉y
1-
M畉ng l畛p th畉p
C叩c l畛p v畉t l箪
13
Internet v giao th畛cInternet v giao th畛c
Ki畉n tr炭c giao th畛c Internet
M担 h狸 h OSI M担 h狸 h TCP/IP
B畛 giao th畛c TCP/IP l s畛
k畉t h畛p c畛a c叩c giao
th畛c kh叩c nhau 畛 c叩c
t畉ng kh叩c nhau, kh担ng
L畛p 畛ng d畛ng
L畛p tr狸nh di畛n
L畛p phi棚n
L畛p v畉n chuy畛n
T畉ng 畛ng d畛ng
T畉ng v畉n chuy畛n
M担 h狸nh OSI M担 h狸nh TCP/IP ch畛 c坦 c叩c giao th畛c
TCP v IP. M畛i t畉ng l畉i
c坦 ch畛c nng ri棚ng.
H畉u h畉t c叩c d畛 li畛u
truy畛n tr棚n b畛 giao
th畛c TCP/IP 畛u k畉t
th炭c 坦ng g坦i 畛 d畛
li畛u 畛 IP (IP
datagram), tr畛 ARP
v RARP 動畛c 坦ng
g坦i tr畛c ti畉p 畛 Khung
1- 14
L畛p m畉ng
L畛p li棚n k畉t d畛 li畛u
L畛p v畉t l箪
T畉ng li棚n m畉ng
T畉ng giao di畛n m畉ng
L畛p li棚n
k畉t d畛 li畛u
L畛p v畉t l箪
g坦i tr畛c ti畉p 畛 Khung
l畛p li棚n k畉t (Link
Level Frames)
Internet v giao th畛cInternet v giao th畛c
Ki畉n tr炭c giao th畛c Internet
RTP SNMPDNSTELNETFTP HTTPPing
TCP UDP OSPF
BGPSMTP
ICMP
IP
RIP
1-
LANs PPPATM FR
10/100BaseT Dedicated B/W:
DSx, SONET, ...
Circuit-Switched B/W:
POTS, SDS, ISDN, ...
CDPD
Wireless
Internet v giao th畛cInternet v giao th畛c
Ch動董ng 1: Network Application Architecture
Client-server v畛i Peer-to-Peer
Ki畉n tr炭c 畛ng d畛ng Internet
Client-Server
Peer-to-Peer
Lai gh辿p Client-Server v畛i Peer-to-Peer
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1- 16
5. 5
Internet v giao th畛c
Clients v Servers (Kh叩ch/ch畛)
Ch動董ng tr狸nh Client
Ch畉y tr棚n tr畉m cu畛i
Ch動董ng tr狸nh Server
Ch畉y tr棚n tr畉m cu畛i畉y 畉
Y棚u c畉u d畛ch v畛
V鱈 d畛: Web browser
畉y 畉
Cung c畉p d畛ch v畛
V鱈 d畛: Web server
GET /index.html
1- 17Trang web ang 動畛c x但y d畛ng
Internet v giao th畛cInternet v giao th畛c
Ki畉n tr炭c Client-server
Clients (c叩c m叩y kh叩ch):
Truy畛n th担ng v畛i m叩y ch畛
C坦 th畛 動畛c k畉t n畛i kh担ng
li棚n t畛c
C坦 th畛 c坦 c叩c 畛a ch畛 IP 畛ng
Kh担ng truy畛n th担ng tr畛c ti畉p
v畛i nhau
Server (m叩y ch畛):client/server
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1- 18
L tr畉m lu担n 畛 tr畉ng th叩i
ho畉t 畛ng
C坦 畛a ch畛 IP c畛 畛nh
M畛 r畛ng t畉o thnh c叩c server
farms
Internet v giao th畛cInternet v giao th畛c
Ki畉n tr炭c Peer-to-Peer thu畉n
Server kh担ng ph畉i lu担n
ho畉t 畛ngho畉t 畛ng
C叩c h畛 th畛ng 畉u cu畛i
b畉t k畛 truy畛n th担ng tr畛c
ti畉p
C叩c peer 動畛c k畉t n畛i
tu畛 箪 v c坦 畛a ch畛 IP
thay 畛i
peer-peer
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
thay 畛i
D畛 m畛 r畛ng nh動ng
kh坦 qu畉n l箪
19
Internet v giao th畛cInternet v giao th畛c
Lai gh辿p client-server v P2P
Skype
畛ng d畛ng voice-over-IP P2P 畛ng d畛ng voice over IP P2P
Server t畉p trung: t狸m 畛a ch畛 畉u xa
K畉t n畛i client-client : tr畛c ti畉p (kh担ng qua server)
Nh畉n tin ng畉n tr棚n m畉ng
Chatting gi畛a hai ng動畛i d湛ng l P2P
D畛ch v畛 t畉p trung: ph叩t hi畛n v畛 tr鱈/hi畛n di畛n c畛a
client
2012-Nguy畛nTh畛ThuH畉ng-PTIT
1-
client
Ng動畛i d湛ng ng k箪 畛a ch畛 IP c畛a m狸nh v畛i server trung
t但m khi l棚n online
Ng動畛i s畛 d畛ng k畉t n畛i t畛i trung t但m 畛 t狸m 畛a ch畛 c畛a
b畉n ch叩t
20