TCP/IP Model vs OSI Model FREE CCNA 200-301 Course 2025

Show video

It's really important that you know the TCP/IP  model for the real world you'll often hear   network engineers saying there's a problem at  Layer 1 or perhaps there's an issue at Layer   3 or there's a problem at Layer 7 what does that  actually mean you need to learn the TCP/IP model   and be aware of the OSI model. Now why do we  have these models? This problem unfortunately   still exists today here I've got a Pixel phone  Samsung phone and an iPhone one of the reasons   the OSI model was developed was standardization  in this example Pixel phone supports USBC so I   could plug that cable in Samsung phone supports  USBC but this is an older iPhone it only supports   a lightning cable so this cable is proprietary  can't be used with these devices this problem   used to also exist in networking where vendors  would create their own proprietary systems own   proprietary protocols and the OSI model allows us  to stop vendors making proprietary protocols that   don't work with one another and one of the ideas  with the OSI model or Open Systems Interconnection   Model created by the International Organization  for Standardization or ISO was interoperability   standardization of interfaces standardization of  protocols fortunately more modern example later   versions of Apple iPhones have to support USB-C so  now we can take the same cable and use it across   different vendor devices rather than having to  use a proprietary cable for every vendor device   now in the same way in networking we have standard  interfaces this is an RJ45 connector technically   it's got a different name but in the real world  people refer to this as an RJ45 connector this is   a CAT5e UTP cable unshielded twisted pair cable  I'll talk more about cabling in a separate video   but what I want you to realize is this cable  can connect to a Cisco switch like that i could   connect it to a UniFi switch so UniFi switch Cisco  switch in the same way same cable could be used   with a Netgear switch or same cable could be used  with a TPLink router because of standardization   this is a standard interface that can be used  across multiple vendors in the old days we used   to have proprietary protocols proprietary vendor  implementations that meant that if you're for   instance using a system from one vendor and you  wanted to support another vendor you ended up   with two separate networks fortunately today we  don't have that problem in today's world we use   TCP/IP which means that the protocols or languages  that we use on the internet are supported across   vendor devices cabling is standardized protocols  such as TCP or UDP or OSPF are standardized across   vendor devices gives us interoperability between  different vendors you don't have to worry about   buying a specific type of Ethernet cable like  you had to do with lightning cables from Apple   as an example i mean on the other side of this  cable we have USBA here's USBC these are standard   interfaces fortunately the EU have forced Apple to  move from lightning to USBC in the same way with   the OSI model and TCP/IP model we have standard  protocols that are supported by multiple vendors   in the TCP/IP model we have what are called RFC's  or Request For Comments that specify a protocol   such as TCP notice how old it is protocols do get  updated so you'll see various changes to protocols   but notice as an example I could just search for a  protocol such as OSPF RFC and here is OSPF v2 RFC   is this notice how old this one is 1998 so when we  get into the nitty-gritty of the TCP/IP model OSI   model don't lose sight of the reason why this was  created in the past we had proprietary protocols   nightmare from a consumer point of view great from  a vendor point of view because they control it   they get all the money we could make some really  snarky comments about Apple as an example the ISO   allows for multi- vendor software and a layered  approach for interoperability between devices   the idea here is that we split responsibilities  some people are responsible for certain parts   of the network other people are responsible for  other parts of the network so as an example you   as a network engineer may work with these kind of  cables but you don't physically create the cables   you just order them in and you know it's going to  be standardized when it arrives you're not going   to create your own fiber cables you could do that  you could create your own routers you could create   your own switches but generally what we do is we  split the responsibilities where someone focuses   on creating cables someone focuses on for instance  creating routers some of us are focused on   configuring those devices some of us are focused  on writing applications that use a network but we   don't understand how networks route traffic from  one device to another as an example so this is   what the OSI model looks like we have seven layers  starting at 1 going to 7 and their names are   All People Sleeping Through Networking Don't  Pass now that's obviously not what the layers   are called but hopefully that helps you remember  the various layers here are the actual layers at   Layer 1 we have the Physical Layer at Layer  2 the Data Link Layer, Layer 3 Network Layer,   Layer 4 Transport Layer then Session at  5, Presentation at 6 and Application at 7.   Now I won't bore you going through all the reasons  again for the OSI model but the whole idea is to   have standardization and interoperability between  different vendors and technologies now I'll be   talking about the different layers in more detail  in a moment but life isn't as simple as this   unfortunately it gets a bit more complicated  in the past we had competing organizations   with different models we had the OSI model and the  TCP/IP model in the real world today we use TCP/IP   the protocols that we use today are IPv4 and IPv6  and I'll explain where those fit in the TCP/IP   model in a moment but in the past there were  different protocols we had protocols such as NetBEUI   or IPX other types of protocols so it wasn't  always clear-cut which protocol would win would   IPX win or would TCP/IP win today fortunately  we just have to focus on TCP/IP v4 v6 so this   is what you need to know in previous versions of  the CCNA course they taught the OSI model there   was a lot of debate about how practical this  model was in the TCP/IP implementation that we   use these days the original TCP/IP model had four  layers so we only had Link Layer, Internet Layer,   Transport Layer and Application Layer only four  layers however in the CCNA and in the real world   we use the hybrid TCP/IP model this is a five  layer TCP/IP model which consists of the Physical   Layer at Layer 1 notice how that's similar to  the OSI model we have the Data link Layer at   Layer 2 similar to the OSI model and then we have  the Network Layer at Layer 3 similar to the OSI   model again Transport Layer similar to TCP/IP  and OSI model and then we have the Application   Layer at Layer 5 so rather than just four layers  we have two layers the link layer in the TCP/IP   model is split into two data link and physical  similar to the OSI model now the one that you   need to know for the real world is the five layer  TCP/IP model Wikipedia shows the different models   available out there so just be aware that Arpanet  is how the internet was started we had 3   Layers Application, Host to Host and Network  Interface and then we had RFC 1122 with 4   Layers and then there are various 5 Layer  models as shown here the one that's most famous   is Application, Transport, Network, Data Link  and Physical and then we have the 7 Layers   Application, Presentation, Session, Transport, Network,  Data Link and Physical now don't get lost in the   details there are 3 Layers the most important  one to know is the 5 layer TCP/IP model that's   actually what we use in the real world i'll show  you using Wireshark how it actually looks on a   network now that can be a bit scary the first  time you see it so don't worry too much if you   don't understand the Wireshark captures right now  as I show it to you in this video but you'll learn   this as we go through the course you need to know  your Layers you need to understand the protocols   used in networks so we going to focus on the  TCP/IP model where we have Application Transport   Network Data Link and Physical Layers. The 3  OSI Layers are combined into a single application   layer but and this is where it might get confusing  the real world we still often refer to this as   Layer 7 so in the real world network engineers  will talk about this being a Layer 7 as in there's   a Layer 7 problem in other words a problem at the  Application Layer even though we only have 5   Layers in the TCP/IP model or 4 Layers in  the original TCP/IP model that comes from the   fact that this is Layer 7 in the OSI model now  don't get hung up about all the different types   of models what you need to know for the exam is  the five layer TCP/IP model and you need to know   which protocols and which devices are used at  which layers you'll see references in books and   documentation to the OSI model as well as the  original RFC 1122 TCP/IP model but for the exam   you need to know this hybrid or 5 Layer TCP/IP  model that's the one that we're going to focus on   from now on now one of the ideas with the OSI  model and TCP/IP model is to put protocols at   certain layers so as an example we would have IPv4 IPv6 at Layer 3 in the TCP/IP   model TCP UDP at Layer 4 Ethernet PPP HDLC which  are encapsulations on various technologies at   Layer 2 and then we'd have the physical media that  we sending traffic across which could be Ethernet   Wi-Fi so as an example a fiber cable or a copper  cable at Layer 1 and then at Layer 7 we would have   protocols such as HTTP, HTTPS, Telnet, FTP, TFTP, a whole  bunch of protocols now again a protocol is just a   set of conventions on how we communicate so as  an example if we're using HTTP we need to agree   on the conventions of HTTP how does the protocol  actually work again in English we have certain   conventions which are different to say other  languages so the idea here is we try and put   various protocols into certain layers but for the  real world just be aware that it doesn't always   work as nicely as this so don't get stuck or hung  up on trying to put every protocol into a specific   layer some people get into fights about this  protocol doesn't reside at this layer it resides   at a different layer don't get too hung up about  that don't get stuck into trying to fit everything   neatly into a model like this so as an example  a model for a house is just that it's a model   it's not going to be exactly the same as the  physical implementation the actual house of   the model so there will be variations application  developers may decide not to follow the rules or   the conventions and put their protocols in weird  places but for the exam and for CCNA in your mind   we are going to try and put most protocols at  specific layers and that's what you're going to   learn we're also going to be putting devices  at specific layers so as an example a hub at   Layer 1 switch or bridge at Layer 2 route at  Layer 3 TCP UDP again at Layer 4 and our Layer   7 protocols here but before I explain that in more  detail and show you with physical devices let's   have a look at what each layer does because you're  probably wondering you know what what is Layer 1   about Layer 2 about Layer 3 about etc so Physical  Layer is probably the easiest one to understand   that's the layer that transmits raw bitstreams as  electrical optical or radio signals over physical   media such as cables or wireless so here's an  example i have a fiber optic cable notice the   light single mode fiber optic that's different  to say multi mode fiber optic so notice how the   pattern is different in multi mode fiber versus  single mode fiber this is like a solid pattern and   this has a dispersed pattern but notice in that  definition we are sending bitst streams in other   words data across a optical cable as light that's  different once again to a copper Ethernet cable   that uses electrical signals so electrical signals  are sent through copper cables as an example light   traverses through the cable allowing communication  from one end of the cable to the other or in this   example electrical signals are sent by the  transmitting party and then are RFC on   the other side that's how devices communicate that  again is very different to say Wi-Fi the standards   for Wi-Fi are going to be very different to  optical that again is going to be different   to say satellite so here's my Starlink satellite  dish so Starlink's transmission to satellites is   going to be different to say 5G so the physical  implementation of how data is transmitted on 5G   is different to Wi-Fi it's going to be different  to copper it's going to be different to fiber it's   going to be different to satellite communication  but the idea is is that we sending data in other   words we are sending bits from one party to the  other through some kind of media now the data link   layer layer two manages physical addressing  or MAC addresses framing and error correction   between directly connected devices notice the  keyword directly connected devices the reason   for that is there are different encapsulations  and different ways that things work at Layer 2   so as an example it says MAC address there but  not all implementations use MAC addresses here   I've got an Ethernet network card that uses a MAC  address here I've got another Ethernet network   card also uses MAC addresses ethernet uses MAC  addresses each device in an Ethernet network is   identified by its MAC address the same is true on  Wi-Fi so the encapsulation or the way information   is transmitted on the network depends on the link  that's used the physical media used as an example   again this is a network interface card that  supports fiber so I can connect a fiber cable to   the network card data is going to be transmitted  across this cable using source and destination   MAC addresses that's how devices communicate on  Ethernet the same is going to be true for copper   Ethernet the Ethernet that you probably very used  to so as an example I could connect this copper   cable to this network interface card so again  just from a Layer 1 point of view obviously   the implementation here is different you are not  going to use a fiber cable to try and connect to   a copper Ethernet network interface card that's  not going to work but from an Ethernet point of   view it looks the same so if I captured traffic  on the fiber cable and looked at the Ethernet   frame it would look the same on copper as  well as fiber implementation is the same at   Layer 2 but at Layer 1 it's different same is true  for Wi-Fi if I look at the destination and source   MAC address on Wi-Fi it looks the same so if I'm  looking at Wi-Fi and Ethernet it's going to look   very similar at the higher layers but obviously  at Layer 1 it's very different this is using air   this is using copper the physical implementation  is very different but things change for instance   when you go from Ethernet this is an Ethernet  port on this router to something and this is an   old example i'll show you some modern examples  in a moment a serial interface so let's say my   network interface card is in my PC and I've got it  connected to this router the traffic is going from   the PC to the router through Ethernet but when it  goes across a serial link serial links don't use   MAC addresses so the framing the error correction  etc is different on a serial link so if I was   sending traffic from a PC using Ethernet and it  went across a serial link to another router if I   captured traffic on the serial interface it would  look different to the Ethernet interface this is   using Ethernet framing the way the the frame looks  and I'll show you what that looks like in a moment   when we run use Packet Tracer but the way it looks  on Ethernet is going to be different to the way   it looks on serial now in the same way here's a  router with some Ethernet ports if I connected   my PC to Ethernet on the router traffic that's  sent across here is Ethernet but in this example   might go across 4G so the Layer 2 implementation  is going to be different across 4G versus Ethernet   versus an old implementation like a serial  interface wi-fi and physical Ethernet look very   similar but if you looked at the encapsulation in  other words what the frame looks like at Layer 2   here it would look very different to Ethernet now  that word frame I'm using on purpose because when   we look at the traffic on a network we will talk  about bits at Layer 1 because it's binary bits   zeros and ones transmitted via light or electrical  signals or something else we talk about frames at   Layer 2 i'll show you once again what a frame  looks like in a moment but we talk about frames   at Layer 2 at Layer 3 we talk about packets so  a router sends packets at Layer 3 and then at   Layer 4 we talk about segments now there's a lot  of information here i'm going to repeat myself so   don't worry if it's a bit overwhelming the point  is is that different devices reside at different   layers of the OSI model such as a switch at Layer  2 the traffic sent at Layer 2 is a frame and Layer   2 looks at the physical addressing which could be  MAC addresses on Ethernet and on Wi-Fi looks at   framing and error correction between directly  connected devices now again the reason we say   directly connected is if we look at Ethernet  here it's between this network card and the   router but when the router routes from one media  to a different type of media such as serial the   communication here is between this router and say  the other router connected on the other side of   the cable it's got nothing to do with what this  PC is sending on the network in the same way if   you send traffic through Wi-Fi to your Starlink  that's communication between you and Starlink   across say Wi-Fi or could be physical Ethernet so  I could plug Ethernet in here different type of   communication between the routers communicating  through the satellite networks versus you using   Wi-Fi on stalling forgive my bad drawings now  but let's assume that you've got a PC so here's   my PC it's sending traffic via Ethernet to  a router so this is Ethernet encapsulation   used here so as an example it might be Ethernet  2 when it goes from the router to another router   this could be a serial link and on this link  here we use MAC addresses but on a serial link   there are no MAC addresses the encapsulation  used here is Ethernet 2 in a lot of cases but   the encapsulation here could be PPP so notice  it changes every hop between routers the PC   on this side could be using Wi-Fi so I'll just  draw Wi-Fi like that notice Wi-Fi is different   to serial which is different to Ethernet every  hop this changes you're not going to use PPP   on your Wi-Fi link every link uses a different  encapsulation so at Layer 2 this changes every   time we go through a router the router actually  strips the Layer 2 information and recreates it   when it sends the traffic from one interface  to another but IPv4 is an example at Layer 3   is end to end so when you communicate through IP  you're communicating from one device to another   like this it's end to end now you'll learn  about NAT and how we can change IP addresses but   essentially for the moment think of it as follows  you are sending traffic from this PC to this PC IP   addresses are used for end to-end communication  routing across multiple links Layer 2 is used on   a per link basis so at Layer 3 or the network  layer we are providing logical addressing which   determines the best path through the network at  Layer 1 we have physical addressing again on a   network interface card the manufacturer burns in  the MAC address or media address for the device   you can often change that but notice it's burnt  into the network card when you buy a network   card it has a burntin address so a MAC address  associated with the card that you could perhaps   change but it has a hardware address identifying  this device on the network ip addresses are   logical addresses those are addresses that  we as an administrator would configure you   can change your IP address think about it when you  connect to one Wi-Fi network it may use a specific   IP address when you connect to a different Wi-Fi  network it may use another IP address so in this   example I'm connected to a specific Wi-Fi network  i'm just going to hide my Wi-Fi networks to keep   that private but notice I have a MAC address  and an IP address ip address was automatically   allocated ip address at the moment is 192.16801  155 i have my subnet mask and my default gateway   or router so address was allocated automatically  or through dynamic host configuration protocol   or DHCP i have a specific IP address if I jump to  a different Wi-Fi network the IP address has now   changed it's 1921 1681 132 different IP address  different default gateway now MAC addresses don't   normally change unless you specify an option here  like private Wi-Fi address they say here using   a private address helps reduce tracking of your  phone across different Wi-Fi networks if you use   the same MAC address the whole time which is the  burnt-in MAC address your phone can be tracked so   to help stop tracking of your device as it moves  from one network to another what Apple is doing   here is automatically changing the MAC address  when you move from one Wi-Fi network to another   so again the phone has a burnt-in MAC address  that's used to connect to the Wi-Fi network same   as here you could change this MAC address but by  default it'll just use a specific MAC address to   identify that device on the network ip addresses  will change and can be changed to allow for   routing through a network and we're going to  spend a lot of time looking at this what we're   going to do is configure routers so forgive my  drawings that's supposed to be a router which   will have a link say to another router which will  have a link to another router and say a router on   this side to get from router one to router two  what's the best path let's assume that this link   is 100 megabits per second and this is only 1  megabits per second it's going to make sense to   send it across two 100 megabits per second links  rather than say 1 and 2 megabits per second link   so you through IP addressing as well as running  routing protocols can say okay to get from this   network to this network I'm going to route this  way and IP addressing allows you to configure a   specific subnet as it's called or network per  interface so every link or every network that   you connect to will have a subnet again look  at your home network so have a look on your   own device here I have a network of 192.168.1.0 I'll talk about subnetting in another video   so don't worry too much about that but notice the  first three numbers are 192.168.1 which equates  

to the 255.255.255 in the subnet mask again don't  worry too much about that if you're not sure i'll   talk about subnetting in more detail later but  the idea is we have a logical addressing that   allows us to route from one network to another  on this network and I've just jumped now subnet   mask is the same notice the network is 192.168.0 now the 255 there is indicating which is the   network address so the network address here is  192.168.0 the previous one was 192.168.1 so they are   different networks different subnets as we call  it allows us to route traffic from one network to   another and you'll learn a lot about that in this  course but the idea is is that we have a logical   addressing you can change your network addressing  very easily in your home network you could set it   to something else you might not want to use what  your router at home has set up by default so this   little TPLink router might be using 192.168.1.0  as the network and you could change that it's  

a logical address we often don't change our MAC  addresses cuz they burnt in but as you saw in the   Apple example Apple is changing the MAC address  when you go from one network to another for   privacy reasons okay next layer Transport Layer  so what is theTransport Layer about it supports   communication between end devices across a diverse  network the two big protocols used at Layer 4   are TCP and UDP transmission control protocol and  user datagramgram protocol think of the following   with regards to TCP TCP is like a phone call it's  going to make sure that the other person is there   and make sure that they get the data so when I  call you and you answer you typically say hello   and then I would say hello so it's kind of like  in TCP where we have what's called the three-way   handshake we agreeing on certain things before we  transmit data if I want to tell you my telephone   number as an example so let's say my telephone  number is triple 5551234 I would say my telephone   number is 555 and you would say 555 to  confirm that you got the information then I would   say 1 2 3 4 and you would confirm by saying  1 2 3 4 so I'm telling you the information or   the data and then you are confirming it back  or acknowledging the data it's a connection   orientated protocol and make sure that the other  party gets the data so transmission control   protocol is connection orientated we set up a  connection so I phone you you answer the call we   acknowledge that by saying hello how are you and  we have sort of a conversation first and then I   transmit the data to you and you confirm that you  got the data or you acknowledge that you got the   data user data gram gram protocol UDP is not like  that it just sends the data and says good luck   so send it i'm not going to confirm that you  got it hopefully you did but I don't know if   you got it so that's kind of like writing an old  fashioned letter so write a letter put it in an   envelope and I post it i don't know if you got  it maybe you got it maybe you didn't who knows   hopefully you did but I have no confirmation that  you got the data or the information whereas with   TCP you are confirming that you got every part of  the information now Layer 7 or application layer   or if you want to be precise 5 to7 represents data  users encodes and controls the dialogue the whole   idea here is that we are setting up for instance a  session between an HTTP client and an HTTP server   so the client and the server are agreeing on  certain parameters and again we'll cover that   in a lot more detail as we go through the course  you've interacted with applications all the time   if using a web browser as an example that's  the most common type of application that we   use today but it doesn't have to be other  applications use protocols such as FTP or   TFTP or SSH or Telnet various applications  use various protocols for communication at   Layer 7 some of those applications make sure  that the data doesn't get lost however when we   use voice so we're making a Voice over IP call it  doesn't make sense to retransmit data that's lost   so if it's lost it's lost we don't make sure that  the data arrives successfully so voice protocols   simply send the traffic across the network and  don't make sure that the other party got it   now again there's a lot of information here we  are going to spend a lot of time going through   this information in the course so don't worry  too much about it if you're struggling what I   want you to understand for the moment is that  at Layer 1 it's about bits we are sending bits   of data at Layer 2 we've got MAC addresses  at Layer 3 we've got logical IP addresses at   Layer 4 we've got TCP or UDP and at Layer 7 or  5 to7 we have got applications such as HTTP FTP   etc so again Layer 1 we have Ethernet or Wi-Fi  it doesn't have to be those two implementations   again serial is a different type of implementation  we've got 5G various types of implementations at   Layer 1 at Layer 2 we've got encapsulations such  as Ethernet 2 the most common type of Ethernet   that you'll encounter but on a serial link like  this you might have had point-to-point protocol or   PPP or HDLC different types of encapsulations are  used on different type of media fortunately today   it's much easier we're going to focus on Ethernet  when I started we had to learn all kinds of   implementations ATM HDLC PPP and a whole bunch of  others which I won't bore you with today it's easy   focus on Ethernet at Layer 3 we have IPv4  IPv6 again different protocols were   available at those layers you don't have to run IPv4 or IPv6 in the old days we had   a protocol called IPX SPX so that was similar in  concept to TCP/IP a whole bunch of other protocols   existed NetBUIE is another protocol that existed  and you'll find that in old versions of Windows   as an example but not in modern versions of  Windows in the real world today we are focusing   fortunately on TCP/IP because remember it's the  TCP/IP model that won the OSI model didn't win   TCP/IP is what we use today that's what won so  we use TCP or UDP at this layer and at Layer   5 to 7 we using HTTPS Telnet FTP TFTP etc lots of  protocols exist here so those are just a sample of that

2025-04-04

Show video