Data Link Layer Protocols

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which of the following is the primary responsibility of the data link layer in computer networks?

  • Reliable transfer of datagrams across a single link. (correct)
  • Compressing data to improve transmission efficiency.
  • Routing data packets across multiple networks.
  • Dividing data into packets and determining the path.

In the context of the data link layer, what is the purpose of 'framing'?

  • To optimize the routing path for data transmission.
  • To compress the size of the data being transmitted.
  • To fragment large packets into smaller, manageable pieces.
  • To encapsulate a datagram into a frame, adding header and trailer. (correct)

Which of the following is a key difference between MAC addresses and IP addresses?

  • MAC addresses are assigned dynamically, while IP addresses are statically assigned.
  • MAC addresses are used for routing between networks, while IP addresses are for identifying devices within a network.
  • MAC addresses are used for link-layer addressing within a single network, while IP addresses are used for routing across multiple networks. (correct)
  • MAC addresses are shorter and easier to read than IP addresses.

Why is reliable delivery between adjacent nodes not always implemented in the data link layer, especially over fiber optic cables?

<p>Fiber optic links typically have very low bit-error rates, reducing the need for complex reliability mechanisms at the link layer. (B)</p> Signup and view all the answers

In data communication, what happens when a receiver detects an error using error detection techniques at the data link layer?

<p>The receiver requests the sender to retransmit the frame. (B)</p> Signup and view all the answers

What is the key difference between half-duplex and full-duplex communication?

<p>Half-duplex allows data transmission in one direction at a time, while full-duplex allows simultaneous transmission in both directions. (B)</p> Signup and view all the answers

Where is the link layer typically implemented in a host?

<p>In the network adapter (NIC) and its associated drivers. (A)</p> Signup and view all the answers

What is the purpose of 'byte stuffing' in the context of framing?

<p>To ensure that flag bytes within the payload do not get misinterpreted as frame delimiters. (B)</p> Signup and view all the answers

What is the role of the 'frame header' in data link layer framing?

<p>To contain source and destination addresses. (C)</p> Signup and view all the answers

Which framing method is most susceptible to errors if the count field is corrupted?

<p>Byte count. (D)</p> Signup and view all the answers

In byte stuffing, what is the purpose of the 'escape character' (ESC)?

<p>To differentiate flag bytes within the message from actual frame delimiters. (A)</p> Signup and view all the answers

During bit stuffing, what action is taken when five consecutive 1s are encountered in the data stream?

<p>A '0' bit is inserted. (A)</p> Signup and view all the answers

In the context of physical layer coding violations for framing, what is the significance of using bit patterns '11' or '00'?

<p>They are used for delimiting frames. (B)</p> Signup and view all the answers

Which error detection method involves adding the data segments and then taking the 1's complement of the sum?

<p>Internet checksum. (A)</p> Signup and view all the answers

What is a key limitation of single-bit parity checking?

<p>It can detect but not correct single bit errors. (D)</p> Signup and view all the answers

How does two-dimensional bit parity improve upon single-bit parity?

<p>It can detect and correct single bit errors. (D)</p> Signup and view all the answers

In the context of the Internet checksum, what happens if the sum of segments results in more bits than the checksum field can hold?

<p>The extra bits are wrapped around and added to the result. (B)</p> Signup and view all the answers

Which of the following is a characteristic of Cyclic Redundancy Check (CRC)?

<p>It utilizes polynomial division for error detection. (B)</p> Signup and view all the answers

What is the purpose of adding CRC bits to a data frame?

<p>To enable the receiver to verify the integrity of the received data. (C)</p> Signup and view all the answers

Which of the following is a key characteristic of Utopian Simplex Protocol?

<p>It assumes a perfect channel with no errors or losses. (C)</p> Signup and view all the answers

What is the primary function of the Simplex Stop-and-Wait protocol?

<p>To provide flow and error control in a data link layer. (C)</p> Signup and view all the answers

In the Simplex Stop-and-Wait ARQ protocol, what action does the sender take if it does not receive an acknowledgement (ACK) after a certain period?

<p>The sender retransmits the original frame. (A)</p> Signup and view all the answers

What is the main feature that distinguishes sliding window protocols from Stop-and-Wait protocols?

<p>Sliding window protocols can send multiple frames before receiving acknowledgements. (B)</p> Signup and view all the answers

What is the purpose of the 'window' in a sliding window protocol?

<p>It defines the range of sequence numbers that can be used for frames in transit. (B)</p> Signup and view all the answers

In the Go-Back-N ARQ protocol, what happens when a frame is found to be in error?

<p>The receiver requests retransmission of all frames starting from the erroneous one. (C)</p> Signup and view all the answers

How does Selective Repeat ARQ differ from Go-Back-N ARQ in handling errors?

<p>Selective Repeat ARQ only retransmits the frames that were received in error, while Go-Back-N retransmits all frames after the error. (B)</p> Signup and view all the answers

What is the primary advantage of using Selective Repeat ARQ over Go-Back-N ARQ?

<p>More efficient use of bandwidth under high error rates. (B)</p> Signup and view all the answers

Which of the following is a key feature of High-Level Data Link Control (HDLC)?

<p>It is a bit-oriented protocol that uses bit stuffing. (A)</p> Signup and view all the answers

In HDLC, what is the purpose of the frame check sequence (FCS)?

<p>To detect errors in the transmitted frame. (D)</p> Signup and view all the answers

What technique does HDLC employ to ensure that the bit pattern of the delimiter flag does not inadvertently appear within the data being transmitted?

<p>Bit stuffing. (C)</p> Signup and view all the answers

In the context of data link layer protocols, what does ARQ stand for?

<p>Automatic Repeat Request (B)</p> Signup and view all the answers

Which of the following data link layer protocols is best suited for a channel with a high error rate where lost frames are common?

<p>Selective Repeat ARQ (D)</p> Signup and view all the answers

Which of the following is a key characteristic of an I-frame in HDLC?

<p>It carries user data from the upper layers. (C)</p> Signup and view all the answers

Which statement accurately compares and contrasts 'byte stuffing' and 'bit stuffing'?

<p>Byte stuffing adds a byte when a flag byte occurs in the payload, while bit stuffing inserts a bit when a pre-defined pattern of bits occurs. (A)</p> Signup and view all the answers

Parity bits of odd-parity are added to make the number of 1s odd, while parity bits of even-parity are added to make the number of 1s even. If a frame being transmitted has the bit sequence 1011001, what paritiy bits will be added for odd-parity and even-parity

<p>The bit added for odd parity will be 1, while the bit added for even parity will be 0 (A)</p> Signup and view all the answers

Flashcards

Data-Link Layer responsibility

Transferring a datagram from one node to a physically adjacent node over link

Framing and Link Access

Adding header/trailer, medium access control, and using MAC addresses for source/destination

Flow Control

Pacing data to ensure the receiver can handle the rate

Error Detection

Identifying bit errors due to signal issues

Signup and view all the flashcards

Error Correction

Identifying and fixing bit errors without retransmission

Signup and view all the flashcards

Half-Duplex

Nodes transmit but not simultaneously

Signup and view all the flashcards

Full-Duplex

Both nodes transmit simultaneously

Signup and view all the flashcards

Adaptor

Where the link layer is implemented in each host

Signup and view all the flashcards

Framing

Process of encapsulating datagrams into frames

Signup and view all the flashcards

Frame Header

Source and destination addresses of the frame

Signup and view all the flashcards

Payload Field

Message to be delivered

Signup and view all the flashcards

Trailer

Error detection and correction bits

Signup and view all the flashcards

Flags (Framing)

Protocol dependent special character signaling start/end of frame

Signup and view all the flashcards

Byte Count

Framing method that uses the count of bytes at the start of the frame.

Signup and view all the flashcards

Flag with Byte Stuffing

Flag bytes with escape characters to avoid confusion

Signup and view all the flashcards

Flag with Bit Stuffing

Adding bits to prevent flag patterns in the data

Signup and view all the flashcards

Physical Layer Coding Violations

Using invalid physical layer codes to mark frame boundaries

Signup and view all the flashcards

Error Detection and Correction (EDC) bits

Bits added for error detection, may include header fields

Signup and view all the flashcards

Error Detection

Ensures reliable data transfer and may miss some errors

Signup and view all the flashcards

Single Bit Parity

Detects single-bit errors

Signup and view all the flashcards

Two-Dimensional Bit Parity

Detects and corrects single bit errors using row and column parity

Signup and view all the flashcards

Internet Checksum

Detects errors of transmitted packet.

Signup and view all the flashcards

Cyclic Redundancy Check (CRC)

Powerful error-detection coding, in Ethernet/WiFi/ATM

Signup and view all the flashcards

Utopian Simplex Protocol

Hypothetical Protocol designed for unidirectional data transmission over ideal channel

Signup and view all the flashcards

Simplex Stop-and-Wait Protocol

Data link layer protocol for data communications with error control and flow control mechanisms

Signup and view all the flashcards

Study Notes

  • Goals include understanding link layer services, framing, error detection/correction, multiple access sharing, MAC addressing, and local area networks like Ethernet and VLANs.
  • Includes instantiation, implementation of various link layer technologies
  • The data link layer: introduction, services
  • Framing as a link layer characteristic
  • Error detection and correction as part of link layer functions
  • Data link protocols like stop-n-wait and stop-n-wait ARQ
  • Hosts and routers are nodes within the data link layer.
  • Communication channels connecting adjacent nodes compose links. Links can be wired, wireless, or LAN-based.
  • Layer-2 packets, known as frames, encapsulate datagrams.
  • The data-link layer transfers datagrams from one node to physically adjacent node over a link
  • Datagrams are transferred across various links using different link protocols (e.g., Ethernet, Frame Relay, 802.11)
  • Each link protocol offers varied services.
  • Link protocols may or may not offer reliable data transfer (rdt) over a link.
  • Analogy: Transportation of tourists (datagrams) via different transportation modes (link layer protocols), communication links representing transport segments.
  • Framing/Link Access: Encapsulates datagrams into frames by adding headers and trailers; used for channel access in shared mediums; employs MAC addresses in frame headers for source/destination identification, which differ from IP addresses.
  • Reliable Delivery between Adjacent Nodes: Achieved through protocols learned in Chapter 3, seldom used in low bit-error links (e.g., fiber), but often used with wireless links with high error rates, for link-level and end-to-end reliability.
  • Flow control: coordinates pacing between adjacent sending and receiving nodes
  • Error Detection: Identifies errors from signal attenuation or noise; receivers detect errors, signaling sender for retransmission or frame drops.
  • Error Correction: Corrects bit errors without retransmission
  • Half and Full Duplex: Half-duplex nodes at both ends of link transmit, but not concurrently, full-duplex allows simultaneous transmission in both directions
  • Implemented in every host's "adaptor" (adapter, network interface card-NIC) or on a chip.
  • Adaptors may be Ethernet cards, 802.11 cards, or an Ethernet chipset.
  • Implements the link and physical layers, attaches to the host's system buses
  • Hardware, software, and firmware combine to implement the data link layer

Adaptor Communication

  • Sending side: encapsulates datagram into a frame, adds error checking bits, rdt, flow control information.
  • Receiving side: checks for errors, rdt, flow control, extracts datagram, and passes it to upper layer.

Framing Methods

  • Byte count, flag bytes with byte stuffing, flag bytes with bit stuffing, and physical layer coding violations are framing methods.
  • Frame Header: Contains source and destination addresses
  • Payload Field: Contains the message to be delivered.
  • Trailer: Contains error detection and error correction bits
  • Flags: Start and end of frame, is protocol dependent

Framing: Byte Count

  • Length of the frame indicated by a byte at the beginning.
  • This method is problematic because a corrupted byte count can lead to misinterpretation of frame boundaries.

Framing: Flag with Byte Stuffing

  • A frame is delimited by flag bytes.
  • In byte stuffing, an escape character (ESC) is added before any byte in the message that matches the flag byte pattern
  • If the ESC character itself is present, it is also escaped by adding another ESC before it.

Framing: Flag with Bit Stuffing

  • Insert an extra 0 bit after any sequence of five consecutive 1s to prevent them from being misinterpreted as flag bytes, mainly for HDLC.
  • At the receiver's end, these inserted bits are removed. This method is used to prevent flag byte patterns

Framing: Physical Layer Coding Violations

  • Using some redundancies, some LANs encode 1 bit of data by using 2 physical bits such as a high-low pair represents 1 and a low-high pair represents 0.
  • The bit sequences are not used for data but for delimiting frames.

Error Detection

  • Error Detection and Correction (EDC) bits provide redundancy for this process
  • “D" signifies data protected by error checking, potentially including header fields.
  • Error detection, though valuable, is not 100% reliable.
  • Larger EDC fields improve error detection and correction capabilities

Error Detection Methods

  • Common methods for error detection include: Parity check, Internet checksum, and Cyclic redundancy check (CRC).

Parity Checking

  • Single Bit Parity: Detects single bit errors
  • Two-Dimensional Bit Parity: Detects and corrects single bit errors.
  • Two types of parity checking are even parity and odd parity.
  • Even Parity: Number of 1s bits is even, then the parity bit is 0
  • Odd Parity: Number of 1s bits is odd, the parity bit is 1

Internet Checksum

  • Goal: to detect "errors" (flipped bits) in the transmitted packet
  • Specifically used at transport layer
  • Sender: treats segment contents as sequence of 16-bit integers, computes checksum as the addition (1's ement su complement sum) of segment contents, and puts value into UDP checksum field.
  • Receiver: computes checksum of received segment, and checks if computed checksum equals value: NO = error, YES = no error.

Cyclic Redundancy Check (CRC)

  • Employs more powerful error-detection coding with data bits (D) viewed as a binary number.
  • An r value represents the "degree" of a "generator" G.
  • The r CRC bits (R) are chosen sush that <D, R> is exactly divisible by G
  • Known by receivers, G divides <D, R> by G. Zero remainder indicates no errors detected; non-zero reveals existence.
  • Can detect all burst errors less than bits.
  • Used in Ethernet, 802.11 WiFi, and ATM.
  • Utopian Simplex Protocol
  • Simplex Stop-and-Wait Protocol; Error-Free/Noisy Channel
  • Sliding Window Protocol; Go-back-N/Selective repeat

Utopian Simplex Protocol

  • Provides unidirectional data transmission over an ideal channel
  • Has error free transmissions
  • Not realistic, and is called utopian simplex protocol

Simplex Stop-and-Wait Protocol for a Noisy Channel

  • Popularly known as Stop-and-Wait Automatic Repeat Request (ARQ) protocol.
  • Adds error control facilities to the basic Stop-and-Wait protocol.

Sliding Window Protocols

  • Multiple frames can be sent by a sender before receiving an acknowledgment from the receiver.
  • Imaginary boxes hold frames and a buffer is called the sending window.
  • The receiver has a buffer called the receiving window with two categories

Protocol using Go-Back-N

  • This protocol uses error recovery and Pipelining.
  • Receiver's window size is 1

Protocol using Selective Repeat

  • A protocol provides sending multiple frames before receiving the first frame acknowledgment.
  • Here only the good/erroneous/lost frames are retransmitted/buffered.
  • HDLC – High-Level Data Link Control
  • Data Link Layer in the Internet
  • Layer 2 protocols which transmit synchronous data packets between point-to-point nodes (RFC 1662).
  • It uses a zero-insertion/deletion process (bit stuffing) which ensures bit pattern of delimiter flag does not occur in the fields between flags.
  • Frame format:
    • Bits 01111110 Address Control Data Checksum 01111110
    • Contains the source, and destination addresses of the frame, as well as error detection and correction bits.

HDLC Control Field

  • Information, supervisory, and unnumbered frames, data is usually sent in multiples of 8 bits
  • Only some variations require this/others provide the data alignments other than 8 bit boundaries.
  • The frame check sequence (FCS) is a 16 - bit CRC or a 32-bit CRC computed over the Address, Control, and Information fields.

Summary of Principles

  • Framing link layer consists of byte count, byte/bit stuffing.
  • Error detection and correction methods of Parity, checksum, and CRC.
  • Elementary data link protocols such as Utopian, Simplex, or Sliding Window.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Ethernet Frames Overview
8 questions

Ethernet Frames Overview

EnergySavingLavender8983 avatar
EnergySavingLavender8983
Ethernet Switching Overview
37 questions
Data Link Layer Overview
48 questions

Data Link Layer Overview

CompliantOklahomaCity7898 avatar
CompliantOklahomaCity7898
Use Quizgecko on...
Browser
Browser