Working principles of physical layer/data link layer/network layer

Working principles of physical layer/data link layer/network layer

  [[279942]]

Physical Layer

Physical layer equipment

  1. Hub
  2. Repeater
  3. Encoder-Decoder
  4. Transmission media connector

Hubs operate at the physical layer

  • All devices are in the same collision domain (Layer 2 devices, bridges or switches are used to isolate collision domains)
  • All devices are in the same broadcast domain (Layer 3 devices, such as routers, are used to isolate broadcast domains)
  • All devices share the same bandwidth

Domain of network devices

Collision: In Ethernet, when two nodes transmit data at the same time, the frames sent from the two devices will collide and meet on the physical medium, and the data of each other will be destroyed.

Collision domain A network segment that supports shared media

Broadcast domain: The network range where broadcast frames are transmitted. The boundaries are usually set by routers (because routers do not forward broadcasts).

The same collision domain

  • The more connected devices are, the greater the chance of conflict.
  • Solved with CSMA/CD technology

Carrier sense multiple access/collision detect (CSMA/CD): A medium access control method. When different nodes in the same shared network transmit data packets at the same time, conflicts are inevitable. The CSMA/CD mechanism is used to resolve such conflicts.

How CSMA/CD works

When a node wants to send data in the network, it first checks whether there are signals from other hosts being transmitted on the line: if so, it means that other hosts are sending data, and it will use the backoff algorithm to wait for a while before trying to send again; if there are no signals from other hosts on the line, it will send the data and keep monitoring the line to make sure that other hosts are not sending data. If other signals are detected, it will send a JAM blocking signal to notify other nodes on the network segment to stop sending data. At this time, other nodes must also use the backoff algorithm to wait for a while before trying to send again.

Important Features of CSMA/CD

Ethernet using the CSMA/CD protocol cannot perform full-duplex communication but can only perform two-way alternating communication (half-duplex communication).

There is a possibility of collision for each station within a short period of time after sending data.

This uncertainty in transmission makes the average communication volume of the entire Ethernet much less than the maximum data rate of Ethernet.

Data Link Layer

MAC sublayer (media access control):

Responsible for MAC addressing and defining media access control methods, encapsulating the data handed down by the upper layer into frames for transmission (the opposite process is performed when receiving, and the frames are disassembled)

LLC sublayer (logical link control): provides SAP (service access point) for the upper layer protocol, adds control information to the data, establishes and releases the logical connection of the data link layer

LLC sublayer protocol: 802.2

The 802.2 protocol is only in the LLC sublayer, providing common functions for Ethernet and Token Ring networks, and identifying the protocol used by the upper layer.

SAP (Service Access Point): The LLC sublayer provides services for various protocols of the network layer, while the upper layer may run different protocols. In order to distinguish the data of different upper layer protocols, a service access point is used.

Header

Network Layer

  • Representative protocol IP
  • Broadcast information control
  • Multipoint message control
  • Path Optimization
  • Traffic Control
  • Logical addressing
  • Provide WAN connection

Network layer functions

  • Transport Layer
  • Representative protocol TCP UDP
  • Distinguish different upper-layer applications
  • Establish end-to-end connections between applications
  • Defining Flow Control
  • Provide reliable or unreliable connection services for data transmission

Reliable transport layer function, establish three-way handshake

The significance and defects of OSI model

Significance of OSI Model

  • Provides a reference model for interconnection between networks
  • Become an important reference tool and theoretical basis for actual network modeling and design
  • The idea of ​​OSI/RM provides us with a method for network design and analysis (actual networks are almost all layered structures, functional layers, and protocol layers, but there are more or less layers according to actual needs. The modular structure facilitates simultaneous development, upgrading, maintenance and management)

Flaws of the OSI Model

  • Many functions are repeated at multiple levels, which creates a sense of redundancy (such as flow control, error control, etc.)
  • Uneven distribution of functions among layers (heavy tasks at the link and network layers and light tasks at the session layer)
  • The functions and services are complex to define and difficult to productize (so there are almost no products designed completely according to the OSI seven-layer model in actual applications)

<<:  Clarity: Docker's four network modes

>>:  Looking at 5G from a different perspective: Don’t talk about technology, talk about demand

Recommend

Let's talk about IPv4 to IPv6 tunnel

[[273990]] When is IPv6 tunneling used? Connect t...

Review: China ranks first in 5G mobile phone sales, is the world happy too?

After the Spring Festival of the Year of the Ox, ...

Understanding OpenID Authentication through Examples

In the article "Understanding OAuth2 through...

Can the interviewer ping 127.0.0.1 after being disconnected from the Internet?

When interviewing for network-related positions, ...

SD-WAN vs. VPN: How Do They Differ?

When it comes to comparing SD-WAN vs. VPN service...

GSA report: Global application status of LTE and 5G in Sub 1GHz spectrum

GSA released a report that believes that the freq...

What changes does MPLS need to make to build networks for 5G?

5G has unique challenges in not only enabling ser...