CompTIA Network+ N10-008 – Routing

  1. Routing Fundamentals

Routing fundamentals. We’ve covered a lot of information up to this point in the course, but we really haven’t left the local area network. And that’s where routers are going to really start coming into play when we start talking about connecting to dissimilar networks or an internal network and an external network. Now, when we talk about routing fundamentals, the first thing you have to understand is the function of a router, and its function is to route traffic, which I know sounds kind of silly, but essentially it’s going to push traffic in one direction or the other between different subnets or external networks. Now each subnet or external network is going to have its own broadcast domain because, if you remember, earlier on we talked about the fact that routers separate broadcast domains, unlike switches, which maintain one broadcast domain for everything that’s touching that switch. Now routers are layer-3 devices, and they separate those broadcast domains, but you can also use layer-3 switches or multilayer switches to perform that function. Throughout this lesson and this entire section, we are going to refer to this as a router.

So even if you’re using a multilayer switch or a three-layer switch, when you’re using it as a router, we’re going to call it a router. Now, how does the basic routing process work? Well, let’s consider this diagram here. I have two networks, one on the left side of the screen and one on the right side of the screen. PC One is connected to our left network, and PC Two is connected to our right network. In between those two routers, we have a serial connection or a wide area network connection. We’re not going to focus too much on that right now, except to know that those two routers can communicate with each other over that connection. We’ll talk about the different types of wide-area network connections in a separate section. Now, if I’m sitting on PC One and I want to send a message to PC Two, I can’t just send it out through ARP like I used to. If you remember back in switching, we talked about how PC One would send an ARP packet, and that would go to the switch. And if it didn’t know where to deliver it, it would send it to every single port in the world based on that Mac address. Now, it can still do that, but what’s going to happen is that the ARP request is going to go up to the router, and the router is going to respond, and it’s going to then send the data frame from PC One through the switch to the router. At this point, we must abandon Mac addresses because Mac addresses are only used internally within the network.

As soon as we go to a router, we now have to use IP addresses or logical addressing, and that’s where we’re making that layer two to layer three transition. So at this point, PC One has determined the Mac address of the router that it wants to talk to as its default gateway and sent the packet there. Now, the router, the left router in this case, wants to send the information on to PC Two because that’s what it’s told to do. To do that, it’s going to pass the information over to the second router on the right. And router one is going to get the data frame from PC one and repackage it with an IP header. It’s now on layer three. It’s going to push that data frame over its default connection on the Wan, which is going across that serial connection, and it’s going to get to Router 2. Once it gets to Router 2, it’s going to strip off that header and bring it back down to the Layer 2 data frame, and it’s going to start using the Mac addresses that it knows. And in this case, it’s going to call out for PC Two. The switch is going to take the information and push it from Router 2 down to PC 2 and reverse the process. So we started out with a layer-two piece of information from PC One.

When it got to Router 1, it got packaged in Layer 3 to cross the wide area network. When it gets to router 2, it strips it back down to layer 2 and uses Misaddresses to deliver it to PC 2. And that’s how routing works in a nutshell. Now we’re going to talk about all the different protocols, static and dynamic routing, and all the other things. However, at its most fundamental level, routing is very similar to switching. The only difference is we’re doing it with IP addresses instead of Mac addresses.

  1. Routing Tables

Routing tables. Now, how does a router make its decisions? It uses a routing table. Similarly to how our switches use their Misaddress tables or Cam tables, We’re going to use routing tables to decide where packets go in our networks. Now, these routing decisions are going from layer three to layer two. Mapping the router will use an ARP cache to map an IP address to a specific Mac address within its local area network. Now, each packet forwarding decision is going to be based on its internal routing tables. And those internal routing tables are really focused on the logical address side of things, or the IP address. Now let’s dig a little bit deeper into these routing tables. These tables are kept by the router, and they help it determine which route is the best fit for it when trying to route traffic for the network. A route entry has a prefix, and the longer the prefix, the more specific the network. So if we look down here at this chart, I have three different networks showing up.

There is a address. I have and 134.7.0 .0. Which one of these would be the longest prefix? Well, it’s the bottom two. Those are the more specific ones because they have the first two octets specified, whereas the first one, the 125 address, only has one octet specified. As a result, it is the least specific. Now, if I’m dealing with ten1124, that is much more specific because there are only 256 possible IPS as opposed to 100zero eight, which has 16 million IPS. And so you can see that the longer the prefix or the higher the cider notation, the more specific that route will become. Now, these routes in the table are going to tell them what the destination network is and which router it should go to to get to that network. It’ll also tell it which port on the router to send the traffic out and the cost of that route, which, like switching, will be dependent upon link speeds and other factors. We’ll talk about that specifically in another lecture.

Now, what are the sources of routing information? Well, there are really three different sources that routers use. The first is what’s called a “directly connected route,” which is learned through a physical connection between routers. So in the example below, router Two knows where router One and router Three are because it has direct cabling between them, as shown by those zigzag lines or that lightning bolt line, which is how we denote that it is a serial connection. Then there are static routes, which are routes that are manually configured by an administrator. So, for example, Router One knows how to get to Router Two because it’s directly connected, but it doesn’t know how to get to Router three yet.

Now, for me to tell it how to get to Router 3, I can put a routing in the routing table that says every time you want to send something from Router 1 to Router 3, go through Router 2. That would be a static route. Now there is a default static route, which is a special one called zero. Basically, this says to the router, “If I don’t know where to go, go there.” So with router one, for instance, it might have a default route of 0 0 0 that says go to router two if you don’t know how to get somewhere. Throughout that traffic, it becomes router2’s problem. Now the third way we do this is by using dynamic routing protocols, which are learned by exchanging information between routers. So instead of me having to go into router one and tell it where router three is, I can let router two do it. So when router one and router two are directly connected, they share their routing tables. And so router one will say, “Hey, number two, who do you know how to talk to?” And router two will say, “Oh, I’m also connected to router three.” So anytime you have something for him, just send it to me, and I’ll pass it on. And they can do this all by themselves. Now this is great, especially for large networks. For example, think about if I took your router home and had to put down every single route for you to find every website you wanted to visit on the internet. You would not be able to do it. So instead, they use dynamic routing to accomplish this. And we only use static routes for very specific cases where we want traffic to be routed a certain way.

Now let’s dig a little bit deeper into each of these three types. When we look at a directly connected route, it’s going to look something like what you see here on the screen. As you can see, router one and router two are directly connected by that zigzag line or that serial connection. These routers both know how to get to the other switches through each other because they’re directly connected. And so if I look at router one’s table, it says I’m connected to 100 100:24, which is the network that it owns on switch one. It is also connected to the router because that is the serial connection between the two routers. Take note that router one has no idea how to connect to the 1020 network, which is on switch to. And router two has no information on that because it only knows things that are directly cabled to it. Now if we go further into static routing, I can write down that there is a default route, or zero zero for router one. And that tells it that anytime you don’t know an IP address, send it out port serial one, which will push it over to router two.

So, in this case, if PC 1 tried to connect to PC 2, it would get as far as router 1, and router 1 would go; I’m not sure how to get to 1022, but maybe router 2 does and will forward it to them. That’s how this manual configuration with a static route works. Now let’s look at a dynamic routing protocol. Now dynamic routing protocols can have more than one route for an existing network. So if I have a more complex network diagram, like these five routers below, if I wanted to go from one to five, I could go 12345 and really just start zigzagging all over the network. Or I might go one, two, four, or five. Or I might go one, three, four, or five. There are numerous paths we can take because there are so many options available. How do I know which one is the best? Well, the dynamic routing is going to negotiate that for us based on the number of hops, which is the hop count or the number of routers, the link bandwidth, which ones are fastest or slowest, and other criteria. And all of these dynamic routers can support different protocols with different criteria depending on how we configure them.

Now we’re going to spend an entire lesson on the different types of dynamic routing protocols so we can dig into them and really understand them because you are going to get questions on them on test day. Now, the last thing I want to talk about in this lesson is preventing routing loops. Just like we had an issue with switches where you could get loops and broadcast storms, you can get issues with routing if things start going in a circular manner, and things will just get lost in space. So to prevent that, we have two techniques. We have a poison reverse and a split horizon. With Split Horizon, this will prevent a route learned on one interface from being advertised on the same interface. So in the example below, router one knows how to get to router two because of a direct connection between the two. Now it’s not going to go until router two gets to router two based on that same connection because it’s going in and out of that same interface. This is essentially what STP did for us when we switched networks. Now we can do it inside of routing. Poison Reverse will cause a route received on one interface to be advertised back out that same interface, but at an exorbitant cost that no one will want to use.

So these are just two different techniques to stop the routing loops. One is that I’m just not going to repeat it; the other is that I’m going to repeat it but tell you that it’s so expensive that you’ll never want to use it. Now let’s dig a little deeper into these routing loops with an example. Here is a network that has no issues. I have three routers. There are routers 1, 2, and 3, and you can see the different networks based on their IPS and their routing tables. Here we’re going to look specifically at the routing tables for Router 2 and Router 3 for this example. Now if I started having an issue, like for instance, the network connection from Router Three to the Ten One 40 network went off Ethernet One, what’s going to happen? Well, Router Two still thinks it can get to that network because it says I can get there through Serial Port One or my connection to Router Three. So when Router Three goes down, it says, “I don’t know how to get there anymore.” And it uses the dynamic protocol to ask friends. So it says Router 2, do you know how to get to that network?

And what happens is that Router Two says, “Oh yes, I know how to get to that network.” It’s just one hop. I go through Router Three. And then Router 3 goes, “Oh, good.” That means I now know how to get there because I can get there through Router 2. And it increases by one, and it keeps going back and forth until it starts getting to be such a high number that neither of those routers can ever get to that area. That is the idea of what a Poison Reverse would do, which is to immediately go ahead and advertise that this network is down. But if you don’t use Poison Reverse or Split Horizon, this can start eating up resources on your network and causing these routing loops because two are sending the packet to three and three are sending the packet back to two, and they just keep going until they can find another way. If there is no other way to get to that network, it’s just going to keep going in.

  1. Routing Protocols

Routing protocols. In the last lesson, we talked about dynamic routing protocols. In this lesson, we’re going to cover each and every one of them that you need to know for the Network+ exam. Now, there are two types of dynamic routing protocols. There are internal ones and external ones. Interior ones, like interior gateway protocols, operate within a network or an autonomous system. External gateway protocols will operate between autonomous systems on those exterior networks. So, for example, the Internet is a very large exterior system, so it’s going to use exterior gateway protocols. Your networks inside your intranet, even if you have multiple routers and switches, are going to operate using an interior gateway protocol. Now we’re going to go through some examples of both of those types of protocols in this lesson. First, let’s talk about the router advertisement method. This is a characteristic of a routing protocol. Every dynamic protocol looks at routing just a little bit differently. Some of them are what we call distance vectors, while others are link states, and some of them don’t fit neatly into either category and become a hybrid of both.

Now what this means is, how is the route going to be received, advertised, and provided to somebody else? What is your measurement of cost? Maybe it’s a distance vector—how many routers I have to go through, for example. Or it can be a link-state vector. And this is where you’re most concerned with speed. What is the quickest method of getting there? So maybe I have to go through four routers to get there, but it’s quicker than just going through one router. When we look at link state, we look at it in this manner. Let’s talk about these as we go through this lesson; it’ll make a little bit more sense. So a distance vector is going to send a full copy of its routing table to everyone it’s directly connected to at regular intervals. Now the bad thing about this is that it has a slow convergence time. Now what’s convergence? Well, convergence is the time it takes for all of the routers to update their routing tables in response to a topology change. So in the example here, I have three routers: routers one, two, and three. If I add a fourth router, it’s going to take some time for router four to tell the other three routers who it is and where it is. That is the convergence time. Once everybody has all of the same information across all four routers, you have a converged network. Now, one of the ways that we can speed up our convergence time is actually to use a hold-down timer. So instead of updating our routing tables every 30 seconds, we might update them every three minutes. Now by doing that, it’s going to allow us to converge faster because there are fewer changes. It takes longer for changes to converge when there are more of them. Now, when we deal with a distance vector, it’s really concerned with hop count, which is how many times I have to go through a router to get somewhere. So in my example below, what’s the quickest way to get from Router Three to Router Two? Well, if you’re only concerned with hops, or the number of routers you go through, you’re going to go directly from three to two over that slow 1 Mbps link. But if you’re concerned with a Link State vector, you’re going to be concerned with the fastest way to get there, which would actually be going across those 100-megabit connections. So going from Router Three to Router One to Router Two would actually be faster in most networks. However, a distance vector does not take this into account. It only looks at the number of hops or the number of times you touched a router.

So it would take the route from router three to router two. Now, when we deal with link states, we start worrying about cost and speed. This is going to require all routers to know about the past of all the other routers that they can reach in the network. And this information is flooded throughout the Link state domain when you’re using OSPF, which is one of our routing protocols, or ISIS, which is another routing protocol, to ensure the routers have synchronized information in their tables so they can make the best routing decisions. We’re going to talk specifically about those two protocols in a little while here. Now, the link state does have a faster convergence time than distance vectors, and it uses that cost and other factors as metrics, including link speed. Each router constructs its own relative shortest path based on where it sees itself logically, and then it calculates the distance to get to the other place. So, for example, if you’re sitting in Florida and I’m sitting in Washington, and we both want to get to California, we’re going to have a different method of getting there based on where we sit in the topology of the United States road system.

And so we’re going to figure out, based on the highway speeds or the slowness of those speeds, how many states and which highways we’re going to go through. I may go 100 miles, but I can travel 60. You may only have to travel 30 miles, but you can only travel at a speed of 2 miles per hour. Well, who’s going to get there first? I will, because I’m going over faster paths. And that’s what Link State starts taking into account as we start figuring out the best way to get around. Now, the first protocol I want to tell you about is Rip IP, and this is one of the oldest routing protocols. It is a routing information protocol, and it is an internal gateway protocol used within your networks. It is a distance vector protocol, and it uses hop count. So it’s all about how many routers I’m going through; the maximum number of hops you can hit is 15. If you hit 16 or more routers, the connection is considered dead, and it drops the packet. It is the oldest dynamic routing protocol out there and provides updates every 30 seconds. And so it’s really hard to maintain convergence with a RIP network. It is easy to configure, and it runs over the UDP protocol, or user datagram protocol, to send out those routing updates.

The next one we have is open. Shortest path first or OSPF Now, OSPF is another interior gateway protocol, but unlike RIP, it uses cost because it is a link-state protocol, and so it is much more efficient. So going back to our example of routers 1, 2, and 3, what’s the shortest path to get from three to two? It’s actually going through one, because the speed is faster going across those 100 megabit per second links than it is going over that 10 megabit per second link. The cost is determined by the link speed rather than the number of hops. Next, we have the intermediate system to intermediate system protocol, or ISIS. This is another interior gateway protocol that functions a lot like OSPF. Again, it is going to use cost as its link state measurement, and this cost is based on the link speed between two routers. It functions much like OSPF, but OSPF is still dominant in the marketplace and used widely, whereas ISIS didn’t really see widespread adoption. The next one we have is EIGRP, or Enhanced Interior Gateway Routing Protocol, which, as you can guess from its name, is an interior gateway protocol. This is an advanced distance vector protocol that uses bandwidth and delay to make it a hybrid of distance and link state. So it does count the delay, which is how many hops, but it also counts the cost of the speed of the links, which is link state. This hybrid protocol was developed by Cisco as an upgrade to OSPF, and it’s popular if you’re using a Cisco-only network, but because it’s proprietary, you’re not really going to see it a lot if you’re using a Juniper or a Brocade network.

And so it really has not gotten the wide acceptance that OSPF has because OSPF allows it to be used on any network. Now, the last protocol we’re going to talk about here is what we call BGP, or border gateway protocol, and this one is an external gateway protocol. So on the exam, if you’re asked which of these is an exterior gateway protocol, the only answer you should be looking for is BGP. All the other protocols we talked about are interior protocols. Now, this gateway protocol is going to use a path vector to use a number of the autonomous system hops it uses instead of router hops. So I’m not concerned with how many routers go through, but I’m more concerned with how many systems I go through. And again, this makes sense when you think about the fact that BGP is the backbone of the Internet, which is made up of tones of autonomous systems. This has widespread utilization, and it is used all across the Internet. It’s what makes the Internet run. The big problem with this is that it does not converge quickly because of the large scale of these networks. So when you add a new router or system to the Internet, it can take an hour or two before it starts getting populated, or even more across the entire network.

Now, when we talk about these routers, we have all these different routes, and we have to think, “What is the believability of the route?” Now, what does that really mean? Well, if I have a network that’s using more than one routing protocol because my routers can support multiple protocols, I might have RIP and I might have OSPF, both being used in the same network. How do I know which one to go with when I’m a packet and the router needs to move me around? Well, these routing protocols are going to be considered more or less credible based on some different factors. For example, Rip is less believable than OSPF, right? And some routers will use an index of believability, which we call an ad or administrative distance. If the route has a lower administrative distance, it’s more believable. It’s better to be lower. It’s like golf rules. So here’s a chart for you that has the administrative distances of the protocols we talked about. If it is a directly connected network, it is the most credible. And that kind of makes sense, right? If I know you personally, then we are connected together. That would be a zero. It is fully trusted. I know you are who you say you are, but if you’re just somebody I heard about from somebody else, I’m not so sure I believe you.

Now, a statically configured network has one that is the next most believable. Now, why is that? Well, because routers do what they’re told. And if you, as the system administrator, told them to use a static route, it’s always going to use that static route, unless it itself has a directly connected route. Beyond that, it’s going to believe EIGRP, it’s going to believe OSPF, Rip, external EIGRP, and then there’s the highest, which is the unknown or unbelievable, which means I can’t find this network anymore. So I change my administrative distance to 255, so I don’t route any traffic that way. Now, for the exam, do you have to memorise these numbers? No. But you do need to realize that directly connected is most believable, followed by static, then by things like EIGRP, OSPF, and Rip. And if you think about the fact that RIP was one of the earliest protocols, it is also one of the least believable. And OSPF was an improvement to that, and EIGRP was an improvement on OSPF. So you can kind of use that as a pneumonic or a memory aid to help you remember which ones are most credible. Lastly, we have the metrics of these routes, and when we look at the metrics of these routes, this is when a routing protocol will be able to choose which path it’s going to go on. And we’ve already mentioned some of these metrics, like hop count, things like bandwidth, reliability, delay, cost, or other metrics. Each protocol uses a different metric to determine which route should be used and which one is faster or slower. And so again, depending on which route it is, we’ll determine which metric you’re going to use.

So when we’re dealing with metrics, it’s always going to be lower numbers that are better when we deal with routing. So if we’re talking about hop count, going through the fewest number of routers is better. It’s quicker. If we’re dealing with cost, the lowest cost is what we use for the highest bandwidth, and so a lower cost is better. If we’re dealing with delays, lower delays are better than higher delays. Believability that is directly connected has a zero rating for administrative distance, so therefore it’s the best, whereas an unbelievable route has a high rating of 255. And so you can see this trend: the lower the number in the metrics for routing, the better it is. Lastly, I want to give you this summary slide, and this is the one that I would kind of put in your notes so you can remember all of the routing protocols. This nicely summarizes everything from Rip, OSPF, EIGRP, ISIS, and BGP. It shows you which ones are interior and which ones are exterior, which ones are distance vectors, and which ones are link states. So I hope this helps you as you go and study your different routes.

  1. Address Translation (NAT and PAT)

Nat and Pat’s “address” translation: Now, we talked about with IPV 4 that we were running out of IP addresses and that this was becoming a big problem, and IPV 6 honestly wasn’t ready yet. So they developed something called “Address Translation” to help us with this problem. Now, network address translation is a way for us to conserve the limited number of IPv4 addresses. For example, if I went to your house right now, how many devices do you have on your network? Well, you might have five, or ten, or 15. There are four of us in my house, and we each have a smartphone, a tablet, and a laptop. So right there, we already have twelve devices. And then you start adding things like smart thermostats, file servers, and desktop computers, and we can really quickly get to ten or 20 devices for just one household. But we only have one public IP address.

And so, how do we all get on the Internet? Well, that’s where Nat comes into play. Nat is going to allow you to translate your private IP address into a public IP address for routing over public networks. Now, there’s another variation called Pat that we’re going to talk about in this lecture as well, which stands for Port Address Translation. And it’s a variant of this address translation in which, instead of using an IP address to IPad dress translation, we’ll use an IPad dress to a port number translation. And with your home network in mind, that’s actually what we’re using. We’ll talk about both of those as we go through this lecture. Now, when we talk about the different types of address translation, we have three big ones. We have DNA, Snit, and Pat. Let’s go through them one by one. We have dynamic Nat beginning with DNA. Dynamic Nat is going to take an IP address and automatically assign it from a pool of IP addresses. And this gives us a one-to-one translation.

Now, why would we use Dynamic Net? Well, if you remember, I talked about the fact that public IP addresses cost money. And so maybe you only wanted to pay for five addresses in your business, but you have 20 workstations. Well, the way Dynamic Net would work is when you wanted to get online, your computer would go to the router, borrow one of those five IP addresses, and it would do a translation from your private IP scope. where you don’t have to pay for IP addresses to the public. It is used to make the request and then returned to the router. And this was a method of maximizing your public IP space for the greatest number of internal clients. Now, it did this all dynamically, and you didn’t even have to worry about it. It just did it like DHCP does, but frogman internal scope to an external scope and Justin a quick microsecond and then give it back. Now, when we’re dealing with static Nat, This was a static assignment where I would manually assign a private IP to a public IP. And again, I would need a one-to-one translation here.

So in this case, if I had five public iPad addresses, I would also have five private ones, and I couldn’t multi-share them the way I could with Dynamic Net because somebody had to physically do the assigning. Now, why would we do this? It really was just a security feature. It was a way to have those public IPS not be shown directly to what client they were actually tied to, and it just hid that behind the router. Now, the third way and the most common one that we use today is what’s called “pa” or “port” address translation. This is where you have multiple private IP addresses sharing only one public address. So again, in my house, we’ve got 15 or 20 different network devices, but we only have one public IP. And so this is a many to one translation. I’m not required to do a one-to-one translation as I did with Dynamic Nat or static net. This is very common in small networks, small offices, home offices, and other small business networks. Now we’re going to show you how each of these works using a diagram in just a second. But before we do that, I want to talk about the different names of Nat IP addresses because they have specific names that you need to memorise for the exam. There’s the inside local, the inside global, the outside local, and the outside global. Your private IP address now refers to an inside device for your inside local.

Your public IP address or global IP address is referencing an inside device for your inside global. Your private IP address is referencing an outside or global device for outside local. And your outside global will have a public IP address that refers to the outside device. Again, being public Anytime you see the word “global,” think “public.” Anytime you see local, think private, and you’ll be able to answer these types of questions. Let me show you what this looks like on a diagram. So here I am with Nat. Now, where are each of these things? Well, if I’m dealing with my inside local, that’s a private IP address referencing an inside device. So which one is the private IP address referencing an inside device? Well, that might be something like 1001101, which would be a PC one. That is an inside local address. Now it is going to reference an internal global address, which is the router. That would be 78 145 in our case. It’s inside because it’s my network, and it’s global because it’s public. Now, as far as the outside local, that’s our private IP address that refers to an outside device. So for us, that would be the inside of the router, because that is our outside device.

It’s our boundary device. Now, if I wanted to discuss something other than global, That is my public IP address referencing an outside device. That would be server 667558-124. Now, for us to be able to get information from our 100, 1101 or PC and send it to the server, all four of these must work together. I’d like to initiate communication. So how does that work? So, take a look at this diagram, where I have PCs 1 and 2 attempting to make a server request. PC One and PC Two both have private IP addresses that are not routable outside the network. As a result, when they send a request, the source is their private IP, 100 1101 or One and 102. It will enter the destination of the server they wish to reach. And so they’re going to send the request to their default gateway, which is this Nat-enabled router. When the router gets that, it’s going to keep track of the fact that 100/1101 was part of PC One and 102 was part of PC Two. And it will assign them one of the inside global addresses from its pool of public addresses. Now, in this case, that’s 78 145 101 and 78 145 102. It’s going to strip off the source, which was the private address put on this inside global address, which is publicly routed, and send the packet off to the server. When the request comes back to the router, it’s going to strip off that inside global address, put back on the inside local address, and send it back to PC One or PC Two, respectively.

That’s how Nat works. And this can be done either statically or dynamically based on those IP addresses that are sitting in reserve in that inside global pool. Now, when we deal with your network at home, you’re using PAT or port address translation. Most likely, most of us are. That means you only have one IP address on your router. So you can’t take one and give it directly to PC One or PC Two. So instead, it uses ports to keep those segments separated. So when PC One and PC Two make a request of the router, the router is going to send off the request from its source address and add a specific port number to keep track of those requests. When the request comes back from the server on that specific port, it then knows to forward that to either PC One or PC Two, respectively.

  1. Multicast Routing

Subnetting. Now that we’ve covered the fundamentals, let’s get into subletting. Subletting is the process of splitting up a large network into smaller networks. This is all about logical IP addressing the default glassful. Subnet mass are rarely the optimal choice for subnet size. Subnets can be modified using subnet subnet mass to create networks that are much better scoped. For example, if I gave you a ten something network as a class A Well, it’s a more efficient use of IP addresses than using the full default, because even in your home network, if you use a class C address of 192, 168, 100:24, that gives you 256 possibilities. But you probably only have five or ten devices on your network. This will allow us to create additional VLANs and subnets and allow separation of our networks for better security and giving us better bandwidth control. We use what’s known as the subnet mask. And we’ve previously discussed class A, B, and C default masks.

As you can see here on the screen in red, they are the 816 and slash 24. When you convert them to binary, you can see that they are all filled, each octave with either all ones or all zeros, making them class full. Now, the ones on the bottom of the screen from 25 down to slash 30 are actually smaller subnets Every network has a network ID and a broadcast ID. The network ID is the first Pith broadcast ID is the last IPad so no matter what network you choose, you’re always going to sacrifice the first and last as the network name and the broadcast. So whenever you calculate this number of usable IPS, it is always going to be the number minus two. Let’s look at glassful versus submitted networks. Well, I can borrow two bits from the host and create a subnet. So if I want to make this a 26, for instance, I’m going to borrow two host bits. So it now becomes two to the S or two to the second, which gives me four networks. Now, how many IPS can I have per each of those four networks? So, originally, I had 256 total. Now, I’m going to have two borrowed host bits, so I only have two to the sixth number of host bits left. That gives me 64 IPS per subnet. And remember, each of those I have to give away two: one for the broadcast and one for the network name.

So I only have 62 usable IPS for each of those four created subnets. Let me show you on a diagram here in blue at the bottom, you can see my original 256 possible IPS, which does include the broadcast and the network name. If I subnet that down, I am going to have four subnets or two to the second. And I am going to have 62 possible IPS used in each one because the first and last are always going to be the name of the network. In our case, 101-64-1128 or 1192. Now, if we want to calculate those IPS, we’ll use the mask. Again, we take 32, which is the total number of bits minus whatever our site or slash notation is. In this case, 26. So 32 – 26 equals six host bits remaining, which is two to the sixth minus two, which is 64 minus two, or 62 usable assignable IPS.

I’m hoping this is all starting to make sense. Subnetting is a very complex topic that Well, we’ve already kind of gone over this by saying that it was the zero, the 64, the 128, and the 192. But where did I come up with those? So zero is my first one. And each subnet was 64 IPS long’s zero, 64, 128, and 192.Now, what is the last IP of each one? That’s the broadcast. So all I have to do is add 63 to each of those numbers. So I become 6312-7191 and 255.And that’s going to be the beginning and end of each subnet, everything in between those. So for instance, one through 62, 65 through 126,129 through 190, and 193 through 254 are all usable hosts for servers, clients, tablets, laptops, and more. So when we do all of this, we can write all of these out and do 192, 168, one dot zero, 192, 168, one dot 1127.But if we did that for each of these four subnets, it gets to be rather long’s instead we have a shorthand notation called Cider classless inner domain routing. So instead of advertising multiple individual routes, wean summaries those all as a single route. And we do this through Cider notation.

Now, in the case of this slash 26, we would want to be able to consolidate all of those under one. And we can do that by summarizing these continuous networks using route aggregation. So when I do this slash 26, notice the first 26 bits are all equivalent. They’re all the same. And so by consolidating those, that allows met put all those networks together in one notation and just write them simply. Next, we have variable length subnet masking or VLSM. This allows subnets of various sizes to be used. So so far, everything I’ve done has been equal. I took a big chunk of 256 IPad I broke them into 464 bit chunks. So far, everything I have done has been equal. I took one big group of 256 IPS and broke it equally into four chunks of 64. But we don’t have to do that. We can actually break them up into 16 and 32 and 64as long as they all add back up to the total amount.

Now, this is going to require a routing protocol that supports it, but all modern protocols do, including Rip, OSPF, ISIS, EIGRP and BGP. Now, we haven’t talked much about routing protocols yet, but we will when we get tithe routing section of this course. Basically, variable length subnet masking issuing setting of subnets without VLSM. All subnets would have to be the same size, like you see here on the screen. But by using VLSM, I can break them up into whatever chunks I want. Now, I’m going to give you the key to subletting here. Look at this chart. It is the subletting exam tip. Now the one I want you to memorizes the small chart off to the right. You can do all the math on test day, and you can do two to the S and you can do two to the H minus two. Or you can memorise this small chart on the right. If you start with a slash 24, you have one subnet because it’s glassful and you have 256 IPS.As I add one to the Cider notation and become slash 25, I take my one network and I multiply it by two and that gets me to two. And I take my 256 IPS and I divide it by two. And that gives me 128.Every time my Cider notation goes up, one, my number of networks goes up and my number of IPS per network go down. So if you can remember the chart on the right or calculate it on test day, you’re going to do great because you’re going to be able to answer any question they give you on subletting. The nice thing is on Network Plus, they’re not going to give you difficult subnets. They’re going to ask you something like if you have a slash 28, how many subnets are created? Well, 16, because if I go from 24 up to 28, I have to keep doubling it. Double it to get to 25, double it again to 26, double it again to 27, and double it again to 16 to 28, which gets you to 16. Or they might ask you how many IPS you would have in each subnet if you had a slash 30? Well, we use slash 30s for point-to-point connections.

There are four IPS, only two of which are actually usable because the first one is used by the name and the last one is used by the broadcast. And so you have four IPS, two of which are usable. So if you can remember this chart, you’re going to do great on Subnetting Day. Now, before test day, take lots of practise subletting problems, especially in the class C range. Everything from 24 through slash 30 is fair game for Network Plus. Get those down pat, memorise those slash notations with Cider, and you are going to answer any question they throw at you.