TCP/IP is the suite of communication protocols the internet and most local networks run on. It is named after its two key protocols: IP (Internet Protocol) addresses and routes packets to their destination, and TCP (Transmission Control Protocol) makes sure they arrive complete, in order and without errors. Loading a web page, sending email or connecting to a server over SSH all happen over TCP/IP.
The TCP/IP Layers
The TCP/IP model (RFC 1122) has four layers. Data gains a header at each layer on the way down and is unwrapped in reverse on the other side.
| Layer | Role | Example protocols | OSI equivalent |
|---|---|---|---|
| Application | Services used by programs | HTTP/HTTPS, DNS, SMTP, IMAP, FTP, SSH | Application, Presentation, Session (7-5) |
| Transport | Data between applications, port numbers | TCP, UDP | Transport (4) |
| Internet | Addressing and routing | IPv4, IPv6, ICMP | Network (3) |
| Link | Delivery on the same physical network | Ethernet, Wi-Fi, ARP | Data link, Physical (2-1) |
The 7-layer OSI model is a reference model used in teaching; real internet protocols follow the TCP/IP model.
What Is TCP and How Does It Work?
TCP is connection-oriented. Before sending data, both sides set up a connection with the three-way handshake:
- The client sends SYN.
- The server replies SYN-ACK.
- The client sends ACK; the connection is open.
TCP then numbers segments, waits for acknowledgements, retransmits lost data and adapts its sending rate (flow and congestion control). That reliability adds a little latency. TCP’s current specification is RFC 9293, published in 2022.
TCP vs UDP
| TCP | UDP | |
|---|---|---|
| Connection | Handshake first | Connectionless |
| Reliability | Acknowledgements, retransmission, ordering | No guarantee; lost packets aren’t resent |
| Overhead | Higher | Lighter, lower latency |
| Used for | Web (HTTP/1.1, HTTP/2), email, file transfer, SSH | DNS queries, live audio/video, games, VoIP, QUIC/HTTP/3 |
Think of TCP as registered mail and UDP as an ordinary letter. In games or video calls a late packet is useless, so UDP is preferred. HTTP/3 uses QUIC, which runs over UDP and provides reliability itself.
IP Addresses and Ports
The IP address gets the packet to the right device; the port number gets it to the right application. A web server listens on TCP 443 for HTTPS and TCP 22 for SSH; DNS mostly uses UDP 53. An IP address plus a port forms a socket (e.g. 203.0.113.10:443). See what is an IP address and what is a port.
Useful Commands
ping example.com: reachability and latency via ICMP (see what is ping).tracert(Windows) /traceroute(Linux, macOS): routers on the path.ipconfig /all(Windows) orip addr(Linux): IP settings.netstat -anorss -tulpnon Linux: open TCP/UDP connections and listening ports.
On your own server you decide which ports are open with the firewall. See our VDS server and VPS server plans.
Frequently Asked Questions
Is TCP/IP a program?
No. It is a set of protocols built into Windows, macOS, Linux, Android and iOS; nothing to install.
Which is faster, TCP or UDP?
UDP has less overhead and lower latency but no delivery guarantee. Use TCP where correctness matters (web, files, email) and UDP for real-time traffic.
Where do I change TCP/IP settings?
On Windows: Settings > Network & internet > your connection > IP assignment, for IP, subnet mask, gateway and DNS. Automatic (DHCP) is right for most home users.
Categories
-
CentOS 7 guides
-
cPanel 19 guides
-
CyberPanel 18 guides
-
Operating Systems 80 guides
-
Juniper Networks 18 guides
-
Control Panels 49 guides
-
Linux 15 guides
-
MySQL 30 guides
-
Network 87 guides
-
Plesk Panel 12 guides
-
Virtual Servers 284 guides
-
SEO 3 guides
-
Cyber Security 5 guides
-
Technology 160 guides
-
VMware 38 guides
-
WordPress 20 guides
-
Artificial Intelligence 21 guides