Bits of Bytes.co

IGCSE / GCSE Computer Science

  • Home
  • 1 - Theory of Computer Science
  • 2 - Practical Problem Solving and Programming
  • Pre-Release Material
    • 2018 June >
      • 22 >
        • 22 - Cow Task
        • 22 - Task 1
        • 22 - Task 2
        • 22 - Task 3
  • 1 - Computer Systems (2023)
Picture
MENU
  • Home
  • 1 - Theory of Computer Science
  • 2 - Practical Problem Solving and Programming
  • Pre-Release Material
    • 2018 June >
      • 22 >
        • 22 - Cow Task
        • 22 - Task 1
        • 22 - Task 2
        • 22 - Task 3
  • 1 - Computer Systems (2023)
1 - Computer systems /   Packets for Data  Transmission

Packets for Data Transmission


Transmitting data across a network poses a problem as most files are far to large to send in one go...
Picture
The delivery driver above has clearly run into a problem.  The problem is that he is trying to deliver far too much in one journey which has overloaded his truck and caused it to fail.  On a network, attempting to transmit a large file in one go will cause failure (less dramatically) due to the file size exceeding network bandwidths and an increase in risk for corruption.
To address this problem, packets and packet switching can be implemented.

Protocols

Protocols are essentially a set of rules.  For the internet to work effectively different protocols have been set up to ensure its smooth operation.

Two important protocols regarding data transmission across networks and the Internet are:
  • TCP/IP - Transmission Control Protocol / Internet Protocol
  • UDP - User Datagram Protocol

Both TCP/IP and UDP are used to when data is sent across the internet.  They provide rules that dictate how the data is broken down into smaller pieces (packets), how they are sent and what data is attached to each packet.


The Packets

Before a file is sent across the internet it must be broken down / split up into a series of packets.  Packets are essentially smaller chunks of the larger file that will be transmitted individually.

Example - The image below would be far to large to send in one piece so it is broken down into a series of smaller pieces:
Picture
Picture

The data for this image has now been split up into 291 separate sections that can be packed into 291 packets ready for transmission.  See numbered sections:
Picture
The data has now been divided into 291 different sections which means that we can now create 291 different packets for transmission.  We cannot simply send the 291 raw data segments across the internet as they will probably get lost.  Each packet will contain the raw data along with a collection of additional data that helps it get to the correct destination and enables the file to be correctly rebuilt.

Packet Structure

Each packet is organized in 3 sections. These are:
  • Header
  • Payload
  • Trailer

The Header
The header contains information that allows the packet to reach the correct destination and for the whole file to be correctly rebuilt once all packets have been received.  The key pieces of information included in the header are:
  • ​IP address of the recipient  
  • IP address of the sender 
  • Number of Packets being sent
  • Packet sequence number (E.g. 5 /291) ​
Picture

The Payload
The payload is the section of the packet that holds the actual data from the file segment that is being transmitted.  The diagram below shows the example for the packet transmitting section 213 of the example beach image:
Picture

The Trailer
The trailer is also sometimes referred to as the footer.  It simply identifies the end of the packet.
Picture

Packet Switching


​What is packet switching? 
Packet switching is the breaking down of large files into smaller pieces (Packets)...  Each packet is then sent to the recipient separately rather than together. Each packet can travel to its destination taking a entirely different route.  Upon receiving all of the packets, the recipient will use the data contained in each packets header to check that all packets have been received and rebuild the file in the correct order.  If any packets are missing, a request will be sent back the the sender asking for the missing packet(s) to be resent.

We recommend that you take some time to watch the excellent video from code.org as it explains the concept with very well.
​
Est. 2015 - Copyright © 2020