Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

When most networking students first learn about the OSI model, they spend a great deal of time trying to figure out which layer of the model a particular protocol fits into. We get a lot of questions about OSI layers on this forum, and they are usually like:

  • Which OSI layer does IS-IS operate at?
  • Is HTML a presentation or application protocol?
  • Are VPN tunnels layer 2 or 3?

How should a student (or professional for that matter) understand the relationship between the OSI model and protocols he/she works with?

share|improve this question

2 Answers 2

up vote 12 down vote accepted

There are two important facts about the OSI model to remember:

  1. It is a conceptual model. That means it describes an idealized, abstract, theoretical group of networking functions. It does not describe anything that someone actually built (at least nothing that is in use today).

  2. It is not the only model. There are other models, most notably the TCP/IP protocol suite (RFC-1122 and RFC-1123), which is much closer to what is currently in use.

A bit of history: You’ve probably all heard about the early days of packet networking, including ARPANET, the Internet’s predecessor. In addition to the U.S. Defense Department’s efforts to create networking protocols, several other groups and companies were involved as well. Each group was developing their own protocols in the brand new field of packet switching. IBM and the telephone companies were developing their own standards. In France, researchers were working on their own networking project called Cyclades.

Work on the OSI model began in the late 1970s, mostly as a reaction to the growing influence of big companies like IBM, NCR, Burroughs, Honeywell (and others) and their proprietary protocols and hardware. The idea behind it was to create an open standard that would provide interoperability between different manufacturers. But because the ISO model was international in scope, it had many competing political, cultural and technical interests. It took well over six years to come to consensus and publish the standards.

In the meanwhile, the TCP/IP model was also developed. It was simple, easy to implement, and most importantly, it was free. You had to purchase the OSI standard specifications to create software for it. All the attention and development efforts gravitated to TCP/IP. As a result, the OSI model was never implemented as a set of protocols, and TCP/IP became the standard for the Internet.

The point is, all of the protocols in use today, the TCP/IP suite; routing protocols like RIP, OSPF and BGP; and host OS protocols like Windows SMB and Unix RPC, were developed without the OSI model in mind. They sometimes bear some resemblance to it, but the OSI standards were never followed during their development. So it’s a fools errand to try to fit these protocols into OSI. They just don’t exactly fit.

That doesn’t mean the model has no value; it is still a good idea to study it so you can understand the general concepts. The concept of the OSI layers is so woven into network terminology, that we talk about layer 1, 2 and 3 in everyday networking speech. The definition of layers 1, 2 and 3 are, if you squint a bit, fairly well agreed upon. For that reason alone, it’s worth knowing.

The most important things to understand about the OSI (or any other) model are:

  • We can divide up the protocols into layers
  • Layers provide encapsulation
  • Layers provide abstraction
  • Layers decouple functions from others

Dividing the protocols into layers allows us to talk about their different aspects separately. It makes the protocols easier to understand and easier to troubleshoot. We can isolate specific functions easily, and group them with similar functions of other protocols.

Each “function” (broadly speaking) encapsulates the layer(s) above it. The network layer encapsulates the layers above it. The data link layer encapsulates the network layer, and so on.

Layers abstract the layers below it. Your web browser doesn’t need to know whether you’re using TCP/IP or something else at at the network layer (as if there were something else). To your browser, the lower layers just provide a stream of data. How that stream manages to show up is hidden from the browser. TCP/IP doesn’t know (or care) if you’re using Ethernet, a cable modem, a T1 line, or satellite. It just processes packets. Imagine how hard it would be to design an application that would have to deal with all of that. The layers abstract lower layers so software design and operation becomes much simpler.

Decoupling: In theory, you can substitute one specific technology for another at the same layer. As long as the layer communicates with the one above and the one below in the same way, it shouldn’t matter how it’s implemented. For example, we can remove the very well-known layer 3 protocol, IP version 4, and replace it with IP version 6. Everything else should work exactly the same. To your browser or your cable modem, it should make no difference.

The TCP/IP model is what TCP/IP protocol suite was based on (surprise!). It only has four layers, and everything above transport is just “application.” It is simpler to understand, and prevents endless questions like “Is this session layer or presentation layer?” But it too is just a model, and some things don’t fit well into it either, like tunneling protocols (GRE, MPLS, IPSec to name a few).

Ultimately, the models are a way of representing invisible abstract ideas like addresses and packets and bits. As long as you keep that in mind, the OSI or TCP/IP model can be useful in understanding networking.

share|improve this answer
    
I've always wondered why we refer to the OSI model when, in all reality, the TCP/IP model fits the bill better. –  Ryan Foley Feb 20 at 8:01
    
@RyanFoley, true in many cases. However when it comes to troubleshooting (and especially teaching it) it is better to have separate physical and data layers to address the issues at each separately. For example, it is good to know the difference in a Cisco device between an interface that is up/up, one that is up/down and one that is down/down. –  YLearn May 30 at 22:51

All IGP (Interior gateway protocols) routing protocols works at layer 3. External BGP works at layer 4, while internal works at layer 3.

Physical Layer - Deals with hardware network devices, i.e laptops, mobile phones, desktops. Layer 1 is known to be a collision domain, Layer 1 PDU (protocol data unit is bits).

Data/link layer - This layer concerns with layer 2 switches, broadcast domains, VLANS, STP, VTP. The protocol data unit of this layer is called frames.

Network Layer - This is when routing occurs, most routing protocols works at this layer. This is also known as the IP layer, where VLANS communicate. The PDU for this layer is known as packets.

Transport layer - Transport layer deals with TCP and UDP ports, these is where the packets from layers 3 are sent to their destination ports. It is important to remember that TCP is a connection-oriented protocol while UDP is connection-less oriented protocol (non guranteed delivery of data). The PDU for this layer is datagrams.

Session layer - Session layer is where the packets are encapsulated from being decapsulated from layer 3. This layer deals with multiple server side programming languages where you can create software-based applications and convert them into ->

The Presentation layer - This layer is about the client-side codes you see on your web browser, or when you do a right-click and view the source, these are mainly HTM/CSS/Javascript codes that allows you to view your ->

The Application layer - This is where the GUI (Graphical user interface) translates the HTML/CSS codes from layer 6 to this layer. What you see on your web browser is the front end GUI. Layer 5,6,7 PDU is called message.

I hope these answer all OSI-related questions.

Which OSI layer does IS-IS operate at? - Layer 3
Is HTML a presentation or application protocol? - Presentation
Are VPN tunnels layer 2 or 3? -> L2TP is layer 2 -> VPN tunnels typically works at layer3 such as IPSEC.

share|improve this answer
    
This doesn't answer the OP; he never asked what each layer did, he asked what someone should understand about the underlying concepts. –  Ryan Foley Feb 20 at 7:51
1  
Chris, I appreciate your answers, and to a large extent, you are correct. But ISIS runs on top of IP, does that make it layer 4? How about BGP? It runs on top of TCP. Is it layer 5? My point is although you can squeeze protocols into the layers, they don't really fit. If you were to look at the OSI presentation layer specification, I don't think HTML would quite qualify. Even OSI admitted that layer 2 was too broad and they had to divide it into two sublayers. –  Ron Feb 20 at 11:23
1  
I wouldn't want to argue which protocols is best suited on each layer, but I think we are undermining the importance of the OSI model, similar to the hierarchical model (access,distribution,core layer), The OSI model is a systematical representation of how the "internet" works. From layer one where a user opens his computer until his device acquires an IP address then routes to the WAN to his destination website served by the GUI, and this GUI came from the codes created by html,css,javascript. It represents how the data travels from its source to the destination network. –  chris Feb 20 at 11:44
1  
OSI model is just a theoretical model. Even if routing protocol <name here> uses (L2|L3) packets, it is also a part of L7, since it's an application, and it has to calculate the routing table, and maybe same layer inbetween. Not everything is black and white. –  mulaz Feb 20 at 12:14
2  
@Ron, ISIS is not a native IP protocol. OSPF is. (Just to add more confusion. :-) ) –  John Jensen Feb 20 at 16:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.