1 00:00:00,000 --> 00:00:00,690 2 00:00:00,690 --> 00:00:01,920 So here's our game plan. 3 00:00:01,920 --> 00:00:04,800 Let's go ahead and configure some specific static routes 4 00:00:04,800 --> 00:00:06,690 starting on R1. 5 00:00:06,690 --> 00:00:12,450 So on R1, let's train R1 that to get to the 10.4.0 network, 6 00:00:12,450 --> 00:00:15,150 it should use R2 as its next hop. 7 00:00:15,150 --> 00:00:18,570 Let's also configure R1 that if it needs to forward packets 8 00:00:18,570 --> 00:00:23,630 to the 10.5.0 network, it should also use R2 as its next stop. 9 00:00:23,630 --> 00:00:26,520 R2 needs to also be able to forward packets. 10 00:00:26,520 --> 00:00:29,640 So in R2, we could create some specific routes as well-- 11 00:00:29,640 --> 00:00:33,660 on how to reach 10.1.0 or we could go ahead 12 00:00:33,660 --> 00:00:39,010 and use a static default route, which basically says dear 13 00:00:39,010 --> 00:00:41,470 Mr. R2, if you get a packet for a network 14 00:00:41,470 --> 00:00:43,600 and you don't know how to reach that network, 15 00:00:43,600 --> 00:00:45,740 go ahead and use your default route. 16 00:00:45,740 --> 00:00:48,340 So let's begin by taking a look at the routing tables 17 00:00:48,340 --> 00:00:51,016 on these routers before we add any new configs. 18 00:00:51,016 --> 00:00:53,390 And to do that, on a Cisco router, we can use the command 19 00:00:53,390 --> 00:00:54,952 show ip route. 20 00:00:54,952 --> 00:00:57,160 And I'm going to send that command to both the router 21 00:00:57,160 --> 00:00:58,810 1 and router 2, and then we can go ahead 22 00:00:58,810 --> 00:00:59,810 and look at the results. 23 00:00:59,810 --> 00:01:01,090 So here on router 1-- 24 00:01:01,090 --> 00:01:03,800 router 1 is directly connected to the 10.1.0 25 00:01:03,800 --> 00:01:08,530 network and the 10.2.0 network and the 10.3.0 network. 26 00:01:08,530 --> 00:01:10,930 And this last 24, immediately following, 27 00:01:10,930 --> 00:01:14,080 represents that these first three numbers, of 10.1.0, 28 00:01:14,080 --> 00:01:15,940 represents the actual network. 29 00:01:15,940 --> 00:01:17,530 We'll cover more about that detail 30 00:01:17,530 --> 00:01:19,700 in separate IPv4 Nuggets. 31 00:01:19,700 --> 00:01:22,810 So R1 is directly connected to those three networks. 32 00:01:22,810 --> 00:01:23,470 Fantastic. 33 00:01:23,470 --> 00:01:25,720 Let's take a look at router 2. 34 00:01:25,720 --> 00:01:27,100 So here on router 2-- 35 00:01:27,100 --> 00:01:31,030 router 2 is directly connected to 10.3 network, the 10.4 36 00:01:31,030 --> 00:01:33,950 network, and the 10.5 network. 37 00:01:33,950 --> 00:01:36,610 So let's start our configuration back on R1 38 00:01:36,610 --> 00:01:39,836 starting from the left going to the right. 39 00:01:39,836 --> 00:01:42,210 And on the Cisco router, we'll go into configuration mode 40 00:01:42,210 --> 00:01:45,990 by typing in configure space terminal or for short configt. 41 00:01:45,990 --> 00:01:47,790 And then, we'll have the command-- ip route 42 00:01:47,790 --> 00:01:52,110 10.4.0, space, then 255 repeated three times 43 00:01:52,110 --> 00:01:55,380 followed by a zero, space, then 10.3.0.2. 44 00:01:55,380 --> 00:01:56,844 Now let's decode what that is. 45 00:01:56,844 --> 00:01:58,260 What we're saying to the router is 46 00:01:58,260 --> 00:02:03,120 we're adding an IPv4 route to reach the 10.4.0 network. 47 00:02:03,120 --> 00:02:06,190 And these first three groupings that say 255. 48 00:02:06,190 --> 00:02:06,690 255. 49 00:02:06,690 --> 00:02:10,919 255, that's very much like this option here-- slash 24. 50 00:02:10,919 --> 00:02:12,330 It means to the router that we're 51 00:02:12,330 --> 00:02:15,000 focusing on the first three numbers 52 00:02:15,000 --> 00:02:17,280 in this IP address that are representing 53 00:02:17,280 --> 00:02:20,110 the network that we are creating the static route for. 54 00:02:20,110 --> 00:02:21,540 And this instruction further says, 55 00:02:21,540 --> 00:02:25,170 that if you need to ever forward a packet to 10.4.0. 56 00:02:25,170 --> 00:02:27,390 anything, the next hop you can use 57 00:02:27,390 --> 00:02:31,569 is your good buddy, R2 at the IP address of 10.3.0.2. 58 00:02:31,569 --> 00:02:33,360 So that one static route teaches the router 59 00:02:33,360 --> 00:02:35,290 how to reach the 10.4.0 network. 60 00:02:35,290 --> 00:02:38,367 But we have one more-- it's the 10.5.0 that R1 also 61 00:02:38,367 --> 00:02:39,450 needs to be able to reach. 62 00:02:39,450 --> 00:02:41,610 So we need to go ahead and hit the upper row key. 63 00:02:41,610 --> 00:02:46,140 And we'll go back and change out the 10.4.0 to a 10.5.0 64 00:02:46,140 --> 00:02:47,130 and press Enter. 65 00:02:47,130 --> 00:02:50,110 And now we've just entered two static routes. 66 00:02:50,110 --> 00:02:52,770 So now, if we issue the command, show ip route, 67 00:02:52,770 --> 00:02:54,690 we have two new static routes right here-- 68 00:02:54,690 --> 00:02:58,680 that basically say to get to 10.4.0 or 10.5.0, 69 00:02:58,680 --> 00:03:01,260 I'm going to go ahead and use the next hop of 10.3.0.2, 70 00:03:01,260 --> 00:03:02,550 which is R2. 71 00:03:02,550 --> 00:03:05,610 Next, let's go ahead and configure a static route on R2, 72 00:03:05,610 --> 00:03:08,190 so that it knows how to forward packets in the direction 73 00:03:08,190 --> 00:03:11,130 of the 10.1 or 10.2 networks if it needs to. 74 00:03:11,130 --> 00:03:12,600 So we'll go back to router 2. 75 00:03:12,600 --> 00:03:15,300 And here on router 2, we'll go back into configuration mode. 76 00:03:15,300 --> 00:03:17,670 And let's do an example of a default route. 77 00:03:17,670 --> 00:03:21,740 It goes something like this-- ip route 0000. 78 00:03:21,740 --> 00:03:23,490 That represents a default route, and we're 79 00:03:23,490 --> 00:03:26,367 going to follow it by another set of quad zeros like this. 80 00:03:26,367 --> 00:03:28,950 And then, we're going to specify the next hop for this default 81 00:03:28,950 --> 00:03:29,560 route. 82 00:03:29,560 --> 00:03:32,850 And that next hop is going to be Mr. R1 in our topology, which 83 00:03:32,850 --> 00:03:34,870 is 10.3.0.1. 84 00:03:34,870 --> 00:03:36,110 We'll press Enter. 85 00:03:36,110 --> 00:03:39,120 We'll end to get out of configuration mode. 86 00:03:39,120 --> 00:03:42,397 And let's do a show ip route once again. 87 00:03:42,397 --> 00:03:43,230 So here's the logic. 88 00:03:43,230 --> 00:03:45,780 If an IP router receives an IP packet, 89 00:03:45,780 --> 00:03:48,630 the router looks at the layer 3 information, 90 00:03:48,630 --> 00:03:50,250 looks at the destination, and then 91 00:03:50,250 --> 00:03:51,630 looks at its routing table. 92 00:03:51,630 --> 00:03:54,570 So if R2 received a packet that had a destination IP 93 00:03:54,570 --> 00:03:58,470 address of 10.1.0.55, router 2 is 94 00:03:58,470 --> 00:04:00,690 looking at its routing table. 95 00:04:00,690 --> 00:04:01,410 That's not it. 96 00:04:01,410 --> 00:04:03,190 That's not it. 97 00:04:03,190 --> 00:04:04,260 None of those are it. 98 00:04:04,260 --> 00:04:06,210 It's going to use the default route. 99 00:04:06,210 --> 00:04:07,560 And because we have that static route there, 100 00:04:07,560 --> 00:04:09,601 that's also why we have this message right here-- 101 00:04:09,601 --> 00:04:12,280 the Gateway of last resort, when you don't know what else to do, 102 00:04:12,280 --> 00:04:14,655 go ahead and forward the packet to the next hop that owns 103 00:04:14,655 --> 00:04:16,529 the IP address of 10.3.0.1. 104 00:04:16,529 --> 00:04:18,880 And now it's his problem or her problem. 105 00:04:18,880 --> 00:04:20,459 So next, let's go ahead and test this 106 00:04:20,459 --> 00:04:25,860 by doing a ping from PC1, who's at 10.1.0.11 and let's 107 00:04:25,860 --> 00:04:31,230 ping it out 10.5.0.55, which is a PC down on the 10.5.0 108 00:04:31,230 --> 00:04:32,760 network, and we'll press Enter. 109 00:04:32,760 --> 00:04:35,610 And because R1 and R2 both know how 110 00:04:35,610 --> 00:04:38,400 to route based on the static routes that we added, 111 00:04:38,400 --> 00:04:42,030 we have full connectivity between a PC on the 10.1.0 112 00:04:42,030 --> 00:04:45,850 network and a PC on the 10.5.0 network. 113 00:04:45,850 --> 00:04:47,940 I hope this has been informative for you, 114 00:04:47,940 --> 00:04:51,380 and I'd like to thank you for viewing. 115 00:04:51,380 --> 00:04:52,178