- Data link control protocol requirements
- frame synchronization
- flow control
- error control
- addressing
- control and data on same link: receiver가 어떤 데이터를 받았을 때, 데이터와 control information 둘 사이를 구분하는 것이 가능해야 함
- link management: link initialization, maintenance, termination
: receiver가 받을 수 있는 만큼만 sender가 데이터를 보내도록 보장하는 기술 => buffer overflow 방지
모든 frame은 frame lost나 error 없이 받는다고 가정한다
=> multiple frames for a single message. bit length of link > frame length (a > 1) => stop-and-wait 비효율적
: mechanism to detect and correct errors
lost frame / damaged frame
based on stop-and-wait flow control
1. source transmits a single frame and wait for ACK
2. if received frame is damaged, discard it
- transmitter's timer expires
- if no ACK within timeout, retransmit the frame
3. if ACK is damaged, transmitter will not recognize it => lost
- transmitter will retransmit
- receiver gets two copies of the frame
- solution: alternatively label frames with 0 and 1 (ACK1 and ACK0)
simple & inefficient mechanism
based on sliding-window flow control
1. use window to control number of outstanding(미해결) frames
2. if no error => ACK with next frame number expected
3. if error => reply with rejection (REJ)
- receiver discard that frame and all future frames until error frame received correctly. 거절당한 프레임 이후 모두 제거
- transmitter must retransmit that frame in error and all subsequent frames
Only rejected (SREJ) or time-out framres are retransmitted
subsequent frames are accepted and buffered by the receiver
(+) minimize the amount of retransmission
(-) receiver must maintain large buffer space, more complex logic in transmitter and receiver
useful for satellite links with long propagation delays
Normal Responsed Mode (NRM)
- unbalanced configuration
- primary: initiates data transfer to a secondary
- secondary: only transmit data in reponse to command from primary (primary에 대한 응답으로만 데이터 전송 가능)
- multidrop lines: host computer (primary) polls each terminal (secondary) for input
- point-to-point links: terminal이나 other peripheral을 컴퓨터에 연결
Asynchronous Balanced Mode (ABM)
- balanced configuration
- either combined station: transmission 가능. 다른 station 허락 필요 X
- most widely used
- polling overhead X: efficient use of full-duplex point-to-point link
Asynchronous Response Mode (ARM)
- unbalanced configuration
- secondary: initiate transmission w/o primary 허락
- primary: responsible for line
- rarely used
Synchronous Transmission (bit-oriented)
all transmissions in frames
single frame format for all data and control exchanges
Flag Fields: delimit frame at both ends with 01111110
- 한 frame의 closing flag, next frame의 opening flag로 사용 가능
- receiver: hunts for flag sequence to synchronize
- Bit Stuffing: 01111110을 포함하는 data와의 confusion 방지
Bit Stuffing
- transmitter: 5개의 1이 나온 뒤에 0을 삽입
- receiver: 5개의 1 감지 시, next bit check
- 0: delete
- 1 & 7th bit가 0: flag
- 6th & 7th bit가 모두 1: abort condition (폐기)
Address Field
- identifies secondary station that sent or will receive frame
- 주로 8bits long
- multiple of 7 bits extend 가능
: leftmost bit of each octet: last octet(1), not last bit(0)
- all 1s (11111111): broadcast
Control Field: frame type에 따라 differ (처음 1~2 bit가 frame 결정)
- Information frame (I-frame)
: user에게 전송할 data carry
: flow, error control: piggybacked on I-frame
- Supervisory frame (S-frame)
: provide ARQ mechanism when piggybacking is not used
(보낼 data X. ACK 보낼 때)
- Unnumbered frame (U-frame)
: provide supplemental link control functions
Poll / Final Bit: 모든 control field는 P/F bit 가지고 있음. context에 따라 사용
- command frame: P bit
1로 설정. solicit (poll) response from peer HDLC entity
- reponse frmae: S bit
1로 설정. indicate response frame for soliciting command
Information field
- I-frame과 몇몇의 U-frame에만 있음. (S-frame: 사용자 data 보내지 X)
- must contain integral number of octets
- variable length up to system-defined maximum (system마다 다름)
Frame Check Sequence field
- error-detecting code
- calculated from remaining bits of frame (flag 제외 나머지 bits)
- 16-bit CRC-CCITT
- Optional 32-bit CRC-32
: 두 개의 station 간의 I, S, U frame 교환 작업
1. Initialization
2. Data transfer
3. Disconnect