OSI Model (7 Layers)

General Networking

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.

LayerNameUnit TypePresentationMnemonic
7ApplicationProtocol Data UnitFile Type (PDF, JPEG etc.)All
6PresentationProtocol Data UnitPresidents
5SessionProtocol Data UnitSimplex/DuplexSince
4TransportSegment (TCP)
Datagram (UDP)
TCP, UDP, TLSTruman
3NetworkPacketIP, IPSec
Router
Never
2Data LinkFrameIEEE 802.3, Mac Address, ARP, L2TP, SwitchDid
1PhysicalBitsNetwork Interface Cards (NICs), HubsPot

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 ModelTCP/IP Model
ApplicationApplication
PresentationApplication
SessionApplication
TransportTransport
NetworkInternet
Data LinkLink
PhysicalLink

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:

  1. Connected physically (layer 1), i.e. its got a network cable plugged in, its got a link light.
  2. 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.
  3. It has an IP address so is on the network (layer 3), i.e. verify the IP address details are correct.
  4. 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:

  1. Connected physically (layer 1), i.e. its got a network cable plugged in, its got a link light.
  2. 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.
  3. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *