Professional Documents
Culture Documents
Ôn thi cuối kỳ - in
Ôn thi cuối kỳ - in
1
II. Yêu cầu kỹ năng.......................................................................................................................................4
1. Chia subnet..........................................................................................................................................4
2. Triển khai cài đặt các dịch vụ nền của 1 hệ thống mạng: DHCP, DNS. E-mail......................................4
3. IPSec....................................................................................................................................................4
4. Cấu hình router....................................................................................................................................4
5. Cấu hình VPN và NAT...........................................................................................................................4
6. Cấu hình firewall..................................................................................................................................4
7. Thiết kế mạng quy mô vừa và nhỏ.......................................................................................................4
8. Socket programming...........................................................................................................................4
2
I. Yêu cầu kiến thức
1. Topology
Đồ hình mạng (network topology):
cách thức bố trí đường truyền để nối kết các nút mạng
Phân loại:
Bus: các thiết bị nối trực tiếp vào một đường mạng chung
Star: các thiết bị nối trực tiếp vào một thiết bị chung
Ring: các thiết bị nối với nhau tạo thành vòng tròn
3
Star Modifying system and adding new If the centralized point
computers is easy. Centralized fails, the network fails.
4
2. Protocol
Giao thức:
Hiểu: như là một “thống nhất” giữa các “đối tượng” khi trao đổi thông tin
qui định, qui tắc để trao đổi dữ liệu giữa các đối tượng trên mạng
• Thứ tự thông tin truyền nhận giữa các thực thể trên mạng
• Các hành động cụ thể sau mỗi sự kiện nhận/gởi hay 1 sự kiện nào đó xảy ra
Do các tổ chức và hiệp hội xây dựng: IEEE, ANSI, TIA, EIA, ITU-T
3. Network Devices
5
4. Bandwidth
Băng thông (bandwidth):
Lượng thông tin có thể truyền đi trên 1 kết nối mạng trong 1 khoảng thời gian
Lý tưởng
4 reasons to understanding
Bandwidth is finite
Bandwidth is a key factor in analyzing network performance, designing new networks, and
understanding the Internet.
6
5. Throughtput
Thông lượng (throughput):
– Topology mạng
– …
Throughput refers to actual measured bandwidth, at a specific time of day, using specific Internet
routes, and while a specific set of data is transmitted on the network.
Network topology
User computer
Server computer
Power conditions
7
– Radio, television, and telephone transmissions have, until recently, been sent through the air and
over wires using electromagnetic waves. These waves are called analog because they have the same
shapes as the light and sound waves produced by the transmitters. As light and sound waves change
size and shape, the electrical signal that carries the transmission changes proportionately. In other
words, the electromagnetic waves are analogous to the light and sound waves. Analog bandwidth is
8
measured by how much of the electromagnetic spectrum is occupied by each signal. The basic unit
of analog bandwidth is hertz (Hz), or cycles per second. Typically, multiples of this basic unit of
analog bandwidth are used, just as with digital bandwidth. Units of measurement that are
commonly seen are kilohertz (KHz), megahertz (MHz), and gigahertz (GHz). These are the units used
to describe the bandwidths of cordless telephones, which usually operate at either 900 MHz or 2.4
GHz. These are also the units used to describe the bandwidths of 802.11a and 802.11b wireless
networks, which operate at 5 GHz and 2.4 GHz.
– While analog signals are capable of carrying a variety of information, they have some significant
disadvantages in comparison to digital transmissions. The analog video signal that requires a wide
frequency range for transmission cannot be squeezed into a smaller band. Therefore, if the
necessary analog bandwidth is not available, the signal cannot be sent.
– In digital signaling all information is sent as bits, regardless of the kind of information it is. Voice,
video, and data all become streams of bits when they are prepared for transmission over digital
media. This type of transmission gives digital bandwidth an important advantage over analog
bandwidth. Unlimited amounts of information can be sent over the smallest or lowest bandwidth
digital channel. Regardless of how long it takes for the digital information to arrive at its destination
and be reassembled, it can be viewed, listened to, read, or processed in its original form.
– It is important to understand the differences and similarities between digital and analog bandwidth.
Both types of bandwidth are regularly encountered in the field of information technology. However,
because this course is concerned primarily with digital networking, the term ‘bandwidth’ will refer
to digital bandwidth.
9
6. Lan/Man/Wan/San
Theo địa hình
Kích thước nhỏ (toà nhà, phòng máy, công ty, ..)
Rẻ tiền
10
Mạng diện rộng (WAN - Wide Area Network)
11
SAN (Storage – Area Networks)
o A SAN is a dedicated, high-performance network
used to move data between servers and storage
resources. Because it is a separate, dedicated
network, it avoids any traffic conflict between clients
and servers.
o SAN technology allows high-speed server-to-storage, Internet
storage-to-storage, or server-to-server connectivity.
This method uses a separate network infrastructure
that relieves any problems associated with existing
network connectivity.
o SANs offer the following features:
Storage-area
o Performance – SANs enable concurrent access of disk
Network
or tape arrays by two or more servers at high speeds,
providing enhanced system performance.
o Availability – SANs have disaster tolerance built in,
because data can be mirrored using a SAN up to 10
kilometers (km) or 6.2 miles away.
o Scalability – Like a LAN/WAN, it can use a variety of
technologies. This allows easy relocation of backup data, operations, file migration, and data
replication between systems.
12
7. Intranet – extranet
Theo phạm vi hoạt động:
intranet
extranet
• Intranet
• Cho phép bên ngoài truy cập vào thông qua chứng thực
internet
One common configuration of a LAN is an Intranet. Intranet Web servers differ from public Web
servers in that the public must have the proper permissions and passwords to access the Intranet of
an organization. Intranets are designed to permit access by users who have access privileges to the
internal LAN of the organization. Within an Intranet, Web servers are installed in the network.
Browser technology is used as the common front end to access information such as financial data or
graphical, text-based data stored on those servers.
Extranets refer to applications and services that are Intranet based, and use extended, secure access
to external users or enterprises. This access is usually accomplished through passwords, user IDs,
and other application-level security. Therefore, an Extranet is the extension of two or more Intranet
strategies with a secure interaction between participant enterprises and their respective intranets.
13
Intranets and Extranets
Intranet VPN
Intranet V
Company A
Remote Site
Extranet VPN
Company
Core Site
Company B
14
8. VPN
– A VPN is a private network that is
constructed within a public IP
IPnetwork
network
network infrastructure such as the
global Internet. Using VPN, a
telecommuter can access the VPN
network of the company
headquarters through the Internet
by building a secure tunnel
between the telecommuter’s PC
and a VPN router in the
headquarters.
Access VPNs – Access VPNs provide remote access to a mobile worker and small office/home office
(SOHO) to the headquarters of the Intranet or Extranet over a shared infrastructure. Access VPNs use
analog, dialup, ISDN, digital subscriber line (DSL), mobile IP, and cable technologies to securely connect
mobile users, telecommuters, and branch offices.
Intranet VPNs – Intranet VPNs link regional and remote offices to the headquarters of the internal
network over a shared infrastructure using dedicated connections. Intranet VPNs differ from Extranet
VPNs in that they allow access only to the employees of the enterprise.
Extranet VPNs – Extranet VPNs link business partners to the headquarters of the network over a
shared infrastructure using dedicated connections. Extranet VPNs differ from Intranet VPNs in that they
allow access to users outside the enterprise
15
16
9. Unicast/Broadcast/Multicast
Kiểu truyền:
Unicast
Broadcast
Multicast
Anycast
17
10. Các độ trễ gửi gói tin
Là thời gian trễ của 1 gói tin
Là thời gian cần thiết để chuyển mạch hết gói tin lên đường truyền
Ví dụ: gói tin có chiều dài L = 100bytes. Đường truyền có băng thông R = 10 Mbps
Dtrans = 100 / 10
Dprop = d/c
18
– c = tốc độ truyền (~ 2x108 m/sec - 3x108 m/sec)
Là thời gian xử lý header của 1 gói tin và quyết định chuyển mạch gói tin theo hướng nào
Là thời gian gói tin chờ trong hàng đợi để được đưa lên đường truyền
Ping
Tracert
Pathping
– A conversation between two people provides a good opportunity to use a layered approach to
analyze information flow. In a conversation, each person wishing to communicate begins by creating
an idea. Then a decision is made on how to properly communicate the idea. For example, a person
19
could decide to speak, sing or shout, and what language to use. Finally the idea is delivered. For
example, the person creates the sound which carries the message.
– This process can be broken into separate layers that may be applied to all conversations. The top
layer is the idea that will be communicated. The middle layer is the decision on how the idea is to be
communicated. The bottom layer is the creation of sound to carry the communication.
• Addresses
• Media
• Protocols
Sử dụng băng thông không hiệu quả nếu dữ liệu rời rạc (hoặc dày đặc nhưng bit rate không
đều)
Khắc phục:
20
kỹ thuật: FDMA (tần số theo trục ngang, đồng thời), TDMA (tần số theo trục dọc, lần lượt
từng gói)
Bị tắt nghẽn
Mỗi gói có thêm phần “header” làm tăng kích thước dữ liệu truyền
21
15. Proxy
Proxy
16. Firewall
Bức tường lửa (Firewall):
Bảo vệ hệ thống
22
17. Virus/Worms/Malware/Backdoor
23
18. IPv4 address, subnetting
Tầng 3 trong mô hình OSI
Định dạng:
Mỗi byte được biểu diễn bằng số thập phân, gọi là một octet
hai octet được viết cách nhau bằng 1 dấu chấm “.”
VD:
172.29.1.10
Network ID (NetID)
Host ID
32 bit
24
Phân loại:
• Dùng để đánh địa chỉ cho các mạng LAN bên trong 1 tổ chức
• Địa chỉ ảo
25
Chia subnet:
Mục tiêu:
Dễ quản trị
Dễ bảo trì
26
19. OSI Model
Xem mạng như là 1 chồng các lớp (layer)
Ưu điểm:
Mỗi lớp có 1 chức năng riêng, lớp N sử dụng dịch vụ do lớp N-1 cung cấp
Dễ quản lý
Đơn giản
Là khung sườn biểu diễn cách thông tin di chuyển trên mạng như thế nào
27
28
29
20. TCP/IP Model
TCP/IP - Transmission Control Protocol/Internet Protocol
OSI vs TCP/IP
– Similarities include:
• Both have application layers, though they include very different services.
30
• Both models need to be known by networking professionals.
• Both assume packets are switched. This means that individual packets may take
different paths to reach the same destination. This is contrasted with circuit-
switched networks where all the packets take the same path.
Differences:
– TCP/IP combines the presentation and session layer issues into its application layer.
– TCP/IP combines the OSI data link and physical layers into the network access layer.
31
32
20.1 Application: DHCP, DNS, E-Mail
Cung cấp các dịch vụ mạng cho người dùng cuối
hệ điều hành
Chia sẻ bộ nhớ
Kiến trúc:
Server-client
Peer-to-peer
Server – client
Server:
Client:
33
Có thể dùng IP “động”
VD:
Peer-to-peer
Quản lý khó
– Địa chỉ IP
– Port:
– Thời gian
– Băng thông
– TCP service
34
• Dịch vụ hướng kết nối
– UDP service
DHCP:
DHCP = Dynamic Host Configuration Protocol
35
Mô hình Client - Server:
Server
• Port: 67
• Cung cấp địa thông tin cấu hình TCP/IP cho các client
Client:
• Port: 68
36
Xin cấp lại:
Request
Ack/ Nak
Release
Sơ đồ hoạt động:
37
Op 1 Loại thông điệp
Flags 1 Cho biết gói tin này có phải là gói tin broadcast không
Ciaddr 4 Địa chỉ của Client, dùng trong các trường hợp renew,..
38
Yiaddr 4 Địa chỉ của “đối tác”
Siaddr 4 Địa chỉ của next server để “mồi”và được dùng trong các thông điệp
DHCPOFFER, DHCPACK
DHCP Scope:
Scope Properties
39
Network ID Lease duration Scope name
Network IP
address range
DHCP Reservation:
A reservation is a specific IP address, within a scope, that is permanently reserved for leased use to a
specific DHCP client
DHCP options:
DHCP options are configuration parameters that a DHCP service assigns to clients along with the IP
address and default gateway
DNS
DNS = Domain Name System
Chức năng
Dùng phân giải tên miền thành địa chỉ IP và ngược lại
Lịch sử:
• Mỗi node
40
Tầng Transport:
Server:
• Primary NS
• Secondary NS
Client - Resolver
Thuật ngữ:
Name space:
Domain:
Zone:
Là một vùng domain tương ứng với “biên” quản lý trong DNS
Phân loại:
Tên đầy đủ
41
<hostname> + <domain name> + “.”
VD: www.cntt.khtn.edu.vn.
Lưu trữ:
Lưu dữ liệu dưới dạng các resource record – RR (name, value, type, ttl)
• Name: hostname
• Value: IP address
• Name: IP addr.
• Value: hostname
Update:
A dynamic update is the process of a DNS client dynamically creating, registering, or updating its
records in zones that are maintained by DNS servers that can accept and process messages for
dynamic updates
A manual update is the process of an administrator manually creating, registering, or updating the
resource record
Dynamic update enables DNS client computers to interact automatically with the DNS server
to register and update their own resource records
42
Organizations that have dynamic changes can benefit from the dynamic method of
updating DNS resource records
Are in a smaller environment that has few changes to their resource records
Have isolated instances, such as when a larger organization chooses to control every
address on every host.
43
What Are Resource Records and Record Types?
44
Nghi thức được dùng trong việc gửi nhận email được ghi nhận
Gửi email: Dùng nghi thức SMTP , Simple mail transfer protocol
Nhận email: Dùng nghi thức POP, Post Office Protocol và IMAP hay
Internet Message Access Protocol
b. Nguyên lý chung khi thiết lập cấu hình dịch vụ email là xác định nghi
thức sử dụng để Gửi/Nhận email. Thiết lập email server sử dụng nghi
thức SMTP và thiết lập hệ thống email account. Thiết lập Chứng chỉ
(certificate) nếu có, thiết lập policy gửi nhận email bao gồm mail hợp lệ,
độ lớn hộp mail, và cách sử lý mail rác.
45
20.2 Transport: RDT3.0, PIPE Line, TCP
Tầng vận chuyển transport:
Phân đoạn thông điệp ở tầng ứng dụng thành các segment
Dán nhãn dữ liệu: đóng gói theo giao thức tại tầng Transport
Chuyển thông điệp lên tầng ứng dụng (đến socket tương ứng)
Hỗ trợ
Không hỗ trợ
Source port
Destination port
46
Một số ứng dụng sử dụng UDP
DNS
SNMP
47
TFTP
…
RDT 1.0
RDT 3.0
Pipeline
Go-back-N
Bên gởi
Bên nhận
Bên nhận
Bên gởi
48
Hành động khi phát hiện mất gói
RDT 3.0:
Bên gởi
• Gởi gói tin kèm theo thông tin kiểm tra lỗi
• Dừng và chờ đến khi nào gói tin vừa gởi đến được bên nhận an toàn: nhận
được gói tin ACK
• Gởi lại khi có lỗi xảy ra: lỗi bit, mất gói
Bên nhận:
Phiên bản:
RDT 1.0
RDT 3.0
Giả thiết:
Lỗi bit
mất gói
Giải pháp:
• bên gửi đợi một khoảng thời gian hợp lí cho ACK
• Gửi lại nếu không nhận đc ACK trong khoảng thời gian này
– Bên nhận phải xác định thứ tự của gói tin đã ACK
49
• Yêu cầu đếm thời gian
50
Rdt3.0 làm việc, nhưng không hiệu quả
PipeLine:
Cho phép gởi nhiều gói tin khi chưa nhận ACK
Bên nhận: lưu gói tin đã nhận đúng nhưng chưa đúng thứ tự
51
Giải quyết mất gói
Go back N
Bên gởi:
Sử dụng buffer (“window”) để lưu các gói tin đã gởi nhưng chưa nhận được ACK
52
Thiết lập đồng hồ cho gói tin cũ nhất (gói tin ở đầu “window”)
Timeout: gửi lại tất cả các gói tin chưa ACK trong window
Bên nhận:
Chỉ gửi ACK cho gói tin đã nhận đúng với số thứ tự cao nhất
53
Gửi lại có chọn:
Bên nhận:
54
Bên gởi:
Time out: chỉ gửi những gói tin không nhận được ACK
55
TCP:
rfc: 793,1122,1323,2018,2581
Point – to – point
Full-duplex
56
TCP = Transport Control Protocol
Pipeline
57
Source & destination port
Sequence number
Acknowledgment number
Window size
Thô ng bá o có thể nhậ n bao nhiêu byte sau byte cuố i cù ng đượ c xá c nhậ n đã nhậ n
Checksum
Urgent pointer
Cờ:
58
ACK = trường Acknowledge number valid
RST = chỉ định nối kết cần thiết lập lại (reset)
Nguyên tắ c: dù ng pipeline
Sử dụ ng ACK để bá o nhậ n
TCP bên gử i:
Nhậ n dữ liệu từ tầ ng ứ ng dụ ng
Tạ o cá c segment
Bậ t đồ ng hồ (nếu chưa bậ t)
59
Nhậ n gó i tin ACK
Reset đồ ng hồ
Chấ p nhậ n
Gở i ACK trù ng
60
TCP thiết lậ p kết nố i:
TCP đó ng kết nố i:
61
TCP quả n lý kết nố i:
Nguyên nhâ n:
Bên gở i là m trà n bộ đệm củ a bên nhậ n khi gở i quá nhiều dữ liệu hoặ c gở i quá nhanh
62
Kiểm soá t tắ t nghẽn:
Buffer: giớ i hạ n
gó i tin: đến ồ ạ t
Mấ t gó i
Delay cao
63
Bên gở i:
– Nhậ n ACK
– Mấ t gó i
– Độ trễ gó i tin
Tố c độ gở i: có 2 pha
– Slow-Start
– Congestion Avoidance
64
20.3 Internet: IP, IP Routing, NAT
65
66
IP:
qui định cách thức đóng gói dữ liệu truyền trên đường truyền
Tạo bảng định tuyến Đóng gói gói tin tại tầng mạng
• A protocol is a set of rules that determines how computers communicate with each other across
networks.
• A routed protocol allows the router to forward data between nodes on different networks.
• In order for a protocol to be routable, it must provide the ability to assign a network number
and a host number to each individual device.
• The Internet Protocol (IP) is the most widely used implementation of a hierarchical network-
addressing scheme.
• At the network layer, the data is encapsulated within packets (also known as datagrams).
• Packet includes header - addressing and other control information + actual data - whatever is
passed down from the higher layers.
Routed Protocol
67
Version (4)
version của IP
Ít sử dụng
Identifier (16):
Khi một gói tin IP bị chia nhỏ ra thành nhiều đoạn, thì mỗi đoạn được gán cùng số ID
Flag (3)
68
DF
MF
Khi 1 gói tin bị chia nhỏ, tất cả các gói nhỏ (trừ gói tin cuối cùng), bit này được
bật lên
Protocol (8)
Chỉ ra nghi thức nào ở tầng transport mà gói tin đang sử dụng
Options (32)
Data:
69
NAT:
Giải quyết:
– Dùng địa chỉ public khi giao tiếp bên ngoài Internet
70
71
Inside local address: địa chỉ dùng trong mạng LAN
Inside global address: địa chỉ dùng để giao tiếp bên ngoài (được nhà cung cấp dịch vụ cấp)
Outside local address: địa chỉ IP bên ngoài của 1 host trong mạng LAN
Static
dynamic
Static
72
Cố định: 1 local IP 1 global IP
Dynamic
n local IP m global IP
Overloading
n local IP 1 global IP
Overlapping
73
74
75
Bài toán về NAT
Yêu cầu:
Các máy tính trong LAN: 192.168.1.0/24 có thể truy cập ra ngoài bằng IP: 172.29.1.1
Bên ngoài có thể truy cập dịch vụ FTP trên máy 192.168.3.253
Private: 192.168.1.1
Public: 172.29.1.1
Incoming port: 80
Outgoing port: 80
76
20.4 Network access: Checksum, Ethernet
Ethernet vs OSI
Ethernet là một loạt các công nghệ mạng và hệ thống được sử dụng trong các mạng cục bộ (LAN),
nơi các máy tính được kết nối trong một không gian vật lý chính.
Các hệ thống sử dụng giao tiếp Ethernet chia luồng dữ liệu thành các gói, được gọi là các khung.
Khung bao gồm thông tin địa chỉ nguồn và đích cũng như các cơ chế được sử dụng để phát hiện lỗi
trong dữ liệu được truyền và yêu cầu truyền lại.
Một mạng LAN là một cấu hình mạng hoặc topology. Vậy Ethernet là gì? Ethernet là
một trong số những phương tiện mà bạn có thể sử dụng để tạo ra một mạng LAN, bao
gồm cả Wi-Fi, Bluetooth và USB. Những thứ này có thể được sử dụng để tạo ra một
mạng cục bộ hoặc có thể cùng tồn tại trong cùng một mạng. Trong khi mạng không dây
có sự tiện lợi riêng của nó thì Ethernet vẫn giữ nhiều vai trò quan trọng, như:
Ethernet vẫn là kết nối facto cho những máy trạm trong các mạng doanh nghiệp.
Kể cả khi trong mạng không dây hoàn chỉnh (mạng gia đình) thì kết nối giữa
cáp / DSL modem và router là Ethernet.
Các hoạt động băng thông như chơi trò chơi hay phát trực tuyến vẫn được
hưởng lợi từ kết nối Ethernet có dây.
Mạng Ethernet tiếp tục cung cấp lợi ích của bảo mật vật lý.
77
Những phần chính của thiết bị mạng trong một mạng Ethernet là cáp Category-5 mà
chạy giữa hai cổng RJ-45. Một mạng Ethernet cơ bản có thể chứa ba phần: hai nút với
cổng RS-45 và cáp chạy giữa chúng. Trong một mạng gia đình, điều này tương đương
với việc cắm thiết bị của bạn (như Xbox) trực tiếp vào cổng của modem cáp.
Các mạng phức tạp hơn sử dụng các yếu tố như hub và router. Điều quan trọng để nhớ
là các hub kết nối mạng nội bộ và router kết nối nó với những mạng bên ngoài. Tất cả
đều có thể kết hợp với một mạng bao gồm các kết nối Ethernet tới những thiết bị như
máy tính hoặc máy chủ và các kết nối không dây với máy in, điện thoại, máy tính bảng,
thiết bị ngoài phạm vi có dây.
78
Về cơ bản không phải tất cả các mạng LAN đều là Ethernet. Ethernet là một trong
những phương tiện lâu đời nhất và theo nhiều cách thì vẫn tốt nhất cho mạng LAN
ngày nay. Nhưng mạng lưới đã phát triển vượt ra ngoài loại kết nối này. Và trong khi
Ethernet vẫn là một yếu tố quan trọng trong hầu hết các mạng LAN trong gia đình và tại
văn phòng thì chúng không phải là một và giống nhau.
– Ethernet operates in two areas of the OSI model, the lower half of the data link layer, known as
the MAC sublayer and the physical layer.
– Figure maps a variety of Ethernet technologies to the lower half of OSI Layer 2 and all of Layer
1. Ethernet at Layer 1 involves interfacing with media, signals, bit streams that travel on the
media, components that put signals on media, and various topologies. Ethernet Layer 1
performs a key role in the communication that takes place between devices, but each of its
functions has limitations. Layer 2 addresses these limitations.
79
CHECK SUM
Checksum
Parity check:
Phân loại:
Parity 1 chiều
Parity 2 chiều
Hamming code
CHECKSUM:
Bên gởi
d bits trong DL gởi đi được xem như gồm N số k bits: x1, x2, …, xN
Tính tổng X = x1 + x2 + … + xN
….
80
Sum = 0010
Checksum = 1101
Bên nhận:
tính tổng cho tất cả giá trị nhận được (kể cả giá trị checksum).
Nếu tất cả các bit là 1, thì dữ liệu nhận được là đúng; ngược lại: có lỗi xảy ra
VD:
ETHERNET
Chuẩn 802.3
Đồ hình mạng:
• Bus
• Star
81
Ethernet – cấu trúc frame
Preamble (8 bytes)
82
địa chỉ MAC của card mạng nhận gói tin tiếp theo
Type (2 bytes)
10Base2
10Base5
10BaseT
100BaseTX
83
100BaseFX
Gigabit Ethernet
84
1000BASE-LX Fiber optics 5000 m
1000BASE-CX STP 25 m
“Cánh cửa” giữa ứng dụng và giao thức tầng transport (TCP, UDP)
Một socket là một end-point của một liên kết giữa hai ứng dụng
4. Giao thức tầng ứng dụng khi trao đổi dữ liệu giữa hai end-host
5. Lập trình
TCP:
Giai đọan 1: Server tạo Socket và lắng nghe yêu cầu kết nối tại PORT
Giai đọan 2: Client tạo Socket, yêu cầu thiết lập một nối kết với Server
85
UDP:
86
22. Networking media: wire (coaxial, UTP, Fiber Optical), wireless
Phương tiện truyền dẫn: là môi trường dùng để truyền tín hiệu từ nơi này đến nơi khác
Phân loại:
Chi phí
Tốc độ
Nhiễu
An toàn
87
Cấu tạo:
Dây dẫn trung tâm: dây đồng hoặc dây đồng bện
Dây dẫn ngoài: dây đồng bện hoặc lá bảo vệ dây dẫn trung tâm khỏi nhiễu điện từ
và được nối đất để thoát nhiễu.
Phân loại:
88
• chiều dài cáp tối đa: 500m
Cấu tạo:
Mức độ xoắn (trên 1m dây) càng cao thì khả năng chống nhiễu crosstalk càng cao
Phân loại:
UTP – S/UTP :
EMI: dễ bị nhiễu
89
Đầu nối: RJ-45
• Sự khúc xạ
• Sự phản xạ
Không bị nhiễu
90
Cáp quang – connectors
91
Cáp quang – thành phần
Tx: biến đổi tín hiệu điện thành xung ánh sáng
Rx (PIN photodiode): chuyển xung ánh sáng thành tín hiệu điện
92
Wireless: PTTD vô tuyến
Là loại đường truyền sử dụng không khí làm vật mang tín hiệu thay cho cáp.
Radio
Viba
Laser
Vệ tinh (satellites)
…
93
So sánh các loại Phương thức truyền dẫn:
94
Limitations: LAN Media
– Bandwidth varies depending upon the type of media as well as the LAN and WAN technologies
used. The physics of the media account for some of the difference. Signals travel through
twisted-pair copper wire, coaxial cable, optical fiber, and air. The physical differences in the
ways signals travel result in fundamental limitations on the information-carrying capacity of a
given medium. However, the actual bandwidth of a network is determined by a combination of
the physical media and the technologies chosen for signaling and detecting network signals. For
example, current understanding of the physics of unshielded twisted-pair (UTP) copper cable
puts the theoretical bandwidth limit at over one gigabit per second (Gbps). However, in actual
practice, the bandwidth is determined by the use of 10BASE-T, 100BASE-TX, or 1000BASE-TX
Ethernet. In other words, the actual bandwidth is determined by the signaling methods, network
interface cards (NICs), and other items of network equipment that are chosen. Therefore, the
bandwidth is not determined solely by the limitations of the medium. Figure shows some
common networking media types along with the limits on distance and bandwidth when using
the indicated networking technology.
95
96
23. Networking devices: modem, Repeater, Hub, Bridge, Switch, Router
Tầng 1: modem, repeater, hub
Tầng 3: router
Là thiết bị cho phép các máy tính truyền thông với nhau qua mạng điện thoại
Chức năng:
Điều chế [Modulate]: chuyển đổi tín hiệu số (digital) trên máy tính thành tín hiệu tương
tự (analog) trên điện thoại.
Giải điều chế [Demodulate]: chuyển đổi tín hiệu tín hiệu tương tự trên điện thoại thành
tín hiệu số trên máy tính
97
Hub: Là thiết bị mạng cho phép tập kết dây dẫn mạng
Tín hiệu vào 1 port của Hub sẽ được chuyển ra tất cả các port
Phân loại:
Passive hub:
Active Hub
Intelligent Hub
Là 1 active hub
Chuyển mạch (switching): chuyển tín hiệu đến đúng port của máy nhận
Chức năng: Tái sinh tín hiệu mạng và chuyển tín hiệu mạng đến các segment mạng còn lại
Đặc điểm:
98
Bridge: Là thiết bị mạng cho phép nối kết 2 nhánh mạng vật lý
Chức năng: chuyển có chọn lọc các gói tin đến nhánh mạng chứa trạm nhận gói tin.
• MAC – Port
Nếu trạm nhận cùng segment với trạm gởi, hủy gói tin; ngược lại chuyển gói tin đến
segment đích
Đặc điểm:
Cho phép mở rộng cùng một mạng logic với nhiều kiểu chạy cáp khác nhau
Tách một mạng thành nhiều phần nhằm giảm lưu lượng mạng.
Không có khả năng tìm đường đi tối ưu trong trường hợp có nhiều đường đi.
Hỗ trợ full-duplex
MAC – Port
Chức năng:
99
Học địa chỉ MAC (self –learning)
Filtering/Forwarding
Tránh loop
Store-and-forward
Cut-through
Fragment-free
Switch – VLAN
100
Router: Chức năng:
• Chạy các thuật toán định tuyến (OSPF, RIP, BGP,…) tạo ra bảng định tuyến
• Chuyển gói tin từ cổng vào (incoming port) ra cổng ra (outcoming port)
NIC:
Là thiết bị chuyển đổi tín hiệu máy tính thành tín hiệu trên phương tiện truyền dẫn và ngược lại
Cung cấp kết nối vật lý đến phương tiện truyền dẫn
101
Access Point
Thành phần:
Bộ thu: thu tín hiệu radio và chuyển thành tín hiệu mạng
Ngày nay, một số AP còn tích hợp chức năng của 1 Router
Kết nối nhiều máy tính trong 1 Net SW, Hub, Bridge
Collision domain (miền đụng độ): là miền có khả năng xảy ra đụng độ
Hai segment thuộc cùng 1 collision domain nếu chúng gây ra collision khi đồng thời gởi
dữ liệu xuống đường truyền
Broadcast domain (miền broadcast): là miền nhận được gói tin broadcast
102
Gồm nhiều collision domain (1 – n)
Collision domain A và B thuộc cùng 1 broadcast domain nếu các node mạng trong
collision domain B nhận được gói tin broadcast từ 1 node trong collision domain A
Repeater
Hub
…
Switch
Bridge
Router
Switch (VLAN)
103
II. Yêu cầu kỹ năng
1. Chia subnet
2. Triển khai cài đặt các dịch vụ nền của 1 hệ thống mạng: DHCP, DNS. E-mail
3. IPSec
8. Socket programming
104