Escolar Documentos
Profissional Documentos
Cultura Documentos
a)
b)
FRAMING
The data link layer needs to pack bits into frames, so that each
frame is distinguishable from another.
Ex: Our postal system practices a type of framing. The simple
act of inserting a letter into an envelope separates one piece of
information from another; the envelope serves as the delimiter. In
addition each envelope defines the sender and receiver addresses
since the postal system is a many-to-many carrier facility.
Fixed-Size Framing
Variable-Size Framing : Define the end of the frame and the
beginning of the next.Two approaches
1.Character oriented protocols
2.Bit oriented protocols
Four Methods:
a) Character count
b) Flag bytes with byte stuffing
c) Starting and ending flags, with bit stuffing.
d) Physical layer coding violations
Source and
destination
information
To separate one frame from the next, an 8-bit (1-byte) flag is added
at the beginning and the end of a frame.
The Flag,
Framing
Framing (2)
Framing (3)
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receivers memory after destuffing.
Error Control:
1. How to make sure all frames are eventually delivered to the
network layer at the destination and in the upper layer.
2. Receiver has to send positive or negative acknowledgements.
3. If the sender receives a positive acknowledgements about a
frame, it knows the frame has arrived safely.
4. Negative acknowledgements means that something has gone
wrong, and the frame must be transmitted again.
5. If a frame vanishes completely, then the receiver will not react
at all, since it has no reason to react & sender transmits a frame
and then waits for an ACK.
6. To overcome this we use TIMER.
7. If timer expires, then the sender sends the frame again.
8. If sender sends same frames multiple times then also problem,
so we assign sequence numbers to outgoing frames.
4.Flow Control :
1. Another design occurs in the data link layer (and higher layers
as well) is what to do with a sender that systematically wants
to transmit frames faster than the receiver can accept
them.
2. This situation can usually occur when the sender is running on
a fast (or light loaded) computer and the receiver is running
on a slow (or heavily loaded) machine.
3. The sender keeps pumping the frames out at a high rate until
the receiver is completely swamped.
4. Even if the transmission is error free, at certain point the
receiver will simply be unable to handle the frames as they
arrive and will start to lose some.
Error-Correcting Codes
b)
Polynomial
Standard Polynomials
Error-Detecting Codes
Protocol Definitions
Protocol
Definitions
(ctd.)
Some definitions
needed in the
protocols to follow.
These are located in
the file protocol.h.
1.
2.
3.
4.
5.
1.
2.
3.
4.
1.
2.
3.
4.
5.
6.
a)
Sliding Windows
a)
b)
c)
Receiving window
Sending window
When a frame is sent, the upper edge of the window is advanced
by one
When an acknowledgement is received, the lower edge of the
window is advanced by one
b) Receiving window
Any received frame the sequence number outside the window is
discarded
When a frame whose sequence number is equal to lower edge of
the window is received, the window is rotated by one
Stop and-Wait
A protocol in which the sender sends one frame and then waits
for an acknowledgement before proceeding.
b) a sliding window protocol with maximum window size = 1
Sequence number {0, 1} is sufficient
c) Frame header fields
Seq : the sequence number of this frame
Ack : the number of the last frame is received
Efficiency of Stop-and-Wait
Stop-and-Wait
time (msec)
t=0
start sending
t=20 completely sent
t=250 frame arrival
t=270 completely received
t=270 acknowledge without delay
t=520 acknowledgement arrival
Efficiency of Stop-and-Wait
Pipelining
time (msec)
t=0
start sending the first frame
t=20 the first completely sent
t=250 frame arrival
t=270 the first completely received
t=270 acknowledge without delay
t=520 acknowledgement arrival
pipelining
piggybacking
Temporarily delaying outgoing acknowledgements so
that they can be hooked onto the next outgoing data
frame is Piggybacking
Go-back-N
a)
Go-back-N : An Example
Selective Repeat
a)
Continued
Continued
Continued
Continued
HDLC :
1. They all are derived from the data link protocol first used in the
IBM mainframe word:SDLC (synchronous data link control )
protocol.
2. After developing SDLC,IBM submitted it to ANSI and ISO
for acceptance as U.S and international standards respectively.
3. ANSI modified it to become ADCCP(Advanced Data
Communication Control Procedure) and ISO modified it to
HDLC.
4. CCITT then adopted and modified HDLC for its LAP(Link
Access Protocol) as part of the X.25 network interface standard
but latter modified it again to LAPB ,to make it more compatible
with a later version of HDLC,
HDLC
bit oriented
bit stuffing
b) SLIP
c) PPP
character oriented
character stuffing
multiprotocol framing
PtP: examples
a)
Frame structure:
Address
for multi-point line
distinguish responses from redirected frames
Control field
Information frame
Supervisory frames
Unnumbered frames
76
PtP: examples
a)
HDLC
Kind of frames:
Information frame
Supervisory frames:
Reject = nack
Unnumbered frames
Initialisation
Polling
Status reporting
77
PtP: examples
a)
Context:
Dial-up
Leased lines between routers
PtP: examples
a)
PPP provides
Scenario