In an Ethernet network, devices exchange data packets with each other, so-called Ethernet packets. Its contents include the Ethernet frame (often also called a data frame), which is itself divided into several data sets. These registers consist of binary code that provides important information, including addresses, control information, usage data, and checksums.
Depending on the Ethernet standard, Ethernet frames are structured differently and may contain more or fewer data fields, depending on the network protocol.
When transmitting data over Ethernet, the Ethernet frame is primarily responsible for the correct configuration of the rules and the success of the transmission of data packets. Data sent over Ethernet is transported through the frame. An Ethernet frame has a size between 64 and 1518 bytes, depending on the size of the data it must transport.
The IPv4 packet header consists of fields that contain important information about the packet. The most important fields in the IPv4 header are the following:
- Version: It contains a 4-bit binary value set to 0100 that identifies it as an IP version 4 packet.
- Differentiated Services or DiffServ (DS): Formerly known as the “type of service” (ToS) field, it is an 8-bit field used to determine the priority of each packet. The six most important bits of the differentiated services field are the differentiated services code point (DSCP), and the last two bits are the explicit congestion notification (ECN) bits.
- Time Duration (TTL): Contains an 8-bit binary value that is used to delimit the time to live of a packet, the sender of the packet sets the initial TTL value that is decremented by one each time a router processes the packet, if it reaches zero, the The router drops the packet and sends an Internet Control Message Protocol (ICMP) timeout message to the source IP address.
- Protocol: It is used to identify the next level protocol. This 8-bit binary value indicates the type of data payload the packet carries, allowing the network layer to transmit the data to the appropriate upper layer protocol. ICMP (1), TCP (6), and UDP (17) are some common values.
- Source IPv4 address: contains a 32-bit binary value that represents the source IPv4 address of the packet, the source IPv4 address is always a unicast address.
- Destination IPv4 address: contains a 32-bit binary value that represents the destination IPv4 address of the packet; the destination IPv4 address is a unicast, multicast, or broadcast address.