linux network management actual combat-->theory

The previous review: linux network management

linux network management combat -> theory

Network communication model

OSI model
  • OSI Introduction:
    Open System Interconnection Open System Interconnection Model, which is formulated by the International Organization for Standardization (ISO), which defines the standards for the interconnection of different computers (this is for the interconnection between computers), OSI is the framework of computer network communication .
    The work of network communication in the world is divided into 7 layers (should be displayed and transmitted network data):

Application layer: The layer that has the closest contact with users, collects user information and converts it into original data.
Presentation layer: Formats, compresses, and encrypts data so that data can be transferred quickly and safely.
Session layer: The session layer determines the full duplex ( Can transfer data in two directions) phone, half-duplex (one-way data transfer) walkie-talkie, care about session information, responsible for establishing session
transmission layer: responsible for segmentation and reassembly (to ensure good transmission and missed transmission during data transmission, to improve transmission efficiency) , Port number
Network layer: Add IP address (final destination), addressing, and routing to
data. Data link layer: Responsible for MAC address, divide the final destination into many partial addresses, and segment to reach the target.
Physical layer: Transmission Medium, bit stream, determine the information to be transmitted, such as current light 5G

Advantages of formulating OSI: formulating OSI model is open, compatible with manufacturers, easy to understand and learn, modular engineering, troubleshooting.

TCP/IP model
  • The 5-layer structure model of TCP/IP:

Application layer
Transport layer
Network layer
Data link layer
Physical layer

  • The difference between
    TCP/IP and OSI model TCP/IP model and OSI model have many similarities, but there are big differences, so what is the difference between them?
    The OSI model was introduced early, and it was put forward a long time ago, but the OSI model has only theory but no practice.
    The TCP/IP (Trancation Control Protocol/Internet Protocol) model is a theory summarized by the U.S. military from practice, and it is the standard of today's communication
  • The data unit (DU) of TCP/IP:
    Information has also changed greatly from generation to reception. In order to facilitate communication, the different modules of the communication model process information and are named uniformly
    . The data of each layer is named as follows:

Application layer data: APDU (Application Protocol Data Unit) application protocol data unit, AP is the application program, DU is the data unit, mostly the original data
transmission layer data: the original data is divided into segments, then called segment DU (分Segment data)
Network layer data: Process the data segment, called Packet DU (packet data)
Data link layer data: frame DU (frame data)
Physical layer data: bit DU (bit data), bit is bit

  • The encapsulation and decapsulation
    information is generated from one computer, processed through the TCP/IP model, and then transferred to another computer. This communication process is like the express delivery to the customer receiving the unpacking of the goods. This communication process is called data The encapsulation and the decapsulation of the
    Insert picture description here
    data must be transmitted through the network. At the sending end, it must be transmitted from the upper layer to the lower layer. If a host wants to transmit data to another host, the data is first loaded into a special protocol header In this process, this process is called encapsulation.
  • The communication process is roughly like this:

User enters information in a computer

Encapsulate data

The information entered by the user in the computer is first converted into data (APDU) through the application layer for transmission on the network. When passing through the transmission layer, the data is divided into small segments, which is segment DU, after passing through At the network layer, these data segments are converted into packets (packet DU), and a logical address is placed at the head of the packet so that each packet can be transmitted through the Internet. When it comes to the data link layer, the packet will be converted It is a data frame (frame DU) for transmission on the local network. On the local network segment, the hardware address is used to identify each computer. When the data frame is finally passed through the physical layer, the data frame is converted into bit data (bit DU) and data encoding is used And the clock scheme, this completes the process of data packaging.

The encapsulated data is transferred and transferred to another computer

Decapsulate the transmitted data

The transmitted data is encapsulated. When passing through the physical layer, the bit data (bit DU) is converted into a data frame (frame DU), the data link layer converts the data frame into a packet DU, and the network layer converts the data The packet is converted into segmented data (segment DU), the transport layer splits the segmented data and transmits it to the application layer, and the application layer is responsible for splicing the split data, which completes the process of data decapsulation

After the data is unpacked and uploaded to another computer of the user, the user knows the input information.

This is the general process of communication, is it very similar to the sending and receiving of express delivery?


TCP/IP protocol family

Insert picture description here


Base conversion

Decimal

The decimal system is composed of 10 symbols with values ​​0-9. The numbers are arranged in order, and the digits cannot be adjusted at will. Position weight: hundred digits, tens digits, ones digit, every decimal

Binary

Binary has two values, 0 and 1, and the digits cannot be adjusted randomly. Every two is entered into one. The range of binary that can appear during work is 0 to 255.

Bit weight addition and subtraction

The first line is decimal, the second line is binary

Insert picture description here

That is, the decimal system is converted to binary system: subtract the smaller decimal system from the larger number, and write 1 in the corresponding binary system.

For example, the binary of 13 is: 0000 1101, and the binary of 254 is 1111 1110

The conversion of decimal to binary is called encoding, and the conversion of binary to decimal is called decoding.

The data we input is converted to binary and then received by the computer. The computer will decode the binary and analyze the binary data every 8 bits and convert it to decimal.

Computer storage unit conversion
Bit bit、b 1bit=1 or 0
byte byte、B 1byte=8bit
Kilobytes KB 1KB=1024B
Megabyte MB 1MB=1024KB
Gigabytes GB 1GB=1024MB
Terabyte TB 1TB=1024GB
Petabytes PB 1PB=1024TB

linux network management actual combat -> middle chapter

Guess you like

Origin blog.csdn.net/qq_45671732/article/details/112094395