Skip to main content

Understanding OSI and TCP/IP Models

OSI Model Diagram
Visual breakdown of the OSI Model's 7 layers

Whether you are new to IT or a seasoned admin, chances are you have heard of the OSI or the TCP/IP model. These frameworks help us understand how data flows across our networks — from online shopping to high-speed data transfers. However, many job postings require knowledge of TCP/IP but not OSI. Why is that? Is one favored over the other? Let's take a look at both.

What is the OSI Model? 

Introduced in the 1980s, the Open System Interconnect — OSI — breaks down network communication into seven layers, each with a specific function.

Layer Functions
7. Application User and device interaction for network services (web browsing, email, file transfer)
6. Presentation Formats data for applications, ensures readable and secure data
5. Session Establishes, maintains, and ends connections between devices. For example: Online shopping uses a session ID to track your activity until you leave the site.
4. Transport Handles data delivery (e.g., TCP, UDP, QUIC, error checking)
3. Network Routes packets between hosts via IP addresses and routing protocols
2. Data Link Formats data into frames for local transfer using MAC addresses
1. Physical Transmits raw bits over wired or wireless media (e.g. copper cables, fiber optics, Wi-Fi, Bluetooth)

How does data actually flow through these layers?

OSI Encapsulation Image

Think of it as sending a package. Each layer wraps data like putting a mug in wrapping paper, bubble wrap, then in a box, and putting a label on it. When it reaches the recipient, it's unwrapped in reverse. When you send a message, it goes from layer 7 (Application layer) to layer 1 (Physical layer), through the process called encapsulation. When you receive a message, it goes in the opposite direction (Physical to Application), through a process called de-encapsulation.

TCP/IP Model: Today's Network Backbone

The OSI model is often used for learning network fundamentals, but the TCP/IP model is more practical for real-world applications. It has 4 or 5 layers, with much of its foundation from the OSI model. 

TCP/IP Layer Corresponding OSI Layers Functions Common Protocols
Application Session, Presentation, Application (5–7) Provides services for user-facing applications, handles formatting, encryption, and connection setup between end hosts. HTTP/S, DNS, IMAP, RDP, TLS
Transport Transport (Layer 4) Ensures reliable or fast delivery between hosts using flow control, segmentation, and error checking. TCP, UDP, QUIC
Network Network (Layer 3) Routes packets across networks using logical addressing and routing protocols. IP, ICMP, IGMP
Network Interface Data Link (Layer 2) Formats packets into frames for transmission within the same network and handles MAC addressing. Ethernet, ARP, PPP, 802.11
Physical (Layer 1) Transmits raw bits over physical media like cables or wireless signals. Fiber, Ethernet, Wi-Fi, Bluetooth

Application Layer: Human Interaction Layer

 This layer combines the session, presentation, and application layers of the OSI model. It handles process-to-process communication between devices like laptops, servers, and smartphones. This is where protocols and services support user applications like browsers or remote desktop clients. This is not referring to apps like Google Chrome or Remmina, but their underlying services like HTTPS or RDP.

Common Protocols:

  • HTTP/S (HyperText Transfer Protocol/Secure) - Insecure/secure web browsing
  • DNS (Domain Name System) - Converts human-readable hostnames into machine-readable IP addresses
  • IMAP (Internet Message Access Protocol) - Receives email across synced devices
  • RDP (Remote Desktop Protocol) - Allows for remote connection to a device with an interactive interface on Windows
  • TLS (Transport Layer Security) - Security protocol used for secure browsing

Security Considerations:

  • Open Ports: Unused open ports can be a security risk. Use a port scanner to find them and a firewall to control access.
  • Access Control: Set up ACLs correctly to allow only necessary traffic.
  • DNS Issues: Problems with domain resolution can arise. Check DNS settings, the hosts file, and use tools like nslookup or dig to troubleshoot.

Transport Layer: (Un)Reliable Delivery?

This layer mirrors layer 4 in the OSI model. It is responsible for ensuring data gets to its destination using either of the two main protocols:

TCP (Transmission Control Protocol)

  • Ensures reliable data transfer
  • Performs error checking, flow control, congestion control, windowing, etc.
  • Uses three-way handshake to initiate a connection for data transfer

    Common Uses

  • Web browsing (HTTPS)
  • Sending and receiving emails (SMTP/IMAP/POP3)
  • File transfer (SFTP/FTP) 

UDP (User Datagram Protocol)

  • Much faster with less overhead
  • Connectionless —  no connection established to guarantee in-order delivery
  • Offers basic error checking

    Common Uses

  • Streaming media (Netflix, Hulu, Spotify)
  • VoIP (Zoom, telephony)
  • DNS & DHCP services

 


Common Issues

Transport layer issues include:
  • Packet loss 
  • Connection timeouts
  • Frequent drops in real-time connections, like videoconferencing  
This often happens due to network congestion. If this happens:
  • Consider your network bandwidth and throughput
  • Configure Quality of Service. Prioritize real-time communication over loss-tolerant communication, such as web browsing or e-mail. 
  • Reduce other activities that can take up bandwidth space while you are on the call, such as TV streaming or downloading big files. 

Network Layer: The Post Office Layer

This layer focuses on sending packets between hosts on different networks and routing them efficiently. Those segments are formatted and packaged into packets. It uses logical addresses called IP addresses to identify the sender and receiver. 
 
At this layer, you will see devices such as routers, layer 3 switches, and load balancers. Routing protocols — OSPF, RIP, EIGRP, BGP — aid in finding the optimal route to deliver the packets. It communicates layer 3 information via protocols like ICMP. Unlike the Transport Layer, it offers no error checking and uses a "best effort" service, meaning packets may arrive out of order or get lost.

Common Issues

Network layer issues include:
  • IP address conflicts
    • Configure DHCP to assign unique IP addresses within an allotted scope.
    • Check your subnet designs for adequate space for the number of devices that can fit the network. 
    • Manually putting in IP addresses for devices can lead to errors and duplicate IP addresses. 
  • Routing loops
    • Check routing tables for duplicates or inconsistencies
    • Implement loop-prevention techniques such as:
      •  Route poisoning (marking a down route as unreachable or "infinite")
      •  Split horizon (telling other routers that a certain route is down and do not take it)
      • Assign a Time-to-Live limit (the maximum amount of routers a packet can travel before discarding it). 

Network Interface Layer

The network interface layer merges the OSI model’s data link and physical layers, formatting packets into frames for transmission over wired or wireless media. Switches and bridges operate at this layer, while the physical layer deals with transmission media and hardware. 

Common Issues & Fixes:

  • Switching Loops: Prevent with Spanning Tree Protocol (STP) to block redundant paths.
  • VLAN Misconfigurations: Ensure correct host placement and properly configured VLAN trunks.
  • Loose Cabling: Secure connections to avoid dropped signals and slow speeds.
  • Duplex Mismatch: Match duplex settings on both devices or set them to auto for proper communication.
PC3 communicates with Switch1. For effective communication, both nodes have set their bandwidth and duplex settings to auto.
 
 

What's the Verdict?

  TCP/IP (Transmission Control Protocol / Internet Protocol) Model OSI (Open System Interconnect) Model
Purpose Practical model used in real-world applications; backbone of the Internet Conceptual model used to understand network structure
Number of Layers 4 (sometimes 5) 7
Layer Names Application, Transport, Network (Internet), Network Interface (Network Access) Application, Presentation, Session, Transport, Network, Data Link, Physical
Today's Use Widely used in modern networks and the Internet Used in learning and troubleshooting
Troubleshooting Abstracted layer structure makes it efficient for troubleshooting Detailed structure helps pinpoint specific network issues

The OSI model and TCP/IP protocol suite are important frameworks to networking. While the OSI model provides a conceptual way to describe network functions, the TCP/IP suite runs the modern Internet. No matter the model, it boils down to one thing: understand each layer of a network. They a both prepare us on how to troubleshoot, design, and manage hardware and software. 

Take the time to understand protocols and these layers. If you do not have the physical hardware, create a virtual lab and utilize packet analyzers, like Wireshark, to see how protocols function. Mastering these models won’t just help you pass exams—it’ll make you more proficient in troubleshooting real-world networks. 


What has been your experience with either model? Has it played a major role in troubleshooting network issues? What are some troubleshooting tips that help you when you face issues in your network? Feel free to share them in the comments!

 



 

Comments

Popular posts from this blog

IP in Practice: The Need for IPv6

 It is time for IPv6. Not just for our network infrastructure, but for this series. The IPv4 section has come to an end, and now it is time for a deep dive into IPv6. More than ever, it is time to consider systems that can handle heavier workloads, more devices, and fewer address limitations - AI agents, IoT devices, edge computing. This post will examine why we need IPv6 and why it is an important network solution.   Why do we need IPv6? We need more space. IPv6 literally increases the address space exponentially. The IPv6 address space is 2 128 total addresses, 3.4 followed by 38 zeroes. Technology is no longer limited to servers, office computers, and mobile devices. Today's systems integrate AI infrastructure, edge computing, IoT devices, cloud networking, virtual machines, and more. Simply, more devices mean more space.  We need more scalability. As more devices connect to systems, administrators need to consider not only the number but the distribution. System...

IP in Practice: IPv4 Workarounds

IPv4 has been dealing with burnout since 2011. Yet we work it to the ground by finding workarounds. Why? The Internet as we know it still runs on it. IPv6 is not as pervasive or widely accepted as IPv4 and often requires adding new infrastructure or reworking what is already in place. So far, the alternatives have extended the use of IPv4 beyond its intended design.  How have we continued to stretch IPv4? If you are studying networking, building a home lab, or managing large-scale networks, these techniques should ring a bell. This post will revisit four current IPv4 workarounds.  Workaround #1 - Private IP Addresses Instead of every server, device, and client getting their own public IP address and taking up space, private IP addresses provide reusable address spaces for local networks. These addresses are not directly accessible via the Internet. Routers will drop external traffic trying to directly access them.  To the outside world, only public IP addresses are...

Subnets: Key to Network Organization

Whether it is a to-do list or a big project, organization is key. We have busy lives. The task in itself can have several parts or may require some sort of collaboration with a partner or a team. A project may call to meet deadlines, which means keeping up with those crucial dates and having a system of order. Similarly, our networks are busy, transferring a great deal of data across links and nodes. The amount of traffic generated can lead to bottlenecks, packet loss, and delays. A network’s design can vary in complexity, depending on the environment or needs of a customer. Just as we find a manageable way to handle heavy workloads, our networks have a way of efficiently handling network traffic by creating "mini-networks" within our network. This process is called subnetting.   Why We Subnet To reduce congestion. Just as traffic in cities cause slowdowns and delays, too much traffic can lead to bottlenecks, packet loss, and delays. Subnetting breaks the netwo...