⚡ Quick Answer
The TCP/IP model has 4 layers: Application, Transport, Internet, and Network Access (bottom to top: Network Access → Internet → Transport → Application). It's the practical model that the real internet actually runs on. The OSI model has 7 layers and is the theoretical reference model. The key difference: TCP/IP collapses OSI's top three layers (Application, Presentation, Session) into one Application layer, and collapses OSI's bottom two (Data Link, Physical) into Network Access.

The 4 Layers of the TCP/IP Model

4
Application Layer
PDU: Data
Top layer
The layer users interact with directly — where applications generate and consume data. Handles everything from web browsing (HTTP/HTTPS) to email (SMTP/IMAP/POP3) to file transfers (FTP/SFTP) to DNS lookups. This single layer maps to OSI layers 5, 6, and 7 (Session, Presentation, Application). When you type a URL, the browser operates at the Application layer.
HTTP/HTTPSFTP/SFTPSMTPIMAPPOP3DNSDHCPSSHTelnetSNMPLDAPRDPNTPTLS/SSL
3
Transport Layer
PDU: Segment (TCP) / Datagram (UDP)
Ports live here
Responsible for end-to-end communication between applications — adding source and destination port numbers to identify which application should receive the data. TCP provides reliable, ordered, connection-oriented delivery with error checking and retransmission. UDP provides fast, connectionless, best-effort delivery. Maps directly to OSI Layer 4 (Transport).
TCPUDP
2
Internet Layer
PDU: Packet
IP addressing
Handles logical addressing and routing — getting packets from the source host to the destination host across multiple networks. IP addresses are assigned and used at this layer. Routers operate at this layer, reading the destination IP and deciding where to forward the packet next. Maps directly to OSI Layer 3 (Network).
IPv4IPv6ICMPARPOSPFBGPRIPEIGRPIPSec
1
Network Access Layer
PDU: Frame (Data Link) / Bits (Physical)
Physical + Data Link
The bottom layer — responsible for physically transmitting data over the local network link. Handles MAC addressing, framing, error detection (CRC), and the actual transmission medium (copper, fiber, wireless). Maps to both OSI Layer 1 (Physical) and OSI Layer 2 (Data Link). NIC cards, switches, cables, and Wi-Fi radios operate here.
Ethernet (802.3)Wi-Fi (802.11)MAC addressingPPPFrame Relay

TCP/IP vs OSI Model — Side-by-Side Comparison

OSI LayerOSI NameTCP/IP LayerKey Protocols
7ApplicationApplicationHTTP, FTP, DNS, SMTP
6PresentationTLS/SSL, JPEG, ASCII
5SessionNetBIOS, RPC, SQL
4TransportTransportTCP, UDP
3NetworkInternetIP, ICMP, ARP, routing protocols
2Data LinkNetwork AccessEthernet, Wi-Fi, MAC addressing
1PhysicalCables, hubs, radio waves, NIC
🎯 Exam Tip — Which Model Does CompTIA Prefer?

CompTIA tests both models — you need to know them both and understand the mapping between them. The OSI model is used more for theoretical troubleshooting questions ("at which layer does a router operate?"). The TCP/IP model is used when discussing how internet protocols actually work.

Key mapping to memorise: TCP/IP Application = OSI layers 5+6+7. TCP/IP Transport = OSI layer 4. TCP/IP Internet = OSI layer 3. TCP/IP Network Access = OSI layers 1+2.

Encapsulation — How Data Travels Down the Stack

When you send data (say, an HTTP request), each layer wraps it in its own header before passing it down — this is called encapsulation. At the destination, each layer strips its header and passes the payload up — called decapsulation.

Application Layer
HTTP Request Data
Your browser creates an HTTP GET request — this is just raw data at this point
Transport Layer
TCP Header (src port: 54321 → dst port: 443)
HTTP Data
Called a Segment
Internet Layer
IP Header (src: 192.168.1.5 → dst: 142.250.80.46)
TCP Header
HTTP Data
Called a Packet
Network Access
Ethernet Header (src MAC → dst MAC)
IP Header
TCP Header
HTTP Data
FCS (CRC)
Called a Frame → sent as bits
Why This Matters for Troubleshooting

Understanding which layer a problem occurs at tells you exactly where to look. If you can ping by IP but not by hostname — the problem is at the Application layer (DNS). If you can ping the loopback but not the gateway — the problem is at the Network Access or Internet layer. CompTIA's troubleshooting methodology follows the layer model.

A useful rule: ping tests the Internet layer (IP). nslookup tests the Application layer (DNS). If ping works but nslookup fails — DNS is broken, not the network.

TCP vs UDP — The Transport Layer Protocols

FeatureTCPUDP
Connection typeConnection-oriented (3-way handshake: SYN, SYN-ACK, ACK)Connectionless — no handshake
ReliabilityGuaranteed delivery — retransmits lost packetsBest-effort — no retransmission
OrderGuaranteed in-order deliveryNo ordering guarantee
SpeedSlower — overhead of acknowledgementsFaster — no acknowledgement overhead
Use casesHTTP/HTTPS, SSH, FTP, email — anything where data integrity mattersDNS, DHCP, VoIP, video streaming, gaming — speed over reliability
Error checkingYes — checksum + sequence numbers + ACKsChecksum only — no retransmission

Exam Scenarios

💬 "At which TCP/IP layer does a router operate?" → Internet layer — routers read IP addresses to forward packets between networks. In OSI terms, this is Layer 3 (Network).
💬 "A technician is troubleshooting a connectivity issue. The user can ping the server by IP address but not by hostname. Which layer is most likely the problem?" → Application layer — specifically DNS. Name resolution (hostname → IP) happens at the Application layer. The network itself (Internet/Transport layers) is working fine since the IP ping succeeds.
💬 "Which protocol uses the 3-way handshake to establish a connection before transmitting data?" → TCP (Transmission Control Protocol) — SYN from client, SYN-ACK from server, ACK from client. This lives at the TCP/IP Transport layer.
💬 "Which TCP/IP model layer is responsible for MAC addressing and local frame delivery?" → Network Access layer — which maps to OSI layers 1 (Physical) and 2 (Data Link). Switches use MAC addresses to forward frames at this layer.
💬 "A VoIP application is dropping calls and experiencing delays. A technician decides that guaranteed delivery is less important than low latency. Which transport protocol should VoIP use?" → UDP — connectionless and faster, no retransmission overhead. A brief audio gap from a dropped packet is better than the delay caused by TCP retransmission waiting for an ACK.

Ready to study Network+?

See the best courses, study guides, and practice exams for CompTIA N10-009.

See Network+ Resources →

Why the TCP/IP Model Matters More Than OSI in Practice

The OSI model gets more attention in study guides because it's more granular and useful as a troubleshooting framework. But TCP/IP is what actually runs on real networks. Every device on the internet uses TCP/IP — the protocols you deal with daily (HTTP, DNS, DHCP, SSH, TLS) are all TCP/IP protocols. The OSI model is a conceptual framework for understanding networking; the TCP/IP model is the implementation that ships on every operating system.

For the exam: when a question asks which model is used in real-world networking, the answer is TCP/IP. When a question asks you to identify which layer a protocol operates at and the answer options list OSI layers (Physical, Data Link, Network, Transport, Session, Presentation, Application), use the OSI model. The two models coexist — TCP/IP protocols map to OSI layers, and knowing both models and their relationship is expected.

Key Protocols at Each TCP/IP Layer

At the Network Access layer (combining OSI Layers 1 and 2): Ethernet, Wi-Fi (802.11), ARP (Address Resolution Protocol — maps IP addresses to MAC addresses), and PPP. This is where physical transmission and local network delivery happen. ARP is a critical exam topic — it operates at this layer and is the target of ARP poisoning/spoofing attacks where an attacker sends fake ARP replies to associate their MAC address with a legitimate IP.

At the Internet layer (OSI Layer 3): IP (Internet Protocol, both v4 and v6), ICMP (Internet Control Message Protocol — used by ping and traceroute), and routing protocols (OSPF, BGP, RIP). IP is responsible for logical addressing and routing packets between networks. ICMP is a companion protocol to IP, used for error reporting and network diagnostics. When ping sends an echo request and receives an echo reply, that's ICMP.

At the Transport layer (OSI Layer 4): TCP (Transmission Control Protocol — connection-oriented, reliable, ordered delivery with acknowledgements) and UDP (User Datagram Protocol — connectionless, no guaranteed delivery, lower overhead). TCP's three-way handshake (SYN → SYN-ACK → ACK) establishes a connection before data transfer. UDP sends datagrams without establishing a connection first — suitable for DNS queries, VoIP, video streaming, and other applications where speed matters more than guaranteed delivery.

At the Application layer (OSI Layers 5–7): HTTP/HTTPS, DNS, DHCP, FTP/SFTP, SSH, Telnet, SMTP, IMAP, POP3, SNMP, and every other application protocol. This is where user-facing communication happens. The Application layer protocols define how data is structured and exchanged between applications — HTTP defines how browsers request and receive web pages, SMTP defines how email is transmitted between mail servers.

IP Addressing Fundamentals

Every device on a TCP/IP network needs at minimum three configuration items: an IP address (identifies the device on its network), a subnet mask (defines the boundary between network and host portions of the address), and a default gateway (the IP address of the router that handles traffic destined for other networks). Without a correct default gateway, a device can communicate with other devices on its own subnet but cannot reach anything outside it.

DNS servers are also typically configured, providing hostname-to-IP resolution. Without DNS, users would need to type IP addresses to reach websites and services. The command ipconfig /all (Windows) or ifconfig/ip addr (Linux/macOS) displays all four: IP address, subnet mask, default gateway, and DNS server addresses.

TCP Three-Way Handshake — How Connections Are Established

Before any data flows over a TCP connection, the two parties perform a three-way handshake to establish the connection and synchronise sequence numbers. Step 1: the client sends a SYN (synchronise) packet to the server. Step 2: the server responds with a SYN-ACK (synchronise-acknowledge) — acknowledging the client's SYN and sending its own SYN. Step 3: the client sends an ACK (acknowledge) completing the handshake. Data transfer can now begin.

This handshake is the target of SYN flood attacks (a type of DoS attack): the attacker sends large numbers of SYN packets with spoofed source addresses, causing the server to allocate resources waiting for ACKs that never come and eventually exhausting its connection table. SYN cookies and rate limiting are the primary defences. On the exam, recognising a SYN flood from a description of "many half-open connections" is a common Security+ scenario.

Related Articles