• No results found

Open Systems Interconnection Reference Model

In document Simple CISSP - Phil Martin (Page 103-105)

In the 1980s when the concept of a global network was still being realized, there were many competing networking standards. The ISO attempted to consolidate all of the standards by creating a single protocol set to replace them. Unfortunately it never quite caught on. But, the model of this protocol set, the open systems interconnection, or OSI, model, was adopted by the entire industry and is still used to day to describe how network communication takes place.

At the time, the transmission control protocol/internet protocol (TCP/IP) suite had its own model that is also still used today. While the OSI model has 7 layers, the TCP/IP model has only 4 layers. Since it is more complex, we’ll first go over the OSI model and the see how the TCP/IP model maps to it.

Protocol

But, before we start that, it is important to understand a few things. A network protocol is a set of rules that systems use to communicate across a network. Network communication models are vertically stacked layers, and each layer has its own unique protocol that no other layer understands. Here’s what happens: you start at the top layer and give it some data. That layer wraps the data with its protocol –

just think of the protocol as being some kind of wrapper that encapsulates the data – and hands the protocol-wrapped data to the next layer beneath the first. The next layer doesn’t understand what was passed to it – it is just data. So it wraps that ‘data’ up in its own protocol and passes to the layer beneath it. And so forth, until we get to the bottom of the stack. The bottom layer knows how to ship the entire package off to some other computer, where the entire process is reversed until we wind up with the original data given to the top layer. That is a severe simplification of it, but at a 10,000-foot level it works.

The OSI model has 7 layers, with layer 7 being at the top of the stack and layer 1 at the bottom. To help understand how this entire stack works, and hopefully give you an easy way to remember what each layer is for, let’s take a rather simple example to the extreme.

Let’s say you make some really tasty brownies and post a photo on Instagram. Your friend on the other side of the country - let’s say you live in California and she lives in New York – sees it and asks you to send her some. You agree and now you have to somehow ship this brownie across the country. Now, brownies tend to crumble so it will need to be wrapped in something to keep it all together - say a paper towel. You know it will take a while to get across the country, so you but the paper towel into a plastic bag to keep it fresh. That brownie is probably going to get beat up on the way, so you are going to need to box it up – but with a bunch of peanuts for protection. You know what I am talking about - those incredibly squeaky and noisy little bits of Styrofoam. So, you pack the peanuts around your plastic bag in a box and tape it shut – and that is what you are going to ship transport the country. Of course the box will go nowhere without a shipping address, so you print off a packing label with the address the box should be delivered to and drop it off at the local shipping office, let’s say UPS.

UPS will take the box and inspect the package to make sure it has been sealed properly – if it has then it is put it into a larger shipping container filled with other boxes going to the same city. This container gets loaded onto a truck and driven to the airport where it is loaded onto a giant UPS jet. The container is flown across the country to a UPS shipping hub, where it is put on another truck and delivered to the right city and dropped off at a local distribution center. There the container is opened, and the boxes are loaded onto those big brown trucks for delivery. It is dropped off at your friend’s house, where she hears the doorbell ring, brings in the package and opens it up. After getting through the peanuts, plastic bag and napkin, she eats your brownie and posts a big THANKS! on your Facebook page.

And that’s it – you now know everything you need to about the OSI model. OK, maybe not yet, but soon you will. Let’s turn that example into a trip through the OSI model.

First, you wanted to ship your data brownie across the country. The first thing you did was to wrap the data brownie in a Layer 7 paper towel – Layer 7 contains protocols such as HTTP and FTP – things that holds your data together while it is shipped. This is called the Application layer for some really

confusing reasons. This is NOT where desktop or web applications live – layer 7 is the top layer that applications talk to. Be sure to not get confused on this matter.

Next, you put your Layer 7-wrapped data brownie into a Layer 6 plastic bag. Layer 6, the Presentation layer, is all about taking specific things and packaging them into generic envelopes, such as JPG, MPEG, ASCII, TIFF and so forth. Remember that JPG is a standard format that can contain different implementations, just like plastic bags can hold all sorts of things as long as they can fit inside of a plastic bag. The term Presentation refers to presenting different contents as a single format- it is up to the computer how to handle the contents.

Then you took your Layer 6 plastic back and wrapped it in Layer 5 peanuts. Layer 5 is called the Session layer and is all about establishing session connections – for example, VPN tunnels or authentication – it is where one system establishes a conversation with another system, or talks to each other. How does

that relate to peanuts? They are squeaky and make noise – you could consider that a form of talking, or establishing a session. OK – it may be a really long stretch, but you will probably remember it!

Then you take your Layer 5 peanuts and put them in a Layer 4 box. Layer 4 is the Transport layer, and the box is what you are wanting to transport. This where the TCP, UDP and SPX protocols all happen. But before you can ship your Layer 4 box, you have to provide a Layer 3 address. Layer 3 is called the Network layer, and is where high-level addressing takes place, such as IP, IPX or ICMP. Networks operate because everything has an address.

Now you drop your Layer 3 box off at UPS, where it is placed into a Layer 2 shipping container. But remember there were two things that happened here – first the box was inspected and THEN placed into a container for shipping only if it was sealed properly. Layer 2 actually has two sublayers – the first (Logical Link Control sublayer, or LLC) checks for errors, and if none are found, wraps it up with all the information required for physical movement , which is the second sublayer called Media Access

Control sublayer, or MAC. The entire layer is called the Data Link layer.

Layer 1 is represented by the trucks and jets. It is the lowest level and about as basic as you can get. Layer 1 physically moves all the encapsulated data from above across network cabling. Occasionally it will encounter routers (UPS distribution hubs, remember?) where it will transfer the contents on to another network (truck to jet to truck). Layer 1 is the Physical layer. After that, the entire process is reversed, revealing a tasty data brownie at the end.

Now that we have a really good grasp on the overall OSI model, let’s take each layer and dive just a bit deeper.

In document Simple CISSP - Phil Martin (Page 103-105)