14.2 Structure of A Data Packet
14.2 Structure of A Data Packet
2
Structure of
a data
packet
By Waqqad
Before we proceed IP Address Overview
• Definition:
• An IP (Internet Protocol) address is a unique
numerical identifier assigned to each device
connected to a network, enabling communication
over the internet.
• Types of IP Addresses:
• There are two main types: IPv4 (32-bit, e.g.,
192.168.1.1) and IPv6 (128-bit, e.g.,
2001:0db8::1428:57ab).
• Purpose:
• It helps route data from the source device to the
destination device across different networks.
Before we proceed IP Address Overview
• Definition:
• A MAC (Media Access Control) address is a unique
identifier assigned to the network interface card (NIC) of a
device, allowing communication within a local network.
• Format:
• MAC addresses are 48-bit hexadecimal numbers, often
formatted as XX:XX:XX:XX:XX
• (e.g., 00:1A:2B:3C:4D:5E).
• Layer 2 Identification:
• Works at the Data Link Layer of the OSI model, allowing
devices to communicate within a local network segment.
Before we proceed MAC Address Overview
• Role in Communication:
• Used by switches to direct data frames to the
correct device within a LAN (Local Area Network).
• Permanence:
• Unlike IP addresses, MAC addresses are
hardcoded into devices by the manufacturer,
making them unique and unchangeable.
• MAC Filtering:
• Networks can use MAC filtering as a security
measure to allow or deny devices based on their
MAC address, adding an extra layer of control.
Data Packets in Networking
• Purpose of Data Packets:
• Smallest unit of data sent across a
network, used for transmitting
information between devices.
• Importance:
• Understanding the structure of a data
packet is key to grasping how data moves
across networks.
• Elements of a Data Packet:
• Typically include a header, payload, and
trailer.
Data Packets in Networking
• Header Role:
• Contains information required for routing
the packet correctly to its destination.
• Payload Role:
• Holds the actual data being transmitted,
such as text, images, or files.
• Trailer Role:
• Ensures the data arrives accurately and
helps indicate the end of the packet.
Header Elements in Data Packets
• Source IP Address:
• Identifies the IP address of the device
sending the packet.
• Destination IP Address:
• Identifies the IP address of the device
intended to receive the packet.
• Sequence Number:
• Helps the receiving device reorder
packets into the correct sequence
Header Elements in Data Packets
• MAC Addresses:
• Includes sender’s and receiver’s MAC
addresses, used for local delivery within a
network.
• MAC Address Removal:
• Removed by routers as packets move through
networks since they are relevant to switches.
• Protocols Used:
• Specifies the communication protocols like
TCP/IP to ensure proper transmission.
Payload in Data Packets
• Definition of Payload:
• The part of the data packet that contains
the actual user data.
• Purpose:
• Transmits the core information such as
file data, message content, or media.
• Data Integrity:
• The payload is protected by error-
checking methods in the trailer to
maintain integrity.
Payload in Data Packets
• Variable Size:
• The size of the payload may vary based
on the type of network and the data
being sent.
• Segmentation:
• Larger data files are broken into smaller
packets to be sent as payloads for easier
transmission.
• Reassembly:
• Packets are reassembled at the
destination to form the original data.
Trailer Elements in Data Packets
• End Flag:
• Signals that the end of the packet has been reached.
• Error Checking:
• Includes methods like cyclic redundancy check (CRC) to detect
errors in transmission.
• Correction Requests:
• If an error is detected, the receiving device can request a
retransmission of the packet.
Trailer Elements in Data Packets
• Purpose of Trailer:
• Ensures data accuracy and integrity during transmission.
• Data Verification:
• Confirms that the payload has been delivered without being corrupted.
• Ensuring Complete Data Transfer:
• Works together with the header to ensure that all packets reach their destination
correctly.
Cyclic Redundancy Check (CRC)
• Definition:
• CRC (Cyclic Redundancy Check) is an
error-detecting code used to detect
accidental changes to raw data during
transmission or storage.
• Functionality:
• It works by generating a checksum
value based on the data being
transmitted, which is then appended to
the data packet before transmission.
Cyclic Redundancy Check (CRC)
• Error Detection:
• At the receiving end, the CRC value is recalculated and compared to the
original. If they don't match, it indicates that an error occurred during
transmission.
• Efficiency:
• CRC is commonly used in networks due to its high error-detection capability
and low computational overhead, making it suitable for ensuring data
integrity.
Check Your Understanding