TCP/IP and OSI Models
TCP/IP and OSI Networking Models
đ Why Networking Models Matter
Networking models like the OSI model (Open Systems Interconnection) and the TCP/IP model were created to solve a critical industry problem: proprietary protocols and hardware that didn't work together. In the early days, vendors built their own systems, their own cables, and their own protocols, making interoperability nearly impossible. A device from one vendor often could not communicate with a device from another vendor without a separate network.
The OSI model, developed by the ISO (International Organization for Standardization), aimed to bring standardization and interoperability by defining a set of layers, interfaces, and protocol conventions that any vendor could follow. The same principle applies today with the TCP/IP model, which is the actual model used on the modern internet.
Standardized cabling is a perfect example: an RJ45 connector and a CAT5e UTP cable (unshielded twisted pair) can connect a Cisco switch, a UniFi switch, a Netgear switch, or a TP-Link router. This universal compatibility is a direct result of the standardization efforts that began with the OSI model. Similarly, standardized protocols like TCP, UDP, and OSPF are implemented across all major networking vendors, giving multi-vendor interoperability.
A layered approach allows different teams and industries to specialize: one company focuses on manufacturing cables, another on building switches, another on writing routing protocols, and network engineers configure and manage them. Each layer has defined responsibilities, making the overall system manageable and scalable.
Key takeaway: The OSI and TCP/IP models exist to stop vendor lockâin and proprietary protocols, ensuring that devices and software from different manufacturers can work together seamlessly.
đĄ The OSI Model (7 Layers)
The OSI model consists of seven layers, numbered from Layer 1 (bottom) to Layer 7 (top). A common mnemonic to remember the names is: All People Sleeping Through Networking Donât Pass (an example of a sentence, not the actual layer names).
The actual layers are:
Layer | Name | Function |
|---|---|---|
Layer 1 | Physical | Transmits raw bitstreams as electrical, optical, or radio signals over physical media (cables, wireless). |
Layer 2 | Data Link | Manages physical addressing (MAC addresses), framing, and error correction between directly connected devices. |
Layer 3 | Network | Provides logical addressing (IP addresses) and determines the best path through the network (routing). |
Layer 4 | Transport | Supports endâtoâend communication between devices; handles reliable vs. unreliable delivery (TCP vs. UDP). |
Layer 5 | Session | Establishes, manages, and terminates sessions between applications. |
Layer 6 | Presentation | Translates data formats (encryption, compression, encoding) so the application layer can process it. |
Layer 7 | Application | Provides network services directly to user applications (HTTP, FTP, Telnet, etc.). |
The OSI model was designed as a reference model â a theoretical framework for understanding networking. In practice, the TCP/IP model is what actually runs the internet.
đ The TCP/IP Model (4âLayer vs. 5âLayer)
The original TCP/IP model (RFC 1122) had four layers:
Link Layer (combines OSI Layer 1 and Layer 2)
Internet Layer (corresponds to OSI Layer 3)
Transport Layer (OSI Layer 4)
Application Layer (combines OSI Layers 5, 6, and 7)
However, in the CCNA curriculum and in most realâworld networks, the hybrid TCP/IP model is used, which has five layers:
Physical Layer (Layer 1)
Data Link Layer (Layer 2)
Network Layer (Layer 3)
Transport Layer (Layer 4)
Application Layer (Layer 5)
The hybrid model splits the original Link Layer into two separate layers (Physical and Data Link) to align more closely with the OSI modelâs structure while still using TCP/IP protocols. This is the model you need to know for exams and for practical networking.
Important: Even though we officially use the 5âlayer TCP/IP model, network engineers still often refer to Layer 7 when talking about applicationâlayer issues. This habit comes from the OSI modelâs Layer 7 (Application). So you may hear âthereâs a Layer 7 problemâ â it means an applicationâlayer problem, even though in TCP/IP it would be Layer 5.
đ Comparing OSI and TCP/IP Models
Both models share the same core layering philosophy, but they differ in number and granularity of layers.
OSI Model (7 Layers):
Application, Presentation, Session â these three are separate.
Transport, Network, Data Link, Physical â the lower four layers are essentially the same as TCP/IPâs lower four.
TCP/IP Model (5âLayer Hybrid):
Application â combines OSI Layers 5, 6, and 7.
Transport, Network, Data Link, Physical â identical in concept to OSI.
The OSI model never won the protocol war; today every device on the internet uses TCP/IP. But the OSI model remains valuable as a conceptual tool for teaching and troubleshooting.
đŠ Protocols and Devices at Each Layer (TCP/IP Model)
đ Layer 1: Physical Layer
Transmits raw bits (binary 0s and 1s) over physical media. The medium can be:
Copper cables â electrical signals (e.g., Ethernet CAT5e/CAT6)
Fiber optic cables â light signals (singleâmode or multiâmode)
Wireless â radio signals (WiâFi, 5G, satellite)
Devices at Layer 1: Hubs, repeaters, transceivers (e.g., media converters).
Protocols/Standards: Ethernet (at the physical level), WiâFi (IEEE 802.11), fiber standards (singleâmode, multiâmode).
đ§± Layer 2: Data Link Layer
Manages frames that include MAC addresses (source and destination), framing, and error correction. This layer operates between directly connected devices â it is perâlink (hopâbyâhop).
Devices at Layer 2: Switches, bridges.
Common encapsulations:
Ethernet II â the most common data link protocol for Ethernet networks (uses MAC addresses)
PPP (PointâtoâPoint Protocol) â used on serial links (does not use MAC addresses)
HDLC â another serial link encapsulation
The encapsulation changes at each hop when crossing different types of links. A router strips the incoming Layer 2 frame and rebuilds a new one for the outgoing interface.
đ Layer 3: Network Layer
Provides logical addressing (IP addresses) and routing â determining the best path through the network from source to destination. This is endâtoâend communication across multiple hops.
Devices at Layer 3: Routers.
Protocols: IPv4, IPv6, and routing protocols like OSPF.
Key difference between Layer 2 and Layer 3:
MAC addresses (Layer 2) are physical / burnedâin (though can be spoofed). They identify a device on a local network segment.
IP addresses (Layer 3) are logical and configurable. They identify a deviceâs location in the broader network and can change (e.g., when moving to a different WiâFi network).
Example: A phone connected to one WiâFi network gets an IP like 192.168.1.155; connect to another WiâFi network and it becomes 192.168.0.132. The MAC address typically stays the same (unless using private addressing).
đĄ Layer 4: Transport Layer
Manages endâtoâend communication between applications on different devices. The two main protocols are:
TCP (Transmission Control Protocol) â connectionâoriented, reliable. Like a phone call: establishes a connection (threeâway handshake), sends data, and expects acknowledgments for each piece. If data is lost, it is retransmitted.
UDP (User Datagram Protocol) â connectionless, unreliable. Like a letter: just sends the data with no guarantee of delivery. No acknowledgment, no retransmission.
Devices at Layer 4: Firewalls, load balancers (sometimes).
Protocols: TCP, UDP.
đ„ïž Layer 5/7: Application Layer
In the 5âlayer TCP/IP model, this is Layer 5 (Application). It corresponds to OSI Layers 5 (Session), 6 (Presentation), and 7 (Application) combined.
This layer contains the protocols that applications use to communicate over a network. Examples:
HTTP / HTTPS â web browsing
FTP / TFTP â file transfer
Telnet / SSH â remote terminal access
DNS â domain name resolution
Applications decide whether to use TCP or UDP at Layer 4. For example:
Web browsing (HTTP) uses TCP for reliability.
Voice over IP (VoIP) uses UDP because retransmission of lost voice packets is pointless â the call quality may degrade but the conversation continues in real time.
đ Key Concepts in the TCP/IP Model
Bits, Frames, Packets, Segments
The name of the data unit changes at each layer:
Layer 1: bits â raw binary 0s and 1s (electrical/optical/radio signals)
Layer 2: frames â includes MAC addresses and errorâchecking
Layer 3: packets â includes IP source and destination addresses
Layer 4: segments â includes TCP or UDP header (port numbers, sequence numbers, etc.)
A router works with packets (Layer 3). A switch works with frames (Layer 2). A hub works with bits (Layer 1).
EndâtoâEnd vs. HopâbyâHop
IP (Layer 3) is endâtoâend: the source and destination IP addresses remain unchanged (unless NAT is applied) across the entire path.
Layer 2 is hopâbyâhop: the data link encapsulation (Ethernet, PPP, WiâFi) is stripped and rebuilt at every router. Each link uses its own addressing (MAC addresses, etc.) and may be a completely different technology.
Logical vs. Physical Addressing
MAC address â physical (burned into the NIC). Unique per interface. Rarely changes (unless using privacy features like Appleâs Private WiâFi Address, which randomizes the MAC per network to prevent tracking).
IP address â logical (configured by an administrator or via DHCP). Can change as a device moves between networks. Essential for routing across different subnets.
RealâWorld Usage of Layer References
Although the TCP/IP model has only 5 layers, network engineers routinely use OSI layer numbers in troubleshooting:
âProblem at Layer 1â = physical connectivity issue (e.g., cable unplugged, fiber cut).
âProblem at Layer 2â = data link issue (e.g., wrong VLAN, duplex mismatch, spanning tree problem).
âProblem at Layer 3â = routing issue (e.g., missing route, incorrect IP configuration, routing loop).
âProblem at Layer 4â = transport issue (e.g., port blocked by firewall, TCP handshake failure).
âProblem at Layer 7â = application issue (e.g., web server not responding, HTTP error).
â Summary
The OSI model is a 7âlayer reference model for understanding networking. It was developed to standardize protocols and enable multiâvendor interoperability.
The TCP/IP model is the practical model used on the internet. The 5âlayer hybrid TCP/IP model (Physical, Data Link, Network, Transport, Application) is what you need to know for the CCNA and realâworld networking.
Each layer has specific functions, protocols, and devices:
Physical (bits) â hubs, cables, radio
Data Link (frames) â switches, MAC addresses, Ethernet/PPP/HDLC
Network (packets) â routers, IP addresses, routing protocols
Transport (segments) â TCP (reliable) vs. UDP (bestâeffort)
Application (data for apps) â HTTP, FTP, SSH, etc.
Layer 2 changes per hop; Layer 3 stays endâtoâend (logical addressing).
TCP is like a phone call (connectionâoriented, acknowledges data); UDP is like a letter (no acknowledgment).
Engineers still use OSI layer numbers informally, especially Layer 7 for application issues.

Ask anything
We've read this whole study set, so questions about it get the best answers.