DJ5-1 Link Layer Overview

Table of contents

1. Terminology of the link layer

Second, the analogy of the link layer

3. Services provided by the link layer

Fourth, the location of the link layer implementation

1. Network adapter

2. Network adapter working process


1. Terminology of the link layer

① Nodes: hosts and routers

② Links: Communication channels connecting adjacent nodes along the communication path

  • Wired links
  • wireless links

③ Data frame (frame): refers to the grouping of the second layer, which is an encapsulated datagram

  • MTU Maximum Transmission Unit: refers to the maximum amount of data that a frame can encapsulate

The responsibility of the data link layer is to transmit datagrams from one node to another node directly connected to the node by a physical link.

  • Datagrams can be sent on different links and through different link layer protocols
  • Each link layer protocol provides different services

The link layer enables communication between different hosts within the same subnet, so no routing is required.

Second, the analogy of the link layer

Journey from school to Lausanne:

  1. Car: University of Electronic Science and Technology of China - Shuangliu Airport
  2. Plane: Shuangliu Airport - Geneva
  3. Train: Geneva - Lausanne

A tourist is like a datagram, each transport segment is like a link, each mode of transport is like a link layer protocol, and the travel agency is like a routing protocol.

3. Services provided by the link layer

① Encapsulation into frames, link access

  • Encapsulate the datagram into a data frame, adding header and tail information
  • If it is a shared link, access the link
  • In the data frame header, the MAC address is used to identify the source and destination MAC addresses

different from IP address

② Reliable transmission of data frames between adjacent nodes

We have learned in Chapter 3 how to achieve reliable data transmission at the transport layer

  • Rarely used on links with very low bit error rates (optical fiber, twisted pair)
  • Wireless Links: High Bit Error Rate

Question: Why implement reliable transport both at the link layer and end-to-end?

③ Flow control: used to control the frequency at which the sending node sends data frames to the directly connected receiving node

④ Error checking

  • Errors may be introduced by signal attenuation, noise
  • The receiver detects whether there is an error: notify the sender to retransmit or discard the data frame

⑤ Error correction: the receiver identifies and corrects bit errors without requesting retransmission

⑥ Half-duplex and full-duplex: In half-duplex mode, both nodes of the link can send data, but not at the same time

Fourth, the location of the link layer implementation

  • Implemented on hosts and network devices (routers)
  • On the host, the bulk of the link layer is implemented on the network adapter
  • The network adapter implements the functions of the link layer and the physical layer
  • A combination of hardware, software, and firmware

The error detection implemented by hardware is implemented by software as mentioned before.

 

1. Network adapter

In most cases, the link layer is implemented on a chip called a network adapter, sometimes called a network interface controller (NIC), also known as a network card.

Network adapters implement many link-layer services, including framing, link access, error detection, and more.

2. Network adapter working process

sender:

  • Encapsulates a datagram into a data frame
  • Add error detection bits, reliable data transmission, flow control and other mechanisms

receiver:

  • Implement mechanisms for checking errors, reliable data transmission, flow control, etc.
  • Extract the datagram and submit it to the upper layer

If the link layer performs error detection, the sending controller needs to set the error detection bit at the header of the frame, and the receiving controller performs error detection.

Guess you like

Origin blog.csdn.net/m0_64140451/article/details/131309411