The TCP/IP model has four layers: Application, Transport, Internet and Network Access. The OSI model has seven. TCP/IP describes the protocols that run the internet. OSI is the numbered vocabulary you use when you say “Layer 2 switch” or “Layer 7 firewall”. Same trip, two maps. You need both.
You’ve probably met both the seven-layer OSI poster and the four-layer TCP/IP diagram and wondered which one’s right. Both are. Here’s what you’ll get below. A table that maps the layers. A 3,000-byte request followed header by header until it becomes three Ethernet frames. A straight answer on where ARP, OSPF and BGP really sit, because some popular pages get that wrong. And what the CCNA and Network+ actually ask, which isn’t what most study guides claim.
| TCP/IP layer | OSI layers | Unit of data | Example protocols | What works here |
|---|---|---|---|---|
| Application | 7 Application, 6 Presentation, 5 Session | Data | HTTP, DNS, DHCP, SSH, SMTP, BGP | Browsers, proxies, web application firewalls |
| Transport | 4 Transport | Segment (TCP) or datagram (UDP) | TCP, UDP | Stateful firewalls, load balancers |
| Internet | 3 Network | Packet | IPv4, IPv6, ICMP, OSPF | Routers, Layer 3 switches |
| Network Access | 2 Data Link, 1 Physical | Frame, then bits | Ethernet, Wi-Fi, ARP | Switches, access points, cables |
Those are the TCP/IP model protocols you’ll meet most, grouped by layer. Some books split the bottom layer in two and call it five layers. That’s covered below, and it changes nothing above it.

Same journey, sliced differently. OSI layers 7, 6 and 5 fold into the TCP/IP Application layer, layers 4 and 3 match Transport and Internet one for one, and layers 2 and 1 become Network Access.
What Is the TCP/IP Model?
The TCP/IP model is a four-layer description of how data travels between devices on a network such as the internet. TCP/IP stands for Transmission Control Protocol/Internet Protocol, the two protocols at its centre. Each layer does one job, hands its result to the next layer, and talks to the matching layer on the other device. The protocols that fill those layers are called the TCP/IP protocol suite, or the Internet protocol suite.
The protocols came first. The IP and TCP specifications both date from September 1981, and the IP one says it was prepared for the US Defense Advanced Research Projects Agency (DARPA). The four-layer model was written down later, in RFC 1122 in October 1989. That RFC names the layers Application, Transport, Internet and Link. You’ll also see the bottom one called Network Access or Network Interface. Same layer, three names.
What Are the Layers of the TCP/IP Model?
Here are the TCP/IP model layers, top to bottom, which is the order data takes when you send something.
What runs at the application layer?
Anything your software speaks directly: HTTP for web pages, DNS for name lookups, DHCP for addresses, SSH for remote logins, SMTP for email. Encryption protocols like TLS sit here too, since TLS only asks for a reliable, in-order stream underneath it (RFC 8446).
Here’s the catch. OSI splits this job into three layers: Application, Presentation and Session. RFC 1122 says the TCP/IP application layer combines the functions of the top two, Presentation and Application, and most courses fold Session in as well. That’s why every comparison says seven versus four.
Routing protocols that ride on TCP or UDP, like BGP and RIP, belong here too. More on that in a moment.
Transport layer: TCP or UDP?
The transport layer carries data between two programs, not just two machines. It tells them apart with port numbers: 80 for web, 443 for HTTPS, 22 for SSH. Two protocols do the work.
- TCP sets up a connection first, numbers every byte, waits for acknowledgements and resends whatever goes missing. Reliable and ordered, but slower to start.
- UDP just sends. No handshake, no resending. Lighter and faster, with nothing guarding against loss.
The rule of thumb: ask what happens if one chunk of data vanishes. If the app breaks (a web page, a file, an SSH session), you want TCP. If late data is worthless or the app copes with loss itself (a DNS lookup you can simply repeat, a voice call, DHCP), UDP is fine. Even that’s shifting. HTTP/3 runs over QUIC, and QUIC is built on UDP (RFC 9000), so “web means TCP” isn’t always true any more.

TCP numbers every byte and the receiver acknowledges what arrives, so anything lost gets sent again. UDP sends and moves on: a lost datagram stays lost unless the application notices.
Our common ports cheat sheet lists the rest of the port numbers worth knowing.
Which layer of the TCP/IP model provides a route?
The Internet layer. It gives every device a logical address (32 bits for IPv4, 128 bits for IPv6) and moves packets from the source network to the destination network, one router at a time. Each router reads the destination address in the IP header and picks the next hop.
ICMP lives here too. It’s the protocol behind ping and the error messages traceroute relies on, and RFC 792 calls it “an integral part of IP”. If addressing still feels fuzzy, Subnetting Explained walks through the maths.
What does the network access layer cover?
Everything that moves a frame across one link: Ethernet, Wi-Fi, the MAC addresses in the frame, and the cable or radio underneath. It works hop by hop. The frame that crosses your Wi-Fi isn’t the frame that crosses your provider’s fibre.
Switches and access points work here, and ARP does too. RFC 1122 covers ARP in its Link Layer chapter. OSI splits this layer into Data Link (2) and Physical (1). For the fields inside a frame, see Ethernet Frame Format: Every Field Explained, and for VLAN tags see What Is a VLAN?.
How Does Data Move Down the TCP/IP Layers? A 3,000-Byte Example
Textbooks say “each layer adds a header”. Here’s what that costs in bytes. Do the maths once and packet captures stop looking like noise.
Say your PC (198.51.100.20) sends a 3,000-byte HTTP request to a web server (203.0.113.50, port 80) through one router. Both addresses come from the ranges reserved for documentation (RFC 5737), so they don’t belong to anyone’s real network. It’s IPv4 over Ethernet with an MTU of 1,500 and no IP or TCP options.
These numbers are calculated from the header sizes, not captured from a live network. IPv4 needs 20 bytes minimum (RFC 791), TCP needs 20 bytes minimum (RFC 9293), and Ethernet adds a 14-byte header plus a 4-byte frame check sequence (FCS).
- Application layer. The browser hands TCP 3,000 bytes.
- Transport layer. The biggest chunk TCP can send at once is the maximum segment size (MSS): the MTU minus the IP and TCP headers. That’s 1,500 – 20 – 20 = 1,460 bytes. So 3,000 bytes becomes three segments of 1,460, 1,460 and 80. TCP adds its header to each.
- Internet layer. IP adds 20 bytes to each segment. The first two fill the MTU exactly at 1,500.
- Network access layer. Ethernet adds the 14-byte header and the 4-byte FCS.
| Segment | TCP payload | With TCP header | With IP header | With Ethernet header and FCS | TCP sequence number (relative) |
|---|---|---|---|---|---|
| 1 | 1,460 | 1,480 | 1,500 | 1,518 | 1 |
| 2 | 1,460 | 1,480 | 1,500 | 1,518 | 1,461 |
| 3 | 80 | 100 | 120 | 138 | 2,921 |

Frame 1 from the table: a 14-byte Ethernet header, a 20-byte IP header, a 20-byte TCP header, 1,460 bytes of data and a 4-byte FCS (the hatched block). That’s 1,518 bytes, and 58 of them are overhead.
That’s 3,174 bytes on the link to deliver 3,000 bytes of data. The 174 extra bytes are overhead: 60 from TCP, 60 from IP and 54 from Ethernet. About 5.8% on top of the data. Send less data per segment and the percentage climbs, because every segment pays the same 58 bytes. Every layer takes a cut.
The receiver runs it in reverse. Ethernet strips its header and checks the FCS. IP checks the destination address. TCP puts the three payloads back in order using the sequence numbers (the next byte it expects is 3,001) and hands all 3,000 bytes to the web server.
One boundary worth remembering: 1,460 bytes of data fit in one segment, 1,461 need two, and 4,381 need four.
Capture this on a Linux host and you’ll usually see 1,448 bytes of payload per segment, not 1,460. Linux turns on the TCP timestamp option by default, which adds 12 bytes of TCP header (RFC 7323), so TCP leaves less room for data. The method doesn’t change, only the MSS.
What changes when a packet crosses a router?
Not much. A router works at the Internet layer and below, so it opens the IP header and never looks inside the TCP one.
| Field | Layer | PC to router | Router to server | Changed? |
|---|---|---|---|---|
| Ethernet source and destination MAC | Network Access | PC’s MAC to the router’s MAC | Router’s MAC to the server’s MAC | Yes, rewritten on every hop |
| Frame check sequence | Network Access | Calculated by the PC | Recalculated by the router | Yes |
| IP source and destination address | Internet | 198.51.100.20 to 203.0.113.50 | Same | No |
| IP TTL | Internet | 64 (the Linux default) | 63 | Yes, minus 1 per router |
| IP header checksum | Internet | Calculated by the PC | Recalculated, because TTL changed | Yes |
| TCP ports, sequence and acknowledgement numbers | Transport | An ephemeral port to 80 | Same | No |

The IP addresses ride end to end, 198.51.100.20 to 203.0.113.50, and only the TTL changes on the way (64 to 63). Each link gets its own MAC pair, and the router writes a new one for the second link.
That table is the whole idea of layering in one picture. Each header carries its own address, and a different device reads each one. The MAC address says which device on this link is next. The IP address says which host sits at the far end. The port says which program on that host gets the data. Three addresses, three jobs.
NAT is the exception. A NAT router also rewrites IP addresses and, with PAT, TCP ports. What Is NAT? shows how.
What Is the Difference Between the TCP/IP and OSI Models?
Here’s the OSI vs TCP/IP model comparison at a glance.
| TCP/IP model | OSI model | |
|---|---|---|
| Layers | 4 (RFC 1122), or 5 in many textbooks | 7 |
| How it started | Protocols first (1981), model written down later (RFC 1122, 1989) | Reference model first (ISO 7498, 1984) |
| Tied to protocols? | Yes: TCP, UDP, IP | No: it describes functions, not protocols |
| Session and presentation | No layers of their own | Layers 5 and 6 |
| Where you meet it | Packet captures, RFCs, protocol design | Job interviews, vendor docs, exams, “Layer 3 switch” |
Is the TCP/IP model 4 or 5 layers?
Four, according to the RFC that defines it: Application, Transport, Internet and Link (RFC 1122). Five-layer versions of the TCP/IP model come from textbooks and courses that split the link layer into Data Link and Physical. The top three layers are identical either way. So the answer depends on who’s marking you. Check which version your course uses, and be ready to draw both. Cisco’s CCNA blueprints don’t name a layer count at all, as the exam section below shows.
Which came first, OSI or TCP/IP?
TCP/IP. The IP and TCP specifications are dated September 1981. ISO published the OSI reference model in 1984, and the current edition is ISO/IEC 7498-1:1994. RFC 1122 wrote the four-layer description down in 1989. That’s why TCP/IP’s layers follow its protocols while OSI’s layers follow a design plan.
Why do engineers still say Layer 2 and Layer 7?
Because OSI won the vocabulary and TCP/IP won the wire. Nobody says “Network Access switch” or “Internet layer firewall”. They say Layer 2 switch, Layer 3 switch and Layer 7 firewall, and everyone knows which header the device reads. Types of Firewalls leans on exactly that vocabulary.
Most OSI protocols never took off, but a few crossed over. IS-IS, a routing protocol born in the OSI suite, was adapted to carry IP in RFC 1195 (December 1990).
Where Do ARP, ICMP, OSPF and BGP Fit in the TCP/IP Model?
Ask what carries the protocol. That settles most arguments.
| Protocol | What carries it | TCP/IP layer | Evidence |
|---|---|---|---|
| ARP | Straight inside an Ethernet frame, no IP header | Network Access | RFC 826; RFC 1122 covers ARP in its Link Layer chapter |
| ICMP | An IP packet | Internet | RFC 792: “an integral part of IP” |
| OSPF | IP protocol number 89 | Internet | RFC 2328: “runs directly over IP” |
| EIGRP | IP protocol number 88 | Internet | RFC 7868 |
| BGP | TCP port 179 | Application | RFC 4271: “BGP listens on TCP port 179” |
| RIP | UDP port 520 | Application | RFC 2453 |
BGP trips people up. It’s a routing protocol, but it isn’t an Internet-layer protocol. It’s a TCP session on port 179, so it’s an application-layer protocol that happens to exchange routes. Plenty of study sites file it under Internet. OSPF and EIGRP skip TCP and UDP and ride directly on IP, so by this rule they sit at the Internet layer. Some courses file OSPF higher because it’s a routing process. The encapsulation rule is the one that matches what you see in a packet capture. For how these protocols behave once they’re running, see BGP vs OSPF.

Ask what carries it. BGP rides inside TCP (port 179), and TCP rides inside IP, so BGP is an application-layer protocol even though what it carries is routes.
ARP is the awkward one. Some textbooks put it at Layer 3, others at Layer 2. It travels inside an Ethernet frame with no IP header, and RFC 1122 covers it in the Link Layer chapter, so Network Access is the better answer. The Ethernet frame post above decodes a real ARP frame in hex if you want to see it.
Which Model Do You Use When You’re Troubleshooting?
Use TCP/IP to ask what a protocol does and what carries it. Use the OSI numbers to say where the problem lives. In practice that means working from the bottom up, one layer at a time.
| Layer | The question | The check |
|---|---|---|
| Network Access (L1, L2) | Is the link up, and does the switch know the neighbour’s MAC? | show ip interface brief, show mac address-table, show ip arp |
| Internet (L3) | Is there a route, and does the packet get through? | ping 203.0.113.50, traceroute 203.0.113.50, show ip route 203.0.113.50 |
| Transport (L4) | Is the port open? | From a PC: nc -vz 203.0.113.50 80 (Linux, macOS) or Test-NetConnection 203.0.113.50 -Port 80 (Windows PowerShell). On a Cisco device, show tcp brief lists the TCP connections that device itself has |
| Application (L5 to L7) | Does the service answer properly? | curl -I http://203.0.113.50/, nslookup |
On older Catalyst platforms the MAC table command is hyphenated: show mac-address-table.
Here’s the deal. Two rules fall out of that table. First, if ping works but the port test fails, stop checking cables and addresses. The problem’s at Layer 4 or above: a firewall rule, an ACL, or a service that isn’t listening. Second, a failed ping doesn’t always mean there’s no route. Many firewalls drop ICMP on purpose, so confirm with a port test before you blame the router.
Our network troubleshooting commands PDF covers the Windows and Linux side, and the Cisco commands cheat sheet covers the IOS side.
Do the CCNA and Network+ Test the TCP/IP and OSI Models?
Not by name on the CCNA, and only the OSI model on Network+. Here’s what the objective lists say, checked on 2026-10-27.
| Exam | What it asks |
|---|---|
| CCNA 200-301 v1.1 (valid until February 2027) | 1.1.b Layer 2 and Layer 3 switches. 1.5 Compare TCP to UDP. No objective names the OSI or TCP/IP model |
| CCNA 200-301 v2.0 (first test date 2027-02-03) | 2.4 Troubleshoot basic Layer 2/Layer 3 connectivity using show commands, ping, extended ping, trace route and packet capture output. The list doesn’t contain the words TCP or UDP, and neither model is named |
| CompTIA Network+ N10-009 | 1.1 Explain concepts related to the OSI reference model, listing all seven layers by number. The TCP/IP model has no objective of its own |
What that means for you. On the CCNA, nobody will ask you to recite a layer count. You’ll be asked to work out which layer a problem lives at and to compare TCP with UDP, so the troubleshooting ladder and the 3,000-byte maths above are the parts worth practising. For Network+, learn the seven OSI numbers cold and use the TCP/IP four to understand them. Our CCNA vs Network+ post helps you pick, and the Network+ practice test lets you check the OSI questions.
Want to practise this on real devices? The CCNA Lab Workbook has 75+ labs built for EVE-NG and Packet Tracer, from Layer 2 switching and VLANs to OSPF, ACLs and NAT. There’s also a free CCNA 200-301 PDF if you want a taste first.
How Do You Memorise the Layers?
Two short mnemonics. For the TCP/IP model, top to bottom: All Teams Inspect Logs (Application, Transport, Internet, Link). For OSI, bottom to top, the classic: Please Do Not Throw Sausage Pizza Away (Physical, Data Link, Network, Transport, Session, Presentation, Application).
Then add the address rule from the router table: port picks the program, IP picks the host, MAC picks the next hop. The free OSI model cheat sheet puts all of it on one page.
Frequently Asked Questions
How many layers does the TCP/IP model have?
Four: Application, Transport, Internet and Network Access. RFC 1122 calls the last one Link. Many textbooks split it into Data Link and Physical and teach five layers. The OSI model has seven.
What is the full form of TCP/IP?
The TCP/IP full form is Transmission Control Protocol/Internet Protocol. Those are two protocols, but the name also stands for the whole suite built around them, including UDP, ICMP and ARP.
What are L1, L2, L3 and L4 in networking?
They’re OSI layer numbers. L1 is Physical (bits on the wire). L2 is Data Link (frames, MAC addresses, switches). L3 is Network (packets, IP addresses, routers). L4 is Transport (TCP and UDP, port numbers). In the TCP/IP model, L1 and L2 together are the Network Access layer, L3 is Internet and L4 is Transport.
Which layer of the TCP/IP model provides a route?
The Internet layer. IP carries the source and destination addresses, and each router uses the destination address to choose the next hop.
Are the OSI and TCP/IP models the same?
No. They describe the same process with different layer counts. OSI is a seven-layer reference model that doesn’t name protocols. TCP/IP is a four-layer description of the protocols the internet runs on. Transport and Internet line up with OSI layers 4 and 3. The top and bottom layers are where they differ.
Bottom Line
TCP/IP is what’s on the wire. OSI is how you talk about it. Learn the four layers, learn which address each header carries (port, IP, MAC), and you’ll read packet captures and troubleshoot faster than someone who only memorised seven names.
Try it yourself. Send 10,000 bytes over the same link (MTU 1,500, no options). How many frames cross it, and how many bytes in total? The answer is 7 frames (six of 1,518 bytes and one of 1,298 bytes), so 10,406 bytes on the link for 10,000 bytes of data. If you got that without peeking, the layers are sinking in.