IP Protocol description: Internet Protocol. The Chinese name is Internet Protocol. It works at the OSI network layer. It is responsible for transmitting data to the correct destination and routing. Regardless of the protocol used by the transport layer, IP addresses must be used to send and receive data.
IP provides a connectionless transmission mechanism, which means that each datagram transmitted over the network is treated as an independent unit. The IP address does not maintain the connection details between the server and the client.
The IP address cannot guarantee the reliability of data transmission. However, this does not mean that the group will be ignored without rules, but data will be lost only when the network fails.
Next we will introduce the format of IP datagram,
IP datagram format, 1,
Version |
Header Length |
Service Type |
Total Length |
Identifier |
Segmentation mark |
Segment offset |
Survival time |
Protocol |
Checksum |
Source Address |
Target address |
Option |
Fill |
Data |
(Figure 1 IP datagram format)
Version: the IP version used for data transmission. The size is 4 bits;
Header Length: used to specify the header length;
Service type: it is used to set the priority or priority of data transmission. The value is 8 bits;
Total Length: indicates the total length of the datagram. The total length of the datagram = Header Length + data length. The size is 16 bits;
ID: used to identify all segments. The size is 16 bits;
Segmentation flag: determines whether a datagram can be segmented. It also indicates whether there are more segments after the current segment, with a size of three digits;
Segment offset: the destination computer is used to find the position of a segment in the entire datagram, with 13 characters in size;
Survival time: sets the maximum number of vrouters that a datagram can pass. The length is 8 characters;
Protocol: Specifies the upper-layer protocol used to create data in the data field. The size is 8 bits;
Checksum: Check the integrity of the transmitted data. The size is 16 bits;
Source Address: the source IP address. The field length is 32 bits;
Target address: the destination IP address. The field length is 32 bits;
Option: Not a required field. The length of the field depends on the selected IP Option;
Data: contains data transmitted over the network, and IP datagram also includes header information of the Upper-layer protocol;
Decoding details
Capture IP data packets using the network analysis system, and decode them in detail 2,
(Figure 2 detailed decoding of IP data packets in the Network Analysis System)
Figure 2 shows the detailed decoding of IP data packets in the network analysis system. The following describes the decoding information of IP data packets respectively:
Version: 4, indicating IPv4 in the current network;
Header Length: 4, indicating that the IP header length is 5x4 = 20 bytes;
Service type: 0, indicating that the service type field is not used in the current IP data packet;
Total Length: 40, indicating that the total length of the datagram is 40 bytes;
Identifier: the identifier of the datagram is 0x41AB (hexadecimal );
Segmentation flag: the second digit is 1, indicating that the datagram cannot be segmented,
Segment offset: the segment offset is 0 because it is not segmented;
Survival time: indicates that the datagram can go through a maximum of 128 routes;
Upper Layer Protocol: 6 stands for TCP protocol;
Checksum: the checksum of the datagram is 0x36A8 (correct), indicating that the datagram is complete;
Source IP Address: 192.168.0.208;
Target IP Address: 192.168.0.92;
Option: indicates that the datagram has no option field;