Documente Academic
Documente Profesional
Documente Cultură
OUTLINE
Encoding Techniques
Data Link Layer Fundamental
Direct-link Protocols
BSC, DDCMP, HDLC, PPP
SRI DATIA
SIGNAL ENCODING
TECHNIQUES
SRI DATIA
ENCODING SCHEMES
SRI DATIA
SRI DATIA
SRI DATIA
PROBLEMS OF NRZ-L
Long sequence of 0s or 1s signal leads to baseline
wander
Receiver maintains baseline of detecting 0 or 1
Too many 0s or 1s cause this baseline to change
Clock synchronization
Frequent transitions of signals are necessary to enable clock
recovery
Every clock cycle the sender transmits a bit and the receiver
recovers a bit
Slightly difference in clocks at either sender and receivers may
cause a problem
SRI DATIA
NON-RETURN TO ZERO
INVERTED (NRZI)
nonreturn to zero inverted on ones
constant voltage pulse for duration of bit
data encoded as presence or absence of signal transition at
beginning of bit time
transition (low to high or high to low) denotes binary 1
no transition denotes binary 0
MANCHESTER ENCODING
has transition in middle of each bit period
transition serves as clock and data no need to send clock
low to high represents one (1), high to low represents zero (0)
used by IEEE 802.
Both 0s and 1s result in a transition to the signal, the clock can be
effectively recovered at the receiver
SRI DATIA
DIFFERENTIAL MANCHESTER
ENCODING
midbit transition is clocking only
transition at start of bit period representing 0
no transition at start of bit period representing 1
this is a differential encoding scheme
SRI DATIA
10
PROBLEMS OF
MANCHESTER ENCODING
Double the rate at which signal transition are
made on the link the receiver has half the time
to detect each pulse of the signal.
Bit rate is half of baud rate encoding is only 50%
efficient
SRI DATIA
11
4B/5B
Used together with other encoding techniques
Used in 100Base-TX transmission
The idea is to insert extra bits into the bit stream so as to break
up long sequences of 0s and 1s
Every 4 bits of actual data are encoded in a 5-bit code 4B/5B
Each 5-bit code has no more than one leading 0s and no more
than two trailing 0s.
No pair of 5-bit codes results in more than three consecutive 0s
solve problem of many consecutive 0s
Then the 5-bit codes are then transmitted using the NRZI
encoding
NRZI already solved the problem of consecutive 1s so 4B/5B results
in 80% efficiency
SRI DATIA
12
4B/5B ENCODING
4-bit data is encoded into 5-bit code
One leading 0, two trailing 0s rule
16 codes used, left the other 16 codes
for other purposes
Code 00000 line is dead
Code 1111 line is idle
Code 00100 halt
7 of them violates the rule
The other 6 represent control symbols
SRI DATIA
13
OUTLINE
Encoding Techniques
Data Link Layer Fundamental
Direct-link Protocols
BSC, DDCMP, HDLC, PPP
SRI DATIA
14
15
FLOW CONTROL
ensure sending entity does not overwhelm receiving
entity
by preventing buffer overflow
influenced by:
transmission time
time taken to emit all bits into medium
propagation time
time for a bit to traverse the link
SRI DATIA
16
17
18
SRI DATIA
19
ERROR CONTROL
detection and correction of errors such as:
lost frames
damaged frames
SRI DATIA
20
AUTOMATIC REPEAT
REQUEST (ARQ)
collective name for such error control
mechanisms, including:
stop and wait
go back N
selective reject (selective retransmission)
SRI DATIA
21
22
SRI DATIA
23
GO BACK N
based on sliding window
if no error, ACK as usual
use window to control number of outstanding
frames
if error, reply with rejection
discard that frame and all future frames until error frame
received correctly
transmitter must go back and retransmit that frame and all
subsequent frames
SRI DATIA
24
GO BACK N - HANDLING
Damaged Frame
error in frame i so receiver rejects frame i
transmitter retransmits frames from i
Lost Frame
frame i lost and either
transmitter sends i+1 and receiver gets frame i+1 out of seq and rejects
frame i
or transmitter times out and send ACK with P bit set which receiver
responds to with ACK i
SRI DATIA
25
GO BACK N - HANDLING
Damaged Acknowledgement
receiver gets frame i, sends ack (i+1) which is lost
acks are cumulative, so next ack (i+n) may arrive before
transmitter times out on frame i
if transmitter times out, it sends ack with P bit set
can be repeated a number of times before a reset procedure
is initiated
Damaged Rejection
reject for damaged frame is lost
handled as for lost frame when transmitter times out
SRI DATIA
26
SELECTIVE REJECT
also called selective retransmission
only rejected frames are retransmitted
subsequent frames are accepted by the receiver and
buffered
minimizes retransmission
receiver must maintain large enough buffer
more complex logic in transmitter
hence less widely used
useful for satellite links with long propagation delays
SRI DATIA
27
GO BACK N
VS
SELECTIVE
REJECT
SRI DATIA
28
ERROR DETECTION
Two-dimensional parity
Internet checksum
Cyclic Redundancy Check
SRI DATIA
29
INTERNET CHECKSUM
Not used in the link layer
checksum for the internet protocol:
30
OUTLINE
Encoding Techniques
Data Link Layer Fundamental
Direct-link Protocols
BSC, DDCMP, HDLC, PPP
SRI DATIA
31
SRI DATIA
32
PROBLEM OF BISYNC
ETX character may appear in the body of a frame
Solved by character stuffing insert a special
character called DLE (data-link-escape) character
whenever it appears in the body
SRI DATIA
33
POINT-TO-POINT (PPP)
PROTOCOL
Designed to encapsulate IP inter-network data
Commonly run over dial-up modem links, but can be used on
any leased line for point-to-point connections not supported by
FR or ATM.
Have character stuffing
Several of the field sizes are negotiated rather than fixed
using LCP (Link Control Protocol)
Two sub protocols: LCP (Link Control Protocol) and NCP
(Network Control Protocol) to negotiate options for a networklayer protocol running on top of PPP
IPCP (Internet Protocol Control Protocol) for IP
34
SRI DATIA
35
LCP
Negotiation of payload size is conducted by LCP
Frame payload size can be negotiated, 1500 byte by default
LCP sends control messages encapsulated in PPP frames
Such messages are denoted by an LCP identifier in the PPP Protocol
field
Sizes are changed based on the information contained in those control
messages
SRI DATIA
36
PPP (CONTD)
PPP tends to be reserved for dialup or a mixedvendor environment, whereas HDLC is the default
for T1 serial connections
SRI DATIA
37
DECNETS DDCMP
Byte-Counting Approach: include number of bytes
contained in a frame as a field in the frame header
Transmission error can corrupt the COUNT field
framing error
SRI DATIA
38
link configurations
39
SRI DATIA
40
trailer
SRI DATIA
41
SRI DATIA
42
SRI DATIA
43
ADDRESS FIELD
identifies secondary station that sent or will receive frame
usually 8 bits long
may be extended to multiples of 7 bits
LSB indicates if is the last octet (1) or not (0)
SRI DATIA
44
CONTROL FIELD
different for different frame type
Information (I-) frame - data transmitted to user (next layer up)
Flow and error control piggybacked on information frames
SRI DATIA
45
SRI DATIA
46
SRI DATIA
47
HDLC OPERATION
consists of exchange of information, supervisory and
unnumbered frames
have three phases
initialization
by either side, set mode & seq
data transfer
Selective reject
disconnect
Go Back N reject
SRI DATIA
48
HDLC
COMMANDS
AND
RESPONSES
SRI DATIA
49
Send seq no
Receive seq no
busy
Unnumbered
acknowledgement
Disconnect
A must
respond with
RR or RNR
Return from
busy condition
SRI DATIA
50
SRI DATIA
51
Next Lecture
QUESTIONS?
52