Data and Computer Communications - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Data and Computer Communications

Description:

Utilization (or efficiency) can be calculated as: We define parameter a: ... Find tfrme, a, and Utilization. How high is. the satellite? Performance Examples ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 33
Provided by: Far699
Learn more at: https://www.sonoma.edu
Category:

less

Transcript and Presenter's Notes

Title: Data and Computer Communications


1
Data and Computer Communications
  • Updated 2/9/2009

2
Data Link Control Protocols
  • They are required to provide a layer of logic to
    manage exchange of data over a link
  • frame synchronization
  • flow control
  • error control
  • addressing
  • control and data
  • link management

3
Flow Control
  • Objectives
  • Sender does not flood the receiver - prevents
    buffer overflow
  • Maximize throughput
  • Basic Idea
  • Sender throttled until receiver grants permission
  • Impacted by
  • Transmission time
  • time taken to emit all bits into medium
  • Propagation time
  • time for a bit to traverse the link
  • Two basic types are discussed
  • Stop-and-Wait FC
  • Sliding Window FC

4
Space Time Diagrams
  • A virtual time sequence diagram
  • Illustrating the sender-receiver relationship

5
Stop and Wait Flow Control
  • Basic Idea
  • Source transmits frame
  • Destination receives frame and replies with
    acknowledgement (ACK)
  • Source waits for ACK before sending next
  • Destination can stop flow by not send ACK

6
Performance
  • Works well for a few large frames
  • Stop and wait becomes inadequate if large block
    of data is split into small frames

7
Efficiency of StopWait
We define parameter a
Utilization (or efficiency) can be calculated
as
What happens if a changes?
Examples of signal speed Light in vacuum 300
m/ms Light in fiber 200 m/ms Electricity 250
m/ms
The textbook uses B for tprop and L for tframe
8
Performance Examples
How high is the satellite?
Assume data rate 56 Kbps Find tfrme, a, and
Utilization
Assume frame size is 500 bytesFind tfrme, a,
and Utilization
9
Performance Examples
10
Maximum Utilization
Utilization
Ideal
Plot the efficiency plot For the problems using
Matlab
Actual
a
11
Sliding Windows Flow Control
  • Allows multiple numbered frames to be transmitted
  • Receiver has buffer W long
  • Transmitter sends up to W frames without ACK
  • Receiver sends an ACK
  • ACK includes number of next frame expected
  • Sequence number is bounded by size of field (k)
  • frames are numbered modulo 2k
  • giving max window size of up to 2k - 1
  • Receiver can ack frames without permitting
    further transmission (Receive Not Ready)
  • Must send a normal acknowledge to resume
  • if have full-duplex link, can piggyback ACks

12
Sliding Window Diagram
W5, 3 bits are required, ACK 0,1,2,3,4,0,1,
13
Sliding Window Example
Why W is not 8?
Window shrinking until ACK is received
Window expands as soon as ACK is sent
Window expands as soon as ACK is received
W7, 3 bits are required, ACK 0,1,2,3,4,6,7,0,1,
14
Efficiency of Sliding Window Protocol
15
Error Control
  • Detection and correction of errors such as
  • Lost frames
  • Damaged frames
  • Common techniques use
  • Error detection
  • Positive acknowledgment
  • Retransmission after timeout
  • Negative acknowledgement retransmission

16
Automatic Repeat Request (ARQ)
  • Error control mechanisms used in
  • stop and wait
  • go back N
  • selective reject (selective retransmission)

17
ARQ in Stop and Wait
ACK0 / ACK1
  • Source transmits single frame
  • Wait for ACK
  • If received frame damaged, discard it
  • transmitter has timeout
  • if no ACK within timeout, retransmit
  • if ACK damaged,transmitter will not recognize it
  • transmitter will retransmit
  • receive gets two copies of frame
  • use alternate numbering and ACK0 / ACK1
  • pros and cons
  • simple
  • inefficient

Remember Special case where W1
18
ARQ in Go Back N
  • Based on sliding window
  • If no error, ACK (RR) as usual
  • Use window to control number of outstanding
    frames
  • If error, reply with rejection (REJ)
  • Discard that frame and all future frames until
    error frame received correctly
  • Transmitter must go back and retransmit that
    frame and all subsequent frames

Frames 5 6 are resent
Lost ACK, P1
Nothing sent until ACK is received
Lost ACK, P1
19
Go Back N Scenarios which are handled
  • Damaged Frame
  • Frame received with error
  • Frame lost
  • Last frame lost
  • Damaged Ack
  • One ack lost, next one makes it
  • All acks lost
  • Damaged Nack
  • Maximum Window 2n -1 with n-bit sequence numbers

20
Selective Reject
  • Also called selective retransmission
  • Only rejected frames are retransmitted
  • Subsequent frames are accepted by the receiver
    and buffered
  • Cons and pros
  • Minimizes retransmission
  • Receiver must maintain large enough buffer
  • More complex logic in transmitter
  • Applications
  • Less widely used
  • Useful for satellite links with long propagation
    delays

Resend Only Corrupted one
Only frame 4 is resent
P1 Resent ACK
Nothing sent until ACK is received
Applet http//media.pearsoncmg.com/aw/aw_kurose_n
etwork_3/applets/SelectRepeat/SR.html
21
Performance Comparison
P is the probability that a single frame is in
error Assume that ACK and NAK are never in
error.
22
High Level Data Link Control (HDLC)
  • An important data link control protocol
  • station types
  • Primary issue commands
  • Secondary - issue Responses
  • Combined - issues commands and responses
  • link configurations
  • Unbalanced - 1 primary, multiple secondary
  • Balanced - 2 combined stations

23
HDLC Transfer Modes
  • Normal Response Mode (NRM)
  • Response from secondary
  • Asynchronous Balanced Mode (ABM)
  • Combined Station, either station initiates
    transmission, has no polling overhead, widely
    used
  • Asynchronous Response Mode (ARM)
  • unbalanced config, secondary may initiate
    transmit without permission from primary, rarely
    used

24
HDLC Frame Structure
  • synchronous transmission of frames
  • single frame format used for all data types

Data
Header
Trailer
Frame Check Sequence FCS
25
Flag Fields and Bit Stuffing
From Jain
26
Address Field
  • Identifies secondary station that sends or
    receives frame
  • Usually 8 bits long
  • May be extended to multiples of 7 bits
  • LSB indicates if is the last octet (1) or not (0)
  • all ones address 11111111 is broadcast

Frames arte multiples of 8-bit (octets)
Last octet
27
Control Field
  • Different for different frame type (I, S, U)
  • Information - data transmitted to user (next
    layer up)
  • Flow and error control piggybacked on information
    frames (includes N(s) and N(R))
  • Supervisory - ARQ when piggyback not used
  • Unnumbered - supplementary link control
  • First 1-2 bits of control field identify frame
    type
  • I0, S10, U11

28
Control Field
  • Use of Poll/Final bit depends on context
  • In command frame is P bit set to 1 to solicit
    (poll) response from peer
  • In response frame is F bit set to 1 to indicate
    response to soliciting command
  • Sequence number usually 3 bits
  • can extend to 7 bits as shown below

SSupervisory function bit
http//www.erg.abdn.ac.uk/users/gorry/course/dl-pa
ges/hdlc-control.html
29
Information FCS Fields
  • Information Field
  • Exists in information and some unnumbered frames
  • It must contain integral number of octets
  • Variable length
  • Frame Check Sequence Field (FCS)
  • Used for error detection
  • Either 16 bit CRC or 32 bit CRC

30
HDLC Operation
  • consists of exchange of information, supervisory
    and unnumbered frames
  • Consists of three phases
  • Initialization
  • by either side, set mode sequence
  • data transfer
  • with flow and error control
  • using both I S-frames (RR, RNR, REJ, SREJ)
  • disconnect
  • when ready or fault noted

31
HDLC Operation Example
Set normal response/responses
Set mode accepted
Full Duplex
Refer to HDLC Commands HDLC Commands
32
HDLC Operation Example
Write a Comment
User Comments (0)
About PowerShow.com