Preface Network is one of the basic skills for engineers. After all, we can't do anything without it! From the recruitment requirements of major companies, network is also a key assessment part. Today, let's review (repay) the college courses (debts) together! IP protocol of TCP/IP protocol suite.
Understanding the network model The network designers came up with a layered design that separates each function and delivers it to different layers. This has the advantage of facilitating updates and maintenance (the advent of IPv6 did not require a redesign of the entire network), and also facilitates our learning and understanding. Below is a diagram of the structure of each version of the network system: Let's clarify the responsibilities of each layer (taking the five-layer protocol as an example): Application layer: This layer protocol is mainly responsible for the rules of interaction between various applications. For example, HTTP and DNS, the data unit of their interaction can be called "message". The transport layer provides general data transmission services for the application layer. It runs errands for the upper layer. TCP and UDP are both transport layer protocols. The network layer provides communication services for different hosts in the network. The IP protocol works at this layer. The data link layer is responsible for data transmission between two adjacent points. Physical layer, transmission bit stream, 0 or 1. Each layer encapsulates the data into a data format that it can understand and delivers it to the next layer. The next layer will receive the data as its own data and add the necessary data of this layer again, and deliver it downward until the link layer. After being delivered to the destination, each layer removes the necessary data of the layer and delivers it to the upper layer. As shown in the following figure: Understanding IP protocol After understanding the network model and the direct cooperation of each layer, let's move on to today's topic, Internet Protocol (IP). This section mainly focuses on understanding what functions the IP protocol provides us, in other words, what it can do.
Any protocol can be composed of three parts: syntax, semantics, and synchronization. Syntax, the format of information exchange, for IP protocol, is the format of IP message. Semantics, that is, what kind of control information needs to be sent and how to respond after receiving the information. Synchronization, a detailed description of the sequence of events. That is, it defines the rules for communicating using the IP protocol. IPv4 IPv4 is the 4th version of the IP protocol, which is what we use now. Let's learn about this version from multiple aspects. IP address All hosts on the network need an IP address so that they can know each other's location. IPv4 addresses are composed of 32 bits and are often expressed in dotted decimal notation (192.168.1.1). Classification The classification of IP addresses is to divide all IPs into several categories, each of which is composed of fields of fixed length. They are network number and host number. The following is a schematic diagram of the composition of various types of addresses:
To summarize: Benefits of classification:
Datagram Format First look at the basic format of IP datagram: You can see that the IP datagram contains a header and a data part. The header contains a fixed 20 bytes and a variable part. The following is an explanation of each part:
IPV6 The emergence of IPv6 is to solve the problem of IPv4 resource exhaustion. It still supports connectionless transmission, but transmits PDU packets instead of IPv4 datagrams. IP address IPv6 addresses are 128 bits, which is enough for the foreseeable future. However, they are not compatible with IPv4. If host A using IPv4 and host B using IPv6 communicate, special processing is required. The method will be introduced later. IPv6 Address Representation IPv6 addresses are written in colon hexadecimal notation, with 8 groups of 4 hexadecimal digits separated by colons. For example: 6845:8C64:FFFF:FFFF:0:1180:9000:FFFF
Datagram Format IPv6 datagrams consist of two parts, the basic header and the payload. The payload runs with 0 or more extension headers. As you can see, the IPv6 header is a fixed 40 bytes, which is different from IPv4; there are also significant differences in composition. Let's take a look at the meaning of each part.
Transition from IPv4 to IPv6 The network is so large that the transition from IPv4 to IPv6 cannot be completed overnight. To communicate under the two versions of the protocol, there are two methods: Dual protocol stack Simply put, a host can understand two versions of content, so the host must also have two versions of the corresponding IP address. A host with a dual protocol stack can know the protocol version used by the destination host through the DNS system. The following is a schematic diagram of two hosts using IPv6 communicating. They need to communicate through the IPv4 network, and when necessary, the dual-stack host performs protocol conversion. Of course, some information may be lost during the conversion, which is also inevitable. Using Tunneling Technology The principle of tunneling technology is that when IPv6 data needs to enter the IPv4 network, the IPv6 datagram (PDU to be precise) is treated as the data part of the IPv4 datagram, and transmitted using the IPv4 version. When leaving the IPv4 network, it is assembled into IPv6 data and sent to the destination. The following is a schematic diagram: Conclusion There is still a lot to talk about the IP protocol, so I won’t go into detail here. I hope you will have a clearer understanding after reading this. |
<<: As 5G technology matures, can it help accelerate the implementation of blockchain?
China Telecom and China Unicom jointly announced ...
Today, the Internet world is slowly transitioning...
5G provides wireless cellular connectivity with h...
Hello everyone, I am Xiaolin. A reader was asked ...
There are many rumors that 5G is harmful to the h...
Justhost.ru is a foreign hosting company founded ...
Challenges facing smart cities When designing a s...
Service mesh adoption continues to grow, and some...
Introduction Do you understand the differences be...
edgeNAT has just launched a promotion for this mo...
China Unicom released its 2020 performance report...
Today, we are witnessing a huge period of innovat...
On November 1, several major domestic operators o...
Wireless communication technology has taken off i...
While data centers are designed to not fail in th...