The OSI model is a hierarchical model of how different devices, protocols, and applications can interoperate to provide a network. The OSI (open systems interconnect) model was created by the International Standards Organization (ISO).
The applications and protocols that make up the network reside at different layers of the OSI model. Those layers are:
Layer 7 – Application
Layer 6 – Presentation
Layer 5 – Session
Layer 4 – Transport
Layer 3 – Network
Layer 2 – Data Link
Layer 1 – Physical
Here are some common ways to remember the OSI model:
All People Seem To Need Data Processing
Please Do Not Throw Sausage Pizza Away
Phew Dead Ninja Turtles Smell Particularly Awful
A common question is, “What application or protocol resides at each of the layers?” Here is a general overview:
Layer 7 - ApplicationThe application layer is where the protocols and services that make up your application reside. Examples of what is located here are: Telnet, File Transfer Protocol (FTP), and Simple Mail Transfer Protocol (SMTP).
Layer 6 - PresentationThe presentation layer “presents” the session layer data to the application. Examples of what is located here are: encryption (like IPSec), ASCII, and JPG.
Layer 5 - SessionThis layer is responsible for initiating and terminating network connections. Examples of the session layer are Remote Procedure Call (RPC) functions and the login portion of a SQL session.
Layer 4 - TransportTCP and UDP work at the transport layer. TCP provides the reliable, in-order delivery of your data, as well as error correction, sequencing, and windowing (flow control). Additionally, TCP at the transport layer provides source and destination port numbers that are commonly associated with applications. For example, TCP port 25 is SMTP, 23 is telnet, 22 is SSH, 80 is HTTP, and so on. These port numbers are very important if you are configuring an ACL (see my article, “
What you need to know about Cisco IOS access-list filtering“) or studying for a
certification test like the CCNA. Data at the transport layer is called a segment.
Layer 3 - NetworkThe network layer is where the “IP” part of “TCP/IP” happens. IP is responsible for addressing in the network. Because IP works at layer 3, you could also say that routing and routers work at layer 3. Any data at layer 3 is called a packet.
Layer 2 - Data LinkIf you think about a WAN, there are many protocols that work at layer 2 (like PPP and Frame-Relay). However, if you just look at the LAN, the most well-known protocol associated with layer 2 is Ethernet. The Ethernet protocol uses MAC addresses to identify unique devices on the network. Any data at layer 2 is called a frame. Ethernet switches work at layer 2 to switch Ethernet packets. To do this, they keep a MAC address table or CAM table — mapping MAC addresses to switch ports.
Layer 1 - PhysicalThe physical layer provides the actual connection between devices. Ethernet cables and fiber optic cables work at layer 1. Data goes through the cables via electricity or light. That data is now represented as a bit (a one or a zero).
Understanding the network “big picture”
There are many new Cisco admins out there who may understand how to unlock a switch port or how to configure IP addressing, but they don’t see, really, how the network functions. By understanding the OSI model, you can see the “big picture” of how the network really works.
You can understand how bits are sent as electrical signals across copper wires; how those are reassembled into frames by Ethernet in layer 2; how the frames are switched to the right destination; how that PC disassembles the frame and packet to verify that it is the right destination IP; how it breaks up the segment at the transport layer, responds with an acknowledgement (ACK), and sends the data up to the session, presentation, and application layers; and how every tiny communication requires this whole process to happen many times per second.
Once you understand the OSI model, you will be a much better network troubleshooter. For example, in my article “
Choosing a network troubleshooting methodology,” I cover how to use the OSI model to troubleshoot the network either by starting at the top or the bottom or by using the “divide and conquer” approach.
If your Ethernet cable is disconnected, at what layer is your problem to be found? Answer: layer 1.
If your ACL is dropping your TCP data, where is the trouble? Answer: layer 4.
If your IPSec is misconfigured, where is the problem? Answer: layer 4.
"see Cisco’s
Internetworking Technology Handbook. "
Here's how the OSI model works: Traffic flows down from the application to the physical layer across the network using the physical medium (for example, an Ethernet cable) to the receiver's physical layer. It then moves up through the layers to the receiver's application.
Once on the receiver's side, the receiver becomes the sender, and the sender becomes the receiver. The response from the receiver traverses the reverse path and moves back to the original sender.
So if one of the layers of the OSI model doesn't work, no traffic will flow. For example, if the data link layer isn't working, the traffic will never make it from the application layer to the physical layer.
Bottom-up
The bottom-up approach is my personal favorite. As the name implies, start at the bottom—Layer 1, the physical layer—and work your way up to the top layer (application).
The physical layer includes the network cable and the network interface card. So if you encounter a broken or disconnected network cable, there's probably no need to do anymore troubleshooting.
You must resolve any physical layer problems before moving on. After fixing the problem, check to see if the trouble still exists. If so, move on to troubleshooting the data link layer.
For example, an Ethernet LAN has an Ethernet switch, which keeps a table of MAC addresses. If there's something wrong with that table—such as a duplicate MAC entry—then resolve that problem before looking at anything on the network layer (e.g., an IP address or routing).
Top-down
Once again, the name of this methodology implies the approach. With the top-down method, start at the top of the OSI model (i.e., the application layer) and work your way down to the bottom layer (i.e., physical).
Divide and conquer
This approach involves a little more intuition. With the divide and conquer method, start at whichever layer you best feel is the root cause of the problem. From there, you can go either up or down through the layers. (Yes, folks, even the "no-method method" has a name.)
Choosing an approach
Which approach you decide to use may depend on where you believe the problem lies. For example, if a user is unable to browse the Web and you think most users have a lot of problems with spyware and Internet Explorer settings, then you may want to start with the top-down approach. On the other hand, if the user mentions that he or she just connected a laptop to the network and can't browse the Web, you might want to use the bottom-up method since there's a good chance the user has a disconnected cable or similar problem.
Do you use a troubleshooting methodology when dealing with networking problems? If so, post your approach in this article's discussion. How important do you think it is to have a troubleshooting methodology?