The OSI Model (Open Systems Interconnection) model is a set of rules and requirements to model and conceptualise the communication between two (network) systems. Yes, its theory, but in computing and networking it can be useful to use as a basic guide when troubleshooting. It helps you to rule-in or rule-out where a problem might be coming from; before an example though, let’s review the model.
Overview
The model consists of 7 layers, you might see this referred to as the “7 layer model”. I’ve summerised it below and also added a mnemonic I use to help me remember it; there’s also some example presentations (implementations) of software or hardware you might see at each layer.
Layer | Name | Unit Type | Presentation | Mnemonic |
7 | Application | Protocol Data Unit | File Type (PDF, JPEG etc.) | All |
6 | Presentation | Protocol Data Unit | Presidents | |
5 | Session | Protocol Data Unit | Simplex/Duplex | Since |
4 | Transport | Segment (TCP) Datagram (UDP) | TCP, UDP, TLS | Truman |
3 | Network | Packet | IP, IPSec Router | Never |
2 | Data Link | Frame | IEEE 802.3, Mac Address, ARP, L2TP, Switch | Did |
1 | Physical | Bits | Network Interface Cards (NICs), Hubs | Pot |
You may also see the TCP/IP Model, this is a simplified version of the model that is specific to TCP/IP (while the OSI Model is agnostic of any particular technology).
The TCP/IP Model is a 4 layer model, essentially collapsing some of the layers into just: Application, Transport, Internet and Link.
OSI Model | TCP/IP Model |
Application | Application |
Presentation | Application |
Session | Application |
Transport | Transport |
Network | Internet |
Data Link | Link |
Physical | Link |
Examples
So that’s the theory, let’s see how you would use this in troubleshooting. So let’s start with an scenario, you have two machines connected to the network, Computer1 and Computer2, a user using Computer1 reports that they are trying to send a document from Computer1 to Computer2 but it is failing.
You verify that their computer is:
- Connected physically (layer 1), i.e. its got a network cable plugged in, its got a link light.
- Has a MAC address assigned to the port on the switch, so there is a data link (layer 2), you can inspect the ARP cache on the switch for example.
- It has an IP address so is on the network (layer 3), i.e. verify the IP address details are correct.
- Continue on up the layers, verifying for transport (layer 4) TCP/UDP, is there ports blocked on a firewall and so on..
In this example, all looks good, so we now go to Computer2 and perform the same steps:
- Connected physically (layer 1), i.e. its got a network cable plugged in, its got a link light.
- Has a MAC address assigned to the port on the switch, so there is a data link (layer 2), you can inspect the ARP cache on the switch for example.
- Upon checking the IP address we find that the machine does not have a valid IP address (layer 3) on the same segment/VLAN/subnet as Computer1.
So using this we verified that each layer was working in turn, we could see a link, we could see a MAC address on the port on the switch, this meant that the computer was visible to the network and the network could see the computer. We then next checked the IP address and found it was incorrect, this being the cause of the issue.
Conclusion
Hopefully that gives you an overview of the OSI Model and gives a practical example of its use.