Protocol Basics - PowerPoint PPT Presentation

1 / 51
About This Presentation
Title:

Protocol Basics

Description:

When S detects that a frame has been corrupted, it returns a negative ... When the secondary detects an out-of-sequence frame, it informs the primary to ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 52
Provided by: POST62
Category:

less

Transcript and Presenter's Notes

Title: Protocol Basics


1
Protocol Basics
2
Introduction
  • Best-try transmission
  • Connectionless mode transmission
  • When a transmission error is detected, even if it
    is only a single (unknown) bit, then the complete
    data block must be discarded

3
Introduction (contd)
  • Reliable transmission
  • Connection-oriented transmission
  • Detecting when errors are present
    retransmission
  • A defined set of rules or control procedures must
    be adopted by both communicating parties to
    ensure the reliable
  • Error control
  • Error detection/correction cycle
  • In Data link protocol

4
Error control
  • Manual error control
  • processes, and then reads and stores the received
    character and initiates its output to the display
    screen
  • If the displayed character is different from what
    was entered or intended, then simply enter a
    suitable control character
  • When the control is received, the control program
    discards the previously entered and removes it
    from the screen

5
Error control (contd)
  • Echo checking
  • First, transmitted to the remote computer
  • Reads and stores the character and retransmits it
    back to the terminal which displays it
  • If this is different from what was keyed in or
    intended, the user can again initiate the
    transmission of a suitable delete character

6
Error control (contd)
  • ARQ
  • Automatic repeat request
  • The receiving computer checks the received frame
    for possible transmission errors
  • And then returns a short control message either
    to acknowledge its correct receipt or to request
    that another copy of the frame

7
ARQ
  • Idle RQ
  • Be used with character-oriented data transmission
  • Continuous RQ
  • Bit-oriented transmission
  • Selective repeat
  • Go-back-N retransmission

8
Idle RQ
  • Be submitted over a serial data link between a
    source DTE and a destination DTE
  • Implicit retransmission
  • Secondary S acknowledges only correctly received
    frames and Primary P interprets the absence of an
    acknowledgement as an indication that the
    previous frame was corrupted

9
Idle RQ (contd)
  • Explicit retransmission
  • When S detects that a frame has been corrupted,
    it returns a negative acknowledgement to request
    that another copy of the frame is transmitted

10
Idle RQ (contd)
  • Implicit retransmission

11
Idle RQ (contd)
  • Explicit Request

12
Idle RQ (contd)
  • N(S)
  • Send sequence number
  • The sequence number carried in each I-frame
  • N(R)
  • Receive sequence number
  • The sequence number in each ACK and NAK frame

13
Layered architecture
  • Layering
  • Decoupling the combined application and
    communication tasks to create two well-defined
    subtasks or layers with a formal interface
    between them
  • Idle RQ protocol layer
  • To transfer a series of blocks of information
    each of a defined maximum length, to a similar AP
    in the destination computer

14
Layered architecture (contd)
  • Relating to error detection
  • The generation and return of acknowledgement
    frames, timeouts and the delivery of blocks of
    information in the same sequence as they were
    submitted
  • AP layer
  • Be concerned only with the procedure to transfer
    the file of data using the service provided the
    communications layer

15
Layered architecture (contd)
  • The name of the file, its length, the
    segmentation of the file contents into smaller
    blocks, and the reassembly of the blocks

16
Layered architecture (contd)
  • The service provided by a communications layer is
    expressed in the form of a service primitive
  • ECB
  • Event control block
  • The user service primitive associated with a
    layer is passed between layers using a data
    structure

17
Layered architecture (contd)
  • Operations
  • Source AP
  • Free ECB? ?? user data ??
  • Primitive type field? L_DATA.request? set
  • Link layer? input queue? ??
  • Idle RQ protocol entity
  • Link service input queue?? ECB? detect
  • Queue? head? ?? entry? ??
  • I-frame ??

18
Layered architecture (contd)
  • Secondary protocol entity ? frame ??
  • Secondary protocol entity
  • Header? tailer character ??
  • Link service primitive type? L_DATA.indication??
    set? output queue? ???? ECB ??? dest. AP? frame
    ??
  • Destination AP
  • ECB? LS_provider queue? ?? ???? ??
  • ??? AP-to-AP protocol? ?? msg. block ??

19
Layered architecture (contd)
  • Sending side?? ACK-frame? ???? LS-user input
    queue? ???? waiting ECB? ??? ?? ??

20
Protocol Specification
  • More sophisticated protocols
  • It is often not practical to describe fully the
    operation of the protocol
  • Three most common methods
  • State transition diagrams
  • Extended event-state tables
  • High-level structured programs
  • In many case, we define a protocol as a
    combination of these coupled with time sequence
    diagrams to illustrate the user service
    primitives associated with the protocol

21
Protocol Specification (contd)
  • Finite state machine (automation)
  • The protocol can be in just one if a finite
    number of defined states at any instant
  • Transitions between states take place as a result
    of an incoming event
  • As a result of an incoming event, an associated
    outgoing event is normally generated

22
Protocol Specification (contd)
  • State
  • Idle waiting for message to send
  • Idle waiting to receive an acknowledgement
  • Incoming event
  • A msg. becomes ready to send
  • An ACK-frame is received
  • Outgoing event
  • On receipt of a message, send the created I-frame
    on the link

23
Protocol Specification (contd)
  • On receipt of a NAK-frame,, retransmit the
    waiting I-frame
  • Local or specific actions
  • Start a timer
  • Increment the send sequence variable

24
Idle RQ specification
  • Operation
  • An incoming event has started to be processed
  • All processing functions associated with event
  • The generation of any outgoing events
  • Local actions
  • A possible change in state

25
Idle RQ specification(contd)
  • Communications subsystem architecture and
    protocol entity interfaces

26
Idle RQ specification(contd)
27
Idle RQ specification(contd)
  • Specification
  • Incoming (and outgoing) event interface? queue?
    ???? protocol entity? ??
  • Transmission? ???? ?? protocol entity?
    transmit-receive procedure ??? ???? queue ??
  • Protocol entity? timer procedure???? queue ??
  • Timer? ??? ?? ?? queue? ?? protocol entity?
    message ??

28
Idle RQ specification(contd)
  • Transmit-receive procedure? ??
  • Frame? ?? ??? protocol entity? ?? ??? ?? queue?
    ??
  • Protocol entity? sequential system??? ?? incoming
    event? ??? ? ??? ???? ?? ??

29
Idle RQ specification(contd)
30
Idle RQ specification(contd)
  • State diagram? ?.??
  • Protocol? ??? ????? ??
  • Space limitation??? ?? ??? incoming event? error
    condition? ???? ?? ???
  • Event-state table method
  • ?? ??? ??? incoming event ??? ??? outgoing event?
    specific action, ??? ?? ??
  • Predicate? ??? ???? ??? ??

31
Link Utilization
32
Continuous RQ
  • Link utilization is much improved at the expense
    of increased buffer storage requirements

33
Continuous RQ (contd)
  • When an error does occur
  • Selective Repeat
  • S selects and requests the retransmission of just
    those frames in the sequence that are corrupted
  • Go-back-N
  • S detects the receipt of an out-of-sequence
    I-frame and requests P to retransmit all
    outstanding unacknowledged I-frames from the last
    correctly received, and hence acknowledged,
    I-frame

34
Selective repeat
  • Two implementation types
  • Implicit retransmission
  • S acknowledges correctly received frames and P
    determines from the sequence of ACK-frames
    received that a frame has been lost
  • Explicit request
  • S returns a specific negative acknowledgement for
    a frame that is missing from the sequence

35
Selective repeat (contd)
  • In the event of frames being received out of
    sequence, S retains these in the link receive
    list until the next in-sequence frame is received

36
Selective repeat (contd)
37
Selective repeat (contd)
38
Go-back-N
  • With go-back-N
  • When the secondary detects an out-of-sequence
    frame, it informs the primary to start to
    retransmit frames from a specified frame number
  • Frame ??? ???
  • ??? selective repeat?? ??

39
Go-back-N (contd)
40
Go-back-N (contd)
  • Timeout mechanism

41
Flow Control
  • Flow control
  • Be concerned with controlling the rate of
    transmission of characters or frames on a link so
    that the receiver always has sufficient buffer
    storage resources to accept them prior to
    processing

42
X-ON/X-OFF
  • A character-oriented terminal-to-computer link
  • X-OFF
  • To the controlling device within the terminal,
    instructing it to cease transmission
  • On receipt of the X-OFF character, the terminal
    either ignores and further characters entered at
    the keyboard or buffers them in a local buffer
    until the overload has been cleared

43
X-ON/X-OFF (contd)
  • X-ON
  • When the overload condition decays and the
    computer is able to accept further characters, it
    returns a companion control character X-ON to
    inform the terminal control device that it may
    restart sending characters

44
Sliding window
  • Sliding window
  • It sets a limit on the number of I-frames that P
    may send before receiving an ack.
  • P monitors the of unacknowledged I-frames
    currently held in the retransmission list
  • If the dest side of the link is unable to pass on
    the frames sent to it
  • S stops returning ack frames
  • The retransmission list at P builds up and this
    in turn can be interpreted as a signal for P to
    stop transmitting further frames until ack start
    to flow again

45
Sliding window (contd)
  • Send window
  • the max limit is set on the number of I-frames
    that can be awaiting ack
  • If set to 1, it reverts to idle RQ
  • Receive window
  • the max of frame buffers required at S

46
Sliding window (contd)
47
Sequence numbers
  • Until now
  • Be assumed that the sequence inserted into each
    frame by P is imply the previous sequence plus
    one and that the range of available is infinite
  • It is possible to limit the range of sequence
    required to identify each transmitted frame
    uniquely

48
Sequence numbers (contd)
49
Sequence numbers (contd)
50
Protocol specification
51
Link management
  • Link management
  • Not be concerned with the actual transfer of user
    data
  • Initialization or link set-up phase
  • Link disconnection phase
Write a Comment
User Comments (0)
About PowerShow.com