TCP/IP
Key points
- TCP/IP is a worldwide standard set of rules (protocols) for exchanging data over the internet.
- "IP" specifies the destination (address), while "TCP" splits data into pieces and makes sure it's delivered reliably.
- Before sending data, a signal exchange called the "3-way handshake" prepares the connection.
What is TCP/IP?
TCP/IP is the basic rule set for internet communication, built around two core protocols: "TCP" and "IP."
When you send a package, you need both a mechanism to deliver it to the right destination (IP) and a mechanism to confirm it arrived intact (TCP). Communication over the internet works because of this division of labor.
🔑 Everyday exampleThink of a courier delivery: IP is like the shipping label that specifies the delivery address, while TCP is like the "fragile" sticker plus confirming that the package arrived undamaged.
The role of IP addresses
An IP address is a numeric address assigned to each device connected to the internet. When sending data, this address is specified as the destination.
(your PC)
IP address→
server
DNS is the mechanism that looks up this IP address from a domain name. We cover the details in the dedicated DNS topic.
TCP's job: delivering reliably
TCP splits the data you want to send into small pieces and delivers them in the correct order, without any gaps. If any data goes missing along the way, it requests a resend.
packets
in order
original data
🔑 Everyday exampleIt's similar to shipping moving boxes in multiple cartons and unpacking them in the numbered order written on each box at the destination. If even one box doesn't arrive, you need to have just that box resent.
The signal before communication begins: the 3-way handshake
Before actually sending data, TCP establishes a connection by exchanging a "we're about to communicate" signal with the other party three times. This is called the "3-way handshake."
(Can we connect?)→
(Sure — and you?)
(Got it, let's begin)→
🔑 Everyday exampleThis resembles the opening exchange of a phone call. ① "Hello?" → ② "Yes, who's calling?" → ③ "It's [name], nice to speak with you." Only after this three-step exchange does the actual conversation (the data exchange) begin.
The difference between TCP and UDP
TCP prioritizes reliability, which comes at the cost of extra back-and-forth. "UDP," on the other hand, is a protocol that prioritizes speed by sending data without confirmation. Each is used depending on the situation.
Summary
TCP/IP is the basic rule set for internet communication, built on a division of labor where IP specifies the destination and TCP delivers the data reliably. It also includes mechanisms like the 3-way handshake for exchanging signals before communication begins.
Related topics: