This paper is participating in theNetwork protocols must be known and must be known”Essay campaign

agreement

TCP/IP is a collection of PROTOCOLS such as IP,TCP, and HTTP. A protocol is a kind of agreement reached when a computer communicates with a computer through a network. Communication is possible as long as the same protocol is followed.

The OSI model

An OSI reference model for communication protocol design is proposed. The model divides the necessary functions in the communication protocol into seven layers, each of which receives special services provided by its lower layer and provides specific services to the upper layer. The conventions by which the upper and lower layers interact are called interfaces. Interactions between the same layers follow an ancient convention called a protocol.

advantages

  • Subdivide communication functions, with each layer responsible for corresponding functions
  • Protocol layering is like modular development, with each layer independent of the others.
  • It is easy to implement each layer of protocol individually, defining the responsibilities and obligations of each layer

disadvantages

  • Being too modular makes processing heavier
  • Each module has to implement some similar logic

For example,

When A and B have A telephone conversation, they can actually be divided into two layers: person-phone, and people use the interface of the phone and use the Chinese protocol. Telephones are connected by communication.

Process: A calls the phone through the interface in Chinese to B’s phone through the communication between phones, and B understands A’s words in Chinese.

Changing the protocol does not affect communication:

Since it is layered, we can use the advantages mentioned above. This link also works if you change the Chinese protocol to The English protocol and do not change the use of telephone communication.

The same link holds if you change telephone communication to radio communication

The specific content

OSI is divided into seven layers: in order

  • Application layer: Application-specific protocols, such as email protocols and file transfer protocols
  • Presentation layer: device inherent data format and network standard data format conversion, accept text, images, etc
  • Session layer: communication management, responsible for establishing and disconnecting communication connections.
  • Transport layer: Manages the transfer of data between two nodes.
  • Network layer: Address management and routing.
  • Data link layer: Transmits and identifies data frames between interconnected devices
  • Physical layer: Network cable

As shown in the example above, the sender assembles a message through the seven layers, and then sends it. After receiving it, the receiver gets the desired message through the seven layers.

Simple process introduction

Application layer: Generally, the application functions are divided into two parts (communication related or not). For example, input the information you want to send, which has nothing to do with communication for the time being, the information you want to input into the application, the application layer.

  • In the application layer, different applications may require different protocols. Take the mail application as an example. The mail applications between users are printed in different ways, but they also need to support sending and receiving emails referenced by other users.

Presentation layer: transforms the unified network data format and application-specific data. In the sending method, the data of specific application A is converted into unified data. On the receiving side, the unified data is then converted into data for specific application B. This enables data transfer without application.

Session layer: Which connection do hosts at both ends use to send packets? (for example, one message per connection, multiple messages per connection)

The ones below are actually used for the actual transmission

Transport layer: Creating logical communication links between two hosts is the primary role of the transport layer. To ensure that the transmitted data can reach the address, the communication ends confirm the data. If the data does not reach the address, the communication ends resend the data. Another important role: to ensure the reliability of data transmission.

Network layer: Sends data from the sender to the receiver when the network is connected to each other. Where, knowing the destination address can be sent to any host.

  • Relationship between transport layer and network layer

    The network layer sometimes does not guarantee data accessibility. Therefore, when data is lost, etc., the transport layer can be relied on to provide the correct processing of transmitted data. In TCP/IP, the network layer and transport layer cooperate to ensure that packets can be reliably transported to the corners of the world

Data link layer, physical layer: communication is actually carried out through the physical transmission medium.

  • The function of the data link layer is to process data between these devices.

  • In the physical layer, data 0,1 is converted into voltage and pulse light and transmitted to the physical transmission medium. Directly connected devices use addresses for transmission, which are called MAC addresses (physical addresses). This time the layering will contain MAC address information

    A MAC address is a device that is connected to the same transmission medium.

  • The difference between data link layer and network layer

    Both send data to the recipient based on the destination address. But the network layer is responsible for sending the entire data to the final destination address, while the data link layer is responsible for sending only the data within a segment