One lesson per day & (OSI seven-layer model data encapsulation process and physical layer)

Lesson 2: The whole process and physical layer of OSI seven-layer model data encapsulation

The whole process of OSI7 layer model data encapsulation:

The whole process of data encapsulation: the user initiates the application layer service (start of data , data), encodes the data through the presentation layer, uses standard ASCII encoding, and passes it to the session layer after the encoding is completed; the session layer initiates TCP or UDP as a bridge The establishment of, that is, the establishment of a session; the transport layer segments the data and then selects the transmission method. There are two methods: TCP is reliable but slow, or UDP is unreliable but fast. After the transport layer is selected, the source port and the destination port are encapsulated and the data is handed over to the network layer for IP addressing. The data will be packaged into data packets when passing through the network layer and the source IP and destination IP need to be encapsulated ; the data is packaged and delivered From the data link layer, the data link layer compresses the data into a data frame and then encapsulates the source MAC address and destination MAC address to the physical layer. The physical layer is the medium layer, and the working method is to encapsulate the data frame transmitted from the data link layer into a bit stream and place it in the transmission medium (such as the usual network cable or optical fiber) in the form of an electrical signal to the destination.

The whole process of data decapsulation: Data decapsulation is a process from the lower layer to the upper layer. After receiving the electrical signal, the physical layer restores the data to the bit stream and submits it to the data link layer for processing; the data link layer unpacks the data to view the destination MAC address of the data encapsulation , if the destination MAC is itself, the data is handed over to the network layer Continue unpacking. The network layer unpacking can only check whether the destination IP address of the data encapsulation is its own. If it is, the transport layer will submit it to the upper three layers. After the upper three layers, the data will be restored to its original appearance, and the user can interpret it. The content of the data.

 Physical layer: use transmission media, such as coaxial cable, twisted pair, optical fiber, etc. The bit stream is transmitted in the form of electric waves, and the representation is binary ( 101010101 words).

 The concept of shared network. Shared network is a conflict domain. There may be data conflicts. The technology to resolve data conflicts is CSMA/CD (Carrier Sense Multiple Access / Conflict Detection). The working principle is: listen first, send, and listen. Side sending, conflicts stop sending, and resend after random delay.

 

 


Guess you like

Origin blog.51cto.com/14171218/2678889