◆ version
specify the version number of the IP protocol? Because the IPv4 version is still mainly used at present, the value here is usually x4 (note that the numbers used in packets are usually hexadecimal)? Take four places?
◆ internet header length (IHL)
how many 32 bits are included in the number of bytes indicating the header length of IPv4 protocol? Since the header of IPv4 may contain a variable number of options, this field can be used to determine the offset position of the data part in IPv4 datagram. The minimum length of IPv4 header is 2 bytes, so the minimum value of IHL field in decimal is 5? Take four places? Because it is a 4-bit field, the header is 6 bytes at most, but it is still 24 bytes at most?
◆ type of service (tos)
defines the type of service required by an IP packet during transmission. * * * consists of 8 bits, where the combination of each bit represents a different meaning? Can only one of the four 4bit be set? If all 4 bits are , does that mean general service? Details are as follows:
◆ ... (routine): process field, with 3 digits? The importance of the data packet is set. The larger the value, the more important the data is. The value range is: (normal) ~ 7 (network control)
◆ ... ... (delay): the delay field, accounting for 1 digit, and the value is (normal)? 1 (extremely low delay)
◆ ... (throughput): traffic field, accounting for 1 digit? Value: (normal)? 1 (exceptionally high traffic)
◆ ... ... (reliability): the reliability field, with 1 digit? Value: (normal)? 1 (extremely high reliability)
◆ ... . (ECN-capable transport): explicit congestion indication transmission field, accounting for 1 bit? Set by the source to show that the transmission protocol of the source node supports ECN (explicit congestion notification)? Value: (ECN is not supported)? 1 (supporting ECN)
◆ ... (congestion experienced): congestion warning field, with 1 digit? Value: (normal, not congested)? 1 (congestion)
◆ Total length (TL)
The total length of an IP packet is specified in the header format of the IP protocol, usually in byte. Does this value include the sum of header and data? It takes 16 bits in bytes? Using the header length field and the total length field, we can know the starting position and length of data content in IP datagram.
because this field is 16 bits long, the longest IP datagram can be 65535 bytes? Although an IP datagram with a length of 65535 bytes can be transmitted, most link layers segment it? Moreover, the host also requires that it cannot receive datagrams exceeding 576 bytes? Because TCP divides user data into several segments, generally speaking, this restriction will not affect TCP? UDP applications (such as RIP? TFTP? BOOTP? DNS? SNMP, etc.), limit the length of user datagram to 512 bytes, less than 576 bytes? However, in fact, most implementations now allow IP datagrams exceeding 8192 bytes?
the total length field is necessary in the IP header, because some data links (such as Ethernet) need to be filled with some data to achieve the minimum length? Although the minimum frame length of Ethernet is 46 bytes (which will be introduced later in this chapter), IP data may be shorter? If there is no total length field, then the IP layer does not know how many of the 46 bytes are the contents of IP datagrams.
◆ identification
each IP packet has a 16-bit unique identification code? When the data generated by the program is to be transmitted through the network, it will be disassembled and sent in the form of packets. When the packets are to be reorganized, this ID is the basis? 16?
the identification field uniquely identifies each datagram sent by the host? Usually every time a message is sent, its value is increased by 1? RFC791 thinks that the identification field should be selected by the upper layer that allows IP to send datagrams? Suppose there are two consecutive IP datagrams, one of which is generated by TCP and the other is generated by UDP, so they may have the same identification field? Although this can work as usual (handled by recombination algorithm), in most systems derived from Berkeley, every time an IP datagram is sent, the IP layer will add 1 to the value of a kernel variable, no matter which layer the data handed to IP comes from. The initial value of kernel variables is set according to the time when the system boots?
◆ flags
is this the identification mark of 3 bits used when the packet is optimally combined during transmission? Take three places?
◆(Reserved Fragment): keep the segmentation? When this value is , it means it is not currently used?
◆..(Don't Fragment): No segmentation? When this value is , it means that the packet can be segmented, and if it is 1, it cannot be segmented?
◆..( More Fragment): More segmentation? When the previous value is , this value means that the packet is the last packet, and if it is 1, it means that there are still divided packets?
◆ Fragment offset (FO)
IP protocol header format stipulates that when a packet is segmented, its arrival sequence will not be the same as the original cutting sequence due to network conditions or other factors, so when the packet is segmented, it will make a positioning record for each segment so that it can be seated properly when it is reassembled? How many bytes is the value? If the packet is not segmented, the FO value is ""? 13 places?