Getting Started with Linux - Network Basics | Network Protocols | OSI Seven-Layer Model | TCP/IP Five-Layer Model | Basic Network Transmission Process

Article directory

 

1. Network basics

2. Network protocol

1.OSI seven-layer model

2.TCP/IP five-layer (or four-layer) model

3. Basic process of network transmission

1. Network transmission flow chart

2. Data packet encapsulation and demultiplexing

4. Address management in the network

1.IP address

2.MAC address



1. Network basics

The development of the network was originally an independent model, that is, computers were independent of each other. Each terminal holds user data individually. Then it developed into network interconnection, where multiple computers were connected together to complete data sharing. Local Area Network LAN: There are more computers connected together through switches and routers. A wide area network connects computers thousands of miles apart.

2. Network protocol

A protocol is an agreement. The transmission medium between computers is photoelectric signals, which identify 0 and 1 information through frequency or intensity. If you want to transmit different information, you need to agree on the data format of both parties.

1.OSI seven-layer model

The OSI seven-layer network model is called the open interconnection reference model, which is a logical definition and specification. The network is logically divided into seven layers, each layer has related corresponding physical devices. The OSI seven-layer model is a framework design method, and its main function is to help different types of hosts realize data transmission; Its biggest advantage is that it clearly distinguishes the three concepts of service, interface and protocol. The concept is clear and the theory is relatively complete. Through seven hierarchical structural models, reliable communication can be achieved between different systems and different networks.

physical layer 0 and 1 represent the voltage level and the light flashing. Define specifications for connectors and network cables
data link layer Transmitting and identifying data frames between connected devices
Network layer Address management and routing
transport layer Manages data transfer between two nodes. Responsible for reliable transmission (ensuring that data is reliably sent to the destination address)
session layer Communication management. Responsible for establishing and disconnecting communication connections (logical paths for data flow)
presentation layer Conversion of device inherent data format and network standard data format
Application layer Application-specific protocols

2.TCP/IP five-layer (or four-layer) model

TCP/IP is synonymous with a group of protocols, and it also contains many protocols.

  • Physical layer : Responsible for the transmission method of optical/electrical signals. For example, the common network cables (twisted pairs) of Ethernet, the coaxial cables and optical fibers used by early Ethernet, and the current electromagnetic waves used by wifi wireless networks all belong to the physical layer. The capabilities of the physical layer determine the maximum transmission rate, transmission distance, anti-interference, etc. Hub works at the physical layer.
  • Data link layer : Responsible for the transmission and identification of data frames between devices, such as the driver of the network card device, frame synchronization (that is, what signal is detected from the network line is counted as the beginning of a new frame), conflict detection (if a conflict is detected, Automatic retransmission), data verification, etc. (Responsible for forwarding and transmission between two devices. Customize the standard for LAN communication. The implementation of the data link layer is implemented in the network card driver. Different network card drivers have different implementations).
  • Network layer : Responsible for address management and routing. For example, in the IP protocol, an IP address is used to identify a host, and the data transmission line (routing) between two hosts is planned through the routing table. Routers work at the network layer.
  • Transport layer: Responsible for the control protocol TCP between two hosts, ensuring that data is reliably sent from the source host to the target host.
  • Application layer : Responsible for communication between applications. Such as simple email transfer (smtp), file transfer protocol (ftp), network remote access protocol (telnet), etc.

3. Basic process of network transmission

1. Network transmission flow chart

2. Data packet encapsulation and demultiplexing

  • Different protocol layers have different names for data packets. In the transport layer, it is called segment, in the network layer, it is called datagram, and in the link layer, it is called frame.
  • When application layer data is sent to the network through the protocol stack, each layer of protocol needs to add a data header, which is called encapsulation.
  • The header information contains information such as how long the header is, how long the payload is, and what the upper layer protocol is.
  • The data is encapsulated into frames and sent to the transmission medium. After reaching the destination host, each layer of protocol strips off the corresponding header, and hands the data to the corresponding upper layer protocol for processing according to the "upper layer protocol" in the header.

4. Address management in the network

1.IP address

From where to where to go --- Fixed

There are two versions of the IP protocol , IPv4 and IPv6.
IP address is the address used to identify different hosts in the network in the IP protocol ;
For IPv4 , the IP address is a 4- byte , 32 -bit integer ; we usually also use " dotted decimal " strings to represent IP addresses , such as 192.168.0.1; each number separated by dots represents a byte , the range is 0 - 255;

2.MAC address

Address passed by - variable

The MAC address is used to identify connected nodes in the data link layer ; the length is 48 bits and 6 bytes . It is generally represented by a hexadecimal number plus a colon ( for example : 08:00:27:03:fb :19) The network card is determined when it leaves the factory and cannot be modified . The mac address is usually unique ( the mac address in the virtual machine is not the real mac address and may conflict ; some network cards also support user configuration of the mac address ).


Guess you like

Origin blog.csdn.net/jolly0514/article/details/132745654