1 00:00:06,000 --> 00:00:11,400 Okay so in this lab we need to configure static routes to enable IP connectivity between hosts on the 2 00:00:11,400 --> 00:00:15,220 left and hosts on the right. As an example 3 00:00:15,220 --> 00:00:24,450 if I open up a console on PC 1 and try and ping 172.16.1.2 the DNS server I'm told that 4 00:00:24,520 --> 00:00:34,450 the destination is unreachable IP config /all shows us that this PC has this IP address configured 5 00:00:35,350 --> 00:00:47,220 and its DHCP server and a default gateway 192 168 1 254. That device is router 1 and we 6 00:00:47,220 --> 00:00:57,650 can verify that by using the command show IP interface brief notice the IP address on gigabyte 0 7 00:00:57,640 --> 00:01:04,400 00. Now in this topology IP addresses are not shown. 8 00:01:04,459 --> 00:01:12,720 So I'm going to add IP addresses to the topology to make it easier to configure the static routes. 9 00:01:12,800 --> 00:01:20,790 We can see that this interface is configured with this IP address. Show IP route will also show 10 00:01:20,790 --> 00:01:28,110 us some early information including the subnet mask used on interfaces. As an example, we can see 11 00:01:28,110 --> 00:01:31,780 that a /24 network is used on gigabit 12 00:01:31,830 --> 00:01:33,410 000. 13 00:01:33,720 --> 00:01:41,460 As shown here and this is the IP address configured on that interface you could simply use a show run 14 00:01:42,060 --> 00:01:44,300 to see that information as well. 15 00:01:44,320 --> 00:01:51,280 Notice this IP address is configured on gigabit 000 and this IP address is configured on gigabit 0 16 00:01:51,280 --> 00:02:02,460 01. So 192.1682.1 is configured on that interface again as shown here. 17 00:02:02,580 --> 00:02:05,840 Don't always rely on show run. 18 00:02:05,940 --> 00:02:14,310 Learn to use other commands such as show IP route and learn to interpret the output of the commands 19 00:02:15,290 --> 00:02:19,090 we can see that this route is directly connected to gigabit 20 00:02:19,130 --> 00:02:22,270 001 as shown there, 21 00:02:22,370 --> 00:02:25,970 this is the IP address configured on that interface. 22 00:02:25,970 --> 00:02:31,910 Notice also that no static routes or any other routes except connected and local routes are displayed 23 00:02:32,240 --> 00:02:41,670 in the routing table. Show IP protocol shows us that no routing protocols are enabled on Router 1. 24 00:02:41,920 --> 00:02:44,350 We can do something similar on router 2, 25 00:02:48,340 --> 00:02:49,820 show IP interface brief 26 00:02:49,960 --> 00:02:54,460 shows us the IP addresses configured on interfaces. 27 00:02:54,460 --> 00:02:58,580 Show IP route shows us the routing table. 28 00:02:58,870 --> 00:03:05,960 No static routes are configured on the router no IP routing protocols are enabled. 29 00:03:06,030 --> 00:03:09,940 We only see connected and local routes in the routing table. 30 00:03:10,140 --> 00:03:15,540 So show IP route once again we can see that this IP address is configured on gigabit 31 00:03:15,580 --> 00:03:28,740 000. So 192.168.2.2 is configured on that interface as shown here 32 00:03:28,770 --> 00:03:32,830 there's the IP address there's the mask used. 33 00:03:33,010 --> 00:03:41,740 This is derived from the IP address configured on the interface. So that this IP address is configured 34 00:03:42,040 --> 00:03:42,700 on gigabit 35 00:03:42,700 --> 00:03:46,380 000 /24 mask. 36 00:03:46,780 --> 00:03:52,690 So hence in the IP routing table, we see this as a connected route. 37 00:03:52,870 --> 00:03:57,010 This is the actual IP address configured on that interface. 38 00:03:57,250 --> 00:04:06,930 Same as shown here we can see the actual IP address and the subnet mask used on this interface. So 1 39 00:04:06,930 --> 00:04:16,860 92.168.3.1/24 is the IP address configured on that interface and to confirm that when we 40 00:04:16,860 --> 00:04:25,520 type show run we can see the IP address and subnet mask on the interface. Let's have a look at router 41 00:04:25,520 --> 00:04:38,310 3 interfaces have come up on router 3 show IP interface brief we can see that this IP address is configured 42 00:04:38,760 --> 00:04:47,070 on gigabit 000 that's already shown in the topology diagram. This IP address is configured on this 43 00:04:47,070 --> 00:04:56,340 interface show IP route confirms that this IP address is configured on this interface that's the subnet 44 00:04:56,340 --> 00:05:07,480 mask. So 192.168.3.2/24 is configured on this interface. OK so looking at the routing 45 00:05:07,480 --> 00:05:17,410 tables once again router 1 only knows about directly connected routes it doesn't know about this network 46 00:05:17,740 --> 00:05:26,990 or this network. Notice the server is in the same subnet as router 3 cisco.com 47 00:05:30,130 --> 00:05:34,570 is also using an IP address in that subnet. 48 00:05:34,570 --> 00:05:41,350 So this is most likely configured as a layer 2 switch even though it says core 2 here when I type 49 00:05:41,350 --> 00:05:51,490 show run we can see that no configuration is configured on the switch apart from an IP address which 50 00:05:51,490 --> 00:05:56,410 is actually incorrect for this lab but won't affect what we're trying to accomplish here. 51 00:05:58,210 --> 00:06:07,200 So router 1 only has direct connected and local routes in the routing table. 52 00:06:07,240 --> 00:06:12,490 The same is true for router 2 as well as router 3. 53 00:06:12,500 --> 00:06:17,430 We only have connected in local routes in the routing table. 54 00:06:17,560 --> 00:06:22,130 So in router 1, we need to configure a static route for every network 55 00:06:22,130 --> 00:06:24,650 that's not directly connected. 56 00:06:24,650 --> 00:06:30,170 In other words, we need to create a static route for this network as well as this network. 57 00:06:30,170 --> 00:06:36,430 So IP route 192.168.3.0 subnet mask will be this. 58 00:06:36,440 --> 00:06:43,960 We've already determined that when we looked at the IP addresses and routes on the routers 59 00:06:44,360 --> 00:06:51,810 but once again show IP route shows us the route on router 3. 60 00:06:51,900 --> 00:06:56,130 Now what is the next hop or outgoing interface. 61 00:06:56,130 --> 00:07:00,480 We've been told to use next hop IP addresses. 62 00:07:00,480 --> 00:07:09,090 So rather than using the local outgoing interface, we're going to specify the next hop which is 192.1 63 00:07:09,090 --> 00:07:15,370 68.2.2. From router one's perspective to get to this network 64 00:07:15,390 --> 00:07:23,130 it needs to send the traffic to router 2 so as traffic is sent out of this interface the next IP 65 00:07:23,130 --> 00:07:27,690 address that it's going to hit is this IP address, 66 00:07:27,690 --> 00:07:30,300 that's the next hop IP address. 67 00:07:31,020 --> 00:07:33,250 Now we could specify administrative distance. 68 00:07:33,750 --> 00:07:35,930 We are not asked to do that in this lab. 69 00:07:36,400 --> 00:07:40,800 So I'm not going to configure an admin distance. 70 00:07:40,800 --> 00:07:44,610 Notice how the routing table has been updated. 71 00:07:44,610 --> 00:07:47,880 This route has been added to the routing table. 72 00:07:47,940 --> 00:07:49,090 It's a static route. 73 00:07:49,560 --> 00:07:54,930 This network is available via this next-hop router administrative 74 00:07:54,930 --> 00:07:56,750 distance is 1. 75 00:07:56,910 --> 00:08:04,500 The cost to get there is 0, static routes to next hop IP addresses have an admin distance or administrative 76 00:08:04,500 --> 00:08:14,490 distance of 1. So at this point, I should be able to ping this IP address on router 2 which I can but 77 00:08:14,490 --> 00:08:22,110 I won't be able to ping this IP address because router 3 doesn't know how to send the traffic back to 78 00:08:22,110 --> 00:08:35,039 router 1. Router 2 can reply because this network is directly connected, router 2 knows about this 79 00:08:35,039 --> 00:08:46,580 network so it can reply back to pings sent from R1 when R1 pings 192.168.3.0 it uses 80 00:08:46,710 --> 00:08:50,690 the outgoing interface as the source IP address. 81 00:08:50,910 --> 00:08:56,430 In other words, this will be the source IP address for traffic sent from router 1 to router 2 and router 82 00:08:56,430 --> 00:09:04,070 2 knows how to get back to this IP address so pings succeed but they don't succeed 83 00:09:04,100 --> 00:09:09,480 to router 3 because router 3 doesn't know how to get back to this IP address. 84 00:09:11,370 --> 00:09:13,560 Okay, so show IP route on router 1 85 00:09:13,560 --> 00:09:15,320 we've got one static route configured 86 00:09:15,330 --> 00:09:18,330 we still need to configure the static route 87 00:09:21,110 --> 00:09:23,300 172.161.0 88 00:09:23,310 --> 00:09:25,400 in other words the segment. 89 00:09:25,480 --> 00:09:35,700 Now to get to that network which once again we can see on router 3 this network 172.16.1.0/ 90 00:09:35,720 --> 00:09:36,940 24 91 00:09:37,000 --> 00:09:45,160 we need to send the traffic to router 2, router 2 is still our next-hop router to get to that destination 92 00:09:45,160 --> 00:09:53,230 network. Traffic sent from router 1 to any device in the subnet will firstly be sent to router 2, 93 00:09:53,260 --> 00:09:57,730 this is the next-hop IP address. So show IP route 94 00:09:57,730 --> 00:10:05,230 we now have two static routes in the IP routing table of router 1. 95 00:10:05,410 --> 00:10:09,450 I'll save that configuration. Now in router 2 96 00:10:09,460 --> 00:10:15,250 we need to do something similar, at the moment they are only connected and local routes in the routing 97 00:10:15,250 --> 00:10:25,810 table. So IP route 192.168.1.0 subnet mask, this is a /24 subnet mask from router 2s point 98 00:10:25,810 --> 00:10:31,330 of view to get to this network the next hop is router 1. 99 00:10:31,330 --> 00:10:38,210 So 192.168.2.1, from router 2s point of view to get to this network 100 00:10:38,440 --> 00:10:41,920 the next hop is this IP address. 101 00:10:41,920 --> 00:10:52,260 Once again we only have 192.168.2.0 and 3.0 in the routing table. 102 00:10:52,290 --> 00:11:01,030 We have to add this network via a static route and we have to add this network via a static route. 103 00:11:01,100 --> 00:11:10,850 So IP right 172.16.1.0/24 mask, next hop will be 192.168.3.2. 104 00:11:14,580 --> 00:11:16,130 So show IP route 105 00:11:16,290 --> 00:11:23,020 this router now has 2 static route in the routing table and at this point should be able to ping 192 106 00:11:23,020 --> 00:11:31,620 this router now has 2 static route in the routing table and at this point should be able to ping 192 107 00:11:31,620 --> 00:11:41,730 point it should be able to ping the DNS server, the DNS server is configured with router 3 as its default 108 00:11:41,730 --> 00:11:47,830 gateway so traffic from here can get to here to there and back again 109 00:11:48,000 --> 00:11:56,190 but notice on router 1 we still can't ping 172.16.1.2 because router 3 doesn't know how to send 110 00:11:56,310 --> 00:12:03,660 the traffic back to router 1. If we did a traceroute to that IP address 111 00:12:03,740 --> 00:12:10,100 notice the traffic it gets to router 2 and then we have a timeout because router 3 doesn't know 112 00:12:10,100 --> 00:12:16,100 how to reply back to router 1. Traffic is not being returned to router 1 113 00:12:16,610 --> 00:12:20,960 So the last step is to update the routing table of router 3.