1
00:00:00,000 --> 00:00:05,000
Here’s one more example using the binary method

2
00:00:05,000 --> 00:00:07,000
and after this I’m gonna show you the quick method.

3
00:00:07,000 --> 00:00:19,000
If a PC had an address of 172.16.129.1/17 or 172.16.129.1 255.255.128.0

4
00:00:19,000 --> 00:00:24,000
you would once again need to work out where the subnet and host portions are split.

5
00:00:24,000 --> 00:00:29,000
In this example /17 means that 17 bits of the 32 bits IP address

6
00:00:29,000 --> 00:00:33,000
are used for network or subnet and the remaining 15 bits

7
00:00:33,000 --> 00:00:35,000
are used as the host portion of the address.

8
00:00:35,000 --> 00:00:43,000
So 172.16.129.1/17 means that the split takes place in the 3rd octet.

9
00:00:43,000 --> 00:00:48,000
The reason why once again is the first octet is 8 bits in size, the second octet

10
00:00:48,000 --> 00:00:54,000
is 8 bits in size so that gives us 16 bits, 17 bits in the network or subnet

11
00:00:54,000 --> 00:00:58,000
means that the split between subnet and host is in the 3rd octet.

12
00:00:58,000 --> 00:01:03,000
So once again you need to convert the 3rd and 4th octet into binary.

13
00:01:03,000 --> 00:01:07,000
There’s no need to convert the  1st 2 octet as they are part of the network

14
00:01:07,000 --> 00:01:09,000
or subnet portion of the address.

15
00:01:09,000 --> 00:01:12,000
You only need to convert the host portion of the address into binary.

16
00:01:12,000 --> 00:01:19,000
So in binary 1 followed by 6 binary 0's followed by 1 equals 129 in decimal,

17
00:01:19,000 --> 00:01:25,000
7 0's followed by binary 1 is the binary equivalent of 1 in decimal.

18
00:01:25,000 --> 00:01:29,000
Once again refer to the binary section of this course if you're not sure

19
00:01:29,000 --> 00:01:31,000
how to convert decimal into binary and vice versa.

20
00:01:31,000 --> 00:01:37,000
So once again 172.16.1 is the network or subnet portion of the address

21
00:01:37,000 --> 00:01:41,000
and the remaining bits of the host portion of the address.

22
00:01:41,000 --> 00:01:46,000
So to work out the network or subnet portion of the address

23
00:01:46,000 --> 00:01:49,000
you need to fill the host portion of an address with binary 0's.

24
00:01:49,000 --> 00:01:54,000
So this green portion of the address needs to be filled with 0's and that will give

25
00:01:54,000 --> 00:02:01,000
us the subnet which is 172.16.1, that binary 1 is part of the network address

26
00:02:01,000 --> 00:02:04,000
followed by 7 0's, followed by 8 0's.

27
00:02:04,000 --> 00:02:09,000
So in the  3rd octet we have 1 binary 1 followed by 7 binary 0's

28
00:02:09,000 --> 00:02:14,000
which give us the equivalent decimal value of 128, the 4th octet is filled

29
00:02:14,000 --> 00:02:19,000
with binary 0's which will give us the equivalent decimal value of 0.

30
00:02:19,000 --> 00:02:27,000
So the subnet that this host 172.16.129.1 resides on is 172.16.128.0

31
00:02:27,000 --> 00:02:33,000
To work out the first host in the same subnet, you need to fill the host portion

32
00:02:33,000 --> 00:02:37,000
with binary 0's except for the last bit which is set to binary 1.

33
00:02:37,000 --> 00:02:42,000
and that would give you 172.16.128.1

34
00:02:42,000 --> 00:02:47,000
To work out the last host, you fill the host portion of the address with binary 1s

35
00:02:47,000 --> 00:02:51,000
except for the last bit which is set to binary 0

36
00:02:51,000 --> 00:02:57,000
so that would give you 172.16.255.254

37
00:02:57,000 --> 00:03:01,000
Now just to make sure that you understand this, notice the 3rd octet is filled

38
00:03:01,000 --> 00:03:08,000
with  binary 1's, there is a single red binary 1 followed by 7 green binary 1's.

39
00:03:08,000 --> 00:03:13,000
That however is the single octet, so there are 8 binary 1's

40
00:03:13,000 --> 00:03:15,000
which gives you a value of 255.

41
00:03:15,000 --> 00:03:20,000
The 4th octet is filled with 7 binary 1's, followed by binary 0

42
00:03:20,000 --> 00:03:24,000
which gives you a decimal equivalent of 254.

43
00:03:24,000 --> 00:03:28,000
To work out the broadcast address, fill the host portion

44
00:03:28,000 --> 00:03:34,000
of the address with binary 1's, so that would give you 172.16

45
00:03:34,000 --> 00:03:41,000
8 binary 1's in the 3rd octet which is 255 and 8 binary 1's on the 4th octet

46
00:03:41,000 --> 00:03:47,000
which is 255 so the broadcast address is 172.16.255.255

47
00:03:47,000 --> 00:03:57,000
So in summary, host 172.16.129.1 is on subnet 172.16.128.0

48
00:03:57,000 --> 00:04:02,000
The first host in the subnet is 172.16.128.1, the last host

49
00:04:02,000 --> 00:04:10,000
in the subnet is 172.16.255.254 and the broadcast address is 172.16.255.255

50
00:04:10,000 --> 00:04:16,000
I hope those 3 examples have helped you learn the binary method to work out the

51
00:04:16,000 --> 00:04:19,000
subnet, 1st host, last host and broadcast address when

52
00:04:19,000 --> 00:04:24,000
presented with an IP address of a host and its subnet mask

53
00:04:24,000 --> 00:04:29,000
Now that we’ve seen the binary method, let me show ou the quick method

54
00:04:29,000 --> 00:04:33,000
which allows you very quickly to work out the answer to question like; what subnet

55
00:04:33,000 --> 00:04:38,000
is this host on, what is the broadcast address, what is the first host

56
00:04:38,000 --> 00:04:42,000
and last host in the same subnets as this specific host.

57
00:04:42,000 --> 00:04:47,000
This method is reliant in you remembering tables and methods

58
00:04:47,000 --> 00:04:49,000
rather than relying on binary.

59
00:04:49,000 --> 00:04:53,000
So the first table to remember is the following; the values at the top of this

60
00:04:53,000 --> 00:05:00,000
table like 128, 64 and so forth are the decimal equivalents for the binary values

61
00:05:00,000 --> 00:05:07,000
such as 1 followed by 7 binary 0's is equal to 128, 3 binary 0's followed

62
00:05:07,000 --> 00:05:11,000
by binary 1 followed by 4 binary 0's is equal to 16.

63
00:05:11,000 --> 00:05:15,000
You should be quite comfortable to write out this table

64
00:05:15,000 --> 00:05:18,000
from memory before attempting any subnetting question.

65
00:05:18,000 --> 00:05:24,000
So remember it's 128 64 32 16 8 4 2 and 1

66
00:05:24,000 --> 00:05:28,000
in the IP addressing section of this course  I explained those values

67
00:05:28,000 --> 00:05:32,000
in a lot of detail and explain how you get to those specific values.

68
00:05:32,000 --> 00:05:34,000
So I’m not gonna cover it again here.

69
00:05:34,000 --> 00:05:40,000
To work out the values in the second line of this table, just take 256 less

70
00:05:40,000 --> 00:05:43,000
the top value which will give you the second value.

71
00:05:43,000 --> 00:05:47,000
So 256 minus 128 gives you 128

72
00:05:47,000 --> 00:05:53,000
256 minus 64 gives you 192 and so forth and so on,

73
00:05:53,000 --> 00:06:02,000
as an example 256 minus 32 gives you 224, 256 minus 1 gives you 255

74
00:06:02,000 --> 00:06:03,000
so you only need to remember the top values and then it’s very simple

75
00:06:03,000 --> 00:06:08,000
to work out the values in the second line.

76
00:06:08,000 --> 00:06:12,000
A lot of people just memorize the entire table for speed and efficiency

77
00:06:12,000 --> 00:06:16,000
but once again write this table out before attempting any binary question.

78
00:06:16,000 --> 00:06:23,000
So if you were given a host address of 172.16.35.123/20 or the decimal

79
00:06:23,000 --> 00:06:29,000
equivalent 255.255.240.0 the first thing you need to work out is, why is the

80
00:06:29,000 --> 00:06:35,000
subnet mask is not equal to 255 and secondly make a note of that octet,

81
00:06:35,000 --> 00:06:40,000
in other words that the network and host portion both reside within that octet,

82
00:06:40,000 --> 00:06:43,000
with the subnet mask is not equal to 255

83
00:06:43,000 --> 00:06:48,000
So in this example, once again we have an address 172.16.35.123

84
00:06:48,000 --> 00:06:53,000
and the subnet mask is 255.255.240.0, so in the 3rd octet

85
00:06:53,000 --> 00:06:59,000
the subnet  mask is not equal to 255 but is equal to a value of 240.

86
00:06:59,000 --> 00:07:02,000
That means that in this octet there is a split

87
00:07:02,000 --> 00:07:04,000
between the subnet and the host portions.

88
00:07:04,000 --> 00:07:08,000
So the 1st 2 octets are network or subnet the last octet is host

89
00:07:08,000 --> 00:07:12,000
but in the third octet there is a split between subnet and host.

90
00:07:12,000 --> 00:07:20,000
Step 2 is to subtract that subnet mask value that is now 255 from 256.

91
00:07:20,000 --> 00:07:28,000
So 256 less 240 would give you 16, what 16 tells us is that network are

92
00:07:28,000 --> 00:07:33,000
incrementing in values of 16, so the first network would be 0

93
00:07:33,000 --> 00:07:40,000
second one 16, third one 32, fourth one is 48 and so forth and so on.

94
00:07:40,000 --> 00:07:44,000
The 16 lets us now the increment of the networks.

95
00:07:44,000 --> 00:07:47,000
Now the table I showed you in step 1 will allow you very quickly and easily

96
00:07:47,000 --> 00:07:52,000
to work this out, so in the third octet we have a value of 240,

97
00:07:52,000 --> 00:07:55,000
so 256 less 240 gives you 16.

98
00:07:55,000 --> 00:08:02,000
So remember in the 3rd octet the subnet mask was 240, 256 less 240 gives us 16

99
00:08:02,000 --> 00:08:06,000
notice in the IP address the 3rd octet value is 35

100
00:08:06,000 --> 00:08:10,000
so part of 35 is network and part of 35 is host.

101
00:08:10,000 --> 00:08:14,000
So in step 3 we worked out where 35 fits

102
00:08:14,000 --> 00:08:17,000
in the range of networks worked out in step 2

103
00:08:17,000 --> 00:08:22,000
Now in step 2 we worked out that 256 less 240 is 16

104
00:08:22,000 --> 00:08:26,000
so our networks are in multiples of 16.

105
00:08:26,000 --> 00:08:31,000
So just start at 0 and go until you pass the value in the question.

106
00:08:31,000 --> 00:08:35,000
So as an example, the first network would be 0 in the 3rd octet,

107
00:08:35,000 --> 00:08:37,000
the 2nd network would be 16 on the 3rd octet

108
00:08:37,000 --> 00:08:41,000
the 3rd one would be 32 and the 4th one would be 48.

109
00:08:41,000 --> 00:08:47,000
So 35 sits somewhere between 32 and 48 and thus

110
00:08:47,000 --> 00:08:57,000
we know that 172.16.35.123 is on network 172.16.32.0

111
00:08:57,000 --> 00:09:02,000
The way you work that out is to leave the network portion of the address the same.

112
00:09:02,000 --> 00:09:06,000
In other words,  this blue portion the first 2 octets remains the same,

113
00:09:06,000 --> 00:09:13,000
the subnet or host octet that lies between 32 and 48 as per our calculation

114
00:09:13,000 --> 00:09:17,000
in step 3 gets rounded down to the nearest value.

115
00:09:17,000 --> 00:09:24,000
so 35 is between 32 and 48, and rounding 35 down we get 32.

116
00:09:24,000 --> 00:09:27,000
So the 3rd octet is equivalent to 32.

117
00:09:27,000 --> 00:09:31,000
Lastly the host portion of the address is just set to 0.

118
00:09:31,000 --> 00:09:37,000
So you now know that 172.16.35.123 is on network 172.16

119
00:09:37,000 --> 00:09:41,000
because the blue portion or network portion remains the same

120
00:09:41,000 --> 00:09:46,000
35 is rounded down to 32 because the subnet host portion lies

121
00:09:46,000 --> 00:09:54,000
between 32 and 48 and the host portion is just set to 0, in other words 172.16.32.0

122
00:09:54,000 --> 00:09:59,000
It's as simple as that to work out the subnet that our hosts resides on.
