1 00:00:00,000 --> 00:00:04,000 Now ping is great for testing as an example 2 00:00:04,000 --> 00:00:09,000 if I ping 10.1.1.2 the ping succeeds 3 00:00:09,000 --> 00:00:12,000 the reason the first ping failed is due to ARP 4 00:00:12,000 --> 00:00:16,000 the router needs to ARP for the MAC address of router 2 5 00:00:16,000 --> 00:00:22,000 but notice if I ping 10.1.2.2 which is the IP address of router 3 6 00:00:22,000 --> 00:00:27,000 the pings fail because that route is not in the routing table. 7 00:00:27,000 --> 00:00:34,000 10.1.2.0 is not in the local router's routing table. 8 00:00:34,000 --> 00:00:39,000 10.1.1.0 is in the local routing table. 9 00:00:39,000 --> 00:00:41,000 so the router can route appropriately 10 00:00:41,000 --> 00:00:45,000 now debugs are very useful for testing and troubleshooting 11 00:00:45,000 --> 00:00:49,000 and in this example, I’m gonna use a command debug ip icmp 12 00:00:49,000 --> 00:00:55,000 on both router 2 and router 3 just to prove that traffic is arriving 13 00:00:55,000 --> 00:00:58,000 as expected on the correct routers. 14 00:00:58,000 --> 00:01:04,000 so ping 10.1.1.2 this IP address 15 00:01:04,000 --> 00:01:13,000 notice we see the ICMP echo replies sent back to 10.1.1.1 16 00:01:13,000 --> 00:01:22,000 let's do that so 10.1.2.2 the traffic doesn’t reach this router 17 00:01:22,000 --> 00:01:25,000 we don’t see any outputs on the screen of router 3 18 00:01:25,000 --> 00:01:30,000 where’s just to do it again to 10.1.1.2 19 00:01:30,000 --> 00:01:38,000 we see the debugs because the traffic is being sent from router 1 to router 2 20 00:01:38,000 --> 00:01:42,000 and is being received by router 2 which in turn is replying back. 21 00:01:42,000 --> 00:01:47,000 So on router 1, we can use the command debug ip packet 22 00:01:47,000 --> 00:01:51,000 be careful with this command in a live environment. 23 00:01:51,000 --> 00:01:55,000 In a live environment, you want to use an access control list 24 00:01:55,000 --> 00:02:01,000 to limit the traffic that you are debugging in a production 25 00:02:01,000 --> 00:02:06,000 or live environment, you can kill your router if you run this command. 26 00:02:06,000 --> 00:02:09,000 But in this live environment, it’s ok to do it. 27 00:02:09,000 --> 00:02:13,000 so from a testing and troubleshooting point of view 28 00:02:13,000 --> 00:02:15,000 lets work through logic 29 00:02:15,000 --> 00:02:20,000 on router 1, we try to ping 10.1.2.2 30 00:02:20,000 --> 00:02:25,000 we're not getting a reply we run a debug IP ICMP 31 00:02:25,000 --> 00:02:29,000 on router 3 to see if the traffic is actually arriving at router 3 32 00:02:29,000 --> 00:02:35,000 and it's not, that’s useful because pings send traffic 33 00:02:35,000 --> 00:02:37,000 and then expect to respond 34 00:02:37,000 --> 00:02:43,000 and this would allows to check whether the problem is on the path R1 to R3 35 00:02:43,000 --> 00:02:47,000 or whether the problem is on the return R3 to R1 36 00:02:47,000 --> 00:02:49,000 so this is a great command for testing 37 00:02:49,000 --> 00:02:58,000 so ping 10.1.2.2 notice in the output we're getting unroutable 38 00:02:58,000 --> 00:03:04,000 the local router is telling us that the source IP address 10.1.1.1 39 00:03:04,000 --> 00:03:08,000 going to the destination 10.1.2.2 is unroutable 40 00:03:08,000 --> 00:03:11,000 so it doesn’t know where to forward the traffic. 41 00:03:11,000 --> 00:03:14,000 another great thing in the output here 42 00:03:14,000 --> 00:03:18,000 is that we know which interface the router is using for sending packets 43 00:03:18,000 --> 00:03:21,000 typically a router uses the outgoing interface 44 00:03:21,000 --> 00:03:25,000 as the source in packets and you can see that here. 45 00:03:25,000 --> 00:03:28,000 so the source of the ping is 10.1.1.1 46 00:03:28,000 --> 00:03:32,000 because that’s the outgoing interface to get to a destination 47 00:03:32,000 --> 00:03:34,000 such as 10.1.2.2 48 00:03:34,000 --> 00:03:40,000 as an example, if we ping 10.1.1.2 the ping succeed 49 00:03:40,000 --> 00:03:42,000 we get quite a lot of output 50 00:03:42,000 --> 00:03:47,000 so scrolling back, there’s the ping, they are the success messages 51 00:03:47,000 --> 00:03:51,000 we can see that the source IP address is 10.1.1.1 52 00:03:51,000 --> 00:03:54,000 destination is 10.1.1.2 this IP address 53 00:03:54,000 --> 00:04:01,000 and this was routed via the Forwarding Information Base or FIB out of F0/0 54 00:04:01,000 --> 00:04:03,000 so the packet was sent 55 00:04:03,000 --> 00:04:11,000 and then we received a reply from 10.1.1.2 going to 10.1.1.1 56 00:04:11,000 --> 00:04:14,000 so here we can see that the packet was forwarded out of the router 57 00:04:14,000 --> 00:04:20,000 or sent by the router and here we can see a replied back from router 2. 58 00:04:20,000 --> 00:04:26,000 so a very useful command but once again be careful using it in production 59 00:04:26,000 --> 00:04:28,000 sh ip route 60 00:04:28,000 --> 00:04:34,000 shows me that I don’t have a route in the routing table for 10.1.2.0 61 00:04:34,000 --> 00:04:37,000 and I also don’t have a gateway of last resort 62 00:04:37,000 --> 00:04:40,000 in other words, I don’t have a default gateway 63 00:04:40,000 --> 00:04:42,000 or default route configured on this router. 64 00:04:42,000 --> 00:04:45,000 So the router doesn’t know what to do with the traffic 65 00:04:45,000 --> 00:04:53,000 and hence when we ping the router tells us that the traffic is unroutable. 66 00:04:53,000 --> 00:04:56,000 The router doesn’t know where to forward the traffic 67 00:04:56,000 --> 00:05:01,000 so we need to configure static routes.