Introduction 1-1
M ng Máy Tínhạ
Computer Networks
Ph m Văn Namạ
Email: ;
Đ a ch liên h : Văn phòng B môn M ng & ị ỉ ệ ộ ạ
Truy n thông - Khoa Công ngh Thông tin, ề ệ
Tr ng Đ i h c Nha Trangườ ạ ọ
Đi n tho i: (058) 2471447ệ ạ
Mobile: 0904 38 81 82
Introduction 1-2
Môn h c nói v ?ọ ề
M ng máy tính (MMT) đa năngạ
- Không ph i là nh ng m ng chuyên d ng (vd: telephone)ả ữ ạ ụ
Nh ng nguyên lý c b n c a MMTữ ơ ả ủ
- Không kh o sát t t c các chu n giao th c hi n hànhả ấ ả ẩ ứ ệ
T p trung vào ki n trúc ph n m m m ngậ ế ầ ề ạ
- Ch th o lu n m t s ph n c ng m ng thi t y uỉ ả ậ ộ ố ầ ứ ạ ế ế
Introduction 1-3
Tài li u môn h cệ ọ
Tài li u chínhệ
Computer Networking
by Jim Kurose and Keith Ross,
Addison-Wesley, 2
nd
Edition, 2002
M ng máy tính và các h th ng m , ạ ệ ố ở
Nguy n Thúc H i, ễ ả
NXB Giáo d c, 1999ụ
Computer Networks
by Andrew S. Tanenbaum, Prentice
Hall, 4
th
Edition, 2002
Tài li u đ c thêmệ ọ
TCP/IP Illustrated Vol. 1 & 2 by W. Richard Stevens,
Addision-Wesley, 1994
Computer Networks and Internets
by Douglas E. Comer,
Prentice Hall, 2
nd
Edition, 1998
Introduction 1-4
Introduction to Networking
What is a computer network?
Internet Architecture
Statistical multiplexing and packet
switching
Fundamental issues in computer networking
Introduction 1-5
Ch ng 1: Các khái ni m c b n v ươ ệ ơ ả ề
m ng máy tính và m ng Internetạ ạ
Th nào là m t m ng máy tính?ế ộ ạ
Các thành ph n c a m t MMTầ ủ ộ
Internet là gì?
Ki n trúc Internet (Internet Architecture)ế
Các chi n l c d n kênhế ượ ồ
M ng chuy n m ch kênh, góiạ ể ạ
Nh ng v n đ c b n trong MMTữ ấ ề ơ ả
Introduction 1-6
What is a Computer Network?
•
Network provides connectivity
A set of computers/switches connected by communication links
Many topologies possible
•
Many different physical media
–
Coaxial cable, twisted pair, fiber optic, radio, satellite, wireless
•
Local area networks vs Wide area networks
•
Emerging systems area network, home network, storage
area network, and wireless network
Introduction 1-7
Th nào là m t m ng máy tính?ế ộ ạ
M ng cung c p s k t n iạ ấ ự ế ố
M t t p các máy tính/thi t b chuy n m ch đ c k t n i b i các liên k t truy n thôngộ ậ ế ị ể ạ ượ ế ố ở ế ề
Nh m chia s thông tin và tài nguyênằ ẻ
Topologies (đ hình m ng)ồ ạ
Nhi u ph ng ti n v t lý khác nhauề ươ ệ ậ
Coaxial cable, twisted pair, fiber optic, radio, satellite
M ng c c b , M ng đô th , M ng di n r ng, vv… ạ ụ ộ ạ ị ạ ệ ộ
(Local/Metropolitan/Wide Area Networks – LANs,
MANs, WANs, etc.)
Introduction 1-8
Elements of a Network
•
hosts, end-systems
–
pc’s, workstations, servers
–
PDA’s, phones, toasters
running network apps
•
communication links
–
point-to-point, multiaccess
–
fiber, copper, radio, satellite
•
Switches and routers:
forward packets (chunks) of data
thru network
•
internet: network of networks
•
Internet is a specific internet
local ISP
company
network
regional ISP
router
workstation
server
mobile
Introduction 1-9
Các thành ph n c a m t MMTầ ủ ộ
•
trạm, hệ thống đầu cuối
–
pc’s, workstations, servers
–
PDA’s, phones, toasters
chạy các ứng dụng mạng
•
liên kết truyền thông
–
fiber, copper, radio, satellite
–
điểm - điểm và quảng bá
–
băng thông
•
switches và routers: chuyển
tiếp các gói dữ liệu qua mạng
•
internet (liên mạng): mạng của
các mạng
•
Internet là một liên mạng công
cộng cụ thể
local ISP
company
network
regional ISP
router
workstation
server
mobile
Introduction 1-10
What is
The
Internet?
The
Internet :
collection of networks and routers that span the world and use
the TCP/IP protocols to form a single, cooperative virtual
network
intranet:
connection of different LANs within an organization
private
may use leased lines
usually small, but possibly hundreds of routers
may be connected to the Internet (or not), often by firewall
Introduction 1-11
Internet là gì?
The Internet:
T p h p các m ng và b đ nh tuy n tr i r ng trên ph m vi toàn ậ ợ ạ ộ ị ế ả ộ ạ
th gi i và s d ng t p giao th c ế ớ ử ụ ậ ứ TCP/IP đ hình thành m t ể ộ
m ng o c ng tác, đ n.ạ ả ộ ơ
Intranet:
S k t n i c a các LANs khác nhau trong m t t ự ế ố ủ ộ ổ
ch cứ
Riêng t (Private)ư
Có th dùng đ ng thuê bao riêng (leased lines)ể ườ
Thông th ng thì nh , nh ng có th bao g m đ n vài trăm ườ ỏ ư ể ồ ế
routers
Có th đ c k t n i ra the Internet (ho c không), b i b c ể ượ ế ố ặ ở ứ
t ng l a (thông th ng)ườ ử ườ
Introduction 1-12
Internet Architecture
(Ki n trúc Internet)ế
LANs
International
lines
ISP ISPcompany
university
national
network
regional
network
NAP
on-line
services
company
access via
modem
Introduction 1-13
Internet today
Introduction 1-14
NAPs, NSPs, ISPs
NSP: National Service Provider (Tier 1 Backbones)
Example: Internet MCI, Sprint Link, UUNET in USA
NAP: Network Access Point
ISP: Internet Service Provider
NAP
NAP
NAP
NAP
NAP
NAP
NAP
NAP
National Provider
National Provider
National Provider
National Provider
Regional
Regional
Provider
Provider
POP
POP
customers
customers
Introduction 1-15
NAP and Private Peering
Introduction 1-16
Multiplexing Strategies
Sharing of network resources among multiple users
•
Common multiplexing strategies
•
Time Division Multiplexing (TDM)
•
Frequency Division Multiplexing (FDM)
•
These two strategies are circuit switching technology
Introduction 1-17
Các chi n l c d n kênhế ượ ồ
Chia s tài nguyên m ng gi a nhi u ng i s d ngẻ ạ ữ ề ườ ử ụ
•
Những chiến lược dồn kênh thông thường
•
Dồn kênh chia thời gian-Time Division Multiplexing (TDM)
•
Dồn kênh chia tần số-Frequency Division Multiplexing (FDM)
•
Cả hai chiến lược trên đều là kỹ thuật chuyển mạch kênh
(circuit switching technology)
Introduction 1-18
Chuy n m ch kênh: FDMA và TDMAể ạ
FDMA
frequency
time
TDMA
frequency
time
4 users
Example:
Introduction 1-19
Circuit Switched Networks
All resources (e.g. communication links) needed by a call
dedicated to that call for its duration
Example: telephone network
Introduction 1-20
M ng chuy n m ch kênh - Circuit ạ ể ạ
Switched Networks
T t c tài nguyên (vd: các liên k t truy n thông) c n thi t ấ ả ế ề ầ ế
cho m t cu c g i đ c dành riêng trong su t cu c g iộ ộ ọ ượ ố ộ ọ
Ví d : m ng đi n tho iụ ạ ệ ạ
Introduction 1-21
Statistical Multiplexing
Time division, but on demand rather than fixed
Reschedule link on a per-packet basis
Packets from different sources interleaved on the link
Buffer packets that are
contending
for the link
Buffer buildup is called
congestion
This is
packet switching,
used in computer networks
Introduction 1-22
D n kênh th ng kê - Statistical ồ ố
Multiplexing
T ng t nh d n kênh theo th i gian nh ng tùy vào nhu c u h n là ươ ự ư ồ ờ ư ầ ơ
c đ nhố ị
K ho ch l i đ ng truy n d a vào n n t ng t ng góiế ạ ạ ườ ề ự ề ả ừ
Các gói t các ngu n khác nhau đ c chèn vào đ ng truy nừ ồ ượ ườ ề
Nh ng gói “đ u tranh” dành đ ng truy n s đ c đ a vào vùng ữ ấ ườ ề ẽ ượ ư
đ m (buffer)ệ
S tích t vùng đ m đ c g i là ngh n-ự ụ ệ ượ ọ ẽ
congestion
Đây là k thu t chuy n m ch gói, ỹ ậ ể ạ đ c dùng trong MMTượ
Introduction 1-23
Packet Switched Networks
Data entering network is divided into chunks called “packets”
Store-and-forward approach: packets buffered before
transmission
Packets traversing network share resources with other packets
On demand resource use: statistical resource sharing
Fewer resources: queuing delay, packet loss
Introduction 1-24
M ng chuy n m ch gói - Packet ạ ể ạ
Switched Networks
D li u đ a lên m ng đ c đ c chia thành nhi u “gói” g i là “packets”ữ ệ ư ạ ượ ượ ề ọ
Ph ng pháp L u gi và chuy n ti p (Store-and-forward): packets đ c l u ươ ư ữ ể ế ượ ư
gi trong vùng đ m tr c khi đ c truy n điữ ệ ướ ượ ề
Packets ch y trên m ng chia s tài nguyên v i các packets khácạ ạ ẻ ớ
Vi c s d ng tài nguyên tùy thu c vào nhu c u hay chia s tài nguyên theo th ng ệ ử ụ ộ ầ ẻ ố
kê
Khi tài nguyên h n ch : đ tr x p hàng, m t gói tinạ ế ộ ễ ế ấ
A
B
C
10 Mbps
Ethernet
1.5 Mbps
D
E
statistical multiplexing
queue of packets
waiting for output
link
Introduction 1-25
Why Statistically Share Resources
Efficient utilization of the network
Example scenario
Link bandwidth: 1 Mbps
Each call requires 100 Kbps when transmitting
Each call has data to send only 10% of time
Circuit switching
Each call gets 100 Kbps: supports 10 simultaneous calls
Packet switching
Supports many more calls with small probability of
contention
•
35 ongoing calls:
probability that > 10 active is < 0.0017!