1 00:00:09,090 --> 00:00:12,950 This is one of multiple videos discussing IP subnetting. 2 00:00:13,440 --> 00:00:19,410 I've received numerous questions with regards to IP subnetting and I'm gonna try and answer a lot 3 00:00:19,410 --> 00:00:21,550 of them through these videos. 4 00:00:22,610 --> 00:00:24,260 So here's a question for you. 5 00:00:24,580 --> 00:00:26,810 Will PC 1 on the left 6 00:00:26,870 --> 00:00:33,860 be able to ping PC 2 on right in this typology, PC on the left is configured with an IP address of 7 00:00:33,860 --> 00:00:38,320 10.1.255.1 slash 17 8 00:00:38,690 --> 00:00:42,210 and the PC on the right is configured with an IP address of 10.1 9 00:00:42,250 --> 00:00:51,950 .28 .2 slash 17 in the apology I'm using Cisco routers instead of Windows PCs. 10 00:00:53,160 --> 00:00:59,320 As it's important for you to learn the Cisco CLI and it's important for you to learn commands available 11 00:00:59,500 --> 00:01:01,320 on Cisco devices. 12 00:01:01,310 --> 00:01:08,290 So show IP interface brief shows me the IP address configured on the gigabit 00 interface of this router 13 00:01:10,530 --> 00:01:19,790 show IP interface brief shows me the IP address configured on gigabit 00 of this router, show run interface 14 00:01:19,790 --> 00:01:29,180 gigabit 00 shows me the configuration of the IP address and we can see that over here as well and show 15 00:01:29,210 --> 00:01:38,810 IP interface gigabit 00 shows us the configuration of router 2 and same on the side, show IP interface 16 00:01:38,810 --> 00:01:47,420 gigabit 00 that's the IP address of router 1 acting as PC 1 here's the IP address of router 2 acting 17 00:01:47,420 --> 00:01:48,700 as PC 2. 18 00:01:49,010 --> 00:02:00,600 So will these two routers acting as PCs be able to ping each other so ping 10.1.255.1 19 00:02:01,220 --> 00:02:01,560 router 2 20 00:02:01,570 --> 00:02:09,220 is able to ping router 1 we can actually see that in real-time by using a de-bug IP ICMP command 21 00:02:09,910 --> 00:02:15,530 that de-bug allows us to see ICMP traffic in real time. 22 00:02:15,640 --> 00:02:23,520 ICMP is the protocol used by ping. In this example I'll send a single ping to router 1, ping succeeds 23 00:02:24,280 --> 00:02:34,390 and we can see that a echo reply was sent back to router 2 with a source IP address of 10.1.255.1 destination 24 00:02:34,420 --> 00:02:37,880 IP address of 10.1.128.2 25 00:02:38,350 --> 00:02:41,490 So how do we know that they were in the same subnet. 26 00:02:43,260 --> 00:02:50,470 Show run interface gigabit 00, show run interface gigabit 00. 27 00:02:50,640 --> 00:02:53,780 You need to look at network and host portions 28 00:02:53,780 --> 00:02:57,830 255 means that the first octet is network, 29 00:02:58,000 --> 00:03:02,330 255 means that the second octet is network, here 30 00:03:02,340 --> 00:03:06,030 however we've got 128 in the network portion. 31 00:03:06,030 --> 00:03:10,910 So it becomes a little bit more tricky to work out host and network portions. 32 00:03:11,970 --> 00:03:14,800 So let's write that out 33 00:03:15,570 --> 00:03:18,960 together 10.1 is fairly simple 34 00:03:19,080 --> 00:03:20,820 that's a network portion. 35 00:03:21,200 --> 00:03:29,350 However, 128 in binary equals 1 followed by seven binary zeros. 36 00:03:29,520 --> 00:03:32,560 Just put a space here to make it easier to read 37 00:03:32,580 --> 00:03:35,040 obviously that space doesn't exist 38 00:03:35,820 --> 00:03:39,330 but I'll just do that for clarity of reading. 39 00:03:39,600 --> 00:03:41,690 So this is the IP address portion 40 00:03:42,030 --> 00:03:49,060 and this is the mask a binary one in the mask indicates that that portion is part of the network 41 00:03:49,780 --> 00:03:54,250 zeroes in the mask indicates that this is host portion. 42 00:03:54,250 --> 00:04:01,900 So in this example, the network portion of the address equals 10.1 in decimal 43 00:04:02,080 --> 00:04:12,360 and then the first binary bit in the third octet if we look at this address here 10.1 is network 44 00:04:12,370 --> 00:04:17,970 portion based on that, that's the same as what we've got over here. 45 00:04:18,310 --> 00:04:26,600 But in the third octet we've got 255, 255 in binary is eight binary ones 46 00:04:26,650 --> 00:04:29,320 and again I'll put a space here just for clarity. 47 00:04:29,650 --> 00:04:32,640 The mask equals 128, 48 00:04:32,830 --> 00:04:44,990 so in this example, the network portion is the first bit which is the same as 128. 49 00:04:45,020 --> 00:04:52,190 So if you look at the address here, 10.1. first binary bit is network and the same is true 50 00:04:52,190 --> 00:04:52,760 here. 51 00:04:52,910 --> 00:04:57,110 10.1 one plus first binary bit in third octet is network. 52 00:04:57,380 --> 00:05:00,480 The rest of the address is the host portion. 53 00:05:00,680 --> 00:05:11,530 So I'll write it out fully 10.1.255.1 in binary equates to 0000 1010. 54 00:05:11,540 --> 00:05:23,020 That's 10 dot seven binary zeros and one binary one that's 1 dot eight binary 1 55 00:05:25,610 --> 00:05:34,430 followed by seven binary zeros and a binary one. 56 00:05:34,470 --> 00:05:40,560 So that is the address in binary of 10.1.255.1 57 00:05:40,680 --> 00:05:46,680 and if we look at the mask we've got 8 binary ones in the first octet. 58 00:05:46,680 --> 00:05:55,330 So the first octet is network, second octet is also network. 59 00:05:55,600 --> 00:06:05,280 But in the third octet, we have one binary one followed by seven binary zeros. 60 00:06:08,250 --> 00:06:11,240 So this portion is the network portion, 61 00:06:11,550 --> 00:06:14,000 this portion is the host portion. 62 00:06:17,980 --> 00:06:18,960 So blue is host, 63 00:06:23,980 --> 00:06:26,380 red is network portion. 64 00:06:26,380 --> 00:06:37,450 If we look at the other address used in the network which is 10.1.128.2 65 00:06:40,780 --> 00:06:46,810 the host portion is different but the network portion is the same. 66 00:06:46,810 --> 00:06:53,020 So these two devices even though they have different host portions are still in the same subnet 67 00:06:53,020 --> 00:06:55,280 based on that information there. 68 00:06:55,600 --> 00:06:58,180 So they are in the same subnet 69 00:07:01,280 --> 00:07:03,080 and hence the device on the right 70 00:07:03,080 --> 00:07:10,790 can ping the device on the left, ping succeed and we can see the debug output on the screen. 71 00:07:11,210 --> 00:07:18,010 So I hope you found this video useful if you did please like it and please subscribe to my YouTube channel. 72 00:07:18,020 --> 00:07:20,680 I wish you all the very best.