Packet Simulator

What Are Packets?

When you send a message across the Internet, it does not travel as one big chunk. Instead, it gets split into small pieces called . Each packet is numbered so the receiving device can put them back together in the correct order.

Example: Sending "Hello World"

#1 "Hello"
#2 " Worl"
#3 "d"

Each packet has a sequence number (#1, #2, #3) so the receiver knows the correct order.

What a Real Packet Looks Like

Every packet has two parts: a header (metadata about the packet) and a payload (the actual data). Think of it like a letter in an envelope: the envelope has the address and tracking info, and the letter inside is the content.

Example: Packet #2 of "Hello World"

Header
Source IP

192.168.1.5

Destination IP

74.125.24.100

Protocol

TCP

Sequence Number

#2 of 3

Source Port

52431

Destination Port

443 (HTTPS)

Payload (Data)

" Worl"

5 bytes of the original message

Header: about the packet: where it came from, where it is going, and how to deliver it.

Payload: The actual chunk of the message being delivered.

TCP vs UDP

There are two main for sending packets:

TCP (Reliable)

  • Numbers every packet
  • Checks for missing packets
  • Retransmits lost packets
  • Slower but complete

Used for: web pages, email, file downloads

UDP (Fast)

  • No error checking
  • No retransmission
  • Sends packets immediately
  • Fast but may lose data

Used for: video streaming, gaming, voice calls