Computer Networks

IP protocol

Easy
15 min

IP packets

An IP packet consists of header and data sections that enable the transmission of information over the internet. In this section, we will examine in more detail the bit structure of the IP packet and its different sections.

IPv4 Header

At the beginning of an IP packet, there is a header that contains information for routing and processing the packet.

Image: Wikipedia

The IPv4 header is a header structure used by the Internet Protocol Version 4 protocol, which contains information about the routing and handling of an IP packet. The IPv4 header consists of several fields that contain different information about the source and destination addresses of the packet, the packet length, the quality of service, and other characteristics.

The IPv4 header begins with the version and header length fields, which determine the protocol version being used and the length of the header in bytes. Next are the Differentiated Services Code Point (DSCP) and Explicit Congestion Notification (ECN) fields. The DSCP field contains information about the quality of service and priority in packet processing. The ECN field, on the other hand, indicates whether congestion has been detected in the network carrying the packet.

The following fields contain information about the total length of the IP packet, identification information, fragmentation, time to live, and the protocol to which the packet belongs (such as TCP or UDP). The source and destination address fields determine the sender and receiver IP addresses of the packet.

The remaining fields contain a checksum that ensures the integrity of the package, as well as special options that can be used to transmit additional information or determine the specific characteristics of the package.

IPv6 Header (Otsake)

Image: Wikipedia

IPv6 header is a header structure used by Internet Protocol Version 6 protocol, which contains information about the routing and handling of an IPv6 packet. IPv6 header is designed to replace the older IPv4 header, and it provides improvements in efficiency, scalability, and security.

The IPv6 header consists of several fields that contain different information about the packet's source and destination addresses, virtual channel identifier, quality of service, and other characteristics.

The first field of the IPv6 header is the version and traffic class (Traffic Class) field. The version field specifies the protocol version used, and the traffic class field corresponds to the DSCP field in the IPv4 header. It contains information about the quality of service and priority in packet processing.

Next comes the virtual channel identifier (Flow Label) field, which enables packet grouping belonging to the same virtual channel. This helps ensure that packets using the same virtual channel are prioritized in routing and processing.

The following fields contain information about the total length of the packet, the next header, the payload type (e.g., TCP or UDP), and the lifespan limitation (Hop Limit) which corresponds to the TTL field in the IPv4 header.

Source and destination address fields determine the sender and recipient IPv6 addresses of the packet. IPv6 addresses are longer than IPv4 addresses and use a hierarchical and unique addressing format.

The remaining fields contain a checksum that ensures the integrity of the package, as well as special options (Extension Headers) that can be used to transmit additional information or specify the special features of the package.

Data section

After the header, there is a data section that contains the actual transmitted information, such as a network packet or protocol data.

Test your knowledge

What information does the IPv4 header contain?

hakatemia pro

Ready to become an ethical hacker?
Start today.

As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.