Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the basic knowledge of IP Protocol

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "the introduction of the basic knowledge of IP protocol". In the daily operation, I believe that many people have doubts about the introduction of the basic knowledge of IP protocol. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts of "introduction to the basic knowledge of IP protocol"! Next, please follow the editor to study!

1. Basic knowledge of IP protocol

The ip protocol corresponds to the network layer in the OSI reference model. The main function of the network layer is to realize the communication between the terminal host nodes, that is, point-to-point communication, while the data link layer, the next layer of the network layer, is responsible for the data packet transmission between the nodes on the same data link. But if the communication between the two host nodes needs to be realized through multiple or multiple data links, it needs to be realized by the network layer. (to be exact, the host should be the device with only IP address but no routing control, while the router has both IP address and routing control, and the node is the general name of host and router.)

In other words, the data link layer provides the ability to communicate between two directly connected nodes, but if the communication between two nodes needs to pass through multiple nodes, that is to say, the two nodes are indirectly connected, the network layer protocol is needed to process and realize the communication.

IP has three main functional modules, namely, IP addressing, routing, IP packet and packet grouping.

3. Route control

1. The address used to send the packet is the network layer address, that is, the IP address, but in addition to the IP address, we also need a hardware device to address to ensure that the data is sent to the host of the destination address, which is the role of the router. A table of ip address and routing address information is kept in the router, which is called the routing control table, which must be held by both the host and the router that realize ip communication. There are two ways to form a routing table, one is to set it manually, and the other is to refresh automatically when the router exchanges information with other routers.

two。 Routing table: the information in the routing table includes the IP address of the current router and the address of the next router (a router may not have only one IP address, it may have multiple IP addresses, and each IP address corresponds to an IP address in the next router)

4. IP segmentation and reconstruction processing

1. The problem of MTU inconsistency caused by different data links: because in the process of data transmission, there may be many data links, and the maximum transmission unit (MTU) of each data link is different, while IP is in the network layer, which is the upper layer of the data link layer, so it must abstract the data link, that is, to achieve data fragmentation to ensure that the data is transmitted in various data links.

2. Fragmentation and reorganization of IP messages: when data is transmitted, it usually needs to be sliced, that is, the data is divided into data frames for transmission. The size of the data frame should be less than or equal to the MTU of the data link. IP protocol as the network layer also implements IP slicing. IP communication hosts or routers can implement IP fragmentation, but data packet reorganization can only be carried out on the target host.

3. Path MTU discovery: if the router realizes data slicing, the pressure on the router is relatively high, and it will cause the speed to slow down, so now the router will not be allowed to implement data slicing, but will leave it to the sending host to explore the minimum MTU value in each data link. After finding the minimum MTU value, the data will be sliced directly according to the minimum MTU value and sent. This prevents the router from slicing data.

5. IPv4 header

1. When data communication is carried out through the IP protocol, the IP header information specified in the IP protocol is added before the packet. The data format is shown in the following figure

two。 Version: 4 bits are used to indicate the IP version number. For example, if the version of IPv4 is 4, then this part is 0100. This version number is very important, and the receiver host processes the data according to the protocol corresponding to that version.

3. Header length: 4 bits, used to indicate the size of the IP header in 4 bytes (32 bits). For example, if the part is 0100, it means the header size is 4 bytes, that is, 16 bytes.

4. Differentiated service: 8-bit structure, used to list the quality of service.

5. Total length: represents the total number of bytes in the header and data portion of the IP, occupying 16 bits, which means that the packet size allowed for IP transmission is 2 ^ 16 bytes of data, that is, 65536 bytes.

6. Logo (id): composed of 16 bits, used for fragment reassembly, the identity of the same shard is the same, but the representation of different shards is different.

7. Logo (flag): 3 bits, indicating the relevant information to be sliced.

8. Slice offset: consisting of 13 bits, used to indicate the position of each slice relative to the original data, for example, the offset of the first slice is 0 and the second slice is 1. Accounting for 13 bits, that is, it can represent 2 ^ 13 relative positions in 8 bytes, that is, a maximum of 65536 bytes of the original data.

9. Lifetime: composed of 8 bits, the exponential data packet can be transferred through how many routers, each passing through a router, the lifetime will be reduced by 1, until it is 0, it will be abandoned.

10. Protocol: consists of 8 bits, indicating what protocol the next header of the IP header belongs to, because each protocol processing of the data in the communication process will add the header information of the relevant protocol to the data header, so the IP header must specify what the protocol of the next header is.

11. Header checksum: composed of 16 bits, it is used to verify the header of the data packet to ensure that the IP packet will not be destroyed.

twelve。 Original address: 32 bits, indicating the IP address of the sender.

13. Destination address: 32 bits, indicating the IP address of the receiver.

14. Optional: variable length, usually used only in experiments or diagnostics.

15. Fill: ensure that the length of the head is an integral multiple of 32 bits.

16. Data: includes not only the data to be transmitted, but also the header information of the upper layer protocol (that is, the protocol above the network layer in the OSI reference model).

At this point, the study of "introduction to the basics of IP protocol" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report