Network Layer-IP packet header

Source: Internet
Author: User

Network Layer -- IP packet header introduction IP packet is also called IP packet grouping. It is transmitted at the network layer in Layer 7 structure of ISO network. It consists of IP packet header and IP packet user data, the length of an IP packet header is generally between 20 and 60 bytes, and the maximum length of an IP packet cannot exceed 65535 bytes. It is the packet header format of the IP Group. The first 20 bytes of the packet header are fixed and the latter is variable. Version: 4 bits, indicating the version number of the IP protocol. The current major version is IPV4, or 4th. Some education networks and research institutions are using IPV6. During communication, the version numbers of the IP protocol must be the same for both parties. Otherwise, direct communication cannot be performed. Header Length: 4 bits, indicating the length of the IP packet header. The maximum length (when 4 bits are 1) is 15 length units, each of which is 4 bytes (TCP/IP standard, DoubleWord ), therefore, the maximum length of the IP header is 60 bytes, and the minimum length is 20 bytes. Service type: eight bits are used to obtain better services. The first three digits indicate the priority of the message, and the subsequent digits indicate that the request is subject to lower latency, higher throughput, higher reliability, and lower routing costs. If the bitwise is 1, there are corresponding requirements. If the bitwise is 0, there is no requirement. Total Length: 16-bit (bit) refers to the total length of the packet (including the packet header ). Note that the unit here is byte rather than 4 bytes, so the maximum length of an IP packet is 65535 bytes. Identification. Flag ). Slice offset: the offset of the current slice relative to the user data field in the original datagram (the datagram before the slice), that is, the relative position in the original datagram. TTL (Time to Live ). This field indicates how long the current message can survive. After 1 ms or a gateway, the TTL value is automatically reduced by 1. When the survival time is 0, packets are considered to be inaccessible to the target host and discarded. Users who have used the Ping command should be impressed. In windows, enter the ping command, and the returned result contains the value of TTL. Protocol: this field indicates the protocol used in the upper layer (layer-7 network structure or TCP/IP Transmission Layer). The possible protocols include UDP, TCP, ICMP, IGMP, and IGP. Header checksum: used to check whether an error occurs when the IP packet header is transmitted. It mainly checks whether one or several bits in the packet header are contaminated or modified. Source IP Address: 32-bit, 4 bytes. Each byte is 0 ~ An integer between 255 and the IP address format we see on a daily basis. Destination IP Address: 32-bit, 4 bytes. Each byte is 0 ~ An integer between 255 and the IP address format we see on a daily basis.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.