TCP/IP Suite of Protocols
Learn the TCP/IP suite, its four-layer model, encapsulation, and the roles of DNS, HTTP, TCP, UDP, IP, ICMP, ARP, and Ethernet for CCNA study.
The TCP/IP suite is a family of networking protocols that work together to support communication across interconnected networks, including the Internet. The suite defines how data is formatted, addressed, transmitted, routed, delivered, and received.
TCP/IP is not one protocol. It is a collection of interoperating protocols. TCP, IP, DNS, and HTTP are individual members of the suite, each with a different job. The suite is named after two of its most important protocols: Transmission Control Protocol and Internet Protocol.
For broader networking context, review the basic concepts of computer networks and compare this model with the OSI reference model.
The TCP/IP Four-Layer Model
The TCP/IP model is a four-layer networking model consisting of the Application, Transport, Internet, and Network Access layers. Each layer provides services to the layer above it and uses services from the layer below it.
| TCP/IP layer | Primary responsibility | Example protocols |
|---|---|---|
| Application | Provides network services to user applications. | DNS, HTTP, FTP, Telnet |
| Transport | Provides process-to-process delivery and transport services. | TCP, UDP |
| Internet | Provides logical addressing and packet forwarding between networks. | IP, ICMP |
| Network Access | Provides local delivery over a link technology and physical medium. | ARP, Ethernet-related functions |
Sending and receiving data
On a sending host, application data moves downward through the layers:
- An application creates data, such as a web request.
- The Transport layer adds process-to-process delivery information using TCP or UDP.
- The Internet layer adds logical addressing and creates an IP packet.
- The Network Access layer prepares a frame for transmission across the local network.
On the receiving host, the process is reversed. The Network Access layer accepts the frame, the Internet layer processes the IP packet, the Transport layer delivers data to the correct application process, and the Application layer gives the data to the user application.
Encapsulation is the addition of protocol control information as data moves down the stack. Decapsulation is the removal and interpretation of that information as data moves up the stack.
Application Layer Protocols
The Application layer contains protocols that provide network services to user applications. These protocols define how applications request, exchange, and interpret information. They commonly depend on TCP or UDP at the Transport layer.
DNS
Domain Name System (DNS) translates a hostname into an IP address. For example, when a user enters a hostname in a browser, the host can query a DNS server to discover the address of the web server.
HTTP
Hypertext Transfer Protocol (HTTP) is used for web client-server communication. A browser uses HTTP to request resources such as HTML text, images, audio, video, and other content from a web server. HTTP commonly uses TCP for reliable delivery.
FTP
File Transfer Protocol (FTP) transfers files between hosts. Complete and correctly ordered file data is important, so FTP commonly uses TCP.
Telnet
Telnet establishes a remote command-line or terminal session with another host. Telnet carries its communication without encryption, so credentials and commands can be exposed. Secure administration should use SSH instead.
Transport Layer Protocols
The Transport layer provides process-to-process data delivery. It allows a host to deliver received data to the correct application by using transport-layer information such as port numbers.
TCP
Transmission Control Protocol (TCP) is a connection-oriented transport protocol. Connection-oriented communication establishes state before data transfer begins.
TCP supports reliability through:
- Session establishment: endpoints establish a communication relationship before normal data transfer.
- Ordered delivery: sequence information allows data to be reassembled in the correct order.
- Acknowledgments: the receiver confirms received data.
- Retransmission: data that appears to be lost can be sent again.
- Flow control: the sender can adjust its rate so it does not overwhelm the receiver.
UDP
User Datagram Protocol (UDP) is a connectionless transport protocol. It sends independent data units without first establishing a session.
UDP does not inherently guarantee delivery, ordering, acknowledgments, or retransmission. Its smaller overhead can reduce delay and processing requirements. An application may choose UDP when timeliness is more important than built-in recovery, provided the application can tolerate loss or implement its own recovery.
| Characteristic | TCP | UDP |
|---|---|---|
| Connection setup | Establishes a session before normal data transfer. | No required session establishment. |
| Reliability | Provides reliability mechanisms. | No built-in delivery guarantee. |
| Ordering | Supports ordered delivery. | Does not guarantee order. |
| Acknowledgments and retransmission | Supported. | Not inherent to UDP. |
| Overhead | Higher because of control and reliability features. | Lower. |
| Suitable application characteristics | Complete, accurate data is more important than minimum overhead. | Low delay is important, or the application supplies its own recovery. |
A file transfer generally favors TCP because missing or reordered data must be recovered. A time-sensitive application may favor UDP when waiting for retransmissions would be worse than losing some data.
Internet Layer Protocols
The Internet layer is responsible for logical addressing and forwarding packets between networks.
IP
Internet Protocol (IP) uses logical addresses to identify source and destination hosts or interfaces. An IP packet contains the destination IP address, and routers use that address to make forwarding decisions.
IP provides best-effort delivery. It attempts to forward a packet toward its destination but does not itself guarantee successful arrival, correct ordering, or retransmission. Reliability, when required, is usually provided by TCP or by the application.
ICMP and ping
Internet Control Message Protocol (ICMP) carries control, error-reporting, and diagnostic information. The ping utility commonly sends ICMP Echo messages and checks for an ICMP Echo Reply.
A successful reply indicates that communication was possible for that ICMP exchange. A failed ping does not prove that every application service is unavailable because a device or firewall may filter ICMP while allowing other traffic.
Network Access Layer and Local Delivery
The Network Access layer covers local-network delivery and the technologies used to place data on a physical medium. Ethernet framing, local media access, and link-layer addressing are associated with this layer.
IP addresses and MAC addresses
An IP address is a logical address used to identify a host or interface and route packets across networks. A MAC address is a link-layer address used to deliver frames on a local network segment.
| Characteristic | IP address | MAC address |
|---|---|---|
| Primary purpose | Logical identification and routing between networks. | Local delivery of a frame on a link. |
| Scope of use | Can represent an end-to-end source or destination across routed networks. | Normally significant only on the local network segment. |
| Used by | Hosts and routers for packet forwarding decisions. | Ethernet switches and hosts for local frame delivery. |
| Relationship to routing and local delivery | The destination IP normally remains the remote host address as routers forward the packet. | The frame destination is the MAC address of the local next hop. |
ARP
Address Resolution Protocol (ARP) is used on IPv4 Ethernet networks to discover the MAC address associated with a known local IP address.
A sender needs the next-hop MAC address before it can send an Ethernet frame. If the destination is on the local subnet, the sender resolves the destination host's MAC address. If the destination is on a remote network, the sender resolves the MAC address of its default gateway instead. The IP packet still identifies the remote destination, while the Ethernet frame delivers the packet to the next local hop.
How the Protocols Work Together
Opening a website by name
- The user enters a hostname in a browser.
- The host uses DNS to resolve the hostname to an IP address.
- The browser creates an HTTP request for a web resource.
- TCP normally provides reliable, ordered transport for the HTTP exchange. An application using a different web transport may use UDP, depending on its design.
- IP places the source and destination logical addresses in packets and carries them toward the destination network.
- Before sending on Ethernet, the client uses ARP to learn the MAC address of the local next hop, usually the default gateway for a remote destination.
- The client sends an Ethernet frame to that next-hop MAC address. Routers forward the IP packet across additional networks using new local frames.
- The server decapsulates the received data and passes the HTTP request to its web application. The response follows the reverse process.
These roles are complementary, not interchangeable: DNS supplies name resolution, HTTP defines web requests and responses, TCP or UDP provides transport, IP provides logical forwarding, ARP supports IPv4 local delivery, and Ethernet carries the local frame.
Sending data to a remote network
Suppose a client sends data to a server on another network. The destination IP in the packet is the remote server's IP address. The destination MAC in the first Ethernet frame is the default gateway's MAC address, because the gateway is the next local hop. After receiving the frame, the router forwards the packet through the next interface using a new link-layer frame.
Protocol Placement Summary
| Protocol | TCP/IP layer | Primary purpose | Key behavior |
|---|---|---|---|
| ARP | Network Access boundary | Maps a known IPv4 address to a local MAC address. | Supports local Ethernet delivery; commonly associated with Network Access even though it bridges IP and link-layer addressing. |
| IP | Internet | Logical addressing and packet forwarding. | Best-effort delivery between networks. |
| ICMP | Internet | Diagnostic and error-reporting messages. | Used by tools such as ping and often involved in traceroute responses. |
| TCP | Transport | Reliable process-to-process delivery. | Connection-oriented, ordered, acknowledged, and able to retransmit. |
| UDP | Transport | Low-overhead process-to-process delivery. | Connectionless and without inherent reliability or ordering. |
| DNS | Application | Hostname-to-IP resolution. | Application queries commonly use UDP or TCP depending on the exchange. |
| HTTP | Application | Web resource requests and transfers. | Commonly uses TCP; the application protocol is separate from its transport. |
| FTP | Application | File transfer between hosts. | Commonly uses TCP for complete and ordered transfer. |
| Telnet | Application | Remote terminal sessions. | Interactive and unencrypted; use SSH for secure administration. |
Protocol placement is a practical TCP/IP classification. It should not be treated as an exact one-to-one translation of every OSI layer. ARP, in particular, is commonly placed at the Network Access layer because it connects IP addressing with local link delivery.
Useful Diagnostic Commands
These commands help isolate problems at different parts of the stack:
ping 192.0.2.10
Uses ICMP Echo messages to test basic IP reachability.
ping example.com
Tests name resolution and reachability when the hostname resolves successfully.
nslookup example.com
Queries DNS and displays hostname-to-IP resolution information.
arp -a
Displays cached IPv4-to-MAC mappings on common host operating systems.
ip neigh
Displays neighbor-cache entries on Linux, including ARP-derived IPv4 mappings.
traceroute 192.0.2.10
tracert 192.0.2.10
Shows the routed path toward a destination using TTL-expiry responses, often involving ICMP.
TCP/IP Troubleshooting Examples
Reachable by IP but not by hostname
This symptom points first to DNS. Test the destination by IP, run nslookup, and verify the configured DNS server and returned record.
Cannot communicate with a device on the same IPv4 LAN
Check the ARP or neighbor cache for an IP-to-MAC mapping. Verify the target address and subnet membership, then check link status, VLAN membership, and local switching connectivity.
Ping fails to a remote destination
Verify the host IP configuration and default gateway. Test the gateway first, then use traceroute or tracert. Remember that ICMP filtering can cause ping to fail even when some application traffic works.
A UDP application loses or reorders data
UDP does not provide built-in acknowledgments, retransmissions, or sequencing. Investigate congestion, packet loss, filtering, and any recovery mechanisms implemented by the application. Determine whether the application actually requires TCP-like reliability.
Telnet exposes credentials and commands
Telnet is unencrypted. Replace it with SSH for secure remote command-line administration.
CCNA Exam Notes
- TCP/IP is a suite of protocols, not a single protocol.
- TCP is connection-oriented and provides reliability; UDP is connectionless and provides lower overhead without inherent delivery guarantees.
- IP uses logical addresses and provides best-effort delivery; routers use destination IP addresses to forward packets.
- ARP maps an IPv4 local IP address to a MAC address so an Ethernet frame can be sent.
- For a remote destination, the first frame is addressed to the default gateway's MAC address, not the remote host's MAC address.
- Ping commonly uses ICMP, but a failed ping does not prove that all application services are unreachable.
- DNS, HTTP, FTP, and Telnet are Application-layer protocols; TCP and UDP are Transport-layer protocols; IP and ICMP are Internet-layer protocols.
- Encapsulation occurs as data moves down the sending stack; decapsulation occurs as it moves up the receiving stack.