1 00:00:09,540 --> 00:00:13,300 This is one of multiple videos discussing IP subnetting. 2 00:00:13,500 --> 00:00:20,070 I've received a number of questions asking me to explain various subnetting scenarios and this is one 3 00:00:20,070 --> 00:00:21,310 of them. 4 00:00:21,340 --> 00:00:30,720 So can the PC on the left configure it with this IP address 10 .1.248.1 slash 20 ping the PC 5 00:00:30,720 --> 00:00:37,810 on the right with IP address 10.1.192.2 slash 20. 6 00:00:37,920 --> 00:00:46,440 In this example, I'm using Cisco routers as my PCs and I'm doing that because it's important that you 7 00:00:46,440 --> 00:00:50,000 learn the Cisco CLI. 8 00:00:50,110 --> 00:00:56,680 However, the subnetting behavior will be the same on Cisco versus a PC but it gives us a lot of options 9 00:00:56,710 --> 00:01:00,950 to troubleshoot and test our subnetting scenarios. 10 00:01:01,300 --> 00:01:10,290 So this is the IP address configured on gigabit 00, show run interface gigabit 00 shows us the IP address 11 00:01:10,290 --> 00:01:19,670 configuration and show IP interface gigabit 00 shows us the IP address inside the notation. 12 00:01:19,670 --> 00:01:27,270 So that's the address inside a notation and that's the address configured in dotted decimal notation. 13 00:01:27,430 --> 00:01:34,520 I'll do the same here show run interface gigabit 00 there's the IP address of PC 2 or router 2 acting 14 00:01:34,520 --> 00:01:41,520 as PC 2 dotted decimal notation and show IP interface gigabit 00. 15 00:01:41,900 --> 00:01:47,660 And what I'll do is only include the IP address of 10. 16 00:01:47,930 --> 00:01:52,910 So there's the IP address inside the notation. 17 00:01:53,040 --> 00:02:03,350 I could do it this way which shows all the output but it's nice to have that output as well as this 18 00:02:03,350 --> 00:02:04,760 output on the same screen. 19 00:02:07,440 --> 00:02:16,580 I'll do the same here show run interface gigabit 00 show IP interface gigabit 00 and I'll include 10. 20 00:02:16,950 --> 00:02:23,130 So there's the IP address inside the notation and a dotted decimal notation. 21 00:02:23,130 --> 00:02:27,310 So the question again can these two PCs ping each other. 22 00:02:27,720 --> 00:02:28,780 So let's test it. 23 00:02:28,800 --> 00:02:31,950 Ping 10.1.248.1 24 00:02:31,980 --> 00:02:40,660 notice the pings are failing ping 10.1.192.2, pings are failing. 25 00:02:40,680 --> 00:02:43,620 Why are they failing? 26 00:02:43,620 --> 00:02:48,000 The answer is the PCs are in different subnets. 27 00:02:48,000 --> 00:02:53,130 They connected physically to each other and we can see that by using the command show CDP neighbors 28 00:02:53,790 --> 00:03:01,640 notice router1 is connected to router 2 on gigabit 00 and router 2 is connected back on gigabit 29 00:03:01,730 --> 00:03:02,870 00. 30 00:03:03,330 --> 00:03:08,670 So they're definitely connected to each other physically but they can't ping each other. 31 00:03:10,790 --> 00:03:17,320 To help explain, I've taken the IP addresses in decimal notation and converted them to binary. 32 00:03:17,570 --> 00:03:22,100 So this is the binary representation of 10.1.248.1 33 00:03:22,370 --> 00:03:32,630 Here's the binary representation of 10.1.192.2 slash 20 means 20 binary ones in the subnet 34 00:03:32,630 --> 00:03:33,450 mask. 35 00:03:33,500 --> 00:03:37,040 Here's the subnet mask with 20 binary ones. 36 00:03:37,070 --> 00:03:44,810 I typically don't have a space between your binary bits but I've just added that to make it easier to 37 00:03:44,810 --> 00:03:45,830 read. 38 00:03:45,830 --> 00:03:50,380 So here's the first octet, second octet, third octet 39 00:03:50,660 --> 00:03:57,010 But notice four binary ones in the third octet and four binary zeros. 40 00:03:57,350 --> 00:03:58,840 The same is shown here 41 00:03:58,860 --> 00:04:00,240 slash 20. 42 00:04:00,290 --> 00:04:03,200 So are these two devices in the same subnet. 43 00:04:03,200 --> 00:04:04,800 The answer is, No 44 00:04:04,890 --> 00:04:10,710 Because notice the network portion is different on these two devices. 45 00:04:10,820 --> 00:04:18,180 I've highlighted the network portion in red, the host portion as shown in blue. For devices to be in 46 00:04:18,180 --> 00:04:25,980 the same subnet the network portion or subnet portion needs to be the same on both devices, notice here 47 00:04:26,100 --> 00:04:28,070 the subnet portion is different. 48 00:04:28,110 --> 00:04:34,530 So they are in different subnets and won't be able to ping each other unless you put a router between 49 00:04:34,530 --> 00:04:37,580 them or change the subnet mask. 50 00:04:38,010 --> 00:04:41,790 What would you change the subnet mask to, to allow them to ping each other? 51 00:04:46,050 --> 00:04:58,500 And the answer is make the subnet portion this which means that the host portion is now changed 52 00:05:00,190 --> 00:05:01,260 to that. 53 00:05:01,480 --> 00:05:04,090 So this is the host portion 54 00:05:04,260 --> 00:05:09,000 this is the network portion, network portion is now the same. 55 00:05:09,000 --> 00:05:20,290 That equates to 8 plus 8, 16 17 18 binary bits which equates to 255.255.192. 56 00:05:20,370 --> 00:05:30,010 So previously that was the IP address on this side and that was the IP address on the right-hand side. 57 00:05:30,080 --> 00:05:42,500 So we would change the IP address to 10.1.192.2, 255.255.192.0 and on this side interface 58 00:05:42,500 --> 00:05:51,500 gigabit00, IP address 10.1.248.1, 255.255.192.0. 59 00:05:51,920 --> 00:05:57,620 So same IP address all I've changed is the subnet mask. 60 00:05:57,620 --> 00:06:05,680 So can the router on the right acting as our PC ping the router on the left acting as a PC. 61 00:06:05,780 --> 00:06:07,970 And the answer is, Yes it can. 62 00:06:07,970 --> 00:06:14,910 It dropped the first ping while doing an ARP but notice device on the right can ping the device on the 63 00:06:14,910 --> 00:06:20,170 left and the device on the left can ping the device on the right. 64 00:06:20,400 --> 00:06:32,560 And that's just because we changed the subnet mask to slash 18 and put the devices in the same subnet. 65 00:06:32,560 --> 00:06:38,860 I hope you enjoyed the video if it's been of benefit to you please like it and please subscribe to my YouTube 66 00:06:38,890 --> 00:06:39,870 channel. 67 00:06:39,880 --> 00:06:41,440 I wish you all the very best.