Data Transmission Over the Internet
TCP/IP Protocol and Data Packets
- The Internet uses the TCP/IP protocol, a set of rules for data transfer.
- Data is broken into smaller chunks called data packets instead of being sent in one piece. These packets independently travel to their destination across various networks.
Why Use Data Packets?
- Data packets make the Internet run smoother and more efficiently than sending data in one long stream.
- Sending data in a single, uninterrupted stream is called circuit switching.
- In circuit switching, during data transmission, no other computers can use the lines until the transmission is complete, causing delays.
Packet Switching
- Breaking data into packets allows each packet to independently find its way to the destination without relying on a fixed path.
- Each packet contains:
- Destination address
- Information on how to get to the destination
- Packets don't need to arrive in the correct order because each has a sequence number (e.g., 1 of 20, 2 of 20).
- The receiving device reads the sequence numbers and reassembles the data in the correct order.
Structure of a Data Packet
- A data packet typically has three sections:
- Header
- Source and destination IP addresses
- Port and sequence numbers
- Payload
- Trailer
- Informs the destination that it has reached the end of the transmission
- Checks for errors
Example: Sending a Photo
- A photo can be broken down into multiple data packets (e.g., 20 packets).
- Each packet contains:
- IP address
- Sequence numbers (e.g., 1 of 20, 2 of 20, 3 of 20)
- Trailer
- Packets are sent independently over the Internet.
- The receiving computer reassembles the photo based on sequence numbers and checks for errors.
- Realistically, photos are broken down into hundreds or thousands of data packets depending on their size.