Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 3.1 - Dr. Phạm Trần Vũ
Số trang: 16
Loại file: pdf
Dung lượng: 815.58 KB
Lượt xem: 11
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 3.1 của Dr. Phạm Trần Vũ trình bày về The Data Link Layer với những nội dung như Data Link Layer Design Issues, Functions of the Data Link Layer, Services Provided to Network Layer và một số nội dung khác.
Nội dung trích xuất từ tài liệu:
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 3.1 - Dr. Phạm Trần Vũ Chapter 3The Data Link Layer Data Link Layer Design Issues• Services Provided to the Network Layer• Framing• Error Control• Flow Control Functions of the Data Link Layer• Provide service interface to the network layer• Dealing with transmission errors• Regulating data flow • Slow receivers not swamped by fast sendersFunctions of the Data Link Layer (2) Relationship between packets and frames.Services Provided to Network Layer (a) Virtual communication. (b) Actual communication.Services Provided to Network Layer (2) Placement of the data link protocol. FramingA character stream. (a) Without errors. (b) With one error. Framing (2)(a) A frame delimited by flag bytes.(b) Four examples of byte sequences before and after stuffing. Framing (3)bit pattern: 01111110 (in fact, flag byte)Bit stuffing(a) The original data.(b) The data as they appear on the line.(c) The data as they are stored in receiver’sError Detection and Correction • Error-Correcting Codes • Error-Detecting Codes Error-Correcting CodesParity bit:The parity bit is chosen so that the number of 1 bits in the codeword is even (or odd).Example: Even parity: 1011010 → 10110100 Odd parity: 1011010 → 10110101 Error-Correcting Codes The (7,4) Hamming codeCalculating parity bits All possible values of 3 bits (even parity): 001 →1 010 →2p0 = p(1, 3, 5, 7): all bits 011 →3 at position whose 100 →4 number ending with 1 101 →5 (bin) 110 →6 111 →7P1 = p(2,3,6,7): second least significant bit is 1 (bin)Error-Correcting Codes The (7,4) Hamming code tableSingle-error code received:Codes Error-Correcting 1001110Check the parity bits:p1 = p(1,0,1,0) = 0 [right],p2 = p(0,0,1,0) = 1 [error]p3 = p(1,1,1,0) = 1 [error]Number of erroneous bit:x = p2p1p0 = 110 (bin) = 6 (dec)The receiver flips the bit at position 6 tocorrect the block. Error-Detecting Codes Where? Assume block size 1000 bits. 10 check bits are needed for error-correction; To detect a block with a single 1-bit error, one parity bit per block will suffice. Improvement Data as a rectangular matrix n bits wide and k bits high. A parity bit is computed separately for each column and append to the matrix as the last row.in practice, another method is in widespread use:the polynomial code, also known as a CRC(Cyclic Redundancy Check). Flow Control feedback-based flow control, the receiver sends back information (feedback) to the sender to control the flow. rate-based flow control, the protocol has a built-in mechanism that limits the rate at which senders may transmit data.
Nội dung trích xuất từ tài liệu:
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 3.1 - Dr. Phạm Trần Vũ Chapter 3The Data Link Layer Data Link Layer Design Issues• Services Provided to the Network Layer• Framing• Error Control• Flow Control Functions of the Data Link Layer• Provide service interface to the network layer• Dealing with transmission errors• Regulating data flow • Slow receivers not swamped by fast sendersFunctions of the Data Link Layer (2) Relationship between packets and frames.Services Provided to Network Layer (a) Virtual communication. (b) Actual communication.Services Provided to Network Layer (2) Placement of the data link protocol. FramingA character stream. (a) Without errors. (b) With one error. Framing (2)(a) A frame delimited by flag bytes.(b) Four examples of byte sequences before and after stuffing. Framing (3)bit pattern: 01111110 (in fact, flag byte)Bit stuffing(a) The original data.(b) The data as they appear on the line.(c) The data as they are stored in receiver’sError Detection and Correction • Error-Correcting Codes • Error-Detecting Codes Error-Correcting CodesParity bit:The parity bit is chosen so that the number of 1 bits in the codeword is even (or odd).Example: Even parity: 1011010 → 10110100 Odd parity: 1011010 → 10110101 Error-Correcting Codes The (7,4) Hamming codeCalculating parity bits All possible values of 3 bits (even parity): 001 →1 010 →2p0 = p(1, 3, 5, 7): all bits 011 →3 at position whose 100 →4 number ending with 1 101 →5 (bin) 110 →6 111 →7P1 = p(2,3,6,7): second least significant bit is 1 (bin)Error-Correcting Codes The (7,4) Hamming code tableSingle-error code received:Codes Error-Correcting 1001110Check the parity bits:p1 = p(1,0,1,0) = 0 [right],p2 = p(0,0,1,0) = 1 [error]p3 = p(1,1,1,0) = 1 [error]Number of erroneous bit:x = p2p1p0 = 110 (bin) = 6 (dec)The receiver flips the bit at position 6 tocorrect the block. Error-Detecting Codes Where? Assume block size 1000 bits. 10 check bits are needed for error-correction; To detect a block with a single 1-bit error, one parity bit per block will suffice. Improvement Data as a rectangular matrix n bits wide and k bits high. A parity bit is computed separately for each column and append to the matrix as the last row.in practice, another method is in widespread use:the polynomial code, also known as a CRC(Cyclic Redundancy Check). Flow Control feedback-based flow control, the receiver sends back information (feedback) to the sender to control the flow. rate-based flow control, the protocol has a built-in mechanism that limits the rate at which senders may transmit data.
Tìm kiếm theo từ khóa liên quan:
Computer Networks 1 Mạng máy tính 1 The Data Link Layer Data Link Layer Design Issue Functions of the Data Link Layer Services Provided to Network LayerGợi ý tài liệu liên quan:
-
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 9 - Dr. Phạm Trần Vũ
23 trang 20 0 0 -
230 trang 11 0 0
-
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 4 - Dr. Phạm Trần Vũ
37 trang 11 0 0 -
ECE/CS 372 Introduction to Computer Networks Lecture 1: Chapter 5
32 trang 10 0 0 -
Computer Networks 1: Lecture 12 (Part 3) - Nguyễn Lê Duy Lai
56 trang 10 0 0 -
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 1 - Dr. Phạm Trần Vũ
58 trang 8 0 0 -
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 5 - Dr. Phạm Trần Vũ
27 trang 7 0 0 -
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 3.2 - Dr. Phạm Trần Vũ
52 trang 7 0 0 -
Bài giảng Computer Networks 1 (Mạng Máy Tính 1): Lecture 2 - Dr. Phạm Trần Vũ
35 trang 7 0 0