1
00:00:07,260 --> 00:00:12,180
OK, so in the last lecture, we talked about converting IP addresses into binary.

2
00:00:12,690 --> 00:00:17,640
So the reason we do that is so that you can think about a layer three address in the same way that a

3
00:00:17,640 --> 00:00:24,180
computer thinks about the way we address computers, see bits and binary humanzee decimals and words.

4
00:00:24,660 --> 00:00:28,380
So this is really the first step into understanding something.

5
00:00:28,700 --> 00:00:32,990
Now we're going to really put your newfound knowledge to work.

6
00:00:33,540 --> 00:00:39,990
So let's go ahead and open the command prompt and take a look at the IP address so you can see here

7
00:00:40,110 --> 00:00:43,650
I changed it to 10 that we got five to thirty four.

8
00:00:44,340 --> 00:00:48,540
Subnet mask is now 255 1855 activity to that zero.

9
00:00:49,080 --> 00:00:50,410
This is what we're going to do, right.

10
00:00:50,430 --> 00:00:56,340
I'm going to show you how you can determine which subnet or VLAN a particular host is sitting on right

11
00:00:56,340 --> 00:00:56,610
now.

12
00:00:57,150 --> 00:01:02,520
And you're also going to learn in the next lecture how you can calculate the total number of hosts that

13
00:01:02,520 --> 00:01:03,980
might be assigned to that subnet.

14
00:01:04,200 --> 00:01:06,660
So, you know, why would you want to do this?

15
00:01:06,660 --> 00:01:06,760
Why?

16
00:01:06,830 --> 00:01:07,620
Why does this matter?

17
00:01:07,620 --> 00:01:12,240
Because when you're thinking about scanning a billion or running an attack, you need to know what you're

18
00:01:12,240 --> 00:01:12,740
up against.

19
00:01:13,110 --> 00:01:13,410
Right.

20
00:01:13,410 --> 00:01:17,280
And this will help you get a better view of the lay of the land.

21
00:01:17,580 --> 00:01:17,970
All right.

22
00:01:17,980 --> 00:01:22,280
So first thing we want to do is just draw a little chart first.

23
00:01:22,290 --> 00:01:27,750
We're just going to create a couple of rows in the first row, which is going to represent the values

24
00:01:27,750 --> 00:01:30,660
of the interesting octet in your subnet mask.

25
00:01:31,440 --> 00:01:33,960
OK, so in other words, you have the octet.

26
00:01:34,650 --> 00:01:39,170
This is going to represent the octet where the bits are changing from one to zeros.

27
00:01:39,690 --> 00:01:42,870
So you have that transition from consecutive months, two consecutive zeros.

28
00:01:43,380 --> 00:01:48,930
And we're just going to zoom in on that decimal value for that mask and then analyze the bit positions.

29
00:01:48,960 --> 00:01:50,280
So let me show you what I'm talking about.

30
00:01:51,030 --> 00:01:51,930
We have 128.

31
00:01:53,410 --> 00:01:55,740
Right, then we have 192.

32
00:01:57,920 --> 00:01:58,760
224.

33
00:02:01,050 --> 00:02:04,080
To 40 to 48.

34
00:02:06,340 --> 00:02:13,420
Two fifty two and two fifty five, one, two, three, four, five, six, seven, a missing one.

35
00:02:13,570 --> 00:02:14,640
Oh I forgot to four.

36
00:02:15,190 --> 00:02:20,320
Let's go back to fifty four to fifty five.

37
00:02:20,440 --> 00:02:23,410
So these are subnet mask values that we're looking at right here.

38
00:02:24,110 --> 00:02:28,900
OK, and now we're going to try to position values underneath that.

39
00:02:29,290 --> 00:02:31,930
And I'm going to do is double one starting from the right side?

40
00:02:31,930 --> 00:02:35,710
I'm going to double the number one until I get all the way to the leftmost position.

41
00:02:36,190 --> 00:02:37,600
And I'm going explain what this means.

42
00:02:37,840 --> 00:02:38,410
Don't worry.

43
00:02:38,440 --> 00:02:41,710
But these are the position values also known as the block sizes.

44
00:02:42,470 --> 00:02:46,450
I started one top of one to two squared is four.

45
00:02:48,010 --> 00:02:57,160
And you can see this to the four is eight to the five is 16, and just keep on going 128.

46
00:02:59,350 --> 00:03:04,960
OK, so we have the mask values on the top, we got the block sizes on the bottom, and then we're going

47
00:03:04,960 --> 00:03:07,110
to have a section for the current bit positions.

48
00:03:07,480 --> 00:03:11,880
So let's review something really fast is what we're up against, right?

49
00:03:12,100 --> 00:03:24,820
10 dot three dot five dot thirty four and Damascus 255 dot 255 dot 252 that zero.

50
00:03:25,120 --> 00:03:25,450
Right.

51
00:03:26,200 --> 00:03:29,440
So what this means is that these first two bits.

52
00:03:29,950 --> 00:03:31,060
These first two octets.

53
00:03:32,430 --> 00:03:41,790
It's like that, and the doctor, these are consisting of 16 beds, a here, a here, this ACTTAB has

54
00:03:41,790 --> 00:03:43,420
a mix of ones and zeros.

55
00:03:43,420 --> 00:03:44,820
So it's not exactly 60 Minutes.

56
00:03:45,510 --> 00:03:52,270
So if we know that we start with 16 bits here, we can then zoom in and change the color a little bit.

57
00:03:52,860 --> 00:04:00,720
We can then zoom in from that third octet and look at this expanded position sort of layout for it.

58
00:04:01,170 --> 00:04:02,460
OK, so we've got 16 minutes.

59
00:04:03,180 --> 00:04:13,050
And if we want to keep counting until we get until 20 to 17, 18, 19, 20, 21, 22.

60
00:04:13,500 --> 00:04:18,350
So you can see that when we get to 250 to see, we've counted 22 bits.

61
00:04:18,750 --> 00:04:20,860
OK, so we're going to call that a 22.

62
00:04:21,690 --> 00:04:22,060
All right.

63
00:04:22,320 --> 00:04:24,900
So again, these are the mask values up here.

64
00:04:25,800 --> 00:04:27,510
These are the block sizes.

65
00:04:28,350 --> 00:04:36,210
And the bit positions would be one, two, three, four, five, six.

66
00:04:36,840 --> 00:04:37,140
Right.

67
00:04:37,410 --> 00:04:40,990
Because this number 252 and you break down the number of bits.

68
00:04:41,640 --> 00:04:42,480
This is what equals.

69
00:04:42,480 --> 00:04:43,080
How do I know?

70
00:04:43,080 --> 00:04:48,360
Because 128 plus 64 plus 32 for 16 plus eight plus four equals 252.

71
00:04:48,550 --> 00:04:50,970
So that's why we have 22 consecutive bits.

72
00:04:50,970 --> 00:04:52,290
And that's the subnet mask here.

73
00:04:53,040 --> 00:04:54,760
These last two bits are zero.

74
00:04:54,780 --> 00:04:55,950
So these are the big positions.

75
00:04:56,570 --> 00:05:02,940
Now, this is where things get a little bit messy because in order to determine the network we're on,

76
00:05:02,940 --> 00:05:09,660
we need to get that block size in the way we get the block size is we look at the rightmost bit of the

77
00:05:09,660 --> 00:05:10,140
mask.

78
00:05:11,210 --> 00:05:21,990
So let me just clear things up a little bit to make more sense of this to 55 to 45 to 50 to zero.

79
00:05:22,440 --> 00:05:28,050
This is one, two, three, four, five, six, seven, eight, five, six, seven, eight, one, two,

80
00:05:28,050 --> 00:05:29,870
three, four, five, six, seven, eight.

81
00:05:30,540 --> 00:05:30,780
Right.

82
00:05:31,350 --> 00:05:37,500
So the rightmost bit the third octet is the interesting octet where they 021 transition happens.

83
00:05:38,130 --> 00:05:39,300
The rightmost bit is this one.

84
00:05:39,810 --> 00:05:41,190
And if you remember, you may not.

85
00:05:41,190 --> 00:05:50,460
But from that previous screen, when you looked at all the enmasse values, we had 128, 192, 224,

86
00:05:51,300 --> 00:05:52,960
240, and you should write these out every time.

87
00:05:52,960 --> 00:05:54,330
It's really good to memorize these.

88
00:05:57,190 --> 00:06:00,250
Fifty two to fifty four to fifty five.

89
00:06:00,730 --> 00:06:06,780
And if you look at this, so you have eight here, get it here that 16, 17, 18, 19, 20, 21, 22,

90
00:06:07,530 --> 00:06:09,270
22, like 22 here.

91
00:06:09,960 --> 00:06:11,960
This equals this, OK?

92
00:06:12,780 --> 00:06:20,460
And if you look at the rightmost bit of the mask, this one right here, this is actually in the one

93
00:06:20,460 --> 00:06:32,300
two four eight 16, 32, 64, 128 252 is in this position, the number four position.

94
00:06:32,580 --> 00:06:32,910
Right.

95
00:06:33,240 --> 00:06:34,890
So number four is the block size.

96
00:06:35,220 --> 00:06:36,310
That's the main thing I want you to see.

97
00:06:36,660 --> 00:06:39,330
And so now that we have the block size, this is where we do the math.

98
00:06:40,710 --> 00:06:42,230
So we know the block size is a four.

99
00:06:43,530 --> 00:06:44,130
What do we do with it?

100
00:06:44,500 --> 00:06:56,400
We can do is we take the last network octet value of the IP 10 dot three dot five dot 34, last network

101
00:06:56,400 --> 00:07:03,330
octet value of this IP is this five adelines up from the mask is what shows you the network portion.

102
00:07:03,960 --> 00:07:06,150
Clearly the ten is in the network portion section.

103
00:07:06,150 --> 00:07:11,040
The three that the network portion because of the 255 255 for the ten fifty five for the three and there's

104
00:07:11,040 --> 00:07:11,700
252.

105
00:07:11,790 --> 00:07:12,990
That's also the network portion.

106
00:07:13,560 --> 00:07:15,760
It's in the third octet for this five.

107
00:07:15,810 --> 00:07:21,360
So what we do is we take that five and we divide it by the block side the four.

108
00:07:21,880 --> 00:07:27,100
So when we take five divided by four, we're going to get one point something.

109
00:07:27,630 --> 00:07:28,680
All we care about is the one.

110
00:07:30,120 --> 00:07:30,480
That's it.

111
00:07:31,410 --> 00:07:32,400
We don't care about the remainder.

112
00:07:32,400 --> 00:07:33,150
We just need the number.

113
00:07:33,990 --> 00:07:41,550
And then once we have that number, we multiply this number by the block size and one times four is

114
00:07:41,550 --> 00:07:42,140
equal to four.

115
00:07:42,180 --> 00:07:43,330
That's all the math we need to know.

116
00:07:44,070 --> 00:07:46,070
OK, so I hope that's not too complicated.

117
00:07:46,090 --> 00:07:52,770
OK, it's just a matter of first determining the block size and then taking that block size.

118
00:07:53,130 --> 00:07:59,130
Then it's a matter of taking the the interesting bit in the interesting octet and dividing that by the

119
00:07:59,130 --> 00:08:02,430
block size and taking that result and multiplying it by the block size.

120
00:08:03,120 --> 00:08:04,230
And then you have that number.

121
00:08:04,770 --> 00:08:07,530
Now what you can do is write out your subnets because, you know, now.

122
00:08:09,070 --> 00:08:12,550
Some that ranges, we're not going get into the rain just completely right now, but let me show you

123
00:08:12,550 --> 00:08:15,980
what you know now from this map that we just did what you can do now.

124
00:08:16,000 --> 00:08:17,890
You can take that IP 10.

125
00:08:18,370 --> 00:08:21,540
And as you're writing this out, you know, the block size of the four.

126
00:08:21,880 --> 00:08:23,350
So we're in the third octet.

127
00:08:23,890 --> 00:08:26,290
So you put a four there and then you just put a zero for the hosts.

128
00:08:26,620 --> 00:08:27,760
That's the first network.

129
00:08:28,450 --> 00:08:29,850
The second one would be ten.

130
00:08:30,110 --> 00:08:32,300
Three, eight.

131
00:08:32,480 --> 00:08:33,640
You just add another four.

132
00:08:34,170 --> 00:08:35,320
It's the second network.

133
00:08:35,500 --> 00:08:37,150
And these could be different floors of the same building.

134
00:08:37,150 --> 00:08:38,080
They could be different departments.

135
00:08:38,080 --> 00:08:42,760
They could be different, you know, logical units just depends on how the organization is divided.

136
00:08:43,090 --> 00:08:44,260
But these are different subnets.

137
00:08:46,600 --> 00:08:47,650
You do 12 here, right?

138
00:08:47,920 --> 00:08:48,490
It keeps going.

139
00:08:49,060 --> 00:08:53,230
And the point here now is now that we have these different subnets, we're going to we can basically

140
00:08:53,230 --> 00:09:00,820
see, you know, where our IP address is, because if you look at this, you can see now that we have

141
00:09:01,420 --> 00:09:05,150
10 DOT 4.0 and the next one is ten to zero, what, ten point three to five.

142
00:09:05,740 --> 00:09:09,790
That thirty four fits in between both of these networks.

143
00:09:10,510 --> 00:09:15,480
So we know then that we are on the 10 that we got, that's the zero network, this whole system, that

144
00:09:15,490 --> 00:09:20,970
network, his host is not in the top three eight zero network in the next election to show you how you

145
00:09:20,980 --> 00:09:25,810
can build your ranges and we can actually show your broadcast interests in the network I.D. and all

146
00:09:25,810 --> 00:09:26,380
that good stuff.

147
00:09:26,590 --> 00:09:27,430
I will say that for the next.

148
00:09:27,440 --> 00:09:29,020
Let's see in a second.
