Skip to main content

What is TCP/IP?

Transmission Control Protocol/Internet Protocol (TCP/IP) is a communication system for internet-connected devices. When you browse the internet, your machine is exchanging data with other applications and devices. TCP is a set of rules that rearrange the data into smaller-sized packets at the source and reassemble them at the destination. IP is the system that makes sure every packet reaches the correct destination address. TCP/IP work together for secure communication over any network. Technologies like browsers, servers, and routers implement TCP/IP rules to make a global and standardized internet possible.

What are the benefits of TCP/IP?

Some more benefits include:

Flexibility

TCP/IP is a flexible communication model. It allows different networks to communicate without additional customization to the underlying protocol. Network engineers can deploy new networks to existing ones without disrupting the operation.

Open source

TCP/IP allocates IP addresses to devices that connect to the internet. It ensures the data packet reaches the correct device. Organizations can use TCP/IP without paying a fee because it is an open-source model.

Reliability

TCP/IP provides a common standard to send and receive data reliably. It solves common problems affecting data exchange on the internet, such as data loss or corruption.

What is the history of TCP/IP?

Transmission Control Protocol/Internet Protocol (TCP/IP) was developed in 1970 by the Defense Advanced Research Projects Office (DARPA). DARPA is a division within the US Department of Defense. In 1983, TCP/IP was adopted as the standard communication system for ARPANET. ARPANET is the first computer network that allowed computers to exchange data packets. It was the predecessor of the modern internet. TCP/IP remains the common standard for new networking architecture after ARPANET. Today, the TCP/IP protocol suite is maintained by the Internet Engineering Task Force.

What is the TCP/IP model?

The TCP/IP model represents how computers disassemble and assemble information with the TCP/IP protocol for networking. It has four layers, with the application layer at the top and the data link layer at the bottom. Some of the layers in the TCP/IP model are a combination of different layers from the Open Systems Interconnection (OSI). OSI is an industrial standard for building networking devices.

Application layer

This layer provides protocols that structure data software programs, such as emails, messengers, and web browsers. It does not contain communication instructions, as the lower layers handle them. You can think of the application layer as a sender that generates data payloads for the lower layers to deliver to the right destination.

Transport layer

The transport layer, or TC layer, packs the application data into the TCP segment to provide a reliable data connection between computers. The TCP layer is analogous to a mail parcel that secures the product.

Internet layer

The internet layer, also known as the IP layer or network layer, ensures the TCP segment and the encapsulated data find their way to the destination. You can think of the internet layer as the pen that writes the recipient’s address on the parcel.

Data link layer

The data link layer, or network access layer, sends and receives data packets on the physical network. Also called the network interface layer, it includes standards that regulate how computers send data over the network interface card, router, and WiFi or Ethernet cables. It combines the data link layer and physical layer of the OSI model. You can think of it as the delivery van that transmits data from sender to receiver.

How does TCP/IP work?

TCP/IP provides standardized guidelines that interconnect network devices for efficient and reliable data delivery. Both are separate computer network protocols that work collaboratively to send small segments of information to a specific destination on the internet.

Diagram showing how TCP/IP connects a source device through IoT Cloud proxy servers to a destination device.

We share how a client and server computer create a connection with the TCP/IP protocol below.

Establish connection

All TCP/IP connections start with a client request.

  • The client sends a SYNC request to the server to initiate a connection.
  • The server responds with an ACK, indicating it is ready to accept a connection.
  • The client replies with an ACK to complete the connection setup.
  • Now, the client can start sending data to the server.

Send data

Both client and server maintain the flow control with the SYNC and ACK fields when transmitting data. For example, the client sends data while enabling the SYNC field, to which the server replies with an ACK. This indicates that the server has successfully received the data. For every response:

  • The server includes the received data length in the Acknowledgment Number field.
  • The client ensures that the received data count equals the sent data before it completes a sequence.
  • The client increases the Sequence Number for the subsequent transmission.

Close connection

After the transmission is completed, either computer sends a FIN message to end the TCP/IP connection. Next, the computer waits for an ACK reply and finishes the sequence with a corresponding ACK.

What is in a TCP/IP data packet?

The TCP/IP data packet comprises an Internet Protocol (IP) packet and Transport Control Protocol (TCP) segment.

IP packet

The Internet Protocol suite ensures data packets are delivered to the target recipient. It has an IP header and IP data. The IP header contains the sender’s and receiver’s IP address, along with necessary information ensuring the IP packet reaches the intended destination. The IP data section holds the message for the recipient. It also carries the TCP segment.

TCP segment

The TCP segment provides the appropriate fields to ensure a reliable internet connection between devices when exchanging data. It consists of a TCP header and TCP data.

TCP header

The TCP header contains several fields that regulate data exchange—for example, the source port, destination port, checksum, and sequence number.

TCP data

The TCP data section contains the actual data that you want to send to a different computer. In most cases, this section encapsulates the application layer protocol, such as the File Transfer Protocol (FTP). FTP is a standard communication system for transferring large files.

How does TCP/IP handle errors in network communication?

TCP/IP has several methods to ensure data integrity when computers transfer data packets.

Checksum

Checksum is a unique value the sender generates from the transmitted data. When receiving a data packet, the receiver recalculates and compares the checksum. It discards the data packet if both checksums don’t match.

Timer

The sender sets a timer when transmitting a data packet. It assumes the data is lost if it doesn’t receive an ACK reply after the timer expires and retransmits the message.

Retransmission

The receiver might not receive data packets in sequence. In such cases, it asks the sender to retransmit the data packet for a particular sequence number. For example, the server computer has received data packets #35, #36, and #39. It suspects data packets #37 and #38 were lost and requests retransmission.

How does TCP/IP compare to other network protocols?

TCP/IP is one of several internet protocols in computer networking.

UDP

User datagram protocol (UDP) is a transport layer protocol that allows devices connected to the internet to send data faster. Unlike TCP/IP, UDP is not a connection-oriented protocol. This means that computers do not have to establish a connection before exchanging data. While UDP is faster, it cannot assure reliability as there is no sequence tracking in the data packet.

HTTPS

Hypertext Transfer Protocol Secure (HTTPS) is a communication method web browsers use to retrieve information securely from the web server. It runs on the application layer of the TCP/IP model. TCP/IP sets up a reliable channel that HTTPS uses to encrypt and send web data.

SMTP

Simple Mail Transfer Protocol (SMTP) is a networking model that allows computers to send and receive email. SMTP is an application layer protocol that runs on top of TCP/IP to provide secure and reliable email delivery. Both protocols allow email servers to establish and maintain active networking paths with each other.

ICMP

Internet Control Message Protocol (ICMP) is a special protocol that allows computers and network devices to diagnose communication issues on a local network or the internet. Unlike TCP/IP, ICMP does not carry data. Instead, ICMP contains a network status that helps IT administrators solve network issues.

What are AWS networking services?

AWS provides a suite of networking solutions that allow organizations to deploy and scale content on the cloud. Organizations use AWS networking capabilities to provide high availability, responsiveness, and security for applications.

  • Amazon Virtual Private Cloud (VPC) allows you to set up a private virtual networking environment.
  • AWS API Gateway lets software developers deploy and manage APIs on the cloud at scale.
  • AWS CloudFront enables organizations to distribute content with low latency to multiple regional locations.
  • AWS Site-to-Site VPN creates a secure connection between on-premise infrastructure and your AWS workloads.
  • AWS WAF provides security for your web applications against common security risks.

Get started with networking on AWS by creating a free AWS account today.

Browse all cloud computing concepts

Browse all cloud computing concepts content here:

Loading
Loading
Loading
Loading
Loading

Did you find what you were looking for today?

Let us know so we can improve the quality of the content on our pages