chapter 11 data link control

35
4.1 Chapter 11 Data Link Control

Upload: jamese

Post on 05-Jan-2016

36 views

Category:

Documents


2 download

DESCRIPTION

Chapter 11 Data Link Control. 링크 계층. 데이터 링크 제어에서 전달하는 데이터의 단위를 프레임 (frame) 이라고 부른다 . 목적 전송되는 프레임의 시작과 끝을 어떻게 구별할 것인가 ? 이외에 , 전송되는 프레임에 에러가 발생했는가 ? 송수신 장치간에 속도 차에 의한 프레임의 손실이 발생할 수 있는가 ? ( 흐름 제어 ). 물리 계층과 링크 계층. 프레임의 경계 구별. 프레임의 시작과 끝을 특별한 문자 ( 혹은 비트 패턴 ) 를 사용하여 구별한다 . - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter  11 Data Link Control

4.1

Chapter 11

Data Link Control

Page 2: Chapter  11 Data Link Control

링크 계층 데이터 링크 제어에서 전달하는 데이터의

단위를 프레임 (frame) 이라고 부른다 . 목적

전송되는 프레임의 시작과 끝을 어떻게 구별할 것인가 ?

이외에 , 전송되는 프레임에 에러가 발생했는가 ? 송수신 장치간에 속도 차에 의한 프레임의

손실이 발생할 수 있는가 ? ( 흐름 제어 )

Page 3: Chapter  11 Data Link Control

물리 계층과 링크 계층

Page 4: Chapter  11 Data Link Control

프레임의 경계 구별 프레임의 시작과 끝을

특별한 문자 ( 혹은 비트 패턴 ) 를 사용하여 구별한다 . Character-oriented Bit-oriented

Page 5: Chapter  11 Data Link Control

Byte stuffing

만약 프레임 내에 flag byte 와 동일한 byte 의 데이터가 존재한다면 ,

Page 6: Chapter  11 Data Link Control

Bit stuffing

만약 프레임 내에 flag 비트 패턴과 동일한 비트 패턴의 데이터가 존재한다면 ,

Page 7: Chapter  11 Data Link Control

흐름 제어 (flow control)

흐름 제어는 수신 장치가 송신 장치가 보내는 데이터의 양을 조절하도록 하는 절차이다 .

흐름 제어의 방법 Stop-and-wait flow control Sliding window flow control

Page 8: Chapter  11 Data Link Control

Stop-and-Wait Flow control

송신 장치는 보낸 프레임에 대한 ACK 이 오기 전까지 송신을 중단하고 , ACK 이 도착하면 다음 프레임을 전송한다 .

Page 9: Chapter  11 Data Link Control

만약 프레임이 손실되었다면 ,

Page 10: Chapter  11 Data Link Control

Sliding window flow control

송신 장치는 ACKf 를 받지 않더라도 계속해서 프레임을 전송한다 .

하지만 현재 연속해서 보낼 수 있는 가능한 프레임의 수를 계속 모니터링한다 .

송신 장치의 window 현재 순간에 ACK 를 받지 않더라도 보낼 수

있는 프레임의 수 이것은 결국 현재 수신 장치의 buffer 에

비어있는 공간을 크기이다 .

Page 11: Chapter  11 Data Link Control

송신측 window

Page 12: Chapter  11 Data Link Control

예 11.6( 최대 윈도우 크기 =7)

Page 13: Chapter  11 Data Link Control

예 11.7( 재전송 발생 )

Page 14: Chapter  11 Data Link Control

에러 제어

에러 제어 에러 검출

CRC Checksum

에러 정정 Forward error correction 재전송 (retransmission, ARQ)

Stop-and-Wait ARQ Go-Back-N ARQ Selective Repeat ARQ

Page 15: Chapter  11 Data Link Control

Go-Back-N ARQ

Go-Back-N ARQ 는 window 가 허락하는 범위에서 프레임을 연속해서 전송한다 .

그런데 프레임 전송에 에러가 발생하면 재전송을 해야 하는데…

I(0)I(1)I(2)I(3)I(4)I(5)I(6)I(4)I(5)I(6)I(7)I(0)I(1)I(7)I(0)I(1)I(2)I(3)

timeout

Retransmitall framesfrom I(4)

Retransmit from I(7)

Error on ACK(8)

NAK(4)

ACK(8)

Erroron I(4)

ACK(1)...

Page 16: Chapter  11 Data Link Control

Selective Repeat ARQ

현재의 window 크기의 범위 내에서 프레임을 계속 전송하는 것은 같지만 만약 에러가 발생해서 재전송을 해야 할 때 차이가 있다 .

I(0)I(1)I(2)I(3)I(4)I(5)I(6)I(4)I(7)I(0)I(1)I(2)I(3)I(4)I(1)I(5)I(6)I(7)

ACK(1)

timeout

Retransmit only I(4)

Retransmit only I(1)

Error on ACK(2)

NAK(4)

ACK(2)

Erroron I(4)

.

.

.

Page 17: Chapter  11 Data Link Control

예 11.8: Selective Repeat ARQ 와 window

Page 18: Chapter  11 Data Link Control

Frame Sequence Number

프레임은 연속적인 번호로 구별할 수 있어야 한다 . 따라서 프레임의 헤더에는 sequence number 를 적는 필드가 있다 .

예를 들어 , m=3 이라면 프레임의 번호는 0부터 7 이 된다 . 따라서 프레임들은 다음과 같은 sequence number 를 갖는다 . 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,…

질문 : sequence number 필드의 크기가 3 비트라면 송신측 window size 는 8(=23) 인가 ?

Page 19: Chapter  11 Data Link Control

최대 window size(Go-Back-N) 재전송이 발생했을 때 수신측에 혼동이 없기

위해서는 최대 window size 는 얼마로 해야할까 ? 다음의 예는 sequence number 는 22=4 일 경우

Page 20: Chapter  11 Data Link Control

최대 window size(Selective Repeat)

Page 21: Chapter  11 Data Link Control

Piggybacking

ACK 프레임을 별도로 전송하지 않고 데이터 프레임을 전송하면서 ACK 를 같이 한다 .

Page 22: Chapter  11 Data Link Control

링크 계층 프로토콜

HDLC PPP

Page 23: Chapter  11 Data Link Control

HDLC

ISO 표준 point to point 와 multipoint 링크

상에서 half-duplex 와 full-duplex 통신을 제공한다 .

Page 24: Chapter  11 Data Link Control

HDLC 프레임 포맷

Address: address of the secondary station. It specifies which stationTo receive in the multi-point link.

Control: it is used for error and flow control.

FCS: CRC-12 (X16 + X12 + X5 + 1)

Page 25: Chapter  11 Data Link Control

프레임 유형

Page 26: Chapter  11 Data Link Control

Control field

Page 27: Chapter  11 Data Link Control

I-FrameI-frames carry user data.The first bit of the control field is 0.N(S) is the sequence number of frame, and N(R) is the sequence numberof the acknowledgement.P/F(Poll/Final): It means poll when frame is sent by a primary station to secondary station, and it means final when frame is sent by a secondarystation to a primary station.

Page 28: Chapter  11 Data Link Control

S-FrameS-frames are used for error control and flow control when piggybacking is either impossible or inappropriate (when a station has no data to send at this moment.)Types of S-frame - RR(Receive ready)

- RNR(Receiver not ready) - REJ(Reject) : error notification for Go-Back-N ARQ - SREJ(Selective Reject): error notification for Selective-Repeat ARQ

Page 29: Chapter  11 Data Link Control

U-FrameU-frames are used to exchange session management and control information

Page 30: Chapter  11 Data Link Control

예 : connection and disconnection

Page 31: Chapter  11 Data Link Control

예 11.10

Page 32: Chapter  11 Data Link Control

예 11.11

Page 33: Chapter  11 Data Link Control

Point-to-Point Protocol(PPP)

인터넷에서 point-to-point 로 연결된 링크에서 사용 Cf: Ethernet

HDLC 프로토콜에 기반을 두고 HDLC 프레임에 여러 종류의 PPP 패킷을 전송한다 .

Byte-oriented protocol

Page 34: Chapter  11 Data Link Control

PPP 프레임 포맷

Page 35: Chapter  11 Data Link Control

상태 전이도