TCP/IP Protocol
Lesson 02 showed you where each protocol sits. This lesson zooms in on what each one actually does — the core Internet protocols (IP, ICMP, ARP, TCP, UDP) and the application protocols you use every day. By the end you will know each protocol’s job and whether it is reliable.
The big picture: a relay team
The TCP/IP suite is a relay team. An application protocol such as HTTP produces the data; a transport protocol (TCP or UDP) delivers it to the right application; IP moves it across networks; and the network access layer puts it on the local link. Two protocols — IP and TCP — carry most of the world’s traffic, which is why the whole family is named after them.
Application
Produces the data and names the service: HTTP, DNS, SMTP, DHCP, FTP, SSH, SNMP.
Transport
Delivers it to the right application, using port numbers. TCP or UDP.
Internet
Addresses and routes it across networks: IP, ICMP, ARP.
Network access
Puts it on the wire with MAC addresses: Ethernet, WLAN, PPP.
Notice that each stage only understands its own neighbour. The Application protocol does not know or care whether the packet crosses one LAN or twenty networks; it simply hands a message down and expects a response. That is the modularity of Lesson 02 in action.
IP: logical addressing and best-effort delivery
The Internet Protocol (IPv4 and IPv6) sits at the Internet layer. It does two critical things: it gives every host a logical address, and it delivers packets between networks. It does both on a surprising promise: best effort.
An IP packet consists of a header and a payload. The header carries the information routers need.
| Header field | What it does |
|---|---|
| Source and destination IP addresses | Identify the sending and receiving hosts. They stay the same for the whole journey across the Internet. |
| Time-to-Live (TTL) | Decreased by one at every router, so a routing loop cannot keep a packet alive forever. When it reaches zero the packet is discarded and an ICMP message is sent back. |
| Protocol | Says which upper-layer protocol the payload belongs to — TCP (6), UDP (17), or ICMP (1). |
| Total length | The size of the whole packet, header included, so the receiver knows where the packet ends. |
| Header checksum | An IPv4-only field that protects the header itself from corruption. IPv6 removes it, relying on the layers below instead. |
ICMP and ARP: the Internet layer’s helpers
Two smaller protocols sit alongside IP at the Internet layer. ICMP is IP’s messaging assistant — it reports problems and provides testing. ARP supplies the link between an IP address and the MAC address needed to build the frame.
ICMP: reporting and testing
The Internet Control Message Protocol is not used to carry application data. ICMP messages travel inside IP packets, and they do three common jobs:
- Error reporting — a router or host can send messages such as “destination unreachable” or “time exceeded” to tell a sender that a packet could not be delivered.
- Availability testing —
pingsends an ICMP echo request and expects an ICMP echo reply. A reply proves the host is reachable and measures round-trip time. - Path discovery —
traceroute(ortracerton Windows) sends packets with increasing TTL values. Each router that lets the TTL hit zero sends back an ICMP “time exceeded” message, revealing the next hop. The path to the destination is built from those replies.
For IPv6, ICMPv6 plays the same error and testing role and additionally powers neighbour discovery (IPv6’s replacement for ARP).
ping and traceroute measure the network itself rather than a particular application.ARP: from IP to MAC
When a host sends a packet on a local network, it needs both an IP address (to identify the destination) and a MAC address (to actually address the Ethernet frame). ARP, the Address Resolution Protocol, resolves a known IPv4 address to a MAC address on the local link.
- The sender broadcasts an ARP request: “Who has IP address 192.168.10.20? Tell 192.168.10.10.”
- The device that owns that IP answers with a unicast ARP reply containing its MAC address.
- The sender stores the pairing in its ARP table (also called the ARP cache) so it does not have to ask again right away. You can view it with
arp -a.
ARP only works within the local network — broadcasts do not cross a router. To reach a host on another network, a device ARPs for the default gateway instead, and the router forwards the packet onward. IPv6 does not use ARP; it uses Neighbor Discovery (ND) via ICMPv6.
TCP: reliable, connection-oriented
The Transmission Control Protocol is the workhorse of the Transport layer. It is connection-oriented and reliable, at the cost of more overhead. Its data unit is a segment.
Connection setup: the three-way handshake
Before any data is sent, TCP establishes a connection with a three-step exchange. Step through it below.
How TCP keeps its promises
- Sequencing — every byte of data is numbered, so the receiver can put segments back in the correct order even if they arrive out of sequence.
- Acknowledgements — the receiver acknowledges the data it has received. If the sender does not get an acknowledgement within a timeout, it retransmits the lost segment.
- Flow control — the receiver advertises how much data it can accept (a window), preventing a fast sender from overwhelming it.
- Connection teardown — when the conversation ends, TCP closes it in an orderly way.
TCP also uses port numbers to identify the application at each end, so several conversations can share one IP address. Week 8 covers TCP in depth; this lesson only introduces it.
UDP and the application protocols
The User Datagram Protocol is TCP’s lightweight sibling. It is connectionless and offers no delivery guarantee. Its data unit is called a datagram.
- No handshake, no acknowledgements, no retransmission, and no ordering — UDP just sends.
- Very low overhead: its header is only 8 bytes, versus TCP’s 20 or more.
- Because there is no waiting or retrying, UDP is faster and adds less delay.
UDP is the right choice when speed matters more than perfection, or when the application handles loss itself. Common users include DNS queries, DHCP, TFTP, VoIP, live video streaming, SNMP, and NTP.
Application protocols
These protocols sit at the Application layer and give users actual services. Know each one’s port and one-line job.
- HTTP (port 80) — the protocol behind the web. A client sends a request, the server returns a response (pages, images, and so on), all in plain text over TCP.
- HTTPS (port 443) — HTTP protected by TLS encryption. This is what modern websites use so that traffic cannot be read or altered in transit.
- DNS (port 53) — the “phone book” of the Internet: it translates human names such as
example.cominto IP addresses. Queries typically use UDP; larger transfers such as zone transfers use TCP. - DHCP (ports 67 and 68) — automatically gives a host its IP address, subnet mask, default gateway, and DNS server so it can join the network without manual configuration.
- FTP (ports 20 and 21) — transfers files. Port 21 carries control commands; port 20 carries the data. It is unencrypted, so secure alternatives such as SFTP exist. (TFTP, a simple transfer protocol, uses UDP port 69.)
- SMTP (port 25) — sends email from a client to a server and between mail servers, using TCP. (POP3 on port 110 and IMAP on port 143 retrieve mail.)
- SSH (port 22) — secure, encrypted remote login and command execution. Telnet (port 23) does the same job in plain text and is now avoided.
- SNMP (port 161) — lets management systems monitor and collect data from network devices such as routers and switches.
Port number reference
| Protocol | Port | Transport | Purpose |
|---|---|---|---|
| FTP | 20 / 21 | TCP | File transfer (data / control) |
| SSH | 22 | TCP | Secure remote access |
| Telnet | 23 | TCP | Remote access (unencrypted) |
| SMTP | 25 | TCP | Send email |
| DNS | 53 | UDP / TCP | Name-to-IP resolution |
| DHCP | 67 / 68 | UDP | Dynamic host configuration (server / client) |
| TFTP | 69 | UDP | Simple file transfer |
| HTTP | 80 | TCP | Web (unencrypted) |
| POP3 | 110 | TCP | Retrieve email |
| IMAP | 143 | TCP | Retrieve email (server-side) |
| SNMP | 161 | UDP | Network device management |
| HTTPS | 443 | TCP | Secure web (TLS) |
Protocol summary table
| Protocol | Layer | Purpose | Reliable? |
|---|---|---|---|
| IP (IPv4/IPv6) | Internet | Logical addressing and routing of packets | No (best effort) |
| ICMP | Internet | Error reporting and network testing (ping, traceroute) | n/a |
| ARP | Internet | Resolve an IPv4 address to a MAC address on the local link | n/a |
| TCP | Transport | Reliable, ordered, connection-oriented delivery of segments | Yes |
| UDP | Transport | Fast, connectionless delivery of datagrams | No |
| HTTP / HTTPS | Application | Web requests and responses (HTTPS encrypted) | Via TCP |
| DNS | Application | Translate names to IP addresses | No (UDP) |
| DHCP | Application | Automatically assign IP configuration | No (UDP) |
| FTP | Application | Transfer files | Via TCP |
| SMTP | Application | Send email | Via TCP |
| SSH | Application | Secure remote access | Via TCP |
| SNMP | Application | Monitor and manage network devices | No (UDP) |
Choosing TCP or UDP
Neither TCP nor UDP is “better”; each fits a different need. Choose TCP when every bit must arrive, and in order — web pages, file downloads, email, and remote logins. Choose UDP when speed and low delay matter more than perfection — real-time voice and video, where a late packet is useless; or simple query/answer exchanges such as DNS; and when the application can retry a lost message itself.
One web request, end to end
Put it all together. You type https://example.com. The data is wrapped, layer by layer, as it moves down the stack — an example of encapsulation (Lesson 05 of this week walks through encapsulation in full).
- DNS first resolves
example.comto an IP address (UDP port 53). - TCP performs the three-way handshake to port
443on the server. - The browser builds an HTTPS request; TCP encapsulates it as a segment with source and destination ports.
- IP encapsulates the segment as a packet with source and destination IP addresses.
- Ethernet encapsulates the packet as a frame with MAC addresses and an FCS, ready for the wire.
- At the server the process reverses (de-encapsulation), the request reaches the web application, and the response travels back the same way.
Key terms
| Term | Meaning |
|---|---|
| IP | Internet Protocol; logical addressing and best-effort packet delivery at the Internet layer. |
| Best-effort delivery | No guarantee of arrival, order, or error correction; recovery is left to higher layers. |
| Logical address | An IP address that identifies a host and its network independently of hardware. |
| ICMP | Internet Control Message Protocol; error reporting and testing, used by ping and traceroute. |
| ARP | Address Resolution Protocol; resolves an IPv4 address to a MAC address on the local link. |
| TCP | Transmission Control Protocol; connection-oriented, reliable transport using segments, sequencing, and acknowledgements. |
| UDP | User Datagram Protocol; connectionless, best-effort transport using datagrams and low overhead. |
| Segment | TCP’s data unit at the Transport layer. |
| Datagram | UDP’s data unit at the Transport layer; also an IP packet informally. |
| Three-way handshake | TCP’s SYN / SYN-ACK / ACK exchange that establishes a connection. |
| Port number | A number that identifies the application at each end of a transport connection. |
Review
Check what you have learned with these review questions.
Sources & references
- Postel, J. RFC 792: Internet Control Message Protocol (1981). rfc-editor.org/rfc/rfc792.
- Plummer, D. RFC 826: An Ethernet Address Resolution Protocol (1982). rfc-editor.org/rfc/rfc826.
- Eddy, W. RFC 9293: Transmission Control Protocol (TCP) (2022, obsoletes RFC 793). rfc-editor.org/rfc/rfc9293.
- Postel, J. RFC 768: User Datagram Protocol (1980). rfc-editor.org/rfc/rfc768.
- Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers (1989). rfc-editor.org/rfc/rfc1122.
- Socolofsky, T. & Kale, C. RFC 1180: A TCP/IP Tutorial (1991). rfc-editor.org/rfc/rfc1180.
- IANA. Service Name and Transport Protocol Port Number Registry. iana.org.
- IEEE. IEEE 802.3 (Ethernet) and IEEE 802.11 (Wireless LAN). standards.ieee.org.
- Cisco. CCNA (200-301) Exam Topics, Network Fundamentals. cisco.com.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.