Chapter 1 - Concept of Computer Networks (6 Files Merged)
Chapter 1 - Concept of Computer Networks (6 Files Merged)
1 3
1 3
About me Topics
• Dr. Tran Nguyen Ngoc
• Introduction to computer networks
• Computer Engineering Department, SoICT, HUST
• Basic concepts of computer communication
• Email: model (OSI)
• [email protected] • Details of each layer
• [email protected] • Physical Layer
• Office: • Data-link Layer
• 405 - B1 (working office) • Internet/ Network Layer
• Routing problem
• Transport Layer
• Application Layer
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
2 4
1 2
Assessment In 12/1969, after 3 months
• Progress (50%)
• Practical labs (60%)
• Mid-term examination (40%)
• Attendance (HUST regulation) SRI UTAH
• No absence: +1 point
UCSB
• Missing 3 or more: -1 point UCLA
5 7
Originated from an
experiemental project of ARPA
Intially having only two nodes
(IMP atUCLA and IMP at SRI).
Source:
http://www.cybergeography.org/
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
atlas/historical.html One node was added each month
Source: http://www.cybergeography.org/atlas/historical.html
School of Information and Communication Technology School of Information and Communication Technology
6 8
6 8
3 4
Years 70s
9 11
9 11
source:
Traffic each day not more than 3.000.000 package
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
http://www.cybergeography.org/
School of Information and Communication Technology
atlas/historical.html 10 12
10 12
5 6
1981: Beginning of NSFNET More network to join and more protocol
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
13 15
13 15
Source: http://www.cybergeography.org/atlas/historical.html 14 16
14 16
7 8
Years 90s Development of the Internet in Vietnam
Begining of 90s:
Begining of Web End of 1990’s – 2000’s:
HTML, HTTP:
• Many new Internet
Berners-Lee applications was introduced:
1994: Mosaic, • Chat, file sharing P2P…
Netscape • E-commerce, Yahoo, Ebay,
Amazon, Google…
End of 90s: • > 50 millions hosts, > 100
Commercialized the millions users.
Internet
17 19
17 19
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
18 20
9 10
Bandwidth to the world (Mbps), 3rd Quarter Some fixed internet subscription technologies
2007
• Dial-up:
• 56kbps,
• use public telephone lines,
• Data are transmitted over the same frequency with voice,
• Old technology, popular before 2000
• ADSL, xDSL:
FPT, 2635
• few Mbps,
EVN, 400 • use public telephone lines,
SPT, 200 • Data are transmitted over the different frequency with voice,
HanoiTelecom,
4
• popular between 2000-2010
Vietel, 2056
VNPT, 6820
• Internet over TV cable
• Use TV cable to carry data
• FTTH
• several dozen Mbps,
• Use optical fiber
• Popular nowadays.
Total: 12115.0 Mbps
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
21 23
21 23
22 24
22 24
11 12
International Internet data volume 2019 Internet management in Việt Nam
• VNNIC
• Is responsible for managing the Internet domain
name, address in Việt Nam;
• Provides guidelines, statistics about Internet and
participates in international activity about Internet.
• VNIX: Vietnam National Internet eXchange
• switching system between national ISP.
25 27
25 27
26 28
26 28
13 14
International connections International connections
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
29 31
29 31
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
30 Source: https://www.submarinecablemap.com 32
30 32
15 16
Optical fiber under the ocean Concepts
A set of computers/nodes
connecting to each other according
to an architecture in order to
exchange data
Computer/node: workstation,
server, router, mobile phone .etc
with information processing
capacity
They connect to each other by a
media (wired or wireless)
Arcording to an archirecture
Different kind of computers
Source: https://www.submarinecablemap.com
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
33 35
33 35
Example of networks
• Computer networks
• The Internet
• Ethernet
Concepts of computer •
•
Wireless LANs: 802:11
…
networks • Banking system (ATM networks)
• Traffic light networks
• Train networks (our new train systems in Hanoi
and HCM city)
• Power, gas networks (in developed countries)
34 36
34 36
17 18
Centralized or distributed What is a protocol?
Hi request
PSTN Internet non response
ok response
• Centralized: Network Computer has stronger
does everything power Thời gian
Most functions are
Protocol between human being: Protocol between
implemented at host vocabulary, procedure
machines
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
37 39
37 39
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
38 40
38 40
19 20
Communication media Computer network classification
• Physical medium that can carry signal • MAN – Metropolitian Area Network
• Classification: • Scope: hundreds of km
• Wired media: twisted pair, coaxial cable, optical fiber,… • #users: Millions
• Wireless media: radio wave, microwave, infrared wave,…
• To serve a metro, area
• Some characteristics:
• Bandwidth (băng thông): width of the frequency band could be • WAN – Wide Area Network
used for carrying signal • Scope: thousands of km
• fmin: minimum frequency, fmax: maximum frequency • #users: billions
• Bandwidth = fmax - fmin
• BER – Bit Error Rate= nb of error bits/nb of transmitted bits) • GAN – Global Area Network: over the world
• Attenuation (suy hao): signal power decrement level (ex: Internet)
gradual loss of signal strength - travels over a transmission medium
-> impacts quality and reliability
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
41 43
41 43
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
42 44
42 44
21 22
MAN GAN
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
45 47
45 47
WAN Internet
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
46 48
46 48
23 24
Internet Internet: Network of networks(2)
• Network of networks • Connect each access network to a relay stations of a global ISP
access access
network access network access access
net net
network access
net
access
access net
net
access
access net
net
Internet global
access
network
access
net
ISP access
net
access
network net
access
net
access access
net access net
net
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
49 51
49 51
• Directly connect one network with all others? • Add more ISP...
access
Internet relay station
access access
access net net
net net access
access net
net access
access net
net access
access net
net
access access
IXP access
net
access net
net
net
ISP A
Not scalable:
access
net
Number of access
net
access
net
IXP
ISP B
access
net
access
connections O(n2) access
ISP C
net
net access
access net
Peer-to-peer
net
access
access net
net access
access net
net access access
access access net access net
net access net net
net
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
50 52
50 52
25 26
Internet: Network of networks(4) Problem
• Add regional networks... • Point-point connection between two hosts
access
access
net
access
net A B
net
access
access net
net
access
IXP access
net
net
ISP A
• Connection parameters:
IXP • Bandwith - R: maximum amount of data transmitted within a time
access
access
net ISP B net unit (bps – bit per second).
• Example: optical cable has the bandwidth of 100Mbps.
ISP C
access
net • Latency: transmission delay from A to B
access
net • Propagation delay: Connection length / speed of signal
access
net regional net • Example: optical cable has the length of 10 km, speed of light
access
net
(3 x 108m/s) 10 x 103/(3 x 108) ~ 3.333 x 10-5 = 0.03333 ms
access access
net access net • Transmission delay: data size / bandwidth
net
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
53 55
53 55
Point-point connection
Time for signal to reach
• Transfer 100B from A to B the destination: 1ms
A B
1Mbps, AB = 200km
Transmission models
time=0
Time to transfer
Timing of the first bit
1 bit = 1/106s
reaching B
Transmission time 100Byte packet
= 1/106+1/103s
800 bits=800x1/106s
Packet switching vs. Circuit switching
Connection oriented vs. Connectionless Timing of the last bit
Time Reaching B
(800x1/106)+1/103s
= 1.8ms
54 56
54 56
27 28
Exercise Connecting hosts
Bus model
• Point-to-multipoint:
• Single communication medium is used for all hosts
• Each packet with the size of 1000 bytes need to broadcast communication
transfer through optical cable with the bandwidth • Weakness: long physical link, few hosts can
of 100 Mbps. Cable length is 100km. Calculate communicate simultaneously
• A) Time for the source to send a packet
• B) Time for one bit to reach the destination (assume A
that the propagation speed is 200000 km/s)
• C) Number of packages can be appeared on the
transmission medium
• D) The practical speed, if each sent bit need to be
X
replied by an ACK bit by the destination
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
57 61
57 61
• Using direct links between all pairs of hosts • Solution: switching network
• A link: a segment of medium without any processing unit in the middle • Each host connects to be switching devices
• Weakness: too many links, distance limitation.
• Switching devices connect point-to-point and forward data to
the destination
• Share resources
Question: How to
G D determine the routes?
A Answer: Routing
3
1
C 5 B
2
E F
4
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
60 62
60 62
29 30
Circuit switching End-to-end data transmission time in circuit switching
10Mb/s?
A 10Mb/s?
3 10Mb/s? Setup
1
10Mb/s? circuit
5 B
2 Transmit
data Information
(1) A requires to establish a channel
4 (2) Switching devices establish the channel time
(3) A starts data transmission
(4) A finish its transmission: send a signal to Teardown
terminate the channel circuit
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
63 65
63 65
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
64 66
64 66
31 32
Cons : case of idle chanel (“blank” channel) Cons: fault channel
Sw1 Sw2
A
3
1
5
B
Setup 2
4
Transmit Transfer
data Information
• Have to restart from the channel establishment stage if
t errors happen
teardown
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
67 69
67 69
Setup
Transmit data
Information
Data
Teardown
Header
t
01000111100010101001110100011001 header
payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
68 70
68 70
33 34
Example of packet switching Transmission time in packet switching
Switch forwards a packet only A Sw B
after receiving all the packet
(store and forward)
h
payl
d
oad r
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
71 73
71 73
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
72 74
72 74
35 36
Switching performance Queue
1
• Packet switching network : Probability of more
than 10 users to send data at the same time 1
P(k = 10) = C3010 x 0.110 x 0.920 = 0.00037
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
75 77
75 77
Queue Queue
Queue(FIFO) Queue(FIFO)
2 2
1 1
1 Mbps
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
76 78
76 78
37 38
Queue Packet loss
2 2 1 1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
79 81
79 81
Bandwidth
Throughput
Queue(FIFO)
MTU (Maximum Transmission Unit)
Latency
• Delay on end nodes
• Delay on intermediate nodes
• Transmission delay
• Propagation delay
Package loss
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
80 82
80 82
39 40
r_s: sender rate
r_c: channel capacity
r_s < r_c -> throughput limited by the sender's rate
r_s > r_c -> throughput limited by the capacity of the channel
• Bandwidth - R
Rs < Rc What is the average throughput?
• In telecommunication: bandwidth= fmax - fmin
• In computer networks: Maximum amount of data
can be transmitted in a unit of time over a link (bps Rs bits/sec Rc bits/sec
– bit per second).
• Ex: optical fiber has bandwidth of 1000Mbps.
Rs > Rc What is the average throughput?
Rs bits/sec Rc bits/sec
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
83 85
83 85
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
84 86
84 86
41 42
Latency Queuing delay
a L
Transmission delay
R
A Propagation delay a
R: bandwidth(bps)
C D L: size of packet (bits)
B
Processing delay a: coming speed of packet
Queue delay
87 89
87 89
Transmission delay
A Propagation delay • RTT: = t3 – t0
A B
C D T = t0
B
Processing delay
Queue delay
88 90
88 90
43 44
MTU Connection oriented vs connectionless communication
• Maximum Transmission Unit: maximum size of a packet can be sent on the • Connection oriented communication:
connection
• Data is transmitted over a connection already setup
• Example: Ethernet has MTU of 1526 byte
• 3 phase of communication
• Why? • Setup connection
• Reason 1: reduce error rate • Data transmission
• BER = error bits / total sent bits constant • Tear down connection
• Ex: BER = 10-3 send 1000 bits will yield 1 error bit • Connection setup allows to make sur that receiver is ready for
• If L = 1000 bit probability of a packet having error(s)? the communication more reliable
• If L = 100 bit probability of a packet having error(s)? • More control mechanism can be performed before the data
• Reason 2: reduce the probability (or data size) of sending lost packets transmission to enhance it QoS
• Queue size: N byte
• If L = 1000 byte: full queue lost packet resend it send 1000 bytes
• Connectionless
• If L = 100 byte: full queue ? • No connection is setup, there is only data transmission phase
• Conclusion: reducing MTU will reduce the size of re-sending data • Not reliable
• “Best effort” QoS, sending data as quick as possible.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
91 93
91 93
• Too small MTU will reduce performance of data • Introduction to the course
transmission
• History of the Internet
• Explanation :
• Packet: header + payload • Concept of Computer Networks
• Header: Constant • Architecture
• Performance:
• Topology
• Protocol
H=
• Circuit switching vs. packet switching
• Pros & cons
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
92 94
92 94
45 46
Devide and conquer principle
95 97
95 97
Example
• Parties at the same level performs similar tasks and use the same
information communication methods.
Compagny A Compagny B
Prepare idea of contract
Director Director
Natural language
96 98
96 98
47 48
Example of layers
Reference models
Cassette
OSI
Sound system All functionalities are put TCP/IP
on the same box
Player
Speaker
When we want to upgrade:
Amplifier Upgrade the whole box
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
99 101
99 101
• Allow to determine the responsibility of each layer Presentation layer Tầng trình diễn
and the relationship amongst them
Session layer Tầng phiên
• Allow to maintain and upgrade easily the system
Transport layer Tầng giao vận
• Changes in some parts do not influence the other
parts. Network layer Tầng mạng Tầng mạng
• Ex: upgrade a media lecture from CD lecture to Tầng liên kết dữ liệu
DVD lecture without the need to change speakers. Data link layer
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
100 102
100 102
49 50
The main functionality of each layers ISO/OSI reference model
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
103 105
104 106
104 106
51 52
Data Encapsulation Data Encapsulation
...
...
addr.
H2 ... Layer 2 Layer 2 H2 ...
Put address
Sender Receiver
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
107 109
107 109
...
...
Protocols at each layer include: Protocol P2
...
Layer 2 Layer 2
• Call a service of the below layer
• Provide service(s) for the upper layer Protocols of Protocol P1
layer 2 Layer 1 Layer 1
Protocols of
layer 1 • Layers (same level) on each side use the same protocol to
exchange logical information
• Two way to communicate logical information at the same logical
level: connectionless or connected-oriented
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
108 110
108 110
53 54
PDU: Protocol Data Unit The protocols TCP/IP and encapsulation process
• At sender
• Each layer add control information to the header of packet
and transfer to the lower layer.
Protocol N+1
• At receiver
• Each layer process packet according to the information of
Layer (N+1) (N+1) PDU the header, then remove the corresponding header and
deliver the remaining data to the upper layer.
Service interface Ex:HTTP header
Application Application
Protocol N Data Data
IP header IP IP
Service interface
Protocol N-1 Ethernet Frame Network Interface Network Interface
addr.
Layer (N-1) (N-1) PDU HN HN-1
Physical Physical
Signal
Sender Receiver
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
111 113
111 113
SAP SAP IP IP IP IP
Dữ liệu - payload
SAP: is a conceptual location at which one OSI layer can request the services
of another OSI layer
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
112 114
112 114
SAP: a logical interface or point where one layer of a network stack
communicates with another layer, or where a service is made available to
upper layers (service available to upper without knowing exactly activities of
lower 55 56
Protocol stack and encapsulation Protocol stack and encapsulation
IP IP IP IP IP IP IP IP
Ethernet/10M 10M 10G 10G 100M Ethernet/100M Ethernet/10M 10M 10G 10G 100M Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5 CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node End node Intermediate node End node
TCP header Dữ liệu - payload Ethernet header IP header TCP header Dữ liệu - payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
115 117
115 117
IP IP IP IP IP IP IP IP
Ethernet/10M 10M 10G 10G 100M Ethernet/100M Ethernet/10M 10M 10G 10G 100M Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5 CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node End node Intermediate node End node
IP header TCP header Dữ liệu - payload Ethernet header IP header TCP header Dữ liệu - payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
116 118
116 118
57 58
Protocol stack and encapsulation Protocol stack and encapsulation
IP IP IP IP IP IP IP IP
Ethernet/10M 10M 10G 10G 100M Ethernet/100M Ethernet/10M 10M 10G 10G 100M Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5 CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node End node Intermediate node End node
IP header TCP header Dữ liệu - payload WDM header IP header TCP header Dữ liệu - payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
119 121
119 121
IP IP IP IP IP IP IP IP
Ethernet/10M 10M 10G 10G 100M Ethernet/100M Ethernet/10M 10M 10G 10G 100M Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5 CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node End node Intermediate node End node
WDM header IP header TCP header Dữ liệu - payload IP header TCP header Dữ liệu - payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
120 122
120 122
59 60
Protocol stack and encapsulation Protocol stack and encapsulation
IP IP IP IP IP IP IP IP
Ethernet/10M 10M 10G 10G 100M Ethernet/100M Ethernet/10M 10M 10G 10G 100M Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5 CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node End node Intermediate node End node
Ethernet header IP header TCP header Dữ liệu - payload IP header TCP header Dữ liệu - payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
123 125
123 125
IP IP IP IP IP IP IP IP
Ethernet/10M 10M 10G 10G 100M Ethernet/100M Ethernet/10M 10M 10G 10G 100M Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5 CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node End node Intermediate node End node
Ethernet header IP header TCP header Dữ liệu - payload TCP header Dữ liệu - payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
124 126
124 126
61 62
Protocol stack and encapsulation Unicast, Multicast, Broadcast protocols
• Unicast protocol: control data to send to one
FTP FTP
destination node
• Multicast protocol: control data to send to
TCP
multiple destination nodes
TCP
IP IP IP IP
• Broadcast protocol: control data to send to all
Ethernet/10M 10M 10G 10G 100M Ethernet/100M nodes
CAT5 CAT5 WDM WDM CAT5 CAT5
Dữ liệu - payload
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
127 129
127 129
Identification in the
• An upper layer makes use of the functionality of its right
bellow layer but does not care about further layer.
• Extensibility/Scalability
• Flexible
• It is possble to upgrade the communication system by
Internet
upgrading the technology of some layers: Ex:
• ADSL→FTTH MAC Address
• IPv4→IPv6 IP Address
Port number
• Without layering:
• Any change in the system requires changing the whole
systems.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
128 130
128 130
63 64
Identification Identification in the Internet and the relationship between layers
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
131 133
131 133
00:11:24:79:8e:82
• 1 Dai Co Viet street, Hai Ba Trung district, Ha Noi Hanoi
• Telephone number HEX
• +84-(4) 868-08-96 Hai Ba Trung BIN 00000000 00010001 00100100 01111001 10001110 10000010
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
132 134
132 134
65 66
Addressing in the Internet Addressing in Application layer
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
135 137
135 137
• Port number
• On each machine, there may be several applications running.
• Applications of the same machine are distinguished by port
number.
• An application instance in the internet is identified by the IP
address of the host and port number on which it runs
• Similar to the address of a room in a building
• Buiding address: B1 Building, 1 Dai Co Viet, Ha Noi => similar
to IP address
• Room number 325 => Similar to port number
• E.g. HTTP runs on port 80, FTP runs on ports 20, 21 …
• http://bidv.vn:81
.keio.ac.jp
pc24.cs.keio.ac.jp
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
136 138
136 138
67 68
Domain name and IP address Address resolution/conversion
• For sending data to a host/machine, the host must be identified
• By an IP address Concept
• By a domain name (easy to be memorized by human) Mechanism finding address IP from a domain name
• name and vice versa.
• Variable length There is no mathematical formula for this conversion.
• easy to be memorized by human
• Nothing to do with the location of the host Domain name server (DNS)
• IP address Store the mapping of IP address and Domain name of
• Fixed length (32 bits or 128 bits)
the same host in a database
• Computer process address more easily Answer requests to resolve IP addresses or domain
• Used for routing purpose names from users.
Widely used in the Internet
203.162.7.194 www.hedspi.hut.edu.vn
www.hust.edu.vn 202.47.142.40
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
139 141
139 141
140 142
140 142
69 70
Nslookup tools on Windows, Linux Example: ARP table (on Windows)
• nslookup www.soict.hust.edu.vn
• Conversion “name⇔ IP address”
C:\Documents and Settings\hongson>arp -a
IP address
C:\>nslookup www.soict.hust.edu.vn Interface: 192.168.1.34 --- 0x2
Server: Internet Address Physical Address Type
Address: 192.168.1.1 192.168.1.1 00-02-cf-75-a1-68 dynamic
192.168.1.33 08-00-1F-B2-A1-A3 dynamic
Non-authoritative answer:
Name: www.soict.hust.edu.vn C:\Documents and Settings\hongson>
Address: 202.191.56.68
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
143 145
143 145
Layer architecture
• Address Resolution Protocol Why layering
• MAC and IP are both used for identifying a NIC. Model TCP/IP vs. Model OSI
• ARP allows to find MAC address from IP address Encapsulation, PDU. SAP
Addressing on Internet
Adress IP, MAC, domain name, port
32bit IP address
Address conversion
ARP RARP
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
144 146
144 146
71 72
10/4/2024
Quizz
147 1
147 1
Overview
73 1
10/4/2024 10/4/2024
Analog Signal
“Digital” Signal
Bit Stream 0 0 1 0 1 1 1 0 0 0 1
0100010101011100101010101011101110000001111010101110101010101101011010111001
Packets
Header/Body Header/Body Header/Body
Packet
Transmission Sender Receiver
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
3 5
3 5
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
4 7
4 7
2 3
10/4/2024 10/4/2024
8 10
8 10
11
9 11
4 5
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
12 14
12 14
13 15
13 15
6 7
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
16 School of Information and Communication Technology School of Information and Communication Technology
18
16 18
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
17 School of Information and Communication Technology School of Information and Communication Technology
19
17 19
8 9
10/4/2024 10/4/2024
• Radio wave:
• Wavelengths: 1mm – 100.000km
• Frequencies: 3 Hz – 300 GHz
• Ex: Bluetooth, WIFI
• Microwave:
• Wavelengths: 1mm-1 m
• Frequencies: 300 MHz-300 GHz
• Terrestrial microwave : metro connection, cellular
communication
• Satelite microwave: TV, long distance telephone
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
20 22
20 22
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
21 23
21 23
10 11
10/4/2024 10/4/2024
0
1010 A B
A B 1
0 1 2 3 4 5 N-2 N-1 N
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
24 26
24 26
Topology Point-to-point
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology 27 School of Information and Communication Technology
25
25 27
12 13
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
28 30
28 30
• Common character of point-to-multipoint The medium interface is defined according to different aspects:
topo is to use a unique medium to connects Mechanism
Define the form of the interface, number of pins for assuring
multiple nodes. the interfaces match together
• Data is broadcasting over the medium Electrics
Define the level of voltage to be used
• Collision when two nodes transmit signal in Define the length of pulse (frequency)
the same time Define enconding method
Functionalities
• Need a control mechanism to allow a single Functionality of each pins
node to transmit multiple access method There are 4 groups of pins: data, control, synchronization,
see in Datalink layer. ground
Procedure
Lists of events to perform for transmitting data
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
29 School of Information and Communication Technology School of Information and Communication Technology
31
29 31
14 15
10/4/2024 10/4/2024
Example: EIA-232-E/RS-232
32 34
32 34
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
33 35
33 35
16 17
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
36 38
36 38
Line coding: represent digital data by digital signals Some line codes
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
37 10/4/2024 39
37 39
18 19
10/4/2024 10/4/2024
During bit time, signal does not go back to 0 level Three aspects should be considered in any
Signal level is not changed during bit time. encoding method:
NRZ-L Non return to zero level Data speed: number of bits could be sent per second
Bit 1 signal is in low/high level given symbol rate
Bit 0 signal is in high/low level
1 bit 1 symbol Clock recovery on receiver side: If the clock recovery is
correctly at receiver side, the received signal can be incorrectly
seperated into symbols cause error in the received data.
DC-component: Directed Current vontage
Signal baseline
component.
DC-component makes recepter mistakenly detect level of
signal (by wrongly detect signal baseline)
Signal baseline
Encoding should avoid DC-component by maintaining signal
mean amplitude around 0.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 40 42
40 42
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 41 10/4/2024 43
41 43
20 21
10/4/2024 10/4/2024
Baseline
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 44 10/4/2024 46
44 46
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 45 10/4/2024 47
45 47
22 23
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 48 10/4/2024 50
48 50
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology 51 School of Information and Communication Technology
10/4/2024 49
49 51
24 25
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 52 10/4/2024 54
52 54
• Draw the signal generated when we encode • Example: data transmission over telephone line
• Telephone line accept signal with frequencies between 300Hz -
following data using different encodings: 3400Hz
• 11000000 11001101 • Digital data from the source must be modulated to analog signal to
transmit over telephone line.
• NRZ-L
• Bipolar AMI • 3 modulation techniques:
• Amplitude-Shift Key
• Manchester • Frequency-Shift Key
• Phase-Shift Key
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 53 10/4/2024 56
53 56
26 27
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology 59 School of Information and Communication Technology
10/4/2024 57
57 59
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
58 School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 60
58 60
28 29
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 61 10/4/2024 63
61 63
Constellation diagram • Used to digitalize real life analog signal, for example voice signal.
• Converting the analog signal to digital data then
• Encode digital data to digital signal for transmission.
• Using line codes: NRZ-L, Manchester etc…
• Two methods for converting analog signal to digital data
• Pulse Code Modulation
• Delta Modulation
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 62 10/4/2024 64
62 64
30 31
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10/4/2024 65 67
65 67
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
66 10/4/2024 68
66 68
32 33
10/4/2024 10/4/2024
10/4/2024 69 1
69 1
34 1
10/4/2024 10/4/2024
“link”
• Network nodes:
• PCs, Laptop, Routers,
Server… Framing Flow control
• Links:
• Communication chanel Media Access Control
between adjacent nodes
• Wired link: Ethernet LAN,
ADSL, fiber optic… Addressing Error control
• Wireless link: Wi-fi, FSO,
Satellite,…
Datalink layer
• Datalink layer responsibility:
• Transmit data between
adjacent elements.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
3 5
3 5
4 6
4 6
2 3
10/4/2024 10/4/2024
Error control
• Error detection
• Error correction
7 9
7 9
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
8 10
8 10
4 5
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
11 13
11 13
A check bit is added to the original data to ensure that the • Sender:
total number of bit 1 is even (even parity code) or odd (odd • Divides data into small parts of n bit
parity code) • Calculates binary sum of all parts. If there are some overflow bit,
• Single code add the overflow bit to the result.
• Able to detect single bit error • Alters all bits (two’s complement) to get the checksum
• Sends the checksum with data
12 14
6 7
10/4/2024 10/4/2024
Overflow
10001 Y
N
bit 1 <D’, R’> mod G = 0 ?
Bits to send: 0011 0110 1000 1101 Link with bit errors
17
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
15
15 17
16 18
8 9
10/4/2024 10/4/2024
19 21
19 21
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
20 22
20 22
10 11
10/4/2024 10/4/2024
010010
10011 send pkt0
000011011 pkt0 is
OK
10011 rcv ACK
send pkt1
010001 pkt1 is
10011 corrupted
10011
Time
00101 🡪 not 0 🡪 errors
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
25
23
23 25
24 26
12 13
10/4/2024 10/4/2024
Time
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
29
27
27 29
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
28
30
28 30
14 15
10/4/2024 10/4/2024
Stop-and-wait
• Principles
• Transmitter sends a single frame
• Receiver receives the frame, process and then
informs the transmitter that it is ready to receives
next frames by a clear acknowledgement (ACK).
• Transmitter waits until reception of the ACK before
Flow control sending next frames.
31 33
31 33
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
32 34
32 34
16 17
10/4/2024 10/4/2024
• Advantage Packet
Paquets Packet
Paquets
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
35 37
35 37
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
36 38
36 38
18 19
10/4/2024 10/4/2024
• Chanel division:
• Resources of the media is divided into small parts (time -
TDMA, frequency- FDMA, Code- CDMA)
• Distribute a part to each nodes
• Random access:
• Chanel is not divided; all nodes are allowed to access
Media access control simultaneously with collision possibility
• Need a mechanism to avoid collision
• e.g. Pure Aloha, Slotted Aloha, CSMA/CD, CSMA/CA…
• Sequent access:
• Nodes can send data one after the other.
• Token Ring, Token Bus….
39 41
39 41
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
40 42
40 42
20 21
10/4/2024 10/4/2024
frequency
time
TDMA:
frequency
43 45
43 45
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
44 47
44 47
22 23
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
48 50
48 50
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
49 51
49 51
24 25
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
52 54
52 54
• Used in Ethernet
• CSMA with Collision
Detection:
• “Listen while talk”. polling:
• A sender listen to the master node “invites” other nodes
channel, to transmit in turn data
poll
• If the channel is free then typically used with “dumb”
transmit data devices master
• While a station transmit data, it
listens to the channel. If it concerns: data
detects a collision then transmits
a short signal warning the
collision then stop
• polling overhead
• Do not continue the
transmission even in collision as
• latency
slaves
CSMA • single point of failure (master)
• If the channel is busy, wait
then transmit with
probability p
• Retransmit after a random
waiting time.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
53 55
26 27
10/4/2024 10/4/2024
Token Ring
A “token” is passed from
T
one node to the other in
a ring topo
Only the token holder can
transmit data (nothing
After finishing sending to send) Point-to-Point forwarding
mechanism
data, the token need to T
be passed to next nodes.
Some problem
Time consuming in passing Hub, Switch, Bridge
token
Loss of token due to some
reasons data
56 58
56 58
• Token Repeater:
Repeats the bits received in one port to the other
• What do you thinks about their advantages and port
weaknesses ? One network with repeaters = one collision domain
Repeater is a physical layer system.
Hub:
Receive the signal from one port (amplify ) and
forward to the remaining ports
Do not offer services of datalink layer
Layer 1 intermediate system
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
57 59
57 59
28 29
10/4/2024 10/4/2024
Hub Bridge
bridge
hub hub
60 62
60 62
Bridge
More intelligent than hub
Can store and forward data (Ethernet frame) hosts have dedicated, direct
according to MAC address. connection to switch A
Bridge breaks the network into two collision switches buffer packets C’ B
domains. Ethernet protocol used on each 1 2
incoming link, so: 6
Layer 2 intermediate system • no collisions; full duplex 5
3
4
Switch • each link is its own collision
domain B’ C
A’
More ports than bridge switching: A-to-A’ and B-to-B’ can transmit
Can store and forward data according to simultaneously, without collisions switch with six
interfaces (1,2,3,4,5,6)
MAC address
Receive full frame, check error, forward
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
61 63
30 31
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
64 66
Q: how does switch know A’ reachable via when frame received at switch:
interface 4, B’ reachable via interface 5? A 1. record incoming link, MAC address of sending host
C’ B
A: each switch has a switch table, each 2. index switch table using MAC destination address
entry: 1 2 3. if entry found for destination
(MAC address of host, interface to reach
6
3 then {
5
host, time stamp) 4 if destination on segment from which frame arrived
looks like a routing table! (Network layer) B’ C then drop frame
A’
else forward frame on interface indicated by entry
Q: how are entries created, maintained }
in switch table? else flood /* forward on all interfaces except arriving interface */
something like an algorithm?
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
65 67
32 33
10/4/2024 10/4/2024
Source: A
Dest: A’
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
68 70
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
69 71
34 35
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
72 74
73 75
73 75
36 37
10/4/2024 10/4/2024
• Roles:
• Connect with protocols of Network Layer: IPX, DCE, IP,
v.v..
• With different physical layers: cable, wireless, optical
WLAN • Functionalities:
• Multiplexing/ Demultiplexing
Traditional bus • Flow control with 3 different modes:
topo • Unacknowledged connectionless
• Acknowledged connectionless
• Connection mode
• Frame structure:
• DSAP & SSAP: Destination/Source SAP, for
Multiplexing/ Demultiplexing of the upper layer (which
entity of the Network Layer is sending/ receiving LLC
frames)
hub, switch • Control: define PDU to transfer and control:
• U-frame: send/receive in connectionless mode (U: Unnumbered)
• I-frame: frame with information (I: Information), used in
acknowledged mode
Ring Star • S-frame: for controlling (S: Supervisor)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
76 78
76 78
• IEEE 802.1 Network Management • Error checking and flow control (I-frame and S-frame) are
• IEEE 802.2 Logical link control used by some upper protocols (NetBIOS).
• IEEE 802.3 Ethernet (CSMA/CD) • U-frame encapsulate PDU without numbering (unnumbered)
• IEEE 802.4 Token bus and therefore NO flow control or error checking are
• IEEE 802.5 Token Ring provided.
• IEEE 802.6 Metropolitan Area
Networks • Most upper protocols of LLC (TCP/TP) support error
• IEEE 802.7 Broadband LAN using checking and flow control
• IEEE 802.12 demand priority
Coaxial Cable
• Only use LLC as “Unacknowledged connectionless” with U-frame.
• IEEE 802.8 Fiber Optic TAG • IEEE 802.14 Cable modems
• IEEE 802.9 Integrated Services • IEEE 802.15 Wireless PAN
LAN
• IEEE 802.10 Interoperable LAN • IEEE 802.15.1 (Bluetooth)
Security
• IEEE 802.15.4 (ZigBee)
• IEEE 802.11 Wireless LAN
• IEEE 802.16 WiMAX
• V.v…
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
77 79
77 79
38 39
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
80 84
80 84
MAC protocol
application and frame format
transport
network 100BASE-TX 100BASE-T2 100BASE-FX
link 100BASE-T4 100BASE-SX 100BASE-BX switch
physical
bus: coaxial cable star
copper (twister fiber physical layer
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology pair) physical layer TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
81 85
81 85
40 41
10/4/2024 10/4/2024
Standards
802.11b 802.11g
Band 2.4-5 GHz (unlicensed Band 2.4-5 GHz
spectrum) Maximum speed 54
Maximum speed 11 Mbps Mbps
86 88
86 88
87 89
87 89
42 43
10/4/2024 10/4/2024
• 802.11: CSMA
• 802.11: CA – Collision Avoidance
• It is difficult to implement Collision detection (CD) in
wireless environment.
• In some cases, it is even impossible to detect the collision :
hidden terminal, fading
A B C
C
A’s signal C’s signal
B strength strength
A
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
space
School of Information and Communication Technology School of Information and Communication Technology
90 92
90 92
91 93
91 93
44 45
10/4/2024 10/4/2024
Idea: Sender can reserve channel without random access DIFS DIFS DIFS DIFS
avoid collision for long frame boe bor boe bor boe busy
station1
Sender send frame RTS (request-to-send) to BS using CSMA
RTS may meet a collision (with low probability because station2
boe busy
Avoid collision thanks to the reservation busy Using channel boe backoff time (elapsed)
made by small size control frames
Request to send data bor backoff time (residual)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
94 96
94 96
A B
AP
2 2 6 6 6 2 6 0 - 2312 4
frame address address address seq address
reservation collision duration payload CRC
control 1 2 3 control 4
Address 4: Using in
adhoc mode
Address 1: address of
the destination Address 3: MAC address of
the router attached to the
DATA (A) AP
defer
Address 2: address of the source
time
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
95 97
95 97
46 47
10/4/2024 10/4/2024
Internet
H1 R1 router
AP
Virtual LAN
R1 MAC addr AP MAC addr
dest. address source address
802.3 frame
802.11 frame
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
98 100
98 100
frame seq #
Duration of the reservation (RTS/CTS) (ACK)
Q: what happens as LAN sizes scale, users change point of attachment?
2 2 6 6 6 2 6 0 - 2312 4
single broadcast domain:
frame address address address seq address
duration payload CRC scaling: all layer-2 broadcast traffic
control 1 2 3 control 4
(ARP, DHCP, unknown MAC) must
cross entire LAN
Computer efficiency, security, privacy issues
Science EE
2 2 4 1 1 1 1 1 1 1 1
Protocol To From More Power More
Type Subtype Retry WEP Rsvd
version AP AP frag mgt data
frame type
(RTS, CTS, ACK, data)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
99 101
48 49
10/4/2024 10/4/2024
Q: what happens as LAN sizes scale, users change point of attachment? traffic isolation: frames to/from ports
single broadcast domain: 1-8 can only reach ports 1-8
scaling: all layer-2 broadcast traffic • can also define VLAN based on MAC
addresses of endpoints, rather than
(ARP, DHCP, unknown MAC) must switch port
cross entire LAN
dynamic membership: ports can be
efficiency, security, privacy, efficiency
Computer dynamically assigned among VLANs
issues
7 9 15
Science
1
EE 2 8 10 16
CS user moves office to EE - physically routing (just as with separate EE (VLAN ports 1-8) CS (VLAN ports 9-15)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
102 104
switch(es) supporting
2 8 10 16 2 4 6 8
2 8 10 16
… … … … …
VLAN capabilities can
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
be configured to define EE (VLAN ports 1-8) CS (VLAN ports 9-15) Ports 2,3,5 belong to EE VLAN
Ports 4,6,7,8 belong to CS VLAN
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
103 105
50 51
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
106 108
107 109
52 53
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
110 112
Technologies for connecting to ISP using cable Optical access network: FTTx
111
111 113
54 55
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
114 116
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
115 117
56 57
10/4/2024
10/4/2024
1
118
119
2
58
1
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
3 5
3 5
4 6
4 6
2 3
10/4/2024 10/4/2024
• Connectionless-oriented protocol
Transport layer: TCP, UDP
• Unreliable / Fast
Routing protocol ICMP
• Data transmission using 'best effort' method
• Routing • Notify errors • IP lacks error recovery mechanisms
Network • RIP, OSPF,
BGP
• Check network node status
• When needed, applications will use upper-layer
layer services to ensure reliability (TCP)
IP
• Identification • It is a routed protocol
•
Encapsulation • Requires routing protocols to pre-determine
• Forwarding
• QoS
paths for data.
link layer • Currently, there are 2 versions: IPv4 and IPv6.
physical layer
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
7 9
7 9
8 10
8 10
4 5
10/4/2024 10/4/2024
11 13
11 13
12 14
12 14
6 7
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
15 17
15 17
Solution…
● CIDR: Classless Inter Domain Routing
● Network ID part will have variable length.
● Length of Network ID part is specified in Network mask
● Address notation: a.b.c.d/x, where x (mask) the number of
bit of Network ID part.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
16 18
16 18
8 9
10/4/2024 10/4/2024
● Network mask divides the IP address into two parts • Network mask: /n
● Part corresponding to Host ID
● Part corresponding to Network ID • Network size: The maximum nodes in a
• Representation: network
• Prefix: /n. Example: /27 • IP Address: NetworkID HostID
• n: Number of bits of NetworkID
• Binary representation:
n bit (32-n) bit
1 1 . . . . . . . . . . 1
0
0 . . . . . . . . . . . . . . . . 0
• The number of addresses for hosts (Unicast
Address):
n bits /27 = 11111111 11111111
• Example: (32 11111111
– n) bits 11100000 232-n - 2
• Decimal representation with dot: 255.255.255.224
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
19 21
19 21
20 22
20 22
10 11
10/4/2024 10/4/2024
Subnet Principle
● Hosts of a subnet 223.1.2.1 ●Take some bits from HostID part to distinguish
communicate directly
223.1.1.2
223.1.1.4 223.1.2.9
subnets
without reaching to ● each subnet contains IP addresses with a fixed values
layer 3. 223.1.2.2 of subnet ID.
223.1.1.3 223.1.3.27
● Usually is one
department of an subnet Host ID
Network ID
organization
223.1.3.1 223.1.3.2
● Design question: How
to assign addresses of a subnetID
network to subnets
A network with 3 subnets.
● Use a longer netmask
network ID of each subnet
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
23 25
23 25
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
24 26
24 26
12 13
10/4/2024 10/4/2024
28 30
Attention about IP
29 31
29 31
14 15
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
32 34
32 34
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
33 35
33 35
16 17
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
36 38
36 38
2800 3999
Offset = 2800/8 = 350
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
37 39
37 39
18 19
10/4/2024 10/4/2024
42
40 42
Forwarding table
Forwarding table
Forwarding table
dest address outgoing port
net1. address/net.mask 1
1
3 2
41 43
41 43
20 21
10/4/2024 10/4/2024
Example – Forwarding table on a host Routing table and forwarding mechanism (1)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
44 46
44 46
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
45 47
45 47
22 23
10/4/2024 10/4/2024
Destination address:
11.1.2.5 = 00001011.00000001.00000010.00000101
Route 1:
11.1.2.0/24 = 00001011.00000001.00000010.00000000
4.5. Internet Control Message Protocol
Route 2:
11.1.0.0/16 = 00001011.00000001.00000000.00000000
Route 3: Packet format
11.0.0.0/8 = 00001011.00000000.00000000.00000000 Ping and Traceroute
48 50
48 50
• S1: If TTL = 1 (or TTL = 0), discard the packet and • IP is unreliable, connectionless
report an error. End. • Lack of supporting and error control mechanism
• S2: If TTL > 1, retrieve the destination address (DA) of
the packet. Mask the destination address of the packet • ICMP is used in network layer for providing
with the destination network masks. information exchange between sender and
• S3: Compare the masked result with the corresponding
receivers
destination network address. If a matching destination • Error information: inform that a packet cannot reach
network is found, forward to the corresponding a host, a network or a port.
outgoing port, and decrement TTL. • Also in network layer but is “above” IP
• S4: If no matching destination network is found, check • ICMP message is encapsulated in IP
the default outgoing port (corresponding to 0.0.0.0/0). • ICMP message: Type, Code, with 8 first bytes of the
• If there is a default port: Forward the packet to the default error IP message
port and decrement TTL.
• If there is no default port: Discard the packet and report an IP header ICMP message
error.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
49 51
49 51
24 25
10/4/2024 10/4/2024
3 Destination Unreachable
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
52 54
52 54
Data
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
53 55
53 55
26 27
10/4/2024 10/4/2024
3 probes
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
56 58
56 58
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
57 59
57 59
28 29
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
60 62
60 62
Static NAT
61 63
30 31
10/4/2024 10/4/2024
64 66
64 66
• The NAT router automatically maps a range of • Also known as NAT overloading
private IP addresses to a range of public IP • It is a special form of dynamic NAT to further
addresses so that computers can access the utilize the IPv4 address space
Internet when needed.
• Allows multiple private IP addresses to map to a
• In contrast to static NAT, the administrator single registered public IP address with
does not need to configure a specific private IP different port numbers
address to be associated with a specific public
IP address. • Thus, PAT uses unique sockets to map to each
device
• Any private IP address will be assigned and
automatically translated to one of the available
(idle) public IP addresses in the public address
pool by the NAT router.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
65 67
65 67
32 33
10/4/2024 10/4/2024
Dynamic NAT – Port Address Translation - Example MAC address and ARP
Src: 202.191.56.15:2001 Src: 10.0.0.31:6000
Dst: a.b.c.d:443 Dst: a.b.c.d:443 • Address Resolution Protocol
Src: a.b.c.d:443 • Finding the MAC address (data link layer identifier)
Src: a.b.c.d:443
Dst: 202.191.56.15:2001 Dst: 10.0.0.31:6000 of a network node when the IP address is known
• Why is ARP needed?
• Communication on the network layer uses IP addresses
• Communication on the data link layer uses MAC
Src: ? Src: 10.0.0.32:7000 addresses
Dst: a.b.c.d:443 Dst: a.b.c.d:443 • During transmission: data moves from the network layer
to the data link layer.
• Data sent within a LAN: The source device needs to know the
MAC address of the destination device
NAT Table Inside IP Outside IP
• Data sent outside the LAN: The source device needs to know
10.0.0.31:6000 202.191.56.15:2001 the MAC address of the default router
10.0.0.32:7000 202.191.56.15: 2002
68 70
137.196.7.78
ARP
1A-2F-BB-76-09-AD • IP/MAC address mappings for
some LAN nodes:
4.7. Address resolution protocol
ARP
69 71
69 71
34 35
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
72 74
72 74
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
73 75
73 75
36 37
10/4/2024 10/4/2024
▪ A creates IP datagram with IP source A, destination B ▪ R determines outgoing interface, passes datagram with IP source A, destination B
▪ A creates link-layer frame containing A-to-B IP datagram to link layer
• R's MAC address is frame’s destination ▪ R creates link-layer frame containing A-to-B IP datagram. Frame destination
address: B's MAC address
MAC src: 74-29-9C-E8-FF-55 MAC src: 1A-23-F9-CD-06-9B
MAC dest: E6-E9-00-17-BB-4B MAC dest: 49-BD-D2-C7-56-2A
IP src: 111.111.111.111 IP src: 111.111.111.111
IP dest: 222.222.222.222 IP dest: 222.222.222.222
IP IP
Eth Et
Phy h
Ph
A B A y
B
R R
111.111.111.111 111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222 74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A 49-BD-D2-C7-56-2A
222.222.222.220 222.222.222.220
1A-23-F9-CD-06-9B 1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110 111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F 88-B2-2F-54-1A-0F
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
76 78
▪ frame sent from A to R ▪ R determines outgoing interface, passes datagram with IP source A, destination B
▪ frame received at R, datagram removed, passed up to IP to link layer
▪ R creates link-layer frame containing A-to-B IP datagram. Frame destination
address: B's MAC address
MAC src: 74-29-9C-E8-FF-55 MAC src: 1A-23-F9-CD-06-9B
IP src: 111.111.111.111
MAC dest: E6-E9-00-17-BB-4B
IP dest: 222.222.222.222
▪ transmits link-layer frame MAC dest: 49-BD-D2-C7-56-2A
IP src: 111.111.111.111 IP src: 111.111.111.111
IP dest: 222.222.222.222 IP dest: 222.222.222.222
IP
IP IP IP Eth
Eth Eth Eth Phy
Phy Phy Phy
A B A B
R R
111.111.111.111 111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222 74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A 49-BD-D2-C7-56-2A
222.222.222.220 222.222.222.220
1A-23-F9-CD-06-9B 1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110 111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F 88-B2-2F-54-1A-0F
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
77 79
38 39
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
80 82
Client Server
• DHCP Discover: find • DHCP Offer: Offer the
DHCP Server information of IP
• DHCP Request: address
4.8. Dynamic Host register to use an IP • DHCP ACK:
Configuration Protocol (DHCP) address Acknowlege the
• DHCP Release: release registration
the using IP address • DHCP NAK: Refuse
• DHCP Decline: Refuse the registration
the offered IP address
81 83
40 41
10/4/2024 10/4/2024
223.1.1.2
223.1.2.5 extension
• No DHCP ACK, then t =
223.1.1.4 223.1.2.9
Other Server
223.1.1.3 223.1.3.27 arriving DHCP client needs 0.875*T, client sends the t = 0.875*T
223.1.2.2 address in this network broadcast DHCP Request
223.1.3.1 223.1.3.2 • No DHCP ACK, while t =
T, client sends DHCP
Discover t=T
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
84 86
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
85 87
42 43
10/4/2024 10/4/2024
• Tăng tốc độ xử lý
• Khuôn dạng header đơn giản hơn
• Không phân mảnh gói tin
• Hỗ trợ QoS tốt hơn
• Về an toàn an ninh
• Sử dụng IPSec như một chuẩn
4.9: Introduction about IPv6 • Tự động cấu hình
• Chuẩn hóa cơ chế tự động cấu hình
88 90
88 90
• Xuất phát từ nhu cầu thực tế: địa chỉ IPv4 cạn
kiệt, không đủ để cấp phát
• Cải ến trên IPv6:
• Mở rộng không gian địa chỉ
• Sử dụng địa chỉ có độ dài 128 bit
• Phân vùng địa chỉ(scope)
IPv6 address
Không gian địa chỉ IPv4 Không gian địa chỉ IPv6
89 91
89 91
44 45
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
92 94
92 94
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
93 95
93 95
46 47
10/4/2024 10/4/2024
96 98
Version Traffic Class Flow Label ● In IPv6, the extension header is put in the payload
(4 bit) (8 bit) (20 bit) section
Payload Length Next Header Hop Limit
(16 bit) (8 bit) (8 bit) Extension Extension Extension
・
Header Header Header
・
Source address ・
(128bit)
Fixed length (40byte) Extension headers if having
Destination address Main information
(128bit)
Next header Ext. header length
(8 bit) (8 bit)
Payload(including extension headers
if having and datagram of the upper layer protocol)
97 99
48 49
10/4/2024 10/4/2024
100 102
100 102
Router Router
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
101 103
101 103
50 51
10/4/2024 10/4/2024
Destination? (
Looking for route)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
104 106
104 106
105 107
105 107
52 53
10/4/2024 10/4/2024
108 110
108 110
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
109 111
109 111
54 55
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
112 114
112 114
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
113 115
113 115
56 57
10/4/2024 10/4/2024
Exercises
116 120
116 120
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
118
10.0.0.0/24 192.168.0.0/24 172.16.0.0/24 172.16.1.0/24
118 121
58 59
10/4/2024 10/4/2024
• Static routing
• Entries in routing table are added manually by • When there is a failure: Internet
Next-hop 10.0.0.1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
122 124
122 124
Next-hop 10.0.0.3
• Cons
• Very stubborn
Routing table of 10.0.0.1 (extract)
• Back up link cannot be used
Prefix Next-hop 10.0.0.1 • Difficult to manage
0.0.0.0/0 10.0.0.3
Next-hop 10.0.0.1
Unreachable route
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
123 125
123 125
60 61
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
126
126 128
Routing protocols
routers
4.12: Routing algorithm and
n
transport
network
link
protocols
k k
link link
destination host
physica datacenter
“least congested”
transport
enterprise network
network link
physical
• routing: a “top-10”
networking challenge!
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
127 129
62 63
10/4/2024 10/4/2024
• Graph with nodes (routers) and edges (links) • Routing information is needed for each node to
• Link “cost” c(x,y) build routing tables
• Bandwidth, delay, cost, congestion level… • Global or decentralized routing information?
• Determine least cost path from every node to • Global:
every other node • all routers have complete topology, link cost info
• “link state” algorithms
5
• Decentralized:
3 • router knows physically-connected neighbors, link costs to
v w
2 5 neighbors
u • iterative process of computation, exchange of info with
2 1 z neighbors
3
1 • “distance vector” algorithms
2
x y • “friend of friend is friend”
1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
130 132
130 132
• A tree that links go out from root to leaves ▪ centralized: network topology, link notation
• The unique path from root to any node v is the costs known to all nodes ▪ cx,y: direct link cost from
shortest path from the root to v • accomplished via “link state node x to y; = ∞ if not direct
broadcast” neighbors
• Each node has a different SPT • all nodes have same info ▪ D(v): current estimate of
cost of least-cost-path from
▪ computes least cost paths from source to destination v
5 one node (“source”) to all other
▪ p(v): predecessor node
3 nodes
v w 5 v w along path from source to v
2 • gives forwarding table for that node ▪ N': set of nodes whose least-
u 2 1 z u z ▪ iterative: after k iterations, know cost-path definitively known
3
1 2 least cost path to k destinations
x 1
y x y
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
131 133
64 65
10/4/2024 10/4/2024
1 Initialization:
5
2 N' = {u} /* compute least cost path from u to all other nodes */
3 for all nodes v v 3
w
2 5
4 if v adjacent to u /* u initially knows direct-path-cost only to direct neighbors */
5 then D(v) = cu,v /* but may not be minimum cost! */ u 2 1 z
3
6 else D(v) = ∞ 1 2
x y
7 1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
134 136
v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z) v w x y z
D(v), D(w), D(x), D(y), D(z), x
0 u 2,u 5,u 1,u ∞ ∞ 9
Step N' p(v) p(w) p(x) p(y) p(z)
1 ux 2,u 4,x 2,x ∞
0 u 7,u 3,u 5,u ∞ ∞ 5 7
2 uxy 2,u 3,y 4,y 4
3 uxyv 3,y 4,y 1 uw 6,w 5,u 11,w ∞ 8
4 uxyvw 4,y
2 uwx 6,w 11,w 14,x 3 w z
5 uxyvwz u y
2
Initialization (step 0): For all a: if a adjacent to then 3 uwxv 10,v 14,x
3
5 D(a) = cu,a 4 uwxvy 12,y 7 4
3 v
v w 5 5 uwxvyz
2
u find a not in N' such that D(a) is a minimum
2 1 z
1
3 add a to N' notes:
x 2 update D(b) for all b adjacent to a and not in N' :
y ▪ construct least-cost-path tree by tracing predecessor nodes
1
D(b) = min ( D(b), D(a) + ca,b ) ▪ ties can exist (can be broken arbitrarily)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
135 137
66 67
10/4/2024 10/4/2024
Main ideas:
At each node:
Based on Bellman-Ford (BF) equation (dynamic programming): ● Distance vector: vector of all distance
from the current node to all other nodes Wait for a DV from
Bellman-Ford equation
● Each node send periodically the its neighbor
Let Dx(y): cost of least-cost path from x to y. distance vector to its adjacent nodes
Then:
● When a node x receives a distance Re-calculate its DV
Dx(y) = minv { cx,v + Dv(y) }
vector, it updates its distance vector by
using equation Bellman-ford
v’s estimated least-cost-path cost to y ● With some condition, the distance Dx(y) If DV changes, Inform its
min taken over all neighbors v of x direct cost of link from x to v in each vector will converge to the smallest neighbor
value of dx(y)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
140
138 140
Suppose that u’s neighboring nodes, x,v,w, know that for destination z:
DV in :
Dv(z) = 5 Dw(z) = 3 Bellman-Ford equation says: Da(a)=0
Da(b) = 8
5 Da(c) = ∞ a b c
Du(z) = min { cu,v + Dv(z), Da(d) = 1 8 1
3 w
v cu,x + Dx(z), Da(e) = ∞
u
2 5
cu,w + Dw(z) } t=0 Da(f) = ∞
2
3
1 z Da(g) = ∞ 1 1
1 2
= min {2 + 5, Da(h) = ∞
x 1
y 1 + 3,
Da(i) = ∞
d A few asymmetries:
5 + 3} = 4 ▪ All nodes have 1
e
1
f
▪ missing link
Dx(z) = 3 distance estimates to
nearest neighbors ▪ larger cost
node achieving minimum (x) is
(only) 1 1 1
next hop on estimated least-
cost path to destination (z) ▪ All nodes send their
local distance vector
to their neighbors g h i
1 1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
139 141
68 69
10/4/2024 10/4/2024
a b c a b c
8 1 8 1
t=1 1 1
t=1 1 1
All nodes: All nodes:
▪ receive distance vectors ▪ receive distance vectors
from neighbors from neighbors
d e f d e f
▪ compute their new local 1 1 ▪ compute their new local 1 1
distance vector distance vector
▪ send their new local ▪ send their new local
distance vector to 1 1 1 distance vector to 1 1 1
neighbors neighbors
g h i g h i
1 1 1 1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
142 144
a
compute 8 compute
b
1
compute
c a
8
b
1
c
t=1 1 1
t=2 1 1
All nodes: All nodes:
▪ receive distance vectors ▪ receive distance vectors
from neighbors from neighbors
d compute
e compute
f d e f
▪ compute their new local compute 1 1 ▪ compute their new local 1 1
distance vector distance vector
▪ send their new local ▪ send their new local
distance vector to 1 1 1 distance vector to 1 1 1
neighbors neighbors
g h i
compute g h i
compute 1 compute 1 1 1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
143 145
70 71
10/4/2024 10/4/2024
compute
a
2
compute
b
1
compute
c …. and so on
t=2 1 1 Let’s next take a look at the iterative computations at nodes
All nodes:
▪ receive distance vectors
from neighbors
▪ compute their new local d
compute 1
compute
e
1
compute
f
distance vector
▪ send their new local
distance vector to 1 1 1
neighbors
g
compute 8 compute
h 1 compute
i
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
146 148
g h i g h i
1 1 1 1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
147 149
72 73
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
150 152
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
151 153
74 75
10/4/2024 10/4/2024
Distance vector: state information diffusion Distance vector: link cost changes
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
154
154 156
Distance vector: link cost changes Comparison of Link-state and Distance vector
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
157
155 157
76 77
10/4/2024 10/4/2024
1
Hierarchical structure of the Internet
• Internet = network of networks
• Such networks can select its own routing policy
(routing domain)
• Such networks are called autonomous system (AS)
AS 2
AS 5
4.13: Hierarchical routing AS 1
AS 4
AS 3
Autonomous System
Intra and Inter domain routing
158 160
158 160
2
Making routing scalable Autonomous System (AS)
• A set of routers with the same routing policy (routing protocol,
metric…) is aggregated into an AS
our routing study thus far - idealized
• Gateway: router connect between two ASes
• all routers identical
• Each AS has an unique number (ASN - 16 bits or 32 bits).
• network “flat”
… not true in practice
2914 NTT-COMMUNICATIONS-2914 - NTT America, Inc.
3491 BTN-ASN - Beyond The Network America, Inc.
scale: billions of destinations: administrative autonomy: 4134 CHINANET-BACKBONE No.31,Jin-rong Street
▪ can’t store all destinations in ▪ Internet: a network of networks 6453 GLOBEINTERNET Teleglobe America Inc.
routing tables! ▪ each network admin may want to 24087 VNGT-AS-AP Vietnam New Generation Telecom
▪ routing table exchange would control routing in its own network 24066 VNNIC-AS-VN Vietnam Internet Network Information Center
swamp links! 17981 CAMBOTECH-KH-AS ISP Cambodia
……………………………….
Source: http://www.cidr-report.org
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
159
161
159 161
78 79
10/4/2024
Slide 160
1 Combine 5 and 6
sonnh, 3/8/2008 Number of AS by time
Slide 161
2 Explain about AS
sonnh, 3/9/2008
Source: http://www.potaroo.net/
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
162
162
163
80
10/4/2024 10/4/2024
AS1 EGP
forwarding table configured by
intra- and inter-AS routing IGP OSPF domain
Intra-AS
Routing
Inter-AS
Routing algorithms IGP
forwarding ▪ intra-AS routing determine entries for
table
destinations within AS EGP
▪ inter-AS & intra-AS determine entries RIP domain EGP
for external destinations EGP
intra-AS
3c AS4 EGP IGP
routing3a inter-AS routing intra-AS
2c AS3
3b 2a routing IGP
1c
2b RIP domain
AS3 intra-AS
1a routing 1b AS2 IGP
1d OSPF domain
AS1
RIP domain
AS5
RIP domain
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
166
164 166
RIP
OSPF
165 167
165 167
81 82
10/4/2024 10/4/2024
u destination hops
v To 133.27.4.0/24
u 1 1 hop
w Net B
A B v 2
w 2 Router
133.27.5.0/24
Router D
x 3 B To 133.27.4.0/24
x y 3 2 hop
z C D z 2
y
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
168 170
168 170
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
169 171
169 171
83 84
10/4/2024
Slide 172
4
4 Explain in opposite way: How B is annouced
3
Review: DV routing (4) sonnh, 3/9/2008
Router A Router
C
To 133.27.4.0/24
1 hop
Net B
Router
133.27.5.0/24
Router D
B
To 133.27.4.0/24
2 hop
172
172
173
173
85
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
174 176
174 176
5
RIP timer (2) RIP: to avoid this loop
When it is timeout,
Routing info will be deleted
from routing table
0 30 60 90 120 150 180 210 240 270 300 330 360 390 420
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
175 177
175 177
86 87
10/4/2024
Slide 177
▪ IGP
▪ “open”: publicly available - standard by IETF (current version, version
3, defined in RFC 2740)
▪ classic link-state
• each router floods OSPF link-state advertisements (directly over IP rather
than using TCP/UDP) to all other routers in entire AS
• multiple link costs metrics possible: bandwidth, delay
• each router has full topology, uses Dijkstra’s algorithm to compute
forwarding table (Shortest Path First)
▪ Advanced features
• security: all OSPF messages authenticated (to prevent malicious intrusion)
• Large AS: Hierarchical OSPF
• Classless routing (able to use Variable-Length Subnet Masking -VLSM )
• Different metric for each link based on TOS (is not used in practice)
178
6
Hierarchical OSPF
• Area
• Group of routers which share the same LSA
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
179
179
88
10/4/2024
Slide 179
180
181
181
89
10/4/2024 10/4/2024
LSAX
(c) (d)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
182 184
182 184
183 185
183 185
90 91
10/4/2024
Slide 187
7 Exchanged informatio
Neighbor & Adjacency Rip:
OSPF
sonnh, 3/9/2008
• Neighbor and adjacency are different concept!
• Adjacency: router which exchange the routing
information each other
• Neighbor: routers have a direct link
• Broadcast multi-access network (e.g Ethernet)
• Neighbor != Adjacency
• Point-to-point network
• Neighbor == Adjacency
• Non Broadcast Multi-access network (e.g. ATM)
• Exchanging data using unicast
186
186
7
RIP vs. OSPF
RIP OSPF
Characteristics • Flat relation • Support hierarchy
between routers • Implementation is
• Implementation is complicated
simple • Middle and large-scale
• Small-scale network network
Scalability x o
Computational little many
complexity
Convergence time Low speed high speed
187
187
92
10/4/2024 10/4/2024
2b
2a 2c
∂
1b 3b
2d
1a 1c ∂
3a 3c
AS 2
1d
Inter-domain routing protocol
3d
AS 1 eBGP connectivity AS 3
logical iBGP connectivity
188 190
▪ BGP (Border Gateway Protocol): the de facto ▪ BGP session: two BGP routers (“peers”) exchange BGP messages over
inter-domain routing protocol semi-permanent TCP connection:
• “glue that holds the Internet together” • advertising paths to different destination network prefixes (BGP is a “path
vector” protocol)
▪ allows subnet to advertise its existence, and the ▪ when AS3 gateway 3a advertises path AS3,X to AS2 gateway 2c:
destinations it can reach, to rest of Internet: “I • AS3 promises to AS2 it will forward datagrams towards X
am here, here is who I can reach, and how” AS 3 3b
▪ BGP provides each AS a means to: AS 1b 3a 3c
• eBGP: obtain subnet reachability information from 1
1a 1c
neighboring ASes AS 2 2b 3d
internal routers.
AS3, X
X
2d
• determine “good” routes to other networks based on
reachability information and policy
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
189 191
93 94
10/4/2024
Slide 192
8
8 Change the symbol of router into AS
BGP: Path vector routing sonnh, 2/29/2008
D E
2 A 4 A
D→A D→A best path
C→B→A ×
192
192
193
95
10/4/2024 10/4/2024
1d AS3, X
AS2,AS3,X 2a 2c
C
2d A !!LOOP!!
A
▪ AS2 router 2c receives path advertisement AS3,X (via eBGP) from AS3 router 3a D→C→B→A
▪ based on AS2 policy, AS2 router 2c accepts path AS3,X, propagates (via iBGP) to A
all AS2 routers C→B→A
▪ based on AS2 policy, AS2 router 2a advertises (via eBGP) path AS2, AS3, X to
AS1 router 1c
D
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
194 196
AS 3
▪ BGP messages exchanged between peers over TCP connection
3b
AS 1b AS3,X
3a 3c
▪ BGP messages:
AS3,X
1
1a
AS3,X
1c • OPEN: opens TCP connection to remote BGP peer and
AS 2 2b 3d X
AS3,X authenticates sending BGP peer
1d AS3, X
2a
AS2,AS3,X 2c
• UPDATE: advertises new path (or withdraws old)
2d • KEEPALIVE: keeps connection alive in absence of UPDATES; also
gateway router may learn about multiple paths to destination: ACKs OPEN request
▪ AS1 gateway router 1c learns path AS2,AS3,X from 2a • NOTIFICATION: reports errors in previous msg; also used to close
▪ AS1 gateway router 1c learns path AS3,X from 3a connection
▪ based on policy, AS1 gateway router 1c chooses path AS3,X and advertises path
within AS1 via iBGP
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
195 197
96 97
10/4/2024 10/4/2024
policy:
AS 3 3b
• inter-AS: admin wants control over how its
AS 1b AS3,X
traffic routed, who routes through its network
AS3,X 3a 3c
1
• intra-AS: single admin, so policy less of an
1
AS3,X
1a 1c AS 2 3d X
local link
2
2
1d
1
AS3,X
2b
AS3, X
issue
2a 2c
interfaces
scale:
AS2,AS3,X
at 1a, 1d 2d
• hierarchical routing saves table size, reduced
dest interface ▪ recall: 1a, 1b, 1d learn via iBGP from 1c: “path to X goes through 1c”
update traffic
… …
▪ at 1d: OSPF intra-domain routing: to get to 1c, use interface 1 performance:
1c 1
X
…
1
…
▪ at 1d: to get to X, use interface 1
• intra-AS: can focus on performance
• inter-AS: policy dominates over performance
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
198 200
AS 3 3b AS 3 3b
AS 1b 3a 3c
AS 1b 3a 3c
1 1 1
1a 1c AS 2 3d X 1a 1c AS 2 3d X
2 2b 2b 112
1d 1d AS1,AS3,X AS3,X
2a 2c 2a 2c
201 263
2d 2d
OSPF link weights
dest interface
▪ recall: 1a, 1b, 1d learn via iBGP from 1c: “path to X goes through 1c”
… …
▪ 2d learns (via iBGP) it can route to X via 2a or 2c
1c 2 ▪ at 1d: OSPF intra-domain routing: to get to 1c, use interface 1
X 2 ▪ hot potato routing: choose local gateway that has least intra-domain
… … ▪ at 1d: to get to X, use interface 1 cost (e.g., 2d chooses 2a, even though more AS hops to X): don’t worry
▪ at 1a: OSPF intra-domain routing: to get to 1c, use interface 2 about inter-domain cost!
▪ at 1a: to get to X, use interface 2
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
199 201
98 99
10/4/2024 10/4/2024
A,w B provider • router may learn about more than one route to
x network
w A destination AS, selects route based on:
legend:
A,w C y customer 1. local preference value attribute: policy decision
network:
2. shortest AS-PATH
ISP only wants to route traffic to/from its customer networks (does not want 3. closest NEXT-HOP router: hot potato routing
to carry transit traffic between other ISPs – a typical “real world” policy) 4. additional criteria
▪ A advertises path Aw to B and to C
▪ B chooses not to advertise BAw to C!
▪ B gets no “revenue” for routing CBAw, since none of C, A, w are B’s customers
▪ C does not learn about CBAw path
▪ C will route CAw (not using B) to get to w
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
202 204
• ORIGIN
• Source of the information (IGP/EGP/incomplete)
B provider • AS_PATH
x network
w A legend: • NEXT_HOP
C y customer
network: • MED (MULTI_EXIT_DISCRIMINATOR)
ISP only wants to route traffic to/from its customer networks (does not want • LOCAL_PREF
to carry transit traffic between other ISPs – a typical “real world” policy)
• ATOMIC_AGGREGATE
▪ A,B,C are provider networks
▪ x,w,y are customer (of provider networks) • AGGREGATOR
▪ x is dual-homed: attached to two networks
▪ policy to enforce: x does not want to route from B to C via x • COMMUNITY
▪ .. so x will not advertise to B a route to C
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
203 205
100 101
10/4/2024 10/4/2024
: NEXT_HOP?
• Step 1: Compare LOCAL_PREF AS2 AS3 AS5 AS4 AS5 AS5 AS5
206 208
• Control the upbound Network Next Hop Metric LocPrf Weight Path
bandwidth AS2 4.79.201.0/26 203.178.136.29 700 500 0 7660 22388 11537 10886 40220
203.178.136.29 700 500 0 7660 22388 11537 10886 40220
AS1 AS2
AS4 203.178.136.29 700 500 0 7660 22388 11537 10886 40220
6.1.0.0/16 203.178.136.29 700 500 0 7660 22388 11537 668
AS3 203.178.136.29 700 500 0 7660 22388 11537 668
203.178.136.29 700 500 0 7660 22388 11537 668
6.2.0.0/22 203.178.136.29 700 500 0 7660 22388 11537 668
AS1 AS4
AS3 AS2 AS1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
207 209
207 209
102 103
10/4/2024 10/4/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
210 212
210 212
172.16.0.0/16
AS1
Routing information Routing information of AS1
of AS1 MED 200
MED 100 used route
211
104 105
11/22/2024 11/22/2024
Chapter 5
Transport layer Basic concepts
1 3
1 3
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
2 4
2 4
1 2
11/22/2024 11/22/2024
Transport services and protocols Transport vs. network layer services and protocols
hosts
network
mobile network
data link
physical
national or global ISP
household analogy:
• Sender: 12 kids in Ann’s house sending
• Receives data from application letters to 12 kids in Bill’s
player house:
• Breaks application messages hosts = houses
into segments, passes to local or
network layer regional processes = kids
• If data is too large, splits to
ISP
app messages = letters in
smaller parts and puts to home network content
provider
envelopes
different datagrams network datacenter
application
transport protocol = Ann and Bill
• Receiver: transport
network
network
who demux to in-house siblings
• Receive data from network
data link
physical network-layer protocol = postal
layer service
enterprise
• Reassembles segments into network
messages, passes to
application layer
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
5 7
5 7
Transport services and protocols Transport vs. network layer services and protocols
• Install on end-to-end
hosts
application
transport
network
mobile network
data link
service
enterprise
• Unreliable and network
connectionless. For
example: UDP
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
6 8
6 8
3 4
11/22/2024 11/22/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
9 11
9 11
applicatio
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
10 12
10 12
5 6
11/22/2024 11/22/2024
Network protocols
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
13 15
13 15
14 16
14 16
7 8
11/22/2024 11/22/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
18 21
18 21
application
application P4 P5 P6 application
P1 P2 P3
transport
transport transport
network
network link network
link physical link
physical physical
server: IP
address B
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
20 22
20 22
9 10
11/22/2024 11/22/2024
24 26
24 26
Sender Receiver
sending receiving
process process
dat dat
application
a
send pkt0
transport a
pkt1 is
sender-side of receiver-side
OK
Sender, receiver do not know reliable data
transfer protocol
of reliable data
transfer protocol rcv ACK
the “state” of each other, e.g., send pkt1
was a message received? transport
network pkt1 is
unless communicated via a unreliable channel corrupted
message
reliable service implementation rcv NAK
resend pkt1
Time Time
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
25 27
25 27
11 12
11/22/2024 11/22/2024
28 30
28 30
Time Time
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
29 31
29 31
13 14
11/22/2024 11/22/2024
sender receiver
sender receiver send pkt0
pkt0
rcv pkt0
send pkt0 pkt0 send ack0
ack
rcv pkt0 rcv ack0
ack send ack0 send pkt1 0
pkt 1 data pkt Data pkts
rcv ack0 0 1 rcv pkt1
send pkt1 pkt send ack1
1 rcv pkt1 ack1
ack1 send ack1
X timeout
loss resend pkt1
pkt1 rcv pkt1
timeout
resend pkt1 pkt1 rcv ack1 (detect duplicate)
rcv pkt1
send pkt0 pkt0 send ack1 Sender Receiver Sender Receiver
(detect duplicate)
ack1 send ack1 ack1 rcv pkt0
rcv ack1 rcv ack1 ACK
send pkt0 pkt0 (ignore) ack0 send ack0 ACKs
rcv pkt0
ack0 send ack0 pkt
1
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
32 34
32 34
33 35
33 35
15 16
11/22/2024 11/22/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
36 38
36 38
37 39
37 39
17 18
11/22/2024 11/22/2024
• Source managment
• Frames sent successfully.
• Frames sent but not acknowledged.
• Frames that can be sent immediately.
• Frames that cannot be sent immediately.
• Destination management
• Frames received.
• Frames waiting to be received.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
40 42
40 42
• The frames being sent are numbered. • ARQ automatic repeat request
• The sequence number must be greater than or equal to
the window size.
• There are 3 standardized versions
• Stop-and-Wait ARQ
• Acknowledgments for received frames are sent
• Previously presented
with numbered acknowledgments.
• Go-Back-N ARQ
• Acknowledgments are cumulative. • Selective Reject/ Selective Repeat ARQ
• If frames 1, 2, 3, 4 are successfully received, only
acknowledgment for frame 4 is sent.
• Upon receiving an acknowledgment for frame k, it
implies that all frames k-1, k-2, and so on, have
been successfully received.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
41 43
41 43
19 20
11/22/2024 11/22/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
44 46
44 46
rcv_base
Not received
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
45 47
45 47
21 22
11/22/2024 11/22/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
48 50
48 50
0123012 pkt0
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
49 51
49 51
23 24
11/22/2024 11/22/2024
sender window
(after receipt)
receiver window
(after receipt) Why UDP?
0123012 pkt0 No need to establish connection (cause delay)
pkt1 0123012
0123012
0123012 pkt2 0123012
Simple
example: 0123012 pkt3
0123012
Small header
X
seq #s: 0, 1, 2, 3 (base 4 counting) 0receiver
123012
can’t
pkt0 will accept packet No congestion control send data as fast as possible
window size=3 see sender side with seq number 0
(a) no problem
receiver
behavior Main functionality of UDP?
identical in both
cases! MUX/DEMUX
0something’s pkt0
Q: what relationship is needed
123012
0(very)
1 2 3 0 1wrong!
2 pkt1 0123012 Detect error by checksum
between sequence # size and 0123012 pkt2 X
X
0123012
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
52 54
52 54
Datagram format
53 55
53 55
25 26
11/22/2024 11/22/2024
Issues of UDP
58 60
58 60
Connection oriented
“no frills” protocol: 3 steps hand-shake
• segments may be lost, delivered out of order Data transmission in stream of byte, reliable
• best effort service: “send and hope for the best” Use buffer
UDP has its plusses: Transmit data in pipeline
• no setup/handshaking needed (no RTT incurred) Increase the performance
• can function when network service is compromised Flow control
• helps with reliability (checksum) Sliding windows
build additional functionality on top of UDP in application layer Congestion control
(e.g., HTTP/3) Detect congestion and solve
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
59 61
59 61
27 28
11/22/2024 11/22/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
62 64
62 64
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
63 65
63 65
29 30
11/22/2024 11/22/2024
Host A Host B
Host A Host B
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
66 68
66 68
Host A Host B
Host A Host B Host A Host B
TCP fast retransmit
if sender receives 3 additional
SendBase=92 ACKs for same data (“triple
duplicate ACKs”), resend
Seq=92, 8 bytes of data Seq=92, 8 bytes of data
timeout
ACK=100
X
ACK=100
smallest seq #
ACK=120 likely that unACKed segment
lost, so don’t wait for timeout
timeout
Seq=92, 8 bytes of data Seq=92, 8
SendBase=100 bytes of data send cumulative
ACK for 120
ACK=100
SendBase=120
Receipt of three duplicate
ACK=120
ACKs indicates 3 segments Seq=100, 20 bytes of data
SendBase=120 received after a missing
lost ACK scenario premature timeout segment – lost segment is
likely. So retransmit!
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
67 69
67 69
31 32
11/22/2024 11/22/2024
Connection establishing in TCP: 3 steps (3-way handshake) Simplified life cycle of TCP
Client application
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology Initiates close connection
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology
70 72
70 72
Close connection
closed
closed
71 73
71 73
33 34
11/22/2024 11/22/2024
application application
Q: What happens if network Application removing
process Q: What happens if network Application removing
process
layer delivers data faster data from TCP socket layer delivers data faster data from TCP socket
buffers buffers
than application layer TCP socket than application layer TCP socket
removes data from socket receiver buffers removes data from socket receiver buffers
buffers? buffers?
TCP TCP
code code
Network layer
delivering IP
datagram payload receive window
flow control: # bytes
into TCP socket IP receiver willing to accept IP
code code
buffers
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
74 76
74 76
application application
Q: What happens if network Application removing
process Q: What happens if network Application removing
process
layer delivers data faster data from TCP socket layer delivers data faster data from TCP socket
buffers buffers
than application layer TCP socket than application layer TCP socket
removes data from socket receiver buffers removes data from socket receiver buffers
buffers? buffers?
TCP TCP
Network layer
code
flow control code
delivering IP
datagram payload receiver controls sender, so
into TCP socket IP
code
sender won’t overflow IP
code
buffers receiver’s buffer by
transmitting too much, too
from sender fast from sender
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
75 77
75 77
35 36
11/22/2024 11/22/2024
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
78 80
78 80
79 81
79 81
37 38
11/22/2024 11/22/2024
Congestion
occur
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
82 84
82 84
approach: senders can increase sending rate until packet loss sender sequence number space
(congestion) occurs, then decrease sending rate on loss event cwnd TCP sending behavior:
roughly: send cwnd bytes,
Additive Increase Multiplicative Decrease wait RTT for ACKS, then
increase sending rate by 1 cut sending rate in half at send more bytes
maximum segment size every each loss event last byte
RTT until loss detected cwnd
ACKed sent, but not- available but
not used
TCP rate ~
~ bytes/sec
yet ACKed RTT
(“in-flight”) last byte sent
AIMD sawtooth
TCP sender Sending
behavior: probing TCP sender limits transmission: LastByteSent- LastByteAcked < cwnd
time
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
83 85
83 85
39 40
11/22/2024 11/22/2024
RTT
• initially cwnd = 1 MSS • TCP transitions to slow start.
• double cwnd every RTT
• done by incrementing cwnd
for every ACK received • If receiving 3 identical ACKs:
summary: initial rate is • TCP sets the threshold to half of the current value of
cwnd.
slow, but ramps up
exponentially fast time • TCP transitions to congestion avoidance state.
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
86 88
86 88
Implementation:
14
3 ACKs
12 SS
variable ssthresh 10
Threshold=10 Threshold is set to half of cwnd (12)
AI And additive increase starts
on loss event, ssthresh is set to 8
SS
1/2 of cwnd just before loss event 6
AI Threshold=6
4
AI
2
Step
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
87 89
87 89
41 42
11/22/2024
Exercise
1
90
92
2
43
1
Application and service?
MUSIC ONLINE
VoIP
GAME CHAT VoD
ON LINE e-Office
SMS e-BANK
MAIL
E-learning
WEB
YOUTUBE
Fundamental concepts VIDEO
CONFERENCE FTP
EBAY
GOOGLE SKYPE
Social
networks SSH
3 5
3 5
• Web (HTTP)
(bits…) • Mail (SMTP/POP/IMAP) …
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
4 6
4 6
2 3
Communication between application processes Application architecture
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Network
physical physical
7 9
7 9
client • Server
Server • Always online waiting for service
wait for result handles response
client requests from clients
request response • There may be backup servers for
assuring high availability in
server client failures
wait handle wait
request • e.g. Web, Mail, …
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
8 10
8 10
4 5
Pure Peer-to-peer architecture
Peer Peer
No center server, only
peers as components
Peers have equal role in
the system
Peer Any two peers can
Peer
communicate directly to
each other but only when Domain name service
both are online.
Peer does not need to be
online all the time
Peer Peer E.g. Gnutella, Bittorent
11 13
11 13
Client
A center server for user • Domain name: identifier on application layer for
management, indexing for network node
search purpose. • Internet management should be centralised
Clients communicate • International: ICANN
directly to each other • Vietnam: VNNIC
Server after authentication • DNS(Domain Name System): the Internet's system for
process with server. mapping alphabetic names to numeric Internet Protocol
E.g. Skype (before 2016) (IP) addresses
Skype server manage user • Address resolution
lists, authentification
Client After authentification users • Users/ Clients use domain name to access services
Client
communicate directly to • Computers and network devices cannot use domain name but
each other IP address
P2P Comm. • How to translate domain name to IP address and
Client-Server Comm. reverse?
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
12 14
12 14
6 7
Example of address resolution DNS Server system
• Root server
• Computers use IP • Answer local DNS servers
I want to access
• Users use DN www.soict.hust.edu.vn • Manage zone and decentralize the management to lower-level
servers
User
• There are 13 root servers (http://www.root-servers.org)
Domain Name
Server
Web server
202.191.56.65 Image from : Wikipedia
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
15 17
15 17
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
16 18
16 18
8 9
Address resolution DNS Message
19 21
19 21
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
20 22
20 22
10 11
Example: dig linux.com Interactive Query
23 25
23 25
24 26
24 26
12 13
Uniform Resource Locator
27 29
27 29
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
28
28 30
14 15
HTTP overview HTTP connections: two types
31 33
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
32 34
16 17
Non-persistent HTTP: example (cont.) Persistent HTTP (HTTP 1.1)
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
35 37
36 38
18 19
Operation of HTTP/1.1 HTTP request message
Web client Web server
39 41
Time Time
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
40 42
20 21
HTTP response message Trying out HTTP (client side) for yourself
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
43 45
status code appears in 1st line in server-to-client response message. Recall: HTTP GET/response
a stateful protocol: client makes
two changes to X, or none at all
some sample codes: interaction is stateless
200 OK no notion of multi-step exchanges
X
• request succeeded, requested object later in this message of HTTP messages to complete a
301 Moved Permanently Web “transaction”
X
• requested object moved, new location specified later in this message (in • no need for client/server to track X’
Location: field) “state” of multi-step exchange t’
400 Bad Request • all HTTP requests are independent of X’’
• request msg not understood by server each other
404 Not Found • no need for client/server to “recover” X’’
from a partially-completed-but-never-
• requested document not found on this server completely-completed transaction
time time
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
44 46
22 23
Maintaining user/server state: cookies HTTP cookies: comments
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
47 49
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
48 50
24 25
Web caches (proxy servers) Caching example: buy a faster access link
residential ISP) • enables “poor” content providers LAN utilization: .0015 institutional
network
to more effectively deliver content access link utilization = .97 .0097 1 Gbps LAN
51 53
Scenario: Scenario:
access link rate: 1.54 Mbps origin
access link rate: 1.54 Mbps origin
RTT from institutional router to server: 2 sec servers RTT from institutional router to server: 2 sec servers
Web object size: 100K bits public
Internet
Web object size: 100K bits public
Internet
Average request rate from browsers to Avg request rate from browsers to origin
origin servers: 15/sec servers: 15/sec
average data rate to browsers: 1.50 avg data rate to browsers: 1.50 Mbps
1.54 Mbps 1.54 Mbps
Mbps
Performance: problem: large
access link Performance: access link
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
52 54
26 27
Caching example: install a web cache Conditional GET
client server
Calculating access link utilization, end-
end delay with cache: Goal: don’t send object if cache has
origin HTTP request msg
suppose cache hit rate is 0.4: 40% requests servers up-to-date cached version If-modified-since: <date> object
satisfied at cache, 60% requests satisfied at not
public • no object transmission delay
Internet modified
origin • lower link utilization HTTP response
before
access link: 60% of requests use access link HTTP/1.0
<date>
data rate to browsers over access link cache: specify date of cached copy 304 Not Modified
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
55 57
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
56 58
28 29
HTTP/2 HTTP/2: mitigating HOL blocking
Key goal: decreased delay in multi-object HTTP requests HTTP/2: objects divided into frames, frame transmission interleaved
server
HTTP/2: [RFC 7540, 2015] increased flexibility at server in sending
objects to client: GET O4 GET O3 GET O2 GET O1 object data requested
client
methods, status codes, most header fields unchanged from HTTP
1.1 O2
O4
transmission order of requested objects based on client-specified O3 O1
object priority (not necessarily FCFS)
push unrequested objects to client O2
O3
divide objects into frames, schedule frames to mitigate HOL O1 O4
blocking
O2, O3, O4 delivered quickly, O1 slightly delayed
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
59 61
• Limitation of HTTP:
• No mechanism for users to check the reliability of web server
HTTP 1.1: client requests 1 large object (e.g., video file, and 3 smaller security vulnerability for imposters or embed malicious code
objects) to HTML
server
GET O4
• No mechanism for data encryption security vulnerability for
GET O3 GET O2 GET O1 object data requested attackers to sneak and steal sensitive information
client
• Secure HTTP: use SSL/TLS instead of TCP to send
O1 HTTP messages
• Authentication:
O2 • Users can access to the correct website
O1
O2 O3 • Communication data won’t be changed
O3
O4
O4
• Security: data are kept secretly during data transmission
objects delivered in order requested: O2, O3, O4 wait behind O1
• Port: 443
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
60 62
30 31
HTTPS on the Web Electronic mail (E-mail)
Access Web with HTTPS
• MUA (Mail User Agent) Protocols:
• Get emails from servers, send Send emails: SMTP-Simple
emails to servers
Mail Transfer Protocol
• e.g. Outlook, Thunderbird…
Receive emails
• MTA (Mail Transfer Agent): :
POP – Post Office
• Contain the mail boxes of user
Protocol
• Queue to send emails
IMAP – Internet Mail
• e.g. Sendmail, MS Exchange…
Access Protocol
63 65
63 65
• RFC 2821
• TCP, port 25: send emails from client to server and
between servers
• Interactive request/response
• Request: Command with ASCII
4. Email service • Response: state code and data
64 66
64 66
32 33
Web Mail MIME standard
• Use Web browser as MUA • Represent email content with multimedia data
• MUA and MTA exchange information through • MIME: multimedia mail extension, RFC 2045, 2056
HTTP • Add one line in the header to specify the sending data
• Mails are stored on servers type
• E.g. MIME version
From: [email protected]
To: [email protected]
• Gmail,
Subject: Picture of yummy crepe.
• Hotmail, method used MIME-Version: 1.0
• Yahoo! Mail, etc. to encode data Content-Transfer-Encoding: base64
Content-Type: image/jpeg
• Today, there are many MTA accessible through multimedia data
type, subtype,
web interface parameter declaration
base64 encoded data .....
.........................
• http://mail.hust.edu.vn ......base64 encoded data
• http://mail.soict.hust.edu.vn encoded data
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
68 70
68 70
69 71
34 35
FTP: File Transfer Protocol FTP client
Command line
TCP control
connection, port 21 C:\Documents and Settings\hongson>ftp
user FTP FTP ftp> ?
interface client server
Commands may be abbreviated. Commands are:
TCP data
user connection, port 20
! delete literal prompt send
? debug ls put status
local file system remote file system append dir mdelete pwd trace
ascii disconnect mdir quit type
• Client-server model Out-of-band control: bell get mget quote user
FTP command : port 21 binary glob mkdir recv verbose
• File transfer between two
bye hash mls remotehelp
hosts Data: port 20
cd help mput rename
• RFC 959 Need user to log-in before close lcd open rmdir
data transfer
• Use TCP, port 20, 21 GUI FTP clients: IE, Firefox, GFTP, ….
Some servers allow
anonymous user
TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG TRƯỜNG CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG
School of Information and Communication Technology School of Information and Communication Technology
72 74
72 74
73
73
36 37