Professional Documents
Culture Documents
NETWORKING
ผศ.ดร.ณัฐกานต์ พุทธรักษ์
Lecture 3
ภาคการศึกษาที่ 1 ปี การศึกษา 2562
1
LAST CLASS
Physical layer:
Fundamental of Signal Transmission
Topology
Transmission Mode
Media Types
Conversion Methods (Digital-to-Digital
Transmission)
2
TODAY’S OUTLINE
▪Conversion Methods (Cont’d)
▪Data Link Layer
3
Analog-To-Digital Conversion
4
PULSE AMPLITUDE MODULATION (PAM)
This technique takes an analog signal, Samples it, and
generate a series of pulses based on the results of the
sampling.
Sampling: Measuring the amplitude of the signal at equal
intervals.
5
PULSE CODE MODULATION (PCM)
PCM modifies the pulses created by PAM to create a completely
digital signal.
PCM first quantizes the PAM
Quantization: A method of assigning integral values in a
specific range to sampled instances
PCM
7
PCM have 4 separate processes:
- PAM,
- Quantization,
- Binary encoding,
- Digital-to-digital encoding.
8
SAMPLING RATE
The sampling rate must be at least twice the highest
frequency of the original signal.
Nyquist Theorem
9
EXAMPLE
What sampling rate is needed for a signal with
a bandwidth of 10,000 Hz (1,000 to 11,000 Hz)?
10
HOW MANY BIT PER SAMPLE?
Example
A signal is sampled, each sample requires at least 12
levels of precision (+0 to +5 and -0 to -5).
11
BIT RATE
Bit Rate = Sampling rate * Number of bits per sample.
Example
We want to digitize the human voice. What is the bit
rate assuming eight bits per sample?
12
TRANSMISSION IMPAIRMENT
VCO
d/dt
BPM = 2(1 + b )B
0
fc
Data Signal Encoding or Conversion Common Devices Common Systems
Technique
30
DATA LINK LAYER
Medium access protocol
Multi-access channels
Medium access control (MAC) to determine access from
competing parties
Very important in LANs
Timed Token Rotation Protocol
Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
Point-to-Point connection
DATA LINK LAYER FUNCTIONS
Line Discipline : It determines which device can send
and when it can send
Flow Control: coordinates the amount of data that can
be sent before receiving acknowledgment
Error Control: allows the receiver to inform the sender
of any frames lost or damaged in transmission
32
LINE DISCIPLINE
▪Line Discipline function is to oversee the
establishment of links and the right of a
particular device to transmit at a given time.
▪Determine who should send now
33
ENQUIRY/ACKNOWLEDGMENT (ENQ/ACK)
▪Used when there is a dedicated link between
two devices (peer-to-peer communication)
▪Coordinates which device may start a
transmission
▪Determine whether or not the intended recipient
is ready to accept the transmission
34
HOW ENQ/ACK WORKS?
The initiator transmit a frame called enquiry
(ENQ) asking if the receiver is available to
receive the data
The receiver must answer either:
- acknowledgement (ACK) frame if it is ready
OR
- negative acknowledgement (NAK) frame if
it is not ready
35
▪If neither ACK nor a NAK is received within a
specified time limit, then the initiator assumes that
the ENQ frame was lost and will sends a
replacement
▪If the initiator made 3 attempts and no response,
then it disconnects and will try later again
37
POLL/SELECT
38
HOW POLL/SELECT WORK
▪All transmission must be made through the
primary device
▪The primary device control the link
▪The secondary devices follow the primary
instructions
▪The primary device determine which device is
allowed to use the channel at a given time
39
Multipoint Discipline
40
▪Each device on the link has an address that
can be used for identification
▪In any transmission the address will appear in
a specified portion of each frame called the
address field
▪If the transmission comes from the primary, the
address indicates the recipient of the data
▪If the transmission comes from the secondary,
the address indicates the originator of the
data
41
POLL
▪When the primary is ready to receive data, it must ask
(POLL) each device in turn if it has anything to send
▪If the response is (NAK) frame, this means no data to
send.
▪The primary (POLL) the next secondary and so on
When the response is positive (data frame) the primary
reads the frame and send (ACK) frame
The secondary sends all its data, and finished with
(EOT) frame
The primary can stop receiving says “Time’s up” 42
Poll
Poll
ACK
Data
43
SELECT
▪Select mode is used when the primary device has
something to send
▪The primary transmit a select (SEL) frame, one field of
which indicates the address of the intended secondary
▪In multipoint systems, A single link is used for all devices
▪All secondaries check the address field, and only the
intended secondary open the frame and read the data
45
FLOW CONTROL
46
METHODS OF FLOW CONTROL
▪X-ON and X-OFF
47
X-ON and X-OFF
48
STOP-AND-WAIT
50
SLIDING WINDOW
51
Sliding Window
If n = 8 then frames are numbered from 0 to 7,
and the size of the window is (n – 1) which is 7
53
Sender Sliding Window
54
EXAMPLE
▪Size of the window is 7
▪Frames from 0 to 4 have been sent and no
ACK has been received
▪The sender window then contains 2 frames (5
and 6)
▪If ACK 4 received, means that frames 0
through 3 are received
▪The sender window expand to include the next
4 frames and will contains 6 frames
(5,6,7,0,1,2) 55
RECEIVER WINDOW
57
EXAMPLE
▪If window size is 7, when the first frame is
arrived the window will shrinks by 1
▪If frames 0 through 3 have arrived but no
ACK, the window will contain 3 frame spaces
▪If the prior ACK was for frame 2 and the
current ACK for frame 5, the window expands
by 3 spaces
58
Sliding Window Example
59
ERROR CONTROL
Error control in the data link layer is based on
automatic repeat request (ARQ) , which means
retransmission of data in three cases: Damage
frame, lost frame, and lost acknowledgment.
60
ARQ FUNCTION
▪Allow us to say that the frame has been lost
▪Automatic retransmission of lost frames (ACK
and NAK frames).
61
STOP-AND-WAIT ARQ
62
BASIC FLOW CONTROL MECHANISM
(RETRANSMISSION )
64
LOST FRAME?
Time Out
1
ACK 1
65
SLIDING WINDOW ARQ
Among the several popular mechanisms for
continuous transmission error control, two protocols
are the most popular:
▪Go-back-n ARQ
▪Selective-reject ARQ
66
Go-Back-n ARQ
If one frame is lost or damaged, all frames sent since
the last frame acknowledged are retransmitted.
Go back-n Damaged Frame
67
Lost Data Frame
68
Lost Acknowledgment
Go back-n Lost ACK
69
SELECTIVE-REJECT ARQ
Only the specific damaged or lost frame is
retransmitted.
Selective Reject
70
NEXT CLASS
▪Switching Networks
✓ Circuit Switching
✓ Packet Switching
✓ Structure of Switch
▪LAN Technologies
71