• Review: – Hamming distance of a code. – Relation between the Hamming distance (N) of a code and the number of errors that can be detected/corrected? – Error correction code and error detection code, which one is more efficient? – How do sender and receiver work when the CRC code is used to do error detection? – How to generate (and verify) CRC code: • E.g: G(x) = x^2+1, data = 100001, final message=? • Example of a data link layer protocol: HDLC (High-level Data link Control). • Frame: 01111110 Address Control Data Checksum 01111110 8 8 8 >=0 16 8 • Framing: bit oriented framing with bit stuffing • Error detection: CRC code with CRC-CCITT as the generator polynomial. • Flow control and Error control: Sliding window protocol with 3 bits sequence number and piggybacking. • Sequence number in the control field. • Control frames to do line maintenance. • Three kind of frames: – information frame control field: 0 seq 3 P/F 1 next 3 – Supervisory frame control field 1 0 Type P/F next Type: ACK, NACK, RECEIVE NOT READY, SELECTIVE REJECT. – Unnumbered • use a control frame, or sending unacknowledged data. • Control field: 1 1 Type P/F Modifier