Presentation is loading. Please wait.

Presentation is loading. Please wait.

Protocol Basics.

Similar presentations


Presentation on theme: "Protocol Basics."— Presentation transcript:

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 (cont’d)
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 (cont’d)
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 (cont’d)
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 Continuous 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 (cont’d) 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 (cont’d) Implicit retransmission

11 Idle RQ (cont’d) Explicit Request

12 Idle RQ (cont’d) N(S) N(R) 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 Idle RQ protocol layer
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 (cont’d)
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 (cont’d)
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 (cont’d)
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 (cont’d)
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 (cont’d)
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 (cont’d)
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 (cont’d)
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 (cont’d)
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 (cont’d)
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(cont’d)
Communications subsystem architecture and protocol entity interfaces

26 Idle RQ specification(cont’d)

27 Idle RQ specification(cont’d)
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(cont’d)
Transmit-receive procedure의 역할 Frame을 전송 받아서 protocol entity에 의한 처리를 위해 queue에 저장 Protocol entity는 sequential system이므로 다른 incoming event가 도착할 때 정보를 저장하는 것이 중요

29 Idle RQ specification(cont’d)

30 Idle RQ specification(cont’d)
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 (cont’d)
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 (cont’d)
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 (cont’d)

37 Selective repeat (cont’d)

38 Go-back-N With go-back-N Frame 순서는 유지되 효율은 selective repeat보다 낮음
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 (cont’d)

40 Go-back-N (cont’d) 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 (cont’d) 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 (cont’d)
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 (cont’d)

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 (cont’d)

49 Sequence numbers (cont’d)

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


Download ppt "Protocol Basics."

Similar presentations


Ads by Google