# Subnets - 172.16.0.0/18 - why 4 subnets

steve_murphy
Posts:

**5**Member ■□□□□□□□□□
in CCNA & CCENT

Hi,

I've come across this in the ICND1 CCNA book and can't work out why there are 4 subnets with 172.16.0.0 and 255.255.192.0. I understand there are 16 Network bits (Class and there are two subnet bits (x.x.192.0 - prefix /18 ?) but I can't work out why that equates to 4 subnets rather than 2. I see the explanation 2^2 but I don't understand why we multiply the two subnet bits gained in subnet /18 by 2 to get 4.

I'm sure it's quite simple but I'm blinkered and can't see it at the minute.

Cheers

Steve

I've come across this in the ICND1 CCNA book and can't work out why there are 4 subnets with 172.16.0.0 and 255.255.192.0. I understand there are 16 Network bits (Class and there are two subnet bits (x.x.192.0 - prefix /18 ?) but I can't work out why that equates to 4 subnets rather than 2. I see the explanation 2^2 but I don't understand why we multiply the two subnet bits gained in subnet /18 by 2 to get 4.

I'm sure it's quite simple but I'm blinkered and can't see it at the minute.

Cheers

Steve

0

## Comments

60Member ■■■□□□□□□□0

64

128

192

Each bit has two options, 1 or 0. With two bits your possible options are 00, 11, 10, 01.

Hence the 4 subnets

Edit: a /17 would give you a 0 and 128 for your two subnets.

If you need more explanation, then be specific on what it is and when I am not using my phone to type I will answer the best I can.

5Member ■□□□□□□□□□It is purely learning at the moment - trying to get my head around the concept. So am I right in thinking the 4 subnets would be 172.16.0.x, 172.16.64.x, 172.16.128.x and 172.16.192.x where "x" would be hosts 1 to 254 ? I think I get why 2^2 now - that's the 4 options 00, 11, 10, 01 you mention. /19 would give 8 subnets 2^2^2 and the possible combination of binary options ?

423MemberWith a /18 mask (255.255.192.0) the 'network' address uses not only the first two Octets, but also the two most significant bits of the 3rd Octet, while the 'hosts' are addressed by the remaining 6 bits of the 3rd Octet plus all 8 bits of the 4th Octet.

In order to 'see' what's going on, for me, I like to map out the binary (host bits are in red)...

If we 'set' all the 'host bits' (to reveal the 'broadcast' for Subnet 172.16.0.0) we get...

So the 'host' range is x.x.0.1 to x.x.63.254. The next IP Address (the one after the Broadcast) would be x.x.64.0; the 2nd Subnet.

I hope this is of help.

60Member ■■■□□□□□□□1 to 62

65 to 126

129 to 190

193 to 254

I am pretty sure I got those right but I'm not 100% awake right now so if someone sees this and knows I'm wrong correct me.

Edit: and like I said I am not paying attention haha. You have more than 1 octet of hosts. My numbers above are for 1 octet....the guy above is correct. Just make sure to account for each beginning and end of the range that you eliminate as not useable.

5Member ■□□□□□□□□□Thanks !

423MemberYou're very welcome.

RE: BIN>DEC/DEC>BIN conversions: I use a Casio fx-115 Scientific Calculator (it's maybe 25 to 30 years old and gives my age away ) and I find it invaluable! I've a couple of apps on my phone (Android) also, but I love old calc'.

5Member ■□□□□□□□□□42Member ■□□□□□□□□□subnet mask is /18 so the interesting octet (the one you care about) is the 3rd octet.

Remember the power of 2s for the 8 bits per octet: 128 64 32 16 8 4 2 1

Number of bits for first two octets is 16. So the third octet will have two bits which include 128 and 64 going left to right. 128 + 64 = 192 which is where the 192 in the subnet mask comes from.

The value 64 is in the bit position for the 18th bit in the 3rd octet.

The value of 64 is your magic number

The third octet will increment by a value of 64 because it is your magic number.

0 to 63

64 to 127

128 to 191

192 to 255

5Member ■□□□□□□□□□