Professional Documents
Culture Documents
Chuong1 Gioithieu Songu PDF
Chuong1 Gioithieu Songu PDF
Giới thiệu
Computer
Networking: A Top
Down Approach
Các silde bài giảng này có nguồn gốc từ J.F. Kurose và K.W Ross
6th edition
All material copyright 1996-2012
J.F Kurose and K.W. Ross, All Rights Reserved
Jim Kurose, Keith Ross
Addison-Wesley
March 2012
Packetswitches: forward
router packets (chunks of data) institutional
network
routers and switches
Giới thiệu 1-10
Nhiều thiết bị có thể kết nối Internet
Web-enabled toaster +
weather forecaster
IP picture frame
http://www.ceiva.com/
Tweet-a-watt:
monitor energy use
Slingbox: watch,
control cable TV remotely
Internet
refrigerator Internet phones
Giới thiệu 1-11
Fun internet appliances
Web-enabled toaster +
weather forecaster
IP picture frame
http://www.ceiva.com/
Tweet-a-watt:
monitor energy use
Slingbox: watch,
control cable TV remotely
Internet
refrigerator Internet phones
Introduction 1-12
Internet là gì? Góc nhìn cơ bản
mobile network
Internet: mạng c a các mạng
Các ISP đ ợc kết nối với global ISP
nhau
giao th c điều khiển việc gửi và
nhận các thông điệp home
network
vd: TCP, IP, HTTP, Skype, regional ISP
802.11
Các chuẩn Internet
RFC: Request for comments
IETF: Internet Engineering
Task Force
institutional
network
institutional
network
Introduction 1-14
Internet là gì? Góc nhìn dịch vụ
Cơ sở hạ tầng cung cấp
các dịch vụ cho các ng
mobile network
Introduction 1-16
Giao th c là gì?
Giao th c c a con ng ời: Giao th c mạng:
“mấy giờ rồi?” Maý ch không phải
“tôi có câu hỏi” ng ời
Giới thiệu Tất cả các hoạt động
thông tin trên Internet
đều phải tuân theo các
… thông điệp cụ thể giao th c
đ ợc gửi đi
… các hành động cụ Giao th c xác định khuôn
thể cần làm khi nhận dạng, trật tự c a các thông
đ ợc thông điệp, hoặc điệp đ ợc gửi và nhận giữa
các sự kiện khác … các thực thể mạng, và các
hành động cần làm khi gửi
và nhận thông điệp
Giới thiệu 1-17
What’s a protocol?
human protocols: network protocols:
what’s the time? machines rather than
I have a question humans
introductions all communication activity
in Internet governed by
protocols
… specific msgs sent
… specific actions taken
when msgs received, or protocols define format, order
other events
of msgs sent and received
among network entities,
and actions taken on msg
transmission, receipt
Introduction 1-18
Giao th c là gì?
Giao th c con ng ời và Giao th c mạng:
Chào ông
Yêu cầu kết nối
TCP
Chào bà
Chấp nhận kết nối
TCP
Mấy giờ rồi?
Get http://www.awl.com/kurose-ross
2:00 giờ
<file>
Thời gian
Hi TCP connection
request
Hi TCP connection
response
Got the
time? Get http://www.awl.com/kurose-ross
2:00
<file>
time
Lõi mạng:
Các router kết nối với
nhau institutional
Mạng c a các mạng network
network core:
interconnected routers
network of networks institutional
network
Introduction 1-24
Mạng truy cập và đ ờng truyền vật lý
Q: Làm thế nào để kết
nối hệ thống đầu cuối
với router biên?
Mạng truy cập ở nơi c
trú
Mạng truy cập ở công sở
(tr ờng học, công ty)
Mạng truy cập di động
Ghi nhớ:
Băng thông (bit trên
giây) c a mạng truy cập?
Dùng chung hay dùng
riêng?
Giới thiệu 1-25
Access networks and physical media
DSL splitter
modem DSLAM
ISP
voice, data transmitted
at different frequencies over DSL access
dedicated line to central office multiplexer
Dùng đ ờng điện thoại có sẵn nối đến DSLAM c a tổng đài
Dữ liệu trên đ ờng DSL đi đến Internet
Thoại trên đ ờng DSL đi đến mạng điện thoại
tốc độ truyền dẫn đ ờng lên < 2.5 Mbps (điển hình < 1 Mbps)
tốc độ truyền dẫn đ ờng xuống < 24 Mbps (điển hình < 10 Mbps)
DSL splitter
modem DSLAM
ISP
voice, data transmitted
at different frequencies over DSL access
dedicated line to central office multiplexer
cable splitter
modem
C
O
V V V V V V N
I I I I I I D D T
D D D D D D A A R
E E E E E E T T O
O O O O O O A A L
1 2 3 4 5 6 7 8 9
Channels
Ghép kênh phân chia theo tần số: các kênh khác nhau
đ ợc phát trên các băng tần khác nhau
Giới thiệu 1-29
Access net: cable network
cable headend
cable splitter
modem
C
O
V V V V V V N
I I I I I I D D T
D D D D D D A A R
E E E E E E T T O
O O O O O O A A L
1 2 3 4 5 6 7 8 9
Channels
to/from headend or
central office
often combined
in single box
to/from headend or
central office
often combined
in single box
institutional link to
ISP (Internet)
institutional router
institutional link to
ISP (Internet)
institutional router
to Internet
to Internet
to Internet
to Internet
3 2 1
Nguồn đích
R bps R bps
L bits
per packet
3 2 1
source destination
R bps R bps
R = 100 Mb/s C
A
D
R = 1.5 Mb/s
B
Hàng đợi các gói E
đang chờ phát ra liên kết
R = 100 Mb/s C
A
D
R = 1.5 Mb/s
B
queue of packets E
waiting for output link
routing algorithm
frequency
time
TDM
frequency
time
Giới thiệu 1-59
Circuit switching: FDM versus TDM
Example:
FDM
4 users
frequency
time
TDM
frequency
time
Giới thiệu 1-60
Chuyển mạch gói so với chuyển mạch kênh
Chuyển mạch gói cho phép nhiều ng ời dùng mạng hơn!
Ví dụ:
Liên kết 1 Mb/s
Mỗi ng ời dùng: N
users
• Sử dụng100 kb/s
• Sử dụng 10% thời gian 1 Mbps link
example:
1 Mb/s link
each user: N
users
• 100 kb/s when active
• active 10% of time 1 Mbps link
circuit-switching:
10 users
packet switching: Q: how did we get value 0.0004?
with 35 users, probability >
10 active at same time is less Q: what happens if > 35 users ?
than .0004 *
* Check out the online interactive exercises for more examples Giới thiệu 1-62
Chuyển mạch gói so với chuyển mạch kênh
Chuyển mạch gói hoàn toàn v ợt trội?
Phù hợp với dữ liệu không đều
chia sẻ tài nguyên
đơn giản, ko yêu cầu khởi tạo cuộc gọi
Tắc nghẽn quá m c: gói tin bị trễ và mất
cần có các giao th c cho việc truyền tải dữ liệu tin cậy, kiểm
soát tắc nghẽn.
Hỏi: làm thế nào để cung cấp dịch vụ t ơng tự nh
chuyển mạch kênh?
băng thông cần đảm bảo cho các ng dụng thời gian thực
access access
net net
access
net
access
access net
net
access
access net
net
access access
net net
access
net
access
net
access
net
access
net
access access
net access net
net
access access
net net
access
net
access
access net
net
access
access net
net
access
net
access
net
access
net
access
net
access access
net access net
net
access access
net net
access
net
access
net
access
net
access
net
access access
net access net
net
access access
net net
access
net
access
access net
net
access
access net
net
access
net
access
net
access
net
access
net
access access
net access net
net
ISP toàn
access
net
cục access
net
access
net
access
net
access
net
access
net
access access
net access net
net
access access
net ISP B net
access
ISP C
net
access
net
access
net
access
net
access access
net access net
net
access
IXP access
net
net
ISP A
access
ISP C
net
access
net
access
IXP access
net
net
ISP A
access
ISP C
net
access
net
access
net regional net
access
net
access access
net access net
net
access
IXP access
net
net
ISP A
Content provider network
access IXP access
net ISP B net
access
ISP B
net
access
net
access
net regional net
access
net
access access
net access net
net
global
access
net
ISP access
net
access
net
access
net
access
net
access
net
access access
net access net
net
access access
net ISP B net
access
ISP C
net
access
net
access
net
access
net
access access
net access net
net
access
IXP access
net
net
ISP A
access
ISP C
net
access
net
access
IXP access
net
net
ISP A
access
ISP C
net
access
net
access
net regional net
access
net
access access
net access net
net
access
IXP access
net
net
ISP A
Content provider network
access IXP access
net ISP B net
access
ISP B
net
access
net
access
net regional net
access
net
access access
net access net
net
ở trung tâm: một số ít các mạng lớn đ ợc kết nối với nhau
Các ISP th ơng mại tier-1 (e.g., Level 3, Sprint, AT&T, NTT),
phạm vi quốc tế hoặc quốc gia
Mạng cung cấp nội dung (e.g, Google): các mạng riêng kết nối các
Data center c a nó với Internet, th ờng bỏ qua các ISP tier-1, các
ISP khu vực Giới thiệu 1-81
Internet structure: network of networks
to/from backbone
peering
… … …
…
to/from customers
to/from backbone
peering
… … …
…
to/from customers
B
Các gói đang xếp hàng chờ (trễ)
Phần còn trống c a bộ đệm: các gói đến sẽ bị rớt (mất)
nếu bộ đệm không còn trống
B
packets queueing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
B
Xử lý
Xếp hàng
B
nodal
processing queueing
B
Xử lý
Xếp hàng
B
nodal
processing queueing
average queueing
R: băng thông liên kết (bps)
delay
L: ộ dài gói (bits)
a: tốc ộ ến trung bình
c a gói
traffic intensity
= La/R
La/R ~ 0: trễ xếp hàng trung bình bé La/R ~ 0
La/R -> 1
Giới thiệu 1-97
Queueing delay (revisited)
average queueing
R: link bandwidth (bps)
delay
L: packet length (bits)
a: average packet arrival
rate
traffic intensity
= La/R
La/R ~ 0: avg. queueing delay small La/R ~ 0
* Check out the Java applet for an interactive animation on queuing and loss La/R -> 1
Giới thiệu 1-98
Trễ Internet thực tế và ường i
Trên thực tế thì độ trễ Internet và mất gói
nh thế nào ?
Ch ơng trình traceroute : đo độ trễ từ nguồn
đến các router dọc trên đ ờng đi c a gói đến
đích. Với mọi i:
Gửi 3 gói đến router i trên đ ờng đi đến đích
router i sẽ trả về 3 gói cho ng ời gửi
Ng ời gửi tính thời gian từ lúc gửi gói đi tới lúc
nhận đ ợc phản hồi
.
3 probes 3 probes
3 probes
3 probes 3 probes
3 probes
Introduction 1-100
Trễ Internet thực tế và ường i
traceroute: gaia.cs.umass.edu to www.eurecom.fr
3 delay measurements from
gaia.cs.umass.edu to cs-gw.cs.umass.edu
1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms
2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms
3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms
4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms
5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms
6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms
7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms trans-oceanic
8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms
9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms link
10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms
11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms
12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms
13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms
14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms
15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms
16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms
17 * * *
18 * * * * means no response (probe lost, router not replying)
19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms
B
packet arriving to
full buffer is lost
buffer
(waiting area) packet being transmitted
A
B
packet arriving to
full buffer is lost
* Check out the Java applet for an interactive animation on queuing and loss Giới thiệu 1-104
Thông l ợng
Thông l ợng: tốc độ (bit/đơn vị thời gian)
truyền bit giữa bên phát và bên thu
T c thời: tốc độ tại một thời điểm nhất định
Trung bình: tốc độ trong một khoảng thời gian dài
server,
server withbits
sends linkpipe
capacity
that can carry linkpipe
capacity
that can carry
file of into
(fluid) F bitspipe Rs bits/sec
fluid at rate Rc bits/sec
fluid at rate
to send to client Rs bits/sec) Rc bits/sec)
server,
server withbits
sends linkpipe
capacity
that can carry linkpipe
capacity
that can carry
file of into
(fluid) F bitspipe Rs bits/sec
fluid at rate Rc bits/sec
fluid at rate
to send to client Rs bits/sec) Rc bits/sec)
Rs bits/sec Rc bits/sec
Rs bits/sec Rc bits/sec
Rs bits/sec Rc bits/sec
Rs bits/sec Rc bits/sec
bottleneck link
link on end-end path that constrains end-end throughput
Giới thiệu 1-108
Thông l ợng: trong Internet
Rc
per-connection end-
end throughput: Rs
min(Rc,Rs,R/10) Rs Rs
in practice: Rc or Rs
is often bottleneck
R
Rc Rc
Rc
a series of steps
định tuyến bay airplane routing airplane routing định tuyến bay airplane routing
airplane routing airplane routing airplane routing airplane routing airplane routing
Introduction 1-118
Vì sao phải phân lớp?
Việc xử lý các hệ thống ph c tạp cần:
Một cấu trúc rõ ràng cho phép nhận dạng các
thành phần, mối liên hệ giữa các thành phần
c a một hệ thống ph c tạp.
mô hình tham chiếu phân lớp dùng cho lập luận
Mô đun hóa sẽ giúp việc bảo d ỡng, cập nhật
hệ thống dễ dàng
Thay đổi cách thực hiện dịch vụ c a một lớp
không ảnh h ởng đến các lớp khác
Phân lớp có gì không tốt?
switch
Đích Hn Ht M network
M application Hl Hn Ht M link Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical
switch
destination Hn Ht M network
M application Hl Hn Ht M link Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical
1. select target
2. break into hosts around
the network (see botnet)
3. send packets to target from
compromised hosts
target
A C
A C
Đánh lừa IP : gửi các gói với địa chỉ nguồn giả
mạo
A C