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

preface

Feel this half year to come, nuggets of activity is one after another 🎁

Yesterday, I saw that the Creators Center added an essay on technical topic, about network protocol, and one of the comments was:

You guys dig a lot of gold, but I don’t know that

That really speaks for me 😢…… For me, the network protocol has always been both familiar and strange, more strange, because I’ve been listening to it but haven’t really taken the time to learn about it, and it’s really hard to write about

However, after a second thought, is not only to learn ah, so plan to take advantage of the activity, make up the network protocol related knowledge

In the previous article, we learned about the HTTP protocol (portal), which said that HTTP is actually based on TCP/IP communication protocol to transfer data, so today we will learn about: TCP/IP protocol

Note:

  • This article focuses on literacy, please turn left at 👈🏻
  • This article refers to a large number of online public information, absorption and arrangement into this article, if there is a problem welcome message

For your clarity, I’ve reorganized the article directory structure as follows:

Mind maps

A picture is worth a thousand words, this part is the brain map of the text content, a total of 5 pictures

The purpose is to quickly understand the relevant knowledge, and to facilitate the future view

1. Introduction to TCP/IP

History of 2.

Characteristics of 3.

4. Architecture

5. Communication process and protocol

Introduction to the

What is the TCP/IP protocol

I thought TCP/IP stood for TCP and IP until I knew more about it

In fact, it refers to a protocol family, but the protocol family includes TCP and IP and is the most representative one, so it is called TCP/IP

In addition to TCP and IP, it also includes FTP, SMTP, UDP and many other protocols

TCP/IP stands for Transmission Control Protocol/Internet Protocol, which translates as Transmission Control Protocol and Network Protocol, and is sometimes called Network Communication Protocol. It doesn’t matter

What’s the use of

In short, through TCP/IP, we can transfer information between different networks

history

On the TCP/IP protocol personal feel or listen to important, the reason is on the one hand personal history is more interested in, on the other hand is the hope to develop a good accomplishment, know the root!

background

The predecessor of Internet network ARPANET used NCP protocol at that time, but NCP protocol has many problems and shortcomings, the biggest problem is that NCP can only be used in homogeneous environment, can not be used for “heterogeneous” network environment, so TCP/IP was born

process

  • In 1973, Kahn and Cerf developed the two most core protocols in TCP/IP: TCP and IP
  • In December 1974, Kahn and Cerf formally published the TCP/IP protocol and detailed description of it
  • On New Year’s Day 1983, TCP/IP formally replaced NCP
  • In 1984, TCP/IP was approved by the U.S. Department of Defense

The characteristics of

TCP/IP has the following features or advantages

  1. Protocol standards are completely open
  2. Independent of the network hardware system
  3. Uniformly assign network addresses
  4. High-level protocol standardization

It’s not perfect, of course, and the TCP/IP model and protocol have their own problems

architecture

Four, five or something

About TCP/IP architecture, there are different views on the Internet, the mainstream is still a four-tier architecture

The four levels of

layered

The TCP/IP protocol refers to the OSI model, but is simplified. After simplification, there are only four layers, which are:

  1. The application layer
  2. The transport layer
  3. The network layer
  4. Network interface layer

Note: About the fourth layer – network interface layer, there are many places called data link layer, but I have consulted a lot of information to decide to call it network interface layer, the reason is that the concept of network interface consists of physical layer and data link layer, rather than only data link layer

Each layer of responsibility

  • The application layer

It is the first layer of TCP/IP and directly provides services for application processes. They can use different protocols of the application layer according to their own needs for different kinds of applications, and can encrypt, decrypt, and format data, and can establish or disassociate contact with other nodes

  • Transport layer

Transport layer is the second layer of TCP/IP and plays a very important role in the whole TCP/IP protocol

  • The network layer

The network layer establishes and terminates network connections and searches for IP addresses

  • Network interface layer

The network interface layer is both the physical medium for transmitting data and provides an accurate line for the network layer

Communication process and protocol

Communication process

Generally, we refer to the sending host as the source host and the receiving host as the destination host

In communication, the source host emits data, which is transmitted from upper to lower levels in the source host:

  1. The application process in the source host first passes the data to the application layer, and the application layer adds the necessary control information to form the packet flow, which is sent down to the transport layer
  2. The transmission layer adds the received data units with the control information of the transmission layer to form message segments and datagrams, which are then delivered to the network layer
  3. The network layer adds control information of its own layer to form IP datagrams, which are transmitted to the network interface layer
  4. The network interface layer assembles the IP datagrams from the Internet layer into frames and sends them to the network hardware (the physical layer) in the form of bit streams. The data then leaves the source host

The agreement

Because there are many protocols, you can’t remember them if you read too much. Here you only know TCP and IP

TCP protocol

TCP is called transmission Control Protocol in Chinese

It’s at the second layer, the transport layer

Is a connection-oriented, reliable, byte stream based communication protocol

TCP is a UDP protocol with an acknowledgement mechanism. Each packet sent requires confirmation. If a packet is lost, the packet cannot be acknowledged and the sender must resend the packet

TCP/IP protocol

The IP protocol is at the third layer, the network layer

It creates a set of addresses by which we can tell if two machines belong to the same network

The IP protocol divides this 32-bit address into two parts, with the front part representing the network address and the back part representing the host’s address on the LAN. If two IP addresses reside on the same subnet, the network addresses must be the same

To determine the network address in the IP address, the IP protocol also introduces the subnet mask. The network address can be obtained by bitwise and operation of the IP address and subnet mask

END

That’s all for this article. If you have any questions, please point out