Hi and welcome to this CertificationKits CCNA training video on networking fundamentals. We’re going to be going over the basics of the OSI model and talk a little bit about IP subnetting, which we’ll get into further in a later CCNA video. Basic network communication, internal LAN and WAN communication and we’re going to take a look at following a data packet. What happens to information as it goes from one source to a particular destination. Then we will go in and talk about the OSI model.
OSI stands for Open Systems Interconnection. It was established in 1982 by the International Organization for Standardization. They came up with a seven-layer communication model and basically the seven layers are requirements for two machines to be able to communicate with each other. How to package the data, everything like that. In a TCP/IP network, there is what’s called the four-layer TCP/IP model. I have also heard it called the DOD model and they break the seven layers up into four functional layers for each type of protocol that would be used. Layers five, six and seven basically map to what would be called the application layer in the four-layer model. The transport layer is still called the transport layer. The network layer is called the Internet layer and the bottom two layers are called the network interface or network access layers.
Now, what happens is we have protocols written to carry out certain things. An application protocol such as FTP or HTTP would make sure that these three requirements are being met. Application, you got to have some sort of application functioning, presentation, everything has got to be in their appropriate format. Session, you must establish a session in communication for transferring the data. FTP or HTTP, both make sure those three requirements are met. So there is one protocol making sure those three requirements are met. That protocol, that application protocol is represented inside the packet by what is called a port number. So the port number identifies the application layer protocol.
At the transport layer, with IP, we have typically TCPor UDP. There is a number that tells us or that represents TCPor UDP in the packet and that number is called a protocol number. Then between the network and the data link layer and actually this is what the logical link control portion of the data link layer handles, it’s called a service access point and that puts the type field into a packet to tell the receiving device to use IP or IPXto open the packet depending on what layer three protocol was used. So there is a service access point identifying the layer three protocol. So layer three communication protocols identified by the service access point. The layer four protocol like TCPor UDP is identified by the protocol number and then the application layer protocol like FTP or HTTP is identified by a port number. What I want to do is take a look at what’s going to happen to a packet, as it goes from one place to another, and see what happens with this OSImodel and how it interacts with the packet, while traveling through different devices. Let me bring up a CCNA slide.
I brought up a CCNA network diagram and what we’re going to do is we’re going to take a look at what it takes for computer A over here to transfer something or upload something to the FTP server in this segment here. We have two local area networks separated by a wide area network connection. So what do we need for this computer to be able to communicate with this server? First thing we are going to need is addressing and a very popular type of addressing would be IP addressing. So what IP addressing do we need?
Now the first thing we need to know is what subnets or network addresses we’re going to be falling under and just for demonstration purposes, we’ll say that this entire environment is network 126.96.36.199 with a /8 subnet mask. So what we need to do is we need to figure out how to address all these systems and have them all be a part of network 188.8.131.52. That’s where the subnetting comes in. Every different broadcast domain and we’ve got three of them; here is one broadcast domain. Here is another broadcast domain and probably a lot of broadcast domains within there, but anyway, we’ll just consider this one subnet. And then we’ve got another subnet here. So we’ve got three subnets going on, subnet one, subnet two, subnet three. So we need to chop network 20 up into three different subnets. To be able to do that, all I do is I start breaking everything down into binary. So I make sure I’ve got the first
So what I need to do is I need to section off part of the known portion of Network 20 and make it part of the network portion and I need enough binary spaces to be able to represent three different combinations of zeros and ones because I got three subnets. If I have one binary space, I’ve got two possible combinations of zeros and ones. If I have two binary spaces, I have got four possible combinations of zeros and ones. That’s a 11 right there not 00. So this is 00, 10, 01 and 11; four different combinations of zeros and ones. Now that’s fine except standard subnetting says don't use all zeros and don't use all ones even though technically I can. So what we’re going to do is we’re going to say we need three binary spaces to be safe to give us enough different combinations of zeros and ones. What that does, each binary space, with two different combinations, gives us 2x2x2, 8 total combinations of zeros and ones, which is more than enough to get three subnets out of. Here are our combinations: 000, 001, 010, 011, 100, 101, 110 and let’s that write up here, 111. This is quickly becoming a mess.
So what I do is I extend my subnet mask out three places and it fits nicely with that equation. Two to the N, minus two is (you can't use all zeros, you can't use all ones) this two says if I have one binary space, I have a total of two possible options. The N is the number of binary spaces. So what we’re looking at is 2 to the 3 minus 2 is equal to 6, which is more than enough to get our three subnets out of. So by extending the subnet mask out three places, I have now designated these three bits that are normally part of the host portion, as part of the network portion and my first subnet is this right here. I just turned that bit on and I’ve got my first subnet. So subnet one is 20 and what is this number? It is 12481632; 184.108.40.206 for this subnet. This subnet right here would be 10 combinations, it’s going in increments of 32, 220.127.116.11 and then the last one would be 11 right there which would be 18.104.22.168. The new subnet mask we would be using is 255.224.0.0, that’s the new subnet mask or you could also call it /11; 8, 9, 10, 11 could also represent it in /11.
So let me clean this CCNA slide up and set the subnets where they belong and then we’ll go in and look at giving the IPs to the individual machines. I’ve gone in and filled in the IP addresses so for the router interface here, which we’ll say is Ethernet 0 interface. We’ll say this is router 1. This is router 2. Ethernet 0 on router 1 has a .1 IP. Serial 0 on router 1 also has a .1 IP but it’s part of the 20.64 subnet, not the 20.32 subnet. So it’s 20.32.01, 20.64.01. Serial 0 on router 2 has a 20.64.02 IP and Ethernet 0 on router 2 has a 22.214.171.124 IP address. I gave the computers .10.11 IP and over here .10 IP for the computer and then the server as a .99 IP address. Everybody is using the same subnet mask of 255.224.0.0. So that’s the IP addressing taken care of. We need one other address for our computers to communicate and this address is very important inside of our network and that address is the MACaddress. That’s what our computers use to communicate at layer two of that OSImodel. So everybody is going to need a MACaddress on the LANside of our communications. For WAN connections, here is our WAN connection, our router interface is here serial 0 interfaces don't need MACaddresses, but the Ethernet interface, as well as the computer’s, they all need MACaddresses. So I am going to go in and instead of using a 12 hexadecimal character MACaddress, I am just going to use something like A2 for MACaddresses just for demonstration purposes. Again, generally, well always, the MACaddress is 12 hexadecimal characters not 2. I am going to throw in some MACaddresses now.
I’ve gone in and filled in the MACaddresses here so all the MACaddresses are in red and on the Ethernet interfaces on the router and Ethernet interfaces on the computers we have MACaddresses. We don't need them on the serial interfaces. Not necessary. So we’ve got our addressing, our MACaddresses, our IP addresses, everything is set up but we need a couple additional things to be functioning before this computer right here can talk to the server. The switch, switches forward based on a MACaddress so the switch has what’s called a forwarding table and the switch uses that forwarding table to determine where to forward a packet so the switch has three ports – port 1, 2 and 3 – and it has to associate MACaddresses with those ports in the forwarding table. The routers also have routing tables that need to be populated before they can determine what interface to send the packet out of. Hubs, they don't use any tables. They are strictly a layer one device. They simply take a signal in one port, send it out all other ports. So let me go in and populate these tables. We’ll talk a little bit more about them and then we’ll take a look at actually transferring date in relation to the OSImodel. So let me know populate these tables.
Here are the tables filled out. Here is the forwarding table for the switch. How it gets filled out, let’s say Computer A right here, when it sends something and it enters in port 1 on the switch, this is port 1, port 2, port 3, it enters in on port 1 on the switch, the switch looks a the header and looks at the source MACaddress and it goes, “Oh computer with a MACaddress of 9B, that packet came in on port 1 and that’s where the source is 9B, so that means if I have to send something to 9B, I better send it out on port 1.” Computer B communicates with the switch, sends something, not the switch maybe to computer A. Again, switch looks at the source MACaddress of C4 and goes, “Oh if you’re source MACaddress is C4, you came in on port 2. That must mean if I want to send something to you, I would go out of port 2.” If the forwarding table is not populated and computer A sent something, what would happen is the switch would look at the destination MACaddress. So let’s say the source MACaddress was 9B, destination MACaddress was C4, so computer A is sending something to computer B. Checks the source MACaddress 9B, puts it in the forwarding table then looks at the destination MACaddress and if it’s not in the forwarding table, the switch will flood the data out all other ports. So computer B and the router’s Ethernet interface would receive the packet except the router’s Ethernet interface wouldn’t open it because it would say, “Hey C4, that’s not me. I’m going to toss that in the junk mail.”
The routing tables, they need to be able to populate so the router can make a forwarding decision or a routing decision. If computer A is sending something to the server over here, the FTP server, the routing tables need to be populated and, if you look at the routing table, it shows the source or any destination subnet, not a source subnet, any destination subnet, 126.96.36.199. The router automatically knows about 20.32 subnet and then it’s attached to the Ethernet interface and the reason it knows that subnet is there is because we’ve configured an IP address of 188.8.131.52 on Ethernet 0 with the 255.224 subnet mask, the router does the math and goes, “Oh that’s subnet 20.32. Let me put that in my routing table.” Same thing with the .64 subnet. However, the router is not directly connected to the 20.96 subnet so what happened was router 2 over here sent his routing table to router 1. Router 1 look at it and goes, “Oh I’ve got 64, I don't need that from you. I’ve got 32 I don't need that from you. I don't have 96. That’s interesting to me. What’s your cost?” This router has a cost of 0, router 2 has a cost of 0 to get to the 96 subnet because it’s directly connected. So he goes, “Oh your cost is 0,” if we’re using routing information protocol which is a standard easy to use routing protocol, he goes, “Okay your cost is 0, I am going to add 1 to that. My cost will be 1 to get to subnet 184.108.40.206 and I will send it out of my serial 0 interface.” So that is how the routers populate these routing tables. They first take their directly connected routes with cost of 0 and put them in their routing table then pass the information along. The receiving routers add costs to the originating routers cost. So they figure out what their new cost will be since they have to send it to somebody else. So eventually the routing tables and the forwarding tables will need to be populated, then communication can take place smoothly. So let me clean this up again and we’ll watch what happens when computer A sends something to the FTP server over here.
Okay, you need to know this for the CCNA exam and I’ve brought up the OSImodel. The seven layers and I’ve put them above every device so we can see what is going to happen as computer A sends something to this FTP server over here. So, let’s take a look at this. I am going to break these models down and we’re going to use an FTP client application to upload a picture from computer A to the FTP server. So the first thing that is going to happen is the FTP protocol is assisted or make sure that there is a client application. I used to use Cute FTP all the time. So Cute FTP could be the client. We’re sending a JPEG, whatever we’re sending is going to be in some sort of format. It doesn’t necessarily have to be formatted on the fly and FTP will make sure we establish a session of communication with the destination. We type in user name and password, all that and then log on to the server. Select our JPEG and then we hit upload. Now, what happens is our picture gets broken up into a bunch of smaller pieces called segments. This is TCP, works with FTP. So TCPwould be doing this and what it is going to do is it’s going to break our picture up into smaller pieces called segments.
Each segment would need to get its own header information. Now a part of that information is going to be the port number, the application that it came from. The other information will be how do we put it back together since we broke it apart here. TCPhas to put the information in the header and how to put it back together; this is part one, this is part two. It puts sequencing information on there like 1 of 1, 2 of, or 1 of 2, 2 of 2 so if the receiving machine only gets 1 of 2 and doesn’t get 2 of 2, it knows to ask for 2 of 2. So it puts all that information on there and passes it down to the next layer. So each segment gets additional information on layer 3 and the additional information it gets is IP information. Let me clean up the slide and we’ll look at the IP data that goes on. So I’ve cleaned up the slide and again we’re using the FTP so in the TCPheader, the source and destination port numbers get put on, as well as the sequencing, error handling, all that stuff and then when it’s done, it sends the packet down to layer three.
At layer three, the first thing that gets put on is the protocol number saying, “Hey TCPwas used to package the information up to this point.” So the TCPwould be in there. Next thing that gets put on is the source destination IP. There are a few other things that get put on in the IP header, but this is the main stuff we’re worried about just so we can see what’s happening. So the protocol number says, “Hey TCPwas used, back here is all the TCPstuff,” which has source and destination port numbers, for the application, sequencing, all that stuff. Then you get the TCPinformation put on. Here’s our data and source destination IPs. So source IP would be 220.127.116.11, destination IP would be 18.104.22.168 so it puts source and destination IP addresses in there. Once it’s done with all the IP information, sends it down to the next layer. Again, I am going to clean up the CCNA slide and we’ll look at layer two.
You remember from your CCNA studies that layer two is where the packet gets fully framed. After the IP information has been put on, it’s called a packet. Now, this packet gets fully framed. Gets the trailer which has a cyclical redundancy check on it, all that stuff and a header. Now the first part of the header is this LLC portion right here that specifies the service access point and tells the receiving computer IP was used. That’s this number right here. So there is a port number saying what source and destination application, a protocol number specifying the layer four protocol to use and a serve access point or type field specifying the layer three protocol to use. This is very important when you get to the receiving machine so it knows what set of rules to use to open the information appropriately. After the LLC information gets put on there like saying, “Hey IP was used,” source and destination MACaddresses get put on. Now this is very important. So let me clean up the CCNA slide again and we’re going to look closely at this source and destination MACaddress. I’ve cleaned it up again and I’ve made it, I started typing everything out because my handwriting is not the best. So we’ve got FTP going here, TCP, IP, that’s called a segment at layer four, because it’s broken up. A packet of layer three, once it gets the IP information on there and a frame once it gets the trailer and the header, it’s fully encapsulated and it’s called a frame and here would be all of our data.
Now this last part of the header, the media access control portion of the header; LLC remember specifies this little service access point telling the receiving machine what protocol to use. The source and destination MACaddress needs to be put on at this point right here. Now this is important. Source MACaddress is 9B. It’s coming from computer A with a MACaddress of 9B. The destination MACaddress, a lot of times people want to say 7D, as the destination MACaddress, but that’s not what it’s going to be. The destination MACaddress is going to be MACaddress B3 – the gateway. How do we resolve MACaddresses? When our computer wants to get the MACaddress of a destination he sends out a broadcast message. A broadcast message will not pass through the router. So what happens when a computer recognizes that a destination IP address such as 22.214.171.124 is not in the same subnet as 126.96.36.199, he sends out an arp request but not for the destination machine. He sends out an arp request for his default gateway address. So it’s very important that you have the appropriate default gateway configured on computer A. The default gateway address should be 188.8.131.52. That’s the difference between getting routed across the network here or local communication. If he was just communicating with computer B, with a MACaddress of C4, the arp request would go out to computer B and not requesting the MACaddress of the default gateway. So very important.
So it gets the gateway’s MACaddress and sends this frame out and it’s called a frame now, in bits, across the wire. It goes in, hits the switch. The switch looks at the source MACaddress 9B and goes, “Okay, that’s still associated with port 1. It came in on port 1, that’s good. Let me look at the destination MACaddress. Oh, okay, that’s B3. It needs to go out of port 3 here.” So if you notice, the only information the switch reads is information at layer two. It receives the bits at layer one and receives and looks at the data at layer two. So a switch is considered a layer two device because it reads layer two information – source and destination MACaddresses. It does not get into the IP addressing or anything like that. It doesn’t care about the IP addressing. It’s just looking at the source and destination MACaddress at layer two. There are multi-layer switches that will read layer three addresses and stuff, but a standard switching function is a layer two function because it reads a source and destination MACaddress. So it hits the switch, goes up to layer two of the OSImodel and then the switch takes it back down to layer one and sends it out of the appropriate port in bits.
Let’s take a look at what happens when it hits the router. Again, I will clean up the CCNA slide. So as this information package hits the router, the router receives the package with bits, at layer one, and then looks at the layer two information. So here’s the layer two information and it looks at the source MACaddress 9B, destination MACaddress B3 and goes, “Oh that’s me.” What do you with a package with your name on it? You check it out. So he strips off the layer two information and looks at the layer three packet and what’s he looking at? He’s looking at IP addresses and he says, “Oh source IP 20” let me write this big, “184.108.40.206 is the source IP” and again he’s reading it out of the packet here. Destination IP is 220.127.116.11. Checks out to see if there’s any access slips or anything like that, security things saying, “Hey I can't do this” and then he goes, “Okay this is the destination IP, let me check that out.” Let me compare that to the subnet mask and find out what the destination subnet is. He goes, “Oh that’s 18.104.22.168. Let me check my routing tables.” So he checks his routing table. He goes, “Oh I do have an entry for 22.214.171.124.” That subnet is one hop away and he needs to send it out of serial 0 to get there.
So he takes the layer three packet that has been stripped off of all the layer two data and sends it back down the OSImodel. So he re-packages it so at layer two he puts on the necessary layer two information to go across a WAN link; instead of following Ethernet set of rules, he might be following the PPPset of rules. So he re-packages it at layer two and sends it out at layer one in the form of bits electrical pulses. Goes in, hits the next router. Again, I’ll clean up the slide and we’ll take a look at what happens at this router number 2 over here.
Router two here receives that package in bits at layer one, goes up to layer two, checks out all the PPPinformation on there and strips it off so he can see the layer three packet. And again, what is he looking at? He’s looking at the source and destination IP information. Source IP 20.32.01, destination IP 20, I’m sorry, 126.96.36.199 was the source; destination 188.8.131.52 and again he compares this IP to the subnet mask and goes, “Okay let me check to see if I have an entry in my routing table for subnet 20.96.00.” And he goes, “Oh I do. Cool it’s directly attached to me on Ethernet 0 and it has got a cost of 0 so I need to repackage it at Ethernet 0 on the way out.” So here is the IP packet. He sends it back down to layer two again. Puts the layer two information back on. Says, “Hey, service access point LLC, IP was used.” Puts the trailer back on there and then the header he puts the source and destination MACaddress. What’s the source MACaddress this time? It’s coming from the router so the source MACaddress is A2. Destination MACaddress is in the same subnet so if he does not have the server’s, the FTP server’s MACaddress, he’ll do an arp request and says, “Hey, computer with an IP of 184.108.40.206, I need your MACaddress. I am trying to send you something.” Sends his MACaddress over and goes, “Okay, destination MACaddress is 7D.” He has repackaged it at layer two and then he goes ahead and sends it out, the Ethernet 0 interface in bits at layer one.
So very important to realize that the routers are stripping off layer two frames and forwarding the packet based on layer three IP addresses. So the router is considered a layer three device while a switch is considered a layer two device. Once this information hits the hub, what does the hub do? The hub doesn’t read any addressing. The hub simply takes the packet, the electrical pulses of bits, and sends them out all other interfaces. So the switch will send the bits out of this interface to the other hub, out of this interface to the server and this hub will send it out of this interface to this computer. This computer looks at the destination frame and goes, “Oh that’s not my MACaddress.” And then the server sees his MACaddress. He receives the bits, looks at the source and destination MAC, source MACA2, destination 7D. He goes, “Oh that’s for me.” What do you do when you get a package with your name on it? He starts stripping that information off. Let me clean up this CCNA slide and we’ll look exactly what the server does when he receives the package.
So I have cleaned up the CCNA slide. I’ve done a little drawing here. Obviously not my hand. As the server receives the information, the first thing he is looking at is part of this MACsub layer of layer two here. Here is the MACsub layer and then the LLC sub layer of the data link layer and he’s looking for his MACaddress 7D. “Oh that’s me, okay.” Starts stripping off the layer two data and gets ready to move it up the OSImodel to layer three. Now in this package here, at the LLC portion, of the data link layer, there’s that type field. This type field tells the computer whether to forward it to IP or to IPX. So it’s an indicator as to what layer three protocol to use to open the package further. If it’s an IP package and he uses IPX, it’s not going to work. Again, devices or computers aren’t capable of only one supporting one layer three protocol. They can support IP, IPX, there’s Net Buoy; other types of protocols there. So he needs to know which one to use. That’s what the LLC does and says, “Hey, use IP to open up further because inside is an IP package.” So he strips everything off, moves it up, checks out the IP packet. Checks source and destination IPs and goes, “.99, oh that’s me.” And then before he moves it up to layer four, as he strips off the layer three stuff, he needs to know, since it’s IP, whether to use TCPor UDP at layer four. Very important, there are multiple layer four protocols for him to use, in association with IP. So he needs to know TCPor UDP. That’s where this protocol number comes in handy. Again, that’s part of the IP packet, the last part right there, that protocol number, and then says, “Hey use TCP.” That’s the last thing stripped away before he sends it up to layer four of the OSImodel.
With TCP, he noticed he has package 1 of 2, that’s FTP right there. He knows he has package 1 of 2 so when he gets 2 of 2, looks within the instructions how to put them back together. As he strips off the TCPinformation and puts the package back together, he needs to know what application layer protocol to send it to and that’s where this destination port number comes in handy. The computer looks at the destination port and goes, “Oh that’s got to go out of my FTP program so let me forward it to FTP.” So that way, the receiving computer knows what protocol path basically to use to open up this information. Puts it in the FTP program, FTP takes the JPEG, puts it in the FTP root and then you could go in and open up your picture. So very important are these service access points, protocol numbers and port numbers. This is actually what our firewalls, access lists things scan for because that’s the indicator as to what type of package it is. So very important is this OSImodel and understanding the flow of data for your CCNA lab and exam.
Let's do a recap of what we have gone over. We’ve gone in and talked about the basic CCNA networking fundamentals. We went over the purpose of the OSI, the seven layers. We did a little preview of IP subnetting you will see on the CCNA exam and what that does for us. We went over basic network communication, what we need, the addresses we need and we actually followed a packet from source to destination and looked at the devices in what layer of the OSImodel they refer too, like a switch is a layer two device because it reads layer two addressing. A router is considered layer three because it reads layer three addressing. A hub is considered layer one because it doesn’t read any addressing at all. It just takes that electrical signal and forwards it out of multiple other ports.
I hope you have enjoyed this CertificationKits CCNA training video on networking fundamentals.