The Quarterly Threat Landscape Report is out. See what attackers are targeting now.Read report

What Is TCP/IP?

TCP/IP (Transmission Control Protocol/Internet Protocol) is the protocol suite that lets devices exchange data across networks. IP addresses and routes packets, while TCP helps deliver data reliably and in order.

Why TCP/IP matters

Sending an email, loading websites, and transferring files all depend on networking technologies working together. TCP/IP provides common rules for exchanging data across devices and networks, including private enterprise networks. That foundation provides several benefits:

  • Interoperability: Different devices can communicate through shared protocols.
  • Reliable delivery: TCP can retransmit missing data and restore its order.
  • Flexible routing: IP carries packets across interconnected networks.
  • Troubleshooting: IP addresses, ports, and connections help narrow down failures.

Understanding these basics also makes network security easier to assess. TCP/IP enables communication, but it doesn’t, by itself, make that communication secure.

How TCP/IP works

TCP/IP isn’t one protocol performing every networking task, rather it’s a suite of related protocols, each with a specific role. TCP manages reliable transport for applications that use it, while IP helps packets reach their destinations.

How TCP and IP work together

IP provides addressing so routers can forward packets between networks. but doesn’t guarantee delivery or arrival order.

TCP adds reliability above IP, with endpoints establishing a TCP connection, then using sequence numbers and acknowledgments to track delivery and retransmit missing data. TCP also adjusts transmission to network and receiver capacity.

How data travels across a network

Let’s consider an application sending a file to another device over TCP:

  1. Prepare the data: The sending application passes data to TCP.
  2. Organize the transmission: TCP creates segments with sequence information, while IP adds addresses to packets carrying those segments.
  3. Forward the packets: Local network technologies carry frames between nearby devices, while routers use IP information to forward packets toward the destination.
  4. Receive and acknowledge: The receiver processes packets and acknowledges data, while the sender retransmits missing bytes when needed.
  5. Deliver the data: TCP places received bytes in order and passes them to the destination application.

Packets may take different routes, and link-layer details can change between hops.

How IP addresses and ports work in TCP/IP

IP addresses and port numbers serve different purposes in network communication. IP addresses help packets reach the correct destination, while TCP port numbers identify which application or service should receive the data. Both play an important role:

IP addresses

Identifies network interfaces and allows routers to forward packets between networks. Devices may use private or public IP addresses depending on their network configuration.

Port numbers

Identifies services and distinguishes individual connections. For example, HTTPS connections over TCP typically use destination port 443.

When a browser connects to a website using TCP, the server's IP address identifies the network destination, and the destination port identifies the service. The browser also uses a temporary source port so its operating system can associate returning data with the correct connection.

Key components of TCP/IP

The TCP/IP model groups network communication into four functional layers. These layers describe responsibilities rather than four separate devices or four protocols that must always appear in every exchange.

  • Application: Protocols such as HTTP, SMTP, and DNS support activities including web access, email, and name resolution.
  • Transport: TCP and UDP carry application data between endpoints, using port numbers to distinguish services.
  • Internet: IP provides logical addresses and supports packet forwarding between networks. Both IPv4 and IPv6 are used.
  • Network access (link): Ethernet, Wi-Fi, and other technologies move data across local network links.

These layers describe functions that work together during communication.

TCP vs. UDP

TCP provides a connection-oriented, reliable, ordered byte stream. UDP sends individual datagrams without establishing a TCP-style connection or guaranteeing their delivery. Applications may use UDP when they need low overhead or handle timing and reliability themselves.

Both TCP and UDP commonly operate over IP. TCP/IP is the name of the broader suite, not a rule that all IP traffic must use TCP.

TCP/IP examples and use cases

Downloading a file

A file transfer using TCP must deliver the correct bytes in the right order. If network congestion causes a segment to go missing, TCP can retransmit the missing data. IP handles addressing and forwarding.

Sending an email

When a mail client or server uses SMTP over TCP, SMTP defines the email exchange while TCP handles reliable transport. IP carries packets across the networks between the participating systems, with each protocol serving a distinct purpose.

Opening a website

A browser using HTTPS over HTTP/1.1 or HTTP/2 typically establishes a TCP connection, protected by TLS, to exchange requests and responses. IP handles packet delivery through the network, while HTTP/3 is an important exception: It uses QUIC over UDP rather than TCP.

How TCP/IP fits into security operations

TCP/IP knowledge helps security teams interpret network events without treating every connection as suspicious. An IP address may indicate where traffic came from or where it was headed, while port numbers, connection attempts, and timing offer additional context. These details help establish context, but can’t prove malicious intent on their own.

For example, a sudden increase in failed TCP connection attempts might warrant investigation. Analysts can check the systems involved, the targeted service, and normal activity. Network traffic analysis (NTA) helps teams study these communication patterns, and NTA solutions can extend that work across larger environments.

TCP/IP also helps explain where controls apply, with network segmentation able to limit which systems are allowed to communicate across network boundaries. Firewalls can assess addresses, ports, and connection state, while properly configured encryption protects content. Neither an allowed connection nor a completed TCP handshake establishes that traffic is trustworthy.

When an incident involves several systems, teams can combine network observations with endpoint and identity evidence. Network detection and response (NDR) uses network activity to identify and investigate potential threats. Broader incident detection and response (IDR) workflows bring these observations together with other evidence, helping analysts clearly understand what happened.

Author

Aaron Wells
Aaron Wells

Frequently asked questions