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

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...

How to Set Up a Cisco Router as a DHCP Server (Step-by-Step Guide)

Lab time! Want to build a DHCP server?  In this lab, I will show you how to build your own DHCP server on a router using Cisco Packet Tracer, as shown above. By the end of this post, you will be able to create your own DHCP server with a Cisco 2911 router, perhaps in a home lab setting, and prepare you to build your own on other hardware.  Why a Router?  A DHCP server is a centralized, automated service that assigns important network configuration details to devices on a network, such as IP addresses. Without it, we would have to create manual entries for our entire network, which can be time-consuming and lead to errors. Traditionally, there are dedicated servers to handle these functions. There are many ways to implement a DHCP server in your topology, including a dedicated physical server, a virtual machine, cloud-based gateways, and firewalls. However, there are specific benefits to using a router as your DHCP server: Reduced infrastructur...

My Trek up Mount Net

   Networking is ...          Let me hold off on that. Expect a definition later. First, let's set the scene.         This is a new platform, new field, new everything for me. You might or might not ask yourself - how?   If you are part of the "might not", I get it. I am currently a college student just trying to make sense at staring at the daunting Mount Net - one of many peaks among the IT Mountain Range that grows not centimeters every year, but centimeters every second it seems like. Yet this is a trek I know I want to take step by step.         Let me just say, my journey to networking started a few years ago. When I graduated high school, I had different interests - psychology, math, animal science, just to name a few. I had a brief stint of interest in electrical engineering that sparked from a fascination with electricity. My mother also told me that my grandfather used to be in ...