hello welcome to another lesson from the first module of my new course on networking fundamentals in this lesson we'll be taking a practical look at the osi model if you haven't seen the videos for lesson one i'd highly recommend you start there this lesson is simply a direct continuation of what occurred in lesson one that said let's get into discussing the osi model the overall purpose of networking as an industry is to allow two hosts to share data with one another before networking if i want to get data from this host to this host i'd
have to plug something into this host walk it over to the other host plug it into the other host networking allows us to automate all that by allowing the host to share data automatically across the wire for these hosts to do this they must follow a set of rules this is no different than any language english has a set of rules that two english speakers must follow spanish has its own set of rules french has its own set of rules while networking also has its own set of rules the rules for networking are divided into
seven different layers and those layers are known as the osi model now to give you an analogy the human body is made up of various systems the skeletal system the respiratory system the nervous system the cardiovascular system the muscular system and if each of those systems are operating as intended then the goal of the human body is attained meaning the human lives well networking works the same way each of the layers of the osi model serve a specific function and if all seven functions are accomplished then the goal of networking is attained which is to
say host can share data and the goal of this lesson is not simply to memorize the osi model the goal this lesson is to take a look at the purpose of each layer in the osi model and see how it contributes to the overall goal of networking which is allowing two hosts to share data with one another that said let's just jump right into it starting with the first layer of the osi model known as the physical layer data on computers exist in the form of bits that is ones and zeros well the first thing
that needs to exist for these hosts to share a data with another is something has to transport those ones and zeros from this computer to the next that something is the physical layer the goal of the physical error is transporting bits and anything that contributes to moving ones and zeros from this computer to this computer is considered a layer one technology for example cables all fall under the concept of layer 1 technologies all of these cables serve the purpose of taking bits from one end and taking them out to the other end but don't get
too caught up on the word physical the osi model was written well before the idea of wireless internet communication was ever thought of wi-fi is considered to be a layer one technology because wi-fi solely exists to carry ones and zeroes from one computer to the next now not only do these cables or wi-fi exist at layer one there are some devices that also exist at layer one one of those devices is known as a repeater in the last lesson we identified the repeaters simply amplify signals from one end out the other end in a way
a repeater is really nothing more than something that allows you to extend a wire meaning it contributes to this goal therefore a repeater is considered to be a layer 1 technology which means that multi-port repeaters like hubs would also be considered layer 1 technologies all of these items serve the function of transporting bits from one computer to the next that is the goal of layer 1 which brings us to layer 2. layer two is going to interact with the physical layer it's going to actually put bits on the wire and retrieve bits from the wire
which means whatever this wire actually connects to on this pc is considered a layer 2 item meaning the nic or the network interface card that this wire is actually connected to on this computer is considered layer 2. the wi-fi access card is also considered layer 2 because it's interacting with those wi-fi radio waves now nicks and wi-fi access cards don't really look like this anymore but there was a time when you had to buy separate cards and actually install them into computers and able to access the network or wi-fi nowadays wi-fi access cards can fit
in your smartphone or your watch the overall goal of layer 2 is what i'm going to call hop to hop delivery meaning layer 2 exists to take ones and 0s from this nic and move it to the other nic this is what i'm calling a hop now to accomplish this goal layer 2 is going to use a specific addressing scheme that addressing scheme is known as a mac address mac addresses are 48 bits which are represented as 12 hex digits here are three examples of a mac address now in all cases these are the exact
same mac address the only thing that's different is how they're displayed windows machines typically use the dashes in between the hex digits linux machines typically use those colons and cisco routers and switches typically use the four hex digits with a dot in between either way it's still just 12 hex digits which are converted into 48 bits the way it works is every single nick has a unique mac address meaning this computer's nick over here has the mac address a1 a1 and this computer's nick has the mac address e8e8 now i'm only showing you the first
four digits of the mac address simply to conserve screen real estate but in reality this is what a mac address looks like either way this mac address is what's going to allow data to go from one nic to the next ie from one hop to the next so we've identified that nics exist at layer two but there is another type of device that also exists at layer 2 and that is switches recall from the last lesson that we discussed that switches are devices which facilitate communication within a network meaning if these two hosts are connected
via this switch the switch is what's going to help traffic move along to accomplish this hop moreover switches allow you to connect many devices to them if these two hosts want to speak to each other the switch is going to internally connect these wires such that data can traverse this hop from this nick to this nic so switches are considered layer 2 technologies because they aid in the accomplishment of this goal now generally with the internet you're commuting with things that are far away not necessarily things that are in the same network so it's very
common for communication between hosts to require multiple hops meaning we need to jump across multiple routers to get to the target host well each of those routers are connected to a wire using a nic and therefore each of those nicks have their own mac addresses and layer two will handle taking data from the first mac address and delivering it to the next mac address and then from this nic to the next nic and then from this nick to the next nick and then finally from this neck to the next nick as you'll notice in all
cases layer two is handling the hop-to-hop delivery of data which begs the question if layer 2 is taking care of every hop what's taking care of ensuring data goes from this end point to the next well that's where layer 3 comes into play layer 3's goal is what's called end to end delivery to accomplish its goal player 3 is going to use its own addressing scheme known as ip addresses now we unpacked ip addresses in the prior lesson ip addresses are 32 bits represented as 4 octets each that can be the number zero through 255.
every host is going to be identified by its ip address and these ip addresses are what's going to allow data to go from here all the way to here now as you can see from this illustration aiding in the goal of delivering data from end to end is routers so routers are considered to exist at layer 3 of the osi model hosts are also considered to exist at layer 3 of the osi model but really anything with an ip address can be considered to exist at layer 3 of the osi model now at this point
a question typically comes up and that question is if we have ip addresses at layer 3 why do we need mac addresses or alternatively if we have mac address to layer 2 why do we need ip addresses answering that question will help reveal how packets flow through the internet the reason we have two different addressing schemes is that each of those addressing schemes serve different purposes so let me show you let's say this host has some data that needs to send to this host now of course that data is just a bunch of ones and
zeroes layer two and layer three don't know what that data contains it's just an arbitrary set of ones and zeros that need to get to this host over here since this computer knows the data needs to get to this endpoint over here it's going to add some layer 3 information to that data that layer 3 information is going to include the source ip address and the destination ip address in order to get this data from one end to the other but now this computer knows that the first step will be getting that data to the
first router which will prompt the computer to add layer 2 information to that data and that layer 2 information is going to have a source mac address of the computer's nic and a destination mac address of the first router's nic that's what's going to get this information to the first router once it gets there we can remove that layer 2 information remember the whole purpose of that layer 2 header was simply to get this construct from here to here through the first hop from this point this router now knows that this needs to get moved
to the next router and it's going to do this by adding another layer 2 header but notice this time the source and destination mac address identify these two mac addresses that's what's going to take this packet to the next router and here once again we can get rid of that layer 2 information again the whole purpose of that layer 2 header was simply to get the packet from here to here since it did that successfully we no longer need it this process will continue with this middle router over here adding layer 2 information that will
take care of this hop and finally the last router in the sequence will add the final layer 2 header which will take the packet from this nick to the end host's nick once it gets to the final host again the layer 2 header can be removed the purpose of that header was again just to bring the packet from here to here moreover the layer 3 header can be removed because the purpose of that header was to bring the data from here to here from end to end finally this gets the data to the computer and
the data can be processed by the receiving host that is why we need both ip addresses and mac addresses because they serve different functions and we've been talking about ip addresses and mac addresses as independent functions and indeed they are but i should mention at this point that there is a protocol that's going to tie these together that protocol is known as the address resolution protocol it's going to link a layer 3 address like an ip address to a layer 2 address like a mac address arp is crucial to understanding how data flows through a
network we're going to be talking about arp later on in this module but if you can't wait i did write an article series that discusses all the different forms of arp you can access that series at pracnet.net arp as for us that wraps up the first part of our practical discussion of the osi model in this video we discussed layer 1 layer 2 and layer 3 and how each of those layers have a specific goal which contributes to how data flows through a network in particular we illustrated how layer two and layer three work together
to move data across the many different hops required to get data from one end to another so that wraps up part one of our discussion in part two we'll pick up right where we left off discussing the transport layer but the main takeaways for this lesson are on your screen right now i hope you enjoyed this video i want to thank you for watching and we'll see you in the next video as we continue our discussion of the osi model hey youtube i hope you enjoyed that free lesson for my new course on networking fundamentals
i'll be releasing the entire first module for free here on youtube i want this course to be the ultimate networking fundamentals course and since i'm still scoping out the outline you could have a say in what topics will be covered let me know in the comments below what subjects you want included in this course otherwise remember to like and subscribe and of course if you learned something from this video the best way to thank me is to share this video it's a small act of gratitude but one i appreciate greatly i hope you enjoyed this
lesson i want to thank you for watching and we'll see you in the next one