OSI Model Deep Dive

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey welcome back to the channel everybody this is kevin and in this week's video we're going to talk about a very fundamental concept in networking it's the osr model the open systems interconnect model in just about any introduction to networking course you're going to hear reference to this osi model and a lot of people think it's a little bit boring and honestly i don't think it gets the treatment it deserves there's a lot of components to this osi model that just go overlooked and skipped over in those introductory level classes so in this video we want to dive a little bit deeper let's do a deep dive into the osi model and the osi model by the way it's a seven layer model and a lot of people want to start counting at the top think of this as an office building where you go into the first floor and then you go up to the seventh floor yeah the numbering starts at the bottom so we say that the physical layer is layer one the data link layer is layer two the network layer is layer 3 and so on and to memorize these layers there's an acrostic i want to share with you it's please do not throw sausage pizza away the p and please reminds us of the p in physical the d and don't reminds us of the d and data link the in and not reminds us the n in network and so on so please do not throw sausage pizza away if you want to memorize this from the top down you can memorize that all people seem to need data processing and as we look at this model our main focus in pretty much all of our networking studies is going to be on these bottom four layers in fact at these bottom four layers we actually call data by different names let's talk about how we refer to data at these bottom four layers and the names that we give to data they're called pdus protocol data units down at the physical layer layer one data is referred to as bits and at layer two data is frames at layer three we call those packets or datagrams at layer three and finally segments up at layer four so the pdus are bits frames packets segments and is another acrostic memory aid for you remember the acrostic bacon frying produces salivation the b in bacon reminds us of the b in bits the f in frying reminds us of the f in frames and then produces salivation packets segments and now that we've talked about the structure of this osi model let's ask ourselves why do we care about the structure of the osi model well the osi model is going to be a way for us to categorize just about anything happening in our network for example if you and i are doing troubleshooting together i might say to you that we've got a layer two troubleshooting issue so we know where to focus our efforts we know what's happening down at layer two or if i've got a physical layer problem maybe i have a cable that has been severed something like that so this is a way for us to categorize protocols devices services that are running on our network and the best thing i've ever heard about the osl model is this i read this in a book a long time ago it said that the osr reference model is a reference model it's not a reverence model we don't revere this as to say that everything in networking has to neatly plug into one and only one layer in this model that's just not reality some things will span maybe two or three layers some applications we might not be able to point to a session layer for that particular feature in our network so it's not a reverence model it's a reference model it's a way for us to better categorize what's going on in the network and we want to take a look in this video at what's happening at all seven layers and our primary focus is going to be on these bottom four layers that's where we're dealing with the actual data that we're trying to get from point a to point b in our network and let's begin down here at layer one with the physical layer what is going on down at the physical layer well the physical layer is concerned with how we get bits across our network how we represent bits devices you might see at the physical layer could be something like your ethernet cable this would be a physical layer component because bits physically travel over this cable as electrical signals or we could use light with a fiber optic cable to send data we might have a network interface card inside of our computer that's going to encode data so it can be sent out on the wire and it can receive data these are examples of things devices that might live at layer one layer one is also concerned about how we represent data on the wire and there are a variety of examples out there but let's take a look at just one to give you a better sense let's consider a way of encoding data called ami alternate mark inversion now ami goes by the thesis that it's best to have an average of zero volts on the wire that's a good electrical characteristic so what we're going to do is represent a binary one as the presence of voltage one time it's going to be positive the next time it's going to be negative so on average over time we have an average of zero volts on the wire let's go to the whiteboard and take a look at this let's say that we have positive five volts negative 5 volts and 0 volts and we're going to divide our time into these different time slots we'll talk about clocking and how the sender and receiver know when one time slot starts and when the other one stops but let's say that we want to represent some data in this first time slot what we can do is give maybe a positive voltage to represent a binary one so it's going to be a one and let's say in the next time slot we want to represent a zero so we drop down and we send zero volts and maybe we do that for a couple of time slots maybe in the next time slot it's time to send another binary one but remember we want an average of zero volts on the wire so what we're going to do is since we've sent a positive voltage previously we're going to send a negative voltage i should have made this one a bit higher we're going to send a negative voltage that's going to be another binary one and let's say that we've got a couple of binary zeros you see what we've done here and again this is called ami for alternate mark inversion what we've done here is we've used the presence or the absence of voltage to represent binary ones and zeros and over time we have an average of zero volts on the wire we have a positive voltage a negative voltage zero volts on average we have zero volts on the wire that's a good electrical characteristic and other things that live at layer one include our wiring standards and the jacks we use to plug into the wall let me give you a couple of examples one jack that you hear a lot about is the rj45 jack let me put that down so you can get a better view of it the rj45 jack is an eight position eight conductor connector and what i mean by that is the connector itself has room it has space for eight different wires and each of those wires can be used as conductors but when we call it an rj45 jack i know i'm being overly technical here but just to be super technical it's really not an rj45 connector there is no rg45 standard there is an rj45s standard and it's not this it looks like this but it's got an extra little sort of a notch in it it's a keyed connector it's not what we think of as an rj45 connector but this is commonly used in the industry i'm perfectly fine with you calling this an rj45 connector no worries there but that's an example of a connector and the way you put the wires in there the color coding that's used that is based on a standard there's a standard that's commonly used called the t568b standard and that standard says what colors of wires we put into those different slots in this connector and something else we're concerned with at the physical layer is the physical topology of a network just a few examples include a bus topology a ring topology and a star topology let's take a look at a few examples the first network i ever worked on way back in the 80s was a bus topology literally we had a coaxial cable that just kind of ran from room to room to room in this office building in this particular floor and if you wanted to get on the network you would tap into this coaxial cable so let's say we've got a computer here and we've tapped into this coaxial cable and another computer here and we've tapped in maybe we've got a printer here and this was called a bus topology and the devices on this bus they ran in half duplex meaning that we could either send or receive but not both at the same time the reason was you could only have one packet on this wire at any one time and as a result we ran something called csma cd carrier sense multiple access with collision detection what this means is before this guy cannot transmit data on this bus he listens to the wire to see if the coast is clear if he hears nothing the assumption is that there is no data on the wire we can only have one packet at a time so it's going to send its packet now here's the challenge what if uh let's say we've got somebody up here and she sends data on the wire and he sends data on the wire at exactly the same time because they listened to the same period of silence if that happens let's say that she's sending a packet down he's sending a packet up when those packets meet there's going to be a collision and a collision is going to corrupt that data and we're going to have to retransmit another type of topology is a ring topology with a ring topology we are logically connecting to a ring we'll talk about logical topologies in just a moment but we're logically connecting to a ring let's say we've got four computers here or maybe three computers and another printer and the way this works is there is a packet let's say that she sends a packet on the network and it starts to go around in the circle and if there's data in this packet actually it's called a token if there's data in this token then when the next person gets it they look at that token and say oh there's data in here is this for me if it's for them they will take the data out of the token and they'll empty the token and send the token back on the wire you have to be in the possession of an empty token to transmit and the token circulates around the ring so there's no contention like we had with the bus topology the token circulates around the ring and that's the only way we can transmit we have to be in possession of an empty token and we look at those tokens to see if the data is for us now this is how things logically work but physically we're talking about the physical layer physically it looks like this let's go to another page physically we have something that looks a little bit a can to an ethernet switch it's a mou and this means that we're going to be physically connected using a star topology we're starting in to the centralized location give our printer again so this is a physical topology even though logically we're passing things around the ring from device to device to device physically it's connected like this now this physical topology is a star topology there actually was a ring topology that was in pretty common use around the late 1990s and that was something called fddi that was a fiber ring actually a dual opposite rotating fiber ring where you could send packets in both directions around two different rings of fiber but that physically was a ring so that's one of the things we defined at the physical layer the types of topologies we're dealing with do we have a bus do we have a star do we have a ring as just a few examples and something else happening here at the physical layer is a synchronization the sender and receiver need to agree on when bits start and stop one way of doing that is to use asynchronous synchronization with asynchronous synchronization the sender tells the receiver hey i'm about to transmit data to you and with asynchronous communication we have a clock that both the sender and the receiver reference yet another function of the physical layer is how we use bandwidth there are a couple of major options we have broadband and we have baseband with broadband it's sort of like your cable tv where different channels use different ranges of frequency so you can tune into a channel you're tuning in to a range of frequencies that's broadband where we can have multiple conversations all going at the same time using different frequencies the other option is baseband with baseband all the frequencies on the medium they're used for a single conversation and that is all defined down here at the physical layer and something else happening here at the physical layer is multiplexing multiplexing defines how we send different conversations at the same time over the same media we've already talked about one remember we talked about broadband we said with cable tv different frequencies could have their own channel on those frequencies that's really how wireless networks work today we have this band of frequencies like the 2.4 gigahertz band or the five gigahertz band and we take that range of frequencies of the channel that we're on and we chop it in to different sub channels and we carry different conversations on those different sub channels another type of multiplexing is time division multiplexing this one reminds me of whitney houston to paraphrase whitney houston with time division multiplexing each conversation gets one moment in time it gets its own time slot to send its data take a t1 for example with a t1 circuit you've got 24 different time slots and maybe you could have 24 different conversations going at the same time and there's going to be a little slice of time where conversation one can transmit the next last of time conversation number two can transmit and so on and that's a look at some of the different things that happen at the physical layer so let's go up in our model a little bit let's add on now layer two the data link layer what goes on here at the data link layer well the data link layer is actually broken up into two sub layers there's the mac or the media access control sub layer and there's the llc sub layer the mac sub layer is concerned with the physical addressing of a networking device the common thing we think of or the common thing i think of here at the max sub layer is the mac address that is burned into all of our network devices for example there's probably a sticker on the back there is that tells me the mac address of this network interface card it is globally unique there's not another network interface card in the universe that has the same mac address it's a 48-bit address that makes this card unique from every other card and every other device that's defined at the datalink layer and something else happening at the max sub layer is the logical topologies remember when we talked about token ring we said logically we were circulating around a ring but physically everything was starring off of this mouth well the physical topology that was layer one but the logical topology which looks like a ring that would be an example of layer two that's defined at the max sub layer and one other thing we'll mention that happens at the max sub layer is the method we use to transmit data and we've already given you an example of that we talked about csma cd carrier sense meaning we're going to listen to the wire before transmitting carrier sends multiple access meaning that multiple devices can connect to the same media media access with collision detection well the cd means that if there is a collision that happens we can see that if we have a hub that's another layer one device that hopefully we don't have in our networks these days but if we have a hub the hub is going to send out a jamming message to all the attached devices saying hey we had a collision if we're physically on a bus like i was back in i guess the late 80s the voltage spike is going to be detected by the network interface card and it knows that a collision occurs so the method of transmission that's defined at the max sub layer now let's check out some things that happen at the llc sub layer well at the llc sub layer we have connection services for one thing that's going to give us flow control if the sender is sending too rapidly the receiver can say whoa slow down you're sending way too fast error correction services or error notification services the receiver might tell the sender hey i was expecting this data i didn't get it you might want to resend it something else happening at the llc sublayer is the synchronization of transmission so the sender and receiver they're agreeing on when the bits start and stop this sounds a little bit like layer one remember some features can show up in more than one layer of the osi model but an example of synchronizing transmissions between syndra and receiver one example is isochronous communication with isochronous communication both the sender and the receiver they reference an external clock to determine these different time slots another type of synchronization is asynchronous synchronization this is where the sender and the receiver can have their own internal clocks they reference but they can send extra bits like start and stop bits to tell the receiver here's when this transmission starts here's where it stops and with synchronous communication we can have another channel between the sender and the receiver that's running a clock signal to say here is one time slot here is the next time slot and at this data link layer we typically think of ethernet switches an ethernet switch such as this this is not a multi-layer switch we'll talk about that in a second this is a layer two switch we've got these ports in the front and we can connect printers pcs our regular network devices they can use one of these rj45 we'll use that term liberally we'll use the rj45 connector and we'll connect into that ethernet switch and the switch is going to learn the mac address of the network interface card on the other end of this cable so if this were plugged in like this and this were powered on the mac address as we transmitted into the switch the switch would know that the mac address on this card lived off of this particular port so if somebody sends a frame remember bacon frying produces elevation frames that layer two if somebody sends a frame destined for this mac address this switch says oh i've seen that before i made a note of that i learned that that mac address lived off of this port and it will send the transmission just out of this port now that's an example of a layer 2 switch before we go on to layer 3 though just be aware that there is such a thing as a layer 3 switch sometimes called a multi-layer switch that's what we have here this is a cisco catalyst 3560 switch and this is a multi-layer switch in other words it's going to be able to do some layer 3 and higher functions we're going to see in a moment that at layer 3 we can make 40 decisions for our packets based on destination ip address information this can too but let's take a look now at layer 3. let's add that on as we're building our seven story office building and layer three we have the network layer and the network layer is responsible for one thing for logical addressing we had physical addressing in our network interface card but logical addressing that would include things like ip like ip version 4 ip version 6. and back in the day when i used to work at a university maybe 25 years ago we actually routed not just ipv4 we routed novells ipx protocol we routed the apple apple talk protocol it wasn't just ip it wasn't clear that ip was going to be the big winner out of all those different protocols i remember the day where there was the prediction that noevel's ipx protocol was going to be the de facto standard for networking didn't work out that way and the osi model was developed when we didn't know ip was going to be the winner that's the reason we have some very non-iph things going on here at the uh different layers of the osi model now at the network layer this is where we think of having routers and we've got an example here of a cisco 2911 router and the router has a series of ports i won't flip it around because it's really really heavy but it's got some ports on the back that we could connect out to our switches which could then go out to our end devices and the router it's going to make forwarding decisions based on ip address information the router is going to learn what ip addresses and specifically what networks live off of different interfaces so if a packet comes in remember packet at layer 3 if a packet comes into that router and it's destined for a particular ip address the router can say let's see do i have a network in my ip routing table that would contain that ip address if i do i know to send this packet to the next top router identified in my ip routing table that's one of the things happening here at the network layer something else happening at the network layer is switching now i'm not talking about layer 2 switching here we're not talking about ethernet switches we're talking about things like packet switching the active routing is technically called packet switching we're making a forwarding decision or switching the packet from the incoming interface over to the outgoing or the egress interface and something else happening here at the network layer is connection services such as flow control and i know we've already talked about flow control at another layer this is another example though of how a similar service can reside at multiple layers of the osi model now let's take a look at layer four our transport layer and at layer four the two primary protocols i want you to be thinking about are tcp transmission control protocol and udp the user datagram protocol tcp is considered to be a reliable or a connection oriented protocol here's the way it works if you and i want to communicate using some sort of tcp protocol we're going to go through a three-way handshake to establish that communication here's what i mean i'm going to send you a message saying hey i'd really like to chat with you and that message is called a synchronization or an syn we pronounce that a sin message i send you a sin an syn message you get that you say oh kevin wants to talk to me cool i'll talk to him so you send me an acknowledgement for that an ack an ack message and you also want to talk with me so you send me your synchronization message so i send you step one i send you a sin you send me a sin act and then i want to acknowledge your sin your synchronization message to me so in return i'll send you an ack an acknowledgement so again the three-way handshake the first step is the sin step two is the synack and finally we have the ack now udp that's considered to be a connection less or an unreliable protocol which begs the question why would you want to use an unreliable protocol and the answer is overhead honestly for example think about voice and video going across your network we're going to be using a protocol called rtp the real-time transport protocol which by the way is another layer for protocol it's encapsulated by udp which also lives at layer four and the reason we use udp is that it has much less overhead we're not taking them as much bandwidth to send a particular video or voice packet and if we did happen to drop the occasional video or voice packet it's not going to be noticeable much if at all and we certainly don't want to say oh no we dropped this one let's send it now we don't want to receive video or voice packets out of order that would look and sound kind of silly so udp that's a great fit for some applications such as voice and video now something else happening here at layer 4 the transport layer is windowing this says how much data can i send at any one time before expecting an acknowledgement take tcp for example after that three-way handshake is over the sender might send a single segment and it's going to sit there and wait for acknowledgement the receiver hopefully gets it and they'll send an acknowledgement says okay got it i got segment one i'm acknowledging you saying i want segment two and we think that worked pretty well instead of sending just one segment it would be more efficient if i sent two segments and then i wouldn't have to be spending all these periods of time waiting so now i'll send segments two and three and i wait i get the acknowledgement saying i'm ready for segment number four and i think well this is going great i sent one then i doubled up and i sent two now i'm going to double up again and i'll send four segments and we send four five six and seven and as long as we get successful acknowledgements we're going to keep doubling up every time we're going to go from 1 2 4 8 16 32 64 1 28 256 and on and on and on but that's an example of windowing that tcp does something else happening at the transport layer is buffering let's say that the router is receiving traffic maybe from a gig link coming in from a local area network and it's trying to send it out to the internet which is only a fast ethernet a 100 megabit per second link that's a 10 to 1 speed mismatch what the router is going to do is it's going to take that data that it cannot send right now and it's going to try to store it temporarily in a buffer area called a queue on the egress interface and hopefully that interface is not going to fill up its queue's not going to fill up if it does if we try to put a packet into a queue and it gets dropped because the queue is full that's something called tail drop we don't want that to happen if we do we have to retransmit our tcp packet or if it's udp it's going to be lost forever so we hopefully are going to have enough q space to do that buffering but buffering that's something that happens here at layer four and we can actually influence using a series of tools called quality of service tools or mechanisms we can influence how we empty that cue using the things like low latency cueing or class-based weighted fair queueing so we can manage or we can influence who gets dropped and who gets through and those are some of the things happening here at the transport layer next let's move up to the session layer the session layer is responsible for establishing maintaining and then tearing down sessions for example as we're establishing a session we might be exchanging the parameters that are going to be used during the session i do a lot in the unified communications world and as we're setting up a voice phone call we're going to be negotiating things like what port numbers are we going to be using what udp port numbers are we going to be using for rtp what codec what method of encoding voice are we going to be using those parameters that we're negotiating that's all happening here at the session layer and when we maintain a session that's where we're talking about making sure that things are not getting dropped if a connection drops it's going to re-establish that session and when we tear down the session that's where both parties are all the parties in the conversation they agree on all right we're stopping communication now and they all agree to tear down the session let's move up to the presentation layer layer six and one of the things happening here at the presentation layer is data formatting for example you've got a graphic image a jpeg image that is an example of something at the presentation layer there's a standard for how jpeg images are constructed or text might be in the ascii format as an example something else happening at the presentation layer is encryption we want to make sure that for security reasons if i send sensitive information across the network if it's intercepted by a malicious user we don't want them to be able to interpret that information so we can use encryption to prevent that that's an example of something happening here at the presentation layer and finally one of the most misunderstood layers of all is the application layer up at layer seven and i say it's misunderstood because a lot of times when we use the term application we might think of an app that runs on our phone or on our computer for example think about microsoft outlook if you use that for email you might think well that's an application does it live at the application layer no it's not the the program that's not what we're talking about the application means the underlying service that supports microsoft outlook for example the microsoft outlook protocols might include pop3 imap4 smtp those are protocols that live up at the application layer because they support the feature of email and as another example think about a terminal emulation program that you might be using to connect into your router well if you do that you're using maybe secure shell as the underlying service secure shell that would live at the application layer not your terminal emulator application itself and you might argue that oh no secure shell doesn't that live at layer four no it's dependent on things happening throughout this layer it does use a port 22 that's defined here at layer 4 it's using tcp port 22 but that doesn't mean it lives at layer 4. it's just using that particular feature at layer 4 but secure shell itself it's going to live up here at the application layer and one other thing happening here at the application layer is service advertisement where a device on the network that wants to offer service lets other network devices know about that service the first example that comes to mind is apple's air print service on my iphone if i want to print something out i say i want to print and it has discovered over the wi-fi network in my home it's discovered a couple printers that we have now these printers they're compatible with apple's air print they're actually sending out messages saying hey i'm this type of printer and i'm available over the network and my iphone sees that and i can print to that advertised resource well the act of doing the service advertisement that also lives here at the application layer and that's a look at our seven layer osi model again it's a reference model it's not a reverence model not everything not every protocol or device is going to fit neatly into one area you might be spanning a couple of areas you might use only one of the sub layers at the datalink layer for example but it's just a way to better communicate about what's happening on our network and that's going to wrap up our look at the seven layer osi model if you enjoyed this video please do me a favor please click the like button down below and subscribe so you don't miss any of our weekly content thanks a ton for joining us we'll see you next time [Music] you
Info
Channel: Kevin Wallace Training, LLC
Views: 49,030
Rating: 4.9762001 out of 5
Keywords: cisco, CompTIA, CCNA, CCNP, CCIE, network+, 200-301, osi, osi model, 7 layer model, tcp model, dod model, tcp/ip model, physical layer, data link layer, network layer, transport layer, #kwtrain
Id: oVVlMqsLdro
Channel Id: undefined
Length: 31min 51sec (1911 seconds)
Published: Fri Aug 14 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.