 Welcome to lesson one. In this lesson we're going to set up our non-contiguous networks. So let's get started. We want to set up three of them, so I'm going to grab two of these routers and you can use whichever type of router you want. I'm just going to use 24321s. Then I'm going to go down here to the switch menu and I'm just going to choose three of these 2960 switches, just like this. And as we know a router's main job is to separate networks, so by choosing two routers we can have three networks, which is what we need. And now we will connect them with the standard RJ45 and so I will go from gig one to gig zero. And I will do mostly the same thing over here as well. I normally don't choose the same interface number or port number because it can get a little bit confusing. If I went from gig one to gig one, it gets a little confusing. I might forget that I'm on the switch instead of the router, so that's why I choose connections and I choose the ports the way I do. But you can choose whichever port you want and let's see, I'll move this over here, this one down just a little bit. I just want to make sure we can see the port numbers clearly and that looks pretty good and you can move your entire network if you lasso it like that and then just left click and hold and you can move the whole thing around if you want to. So I'm just going to try to center it right there and now I'm going to add some host devices so I will put a PC right here, PC right here and a PC right here like that and you can choose again whatever type of host devices you want to choose. I'm using PCs because then we can log into them and we can you know go on to the desktop if we have to and we are definitely going to be using the command line on each of these PCs so that's why I'm choosing those. You could also choose a laptop if you want to but I'm going to use the standard PC. Okay so let's go over here to this router and I will call this router R1 and these are just labels so we will change the host names when we actually do the configuration. I will call this one R2 and I think we can call this SW2 for switch 2 and it's a little hard to read over here but we'll make this one switch 1 and again we will change the host names by doing the actual configurations on the command line and I'll make this one switch 3 and I should probably relabel these as well and that all looks good. Okay now we have all our network devices in place and what we have to do next is configure some static IP addresses for our devices and before we do this I'm going to use the notepad button up here and keep notes of what we're doing so that we can keep track of things as we go along so I'm going to use a class C address and this is going to be for networks 1 and 3 and then for network 2 we're going to use a completely different address different network boundaries and that way we can create our non-contiguous networks which will be networks 1 and networks 3 so for this address we can use pretty much anything we want it just has to be you know not in the same subnet so I will use 192.168 how about .20.0 and the other thing I'm going to do is subnet this network so that we have four subnetworks and so I'm going to make four of them so it's going to be in divisions of 64 if you're not sure how to do subnetting take my course on total IP and subnetting and if you practice the three step method that I created you will be able to subnet quickly and accurately every time and you do want to learn how to do that because if you could do everything in your head then you will have no problems with time management on your exams because remember the exams are timed okay so we have subnetworks and we will not subnet network 2 we'll just leave network 2 as is and I will move this where somewhere we can kind of keep it out of the way I guess that was a good place for it let's use the note pad tool again and I will assign 192.168.10.0 to this network network 1 and since we divided it into four subnetworks so we divided this network into four subnetworks that means that we used a power of 2 which means our new subnet mask would be slash 26 or 26 bits and so we'll go over here to network 3 and make this one 192.168.10.64 slash 26 and so the first two subnetworks out of the four that we created are being used for networks 1 and network 3 we have to label network 2 as 192.168.20.0 slash 24 and so that looks good and now we can start assigning our static addresses and while I do this I will also change the host names of our devices so let's get started okay I'm going to start with switch 1 I will log in go to global configuration mode enter the command hostname sw1 so that's all finished there I'm just going to let these switches operate as normal layer two switches then on our routers we're going to type no because we don't want to use the setup wizard we want to do all the configurations ourselves okay now we're ready to statically assign IP addresses to our PCs so I will start with PC1 and so our gateway is going to be this interface right here because that's our gateway to get out of this network and that's 192.168.10.1 I believe is what it was and for the DNS server you really could put anything you want here I'm going to use the actual address of one of Google's DNS's which is 8.8.8.8 and so I'm going to make this PC.2 and our subnet mask is .192 and so that looks good everything set to static like it should be now let's go to desktop and let's run an IP config for this PC and so we can actually see I'll make this a little bit bigger here we can actually see the static address that we assigned to the PC and we can see the default gateway and we can see the subnet mask right there so that all looks good and now let's try to ping our default gateway so we are going to ping from here to this interface just to test the connectivity and right away we are getting replies and that all looks good okay now let's go to PC2 and here we're going to do something a little bit different we're going to make our gateway .4 you might be wondering wait a minute what address is that I'm going to show you in just a moment so our static address for this PC is going to be .3 I believe is what we said it was going to be and that is the correct mask so that all looks good so we don't want to assign one of these ports as our gateway because if we do that then the vanilla routing table will allow us to ping or communicate between two of the networks or one of two of the networks so we don't want that so what I'm going to do is add a router and I'm just going to name this router internet so this is the gateway for the entire network so this could be our company network or a you know some small business or even a home network so I will connect this and so that will do right there and let me go in here and very quickly configure this and we can actually test our PC now so we can try first we'll do the ip config so we can look at our configuration so we have the .3 address as the pc address default gateway is the internet router and we have the correct mask let's go over here to ping and see if we can ping let's see how about PC one I believe that was the .2 address and it says destination host unreachable if we mouse over we can see yes it was .2 so that makes perfect sense this pc cannot reach any devices over here let's see if this pc can ping the other side of this router let's see what happens and it's saying destination host unreachable again because we didn't set this router as a default gateway for any of the devices on network 2 so that is correct and now we can go and configure pc and actually let me go back into pc2 just for a moment and see if we can ping our gateway because that is something we should check and we are getting replies from the internet router so that's our gateway for our entire network all three networks but we will not be simulating an internet because that's not what this lab is about but I just wanted to put that here just sort of to you know add a little bit of realism we would have one gateway going out to the internet for our entire LAN okay so now we will go to pc3 and configure it and so our gateway is 192.168.10.65 I believe that was the first available host address that we assigned on this network and we assigned it to that interface the 001 interface I will use the same DNS and if 65 was the first one then the next available host address would be .66 with a 26 bit mask so .192 so that looks correct so let's go and run the ipconfig command check our configuration on pc3 .66 that's correct .65 is our gateway correct subnet mask let's try to ping our gateway 192.168.10.65 and we immediately get replies that is correct let's try to ping pc3 I know I'm sorry pc2 which was .3 I believe and it looks like we're going to get a timeout so that means we are sending our pings but pc2 cannot respond because pc2 has no idea where the .64 network is which of course is our second non contiguous network this is the first half of that non contiguous network and let's see can we ping the other gateway the .4 let's see what happens so we're getting timeouts and so that all looks correct so we have verified that we do have connectivity on a network that we're currently on but these networks are not aware of each other because we have no routing protocol and so we will configure our routing protocol I'm going to use eigrp but you can use whichever routing protocol you prefer I'm going to use eigrp because it's a little bit more sophisticated than RIP but not quite as granular as OSPF and it tends to converge a little bit faster than both of them so let's get started okay let's begin I'm going to start with R1 just make this a little bit bigger so we can see everything I'm going to log in go to global configuration mode enter the command router eigrp question mark and I am prompted to choose an autonomous system number as you know in eigrp all participating routers must be part of the same autonomous system so I will choose one and now a question mark and we can see the various options available to us now there are two things I want you to pay attention to this is autosummary now by default 99% of the time devices have autosummary disabled this is the command we're going to use later to create the network issue that we're going to troubleshoot and I just want you to be aware of it right now but the only command we're going to be using is the network command just for this part of the lesson so that we can get our routing operating across our three networks so I will enter in the command for network and then enter in our two networks that this router will be routing for in eigrp and when I enter the question mark again I am prompted to enter wildcard bits this means an inverse mask or a reverse mask now if you understand how ip addresses work and how subnet masks or network masks function they essentially tell the devices on a LAN what the boundaries are of that particular network but an inverse mask or reverse mask or wildcard mask if you want to call it that is actually telling the routing protocol what the boundaries are okay so instead of doing 255.255.255.0 or . whatever the network happens to be we do it in the opposite so it would be 0.0.0.255 so here's our inverse mask and what this is doing is it's telling eigrp that in these first three octets any packet of data that is routed to this network must have these three numbers in these first three positions and then in this fourth octet we can have any number to represent a host device and now I will do the same thing for our other network which is the 20.0 network and there you have it it's all finished for router one and I will save the configuration with the right command and now we can move on to configuring our other two routers and here you can see that router one has formed a neighbor relationship an adjacency with router two through eigrp and now I will move on to the third router our internet router and that looks good okay we're ready to verify our configurations so let's go over here to r1 and the first command I'm going to issue is show ip route this returns the vanilla routing table for any routing device and right here we can see that eigrp is fully converged because we now have a route to the .64 network but the most important thing I want you to pay attention to here is this side or notation which shows a 26-bit mask that is correct because that is what we ended up with when we divided this network to create these four subnetworks so the reason this is showing as a slash 26 is because when we do not auto summarize what happens is the subnet mask accompanies the network address and so this allows any other network outside of our subnetworks which are non contiguous it allows any device outside those two networks to know where these two subnetworks are but if we summarized this address this would read as 24 and the reason is is that when you summarize what you're doing is you're abbreviating and so these devices would no longer recognize the existence of any of these subnetworks because we had summarized these network addresses then the only thing that these devices are going to care about are the first three octets and because they only care about these first three and because there is no subnet mask accompanying this address then these devices are just going to assume that it's a class full class C address and we'll assume that it has the default mask of 24 bits so what would happen is these devices would then think that 192.168.10.0 existed in two places at the same time and that would cause problems obviously because then if someone out here sent an email let's say they want to send an email to the person who is at PC3 well those emails would only get here half of the time the other half of the time they would be routed incorrectly to this router and then this router would just drop the packets because this router would get the packet look at it and say well I don't know where PC3 is there's no PC3 over here and it would just drop the packet and we're going to actually do this we are actually going to simulate that problem in just a moment but the first thing I want to do is test the connectivity so let's go ahead and do that just to make sure that everything is functioning normally before we go ahead and simulate our summarization problem so if I recall correctly the PC over here PC3 has an address of .66 and yes it does there's our ping and it goes through perfectly fine let's go ahead and do a trace route to PC3 and that way we can see the path that our ping takes and there it is we go from this router R1 to 20.2 which is R2 and then R2 routes the traffic or that ping if you will to .66 which is PC3 so that works just fine let's go over here to PC3 now and let's try if we can to ping PC1 that's 192.168.10. I believe it was 2 and let's see what happens and we are getting replies from PC1 so that works just fine let's do a trace route to PC1 and when we are in a windows environment which is what's being simulated here in these PCs we use the command tracer not trace route so let's go ahead and do that and we can see the path that our ping has taken so let me see if I can move this in a way where we can still see it okay so our ping went to the default gateway for this network which is right here .65 is the address of this port the internal port of R2 for this network then we went to 20.1 which is the external port here on R1 and then R1 looked at the packet and said oh I know where .2 is that's right here and it sent the packet or ping if you will to PC1 and of course PC1 is able to reply back to PC3 and now let's check our internet router because we will see some even more interesting things over here we do a show IP route we should see two networks being learned via EIGRP let's open this up a little more and yes there they are we can see the .0 network and the .64 network have been learned by the devices outside of those two non-contiguous subnetworks so the router has learned routes to those two networks and we can see again it knows that they are two separate networks because we did not summarize our network addresses and so the subnet mask is accompanying the network addresses as we can see here so that all looks good and I'm fairly confident that we can also ping from PC2 to PC3 or to PC1 so I'm not going to test those instead let's go and move on to the next section where we will intentionally set our routers to summarize those addresses in EIGRP and then we will test the connectivity again so that we can see the problem that occurs when we do not set the no summary command when using non-contiguous networks okay we're back and let's go ahead and reconfigure our routers to summarize network addresses so I will go over here to router 1 and I will go to global configuration mode router EIGRP 1 and the thing here is once you set up a routing protocol on your routing devices you don't actually have to go through the whole configuration again you only have to call up the autonomous system and then make a change and it will propagate throughout the configuration for that device so I'm going to go ahead and say auto some tab okay I've done it and you can see already things are re-synchronizing they're re-establishing connections with the other routers their neighbor adjacencies are being reconfigured to reflect the new configuration go right over here to the internet router go to conf t just open this up a little bit router EIGRP 1 auto summary and again we see the same thing happening here it is re-establishing those adjacencies that will save it move on to router 2 and do the same thing and there we go exit exit okay so that all looks good okay let's go back to R1 and see what changes have occurred and I will issue the show ip route command and now when we look at our EIGRP learned route we see that we no longer have a route to the dot 64 network instead it says we have a route to the dot 0 network with a 24-bit mask so what's happened is because we are now summarizing the routes this router now believes that it is learning a route to the dot 0 network which it shouldn't do because it is directly connected to the dot 0 network and we can see that's true because there's the 26-bit mask for this network so already we have an error this is going to cause a problem when routing to this network this becomes even more pronounced when we go to any device outside of our two non-contiguous networks so if I log in to our internet router and I issue the show ip route command we can see that EIGRP is routing to the dot 0 network and there is no other network shown here there's no dot 64 we can also see the classical default mask for this network meaning that because it has been summarized this router and in fact any device that's outside of those two non-contiguous subnetworks now believes that they are in fact one network and erroneously also believe there are two separate routes to get there one route goes through router one any other one through router two and we can further prove this by trying to ping a host device on one of those networks so how about we ping pc1 which I believe is at the dot 2 address and right away we can see that we do get a reply but then we get unreachable then there's a reply and then another unreachable and then a reply so what is happening is that when we ping from the internet router or in fact when any device pings or sends a packet of data over here to pc1 from outside of this subnetwork because these two subnetworks are non-contiguous and they are now being summarized any data that is sent over here or over here only has a 50-50 chance of getting there the other 50% of the time it's going to be routed to the wrong network so what's happening here is we are attempting to ping pc1 and so we do so successfully and we get a reply but then the next ping is being sent to r2 and r2 is saying well I don't know where the dot 2 host is so I'm just going to drop the packet and so the same thing happens again after we get a reply from pc1 the very next ping goes out and gets routed incorrectly to router 2 and we can run that again and see what happens and so we see the same thing happening over and over again so at this point you might be wondering why do we even need auto summarization because it seems like it can cause a lot of problems well that's true it can but it can also be very useful in more complex and larger network topologies so for example if we had gone ahead and created two other networks over here using our other subnetwork addresses we would then have three networks over on this side of our topology so maybe we don't want to have all that information stored in the routing tables on these two routers because there's no reason for that to be instead we could have this router router to summarize the entire topology on this side of our networks and that way when these two routers need to send packets over to one of these other three networks this router is basically saying hey don't worry about where exactly those networks are I've summarized the addresses just hand me your packets and I know where to send them so in that case summarization is a useful thing to have and it can be used in any routing protocol in fact an OSPF auto summarization is especially useful in stub area networks because in a stub area the devices don't have to know the entire rest of the topology they only have to know about their one gateway so auto summarization is useful in certain circumstances now let's learn how non contiguous subnetworks differ from contiguous subnetworks and to do that I'm going to add one of our subnetworks over here to our topology so I will go ahead and add a router we'll rename this router router three or r3 rather even though technically the internet router was our third router but we renamed it internet so I will change the host name of this router r3 let's choose a switch I'll put that right there and finally a fourth PC and I'll put it right there and I'll call this one PC four and now I will connect these and then very quickly configure this other network with some static addresses and before I do that let me remember here to label our topology because it's always good to have a little bit more documentation there is our sider notation indicating a 26 bit mask and so now I will configure these devices okay I think all that looks good now let's retest our network topology and see if the auto summary command has any effect on contiguous subnetworks so let's go to our internet router and we will log in and attempt to ping pc3 and let's see what happens and we are encountering the same problem as we had before we have a timeout which means that the ping did get all the way to the host but the host was not able to reply we get an unreachable which means that the ping was routed to the wrong network was routed over here to r1 unreachable meaning that r1 received the packet looked at the destination address and simply said I don't know where this is and dropped the packet and then one of the packets did get routed to the correct network over here and we got a reply from the host pc3 and then the next ping again went to the wrong network over on r1 and then the one after that went to the correct network over here and was replied by pc3 and if we use the up arrow key we can repeat those pings over and over and we get a similar result and a similar problem and that is because all of our routers are auto summarizing the networks okay now let's try to ping pc4 from router 2 and see what happens bearing in mind that the addresses are still being summarized so they are being summarized by router 3 as well so if I type in ping 192.168.10.130 let's see what happens so we wait a few seconds so we did have a timeout and then we get all replies after that and if we use our up arrow key we are getting replies just fine now let's see if we can ping at pc3 from pc4 so go 192.168.10.66 and see what happens and it's taking a few seconds we get a timeout and now we are getting replies so everything is working well we can up arrow key and do that again and everything is working just fine so that all looks good so now the question becomes how is it possible that these two subnetworks can route traffic between each other just fine but all of the other networks cannot well the reason is that these two subnetworks are contiguous they do not have another network dividing them from each other they are right next to each other connected by a common router so even though we have autosummarization turned on on all of our routers because these two subnetworks have the same network boundary of 26 bits and because they are not divided by another network they can communicate with each other just fine so now let's correct this problem with a simple command all we have to do is log into each of our routers and issue the command no autosummary so let's start with router 1 log in go to conf t and issue the command router eigrp1 for autonomous system 1 and we don't have to reconfigure the entire eigrp autonomous system we just have to enter this command no autosummary and that's it and after we do this on each of our routers we will go and check our routing tables and see if they have converged quickly sometimes it can take a couple of minutes for that to happen all the way but we'll go and we'll take a look and let's go here to router 3 and we can already see that something is changing it hasn't converged all the way yet but it will eventually okay now let's log back in to our internet router and see if everything has converged we'll do a show ip route command let's take a look at our routing table and now we can see the addition of the dot 64 and dot 128 networks we can see they have the correct subnet mask of 26 bits and we now can see that the dot zero network is in its own route with the correct subnet mask of course you can see it's accessible via router one and the other two subnetworks are available through router two so that all looks good let's test it by trying to ping pc3 again like we did before before we failed at doing that because of the non contiguous network situation and the autosummarization so let's see what happens now that we have issued the no autosummary command and that we can plainly see that we do have routes to each of those subnetworks and if we up arrow key again we can see we are getting total success our pings are getting through and they are being replied to by pc3 now let's see if we can ping all the way to pc4 and yes we can can we ping to pc1 which i believe is dot two yes we can let's see if we can ping from pc1 all the way to pc3 and right away we see that yes we can we have all replies right there that's good how about we try pinging pc2 from pc3 so that's 192.168.20.3 i believe was the pc's address because 20.1 is here 20.2 is there i believe that the internet router has 20.4 so let's try this and yes we get all replies so issuing the no autosummary command on each of our routers has resolved the issue and now we can ping between our non contiguous subnetworks and with that i believe we have completed our introduction to non contiguous and contiguous networks i encourage you to continue to experiment of course with this lab i think this is actually a quite nice topology for doing that because it has a nice variety of networks and we also have the one subnetwork that we haven't used yet the dot 192 network and so we could always insert that somewhere in our topology and add some additional network devices host devices maybe even some iot and of course this network is also quite nice for experimenting with different routing protocols or maybe even introducing a server such as a dhcp or dns server but i think that does it for this module and if you're enjoying these