A: hi! ~ Hello everyone, I am YK bacteria 🐷, a microsystem front-end ✨, love to think, love to summarize, love to record, love to share 🏹, welcome to follow me 😘 ~ [wechat account: Yk2012Yk2012, wechat public account: ykyk2012]

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

Computer network provides us with communication and exchange, leisure and entertainment, resource sharing, e-commerce, remote collaboration, online office platform, the Internet is the largest computer network in the world today, is also the computer network we contact the most. Computer network is a very important basic knowledge for programmers. Starting today, we’re learning about computer networking from the top down! Of course, first of all, we have to introduce the hierarchical structure of the computer network, macro to understand the computer network.

Even if you haven’t taken a computer network course, you’ve probably heard of a seven-tier model, or a five-tier model, or a four-tier model, but what are those? Let’s take a closer look

why

The first is why do computer networks need to be layered? Because the computer network is a complex program, complex programs need to be layered management, one layer to solve one kind of thing. Layering has many benefits:

  • (1) Each layer is independent. A layer does not need to know how the next or the previous layer is implemented, but only needs to know the services provided by the layer through the interface between layers. By breaking a complex system into smaller systems, the complexity of the whole problem is reduced;
  • (2) good flexibility, a layer of internal changes, as long as it provides the interface is unchanged, it will not affect the use of the upper or lower layer;
  • ③ Can promote standardization work

What points

So what is layering? To analogy into our mail service system, the user application layer, the user to the user B A message, need to write the letter, then package in an envelope for mail delivery layer, and then through A parcel transport layer, transport layer, transport layer, and then transfer it again until it reaches the user application layer user B’s hands.

Such a layered structure is placed in a computer network

OSI reference model seven layers

Open SystemsInterconnection Reference Model This is the legal international standard OSI Reference Model

  1. The physical layer uses the physical transmission medium to provide the physical connection for the data link layer, and the data transmitted is a bit stream.

  2. The data link layer defines the specification of the transmission between devices interconnected by the communication medium; First, the bitstream is encapsulated in the format of data frames, and zeros and ones are grouped. When computers are connected, data is transmitted through a network card that defines the world’s unique MAC addresses. Then it broadcasts the data to all computers in the LAN and compares the MAC address in the data with its own address to determine whether the data is sent to itself.

  3. Network layer addressing and routing; IP ; Broadcast is inefficient. To distinguish MAC addresses that belong to the same subnet, IP addresses and subnet masks are defined at the network layer. The IP addresses and subnet masks are calculated by and to determine whether they belong to the same subnet, and then transmitted through routers and switches.

  4. Transport layer provides reliable end-to-end transmission for upper layer protocols. TCP, UDP After the MAC+IP address of the network layer, to determine the process from which the data packet is sent, the port number is required to establish communication

  5. The session layer establishes, disconnects, and maintains communication links

  6. Presentation layer Data format conversion, data compression and data encryption HTML, MIME

  7. The highest layer of the application layer, facing users, provides computer network and finally presented to the user interface (various application protocol HTTP, FTP, SMTP, POP3) to provide network services for applications

Detailed see families to network communication protocol figure www.colasoft.com.cn/download/pr…

2. TCP/IP reference model layer 4

Because of the OSI hierarchy, some functions were repeated in multiple layers, and were too large and complex to be criticized. In fact, the TCP/IP protocol cluster was in operation before the OSI model and gradually evolved into the TCP/IP reference model, and TCP/IP is called the de facto international standard because it dominates the market.

Note: TCP/IP protocol family refers to all protocols used in IP protocol communication

  1. Network interface layer, also known as network access layer, data link layer. Contains the physical layer and data link layer of the OSI model.
  2. The Internet layer, also known as the IP layer, is the OSI network layer that handles the transmission, routing, and communication between hosts of IP packets.
  3. The transport layer, also known as the transport layer, provides end-to-end communication between two host devices. TCP, UDP
  4. The application layer, including the OSI session layer, presentation layer, and application layer, provides some common protocol specifications, such as FTP, SMPT, HTTP, and DNS.

In learning the principles of computer network, we often take a compromise approach, that is, integrating the advantages of OSI and TCP/IP, using a principle architecture with only five layers of protocol

That is

  1. The physical layer connects computers by physical means
  2. The data link layer groups the data of the bitstream
  3. The network layer establishes host-to-host communication
  4. The transport layer establishes port-to-port communication
  5. The application layer is ultimately responsible for establishing connections, converting data formats, and presenting it to users

Finally, welcome to my column and make friends with YK bacteria