<> Architecture of computer network

<> Agreement and hierarchy

Each layer of computer network and the collection of its protocols are the architecture of the network

The architecture is abstract , The implementation is concrete , Is really running computer hardware and software .

Rules established for data exchange in a network , Standards or conventions are called network protocols , Also referred to as agreement .

Network protocol is mainly composed of the following three elements :

* grammar , That is, the structure or format of data and control information :
* semantics , That is, what control information needs to be sent , What actions are completed and what responses are made
* synchronization , That is, the detailed description of the event implementation sequence
Benefits of Tiering :

* The layers are independent , One layer does not need to know how its next layer is implemented , We only need to know that this layer passes through the interface between layers ( Interface ) Services provided .
* Good flexibility . When any layer changes ( For example, due to technological changes ), As long as the interface relationship between layers remains unchanged , Then the layers above or below this layer are not affected . in addition , The services provided by a certain layer can also be modified .
* Structurally separable . Each layer can be implemented with the most appropriate technology .
* Easy to implement and maintain . This structure makes it easy to implement and debug a huge and complex system , Because the whole system has been decomposed into several relatively independent subsystems .
* Can promote standardization . Because the functions of each layer and the services it provides have been accurately described .
function ( One or more ):

* error control : Make the communication between peers at corresponding levels more reliable
* flow control : The sending rate of the sending end must enable the receiving end to receive in time , Don't be too fast .
* Segmentation and reassembly : The sender divides the data block to be sent into smaller units , Restore it at the receiving end .
* Reuse and distribution : Several high-level sessions at the sender reuse a low-level connection , Reuse at the receiving end .
* Connection establishment and release : Before establishing a logical connection , Release connection after data transfer
<> Network architecture

Each layer of five layer protocol and its main functions :

physical layer

Transparently transmit bitstreams , Determine the definition and connection method of connecting cable plug .

be careful : Physical media for transmitting information , Such as twisted pair , Coaxial cable , Optical cable, etc , It's under the physical layer , As the first 0 layer .

data link layer

Error free transmission of frames on the line between two adjacent nodes (frame) Data in . Each frame includes data and necessary control information .

network layer

Select the appropriate route , So that the packets transmitted from the transport layer of the transmitting station can correctly find the destination station according to the address , And delivered to the transport layer of the destination station .

The network layer is responsible for providing communication services for different hosts in the packet switching network . When sending data , Network layer transport The message segment or user datagram generated by layer is encapsulated into component groups or packets for transmission

Transport layer

Provide a reliable end-to-end service between two processes communicating to the upper layer , So that they cannot see the details of data communication below the transport layer .

Transmission control protocol TCP Provide connection oriented , Reliable number Data transmission service , The unit of data transmission is message segment (segment)

User datagram protocol UDP – Provide connectionless , Best effort data transmission service ( The reliability of data transmission is not guaranteed ), The unit of data transmission is user datagram

application layer

Directly provide services for the user's application process , Through the interaction between application processes to complete the specific network Network application