# Subnets - 172.16.0.0/18 - why 4 subnets

steve_murphy
Posts:

**5**Member ■□□□□□□□□□
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

#### Welcome

We're proud to offer IT and security pros like you access to one of the largest IT and security certification forums on the web.

## Quick Links

#### Categories

- 109.9K All Categories
- 121 Welcome Center
- 21 Announcements
- 3 Forum Rules of Engagement
- 62 Introduce Yourself
- 34 TechExams Support
- 87.5K Certification Preparation
- 131 Check Point: CCSA & CCSE
- 32.8K Cisco
- 21.5K CCNA & CCENT
- 368 CCDA & CCDP
- 8.9K CCNP
- 1.7K CCIE
- 413 Cloud Certifications
- 154 Amazon Web Services (AWS)
- 8 Azure
- 103 CCSP
- 73 Cloud+ & Cloud Essentials
- 15.4K CompTIA
- 5K A+
- 223 CASP+
- 93 CySA+
- 970 Linux+
- 4.4K Network+
- 23 PenTest+
- 259 Project+
- 3.8K Security+
- 329 Server+
- 249 Other CompTIA Certifications
- 1.2K EC-Council
- 583 CHFI
- 600 CEH
- 1.3K GIAC
- 27 IAPP
- 960 ISACA
- 11 CRISC
- 265 CISA
- 670 CISM
- 4.2K (ISC)²
- 601 CISSP
- 32 CSSLP
- 3.6K SSCP
- 921 Juniper
- 721 LPI, Red Hat & Linux Foundation
- 18.5K Microsoft
- 135 MCSA 2016 / MCSE 2016
- 159 Windows 10 exams
- 139 Windows 8 exams
- 1.4K Windows 7 exams
- 1.6K MCSA / MCSE on Windows 2012 General
- 2.3K MCTS / MCITP on Windows 2008 General
- 828 Exchange Server & Office Communications Server Exams
- 528 Other Microsoft Electives
- 350 MCSA/MCSE: Security
- 300 Microsoft Developers Certifications
- 483 SQL Server exams
- 143 Offensive Security: OSCP & OSCE
- 2K Other Security Certifications
- 335 Virtualization Certifications
- 231 Citrix Certifications
- 97 VMware
- 1.9K Other Certifications
- 6 Business Analyst Certifications
- 387 CWNP Certifications
- 860 ITIL Certifications
- 212 Project Management Certifications
- 84 Apple Mac OS X Certifications
- 62 Novell Certification
- 81 Oracle Certifications
- 52 Sun Microsystems Java Certification
- 112 Storage Certifications
- 6.6K General Certification
- 17.6K Education & Development
- 35 Colleges & Schools
- 32 Educational Resources
- 17.5K IT Jobs / Degrees
- 34 Professional Development
- 91 Cybersecurity
- 1 Forensics
- 5 Pentesting
- 4 Cloud Security & IoT
- 8 OWASP
- 28 Security Awareness & Training
- 32 Security News & Breaches
- 19.9K General
- 13 Conferences & Events
- 12 Computer Gaming
- 3 Data Center
- 43 Classifieds
- 26 For Sale
- 6 Wanted (ISO)
- 9 Help Wanted
- 11 Just for Fun
- 17.4K Off-Topic
- 9 Scripting
- 2 Show Us Your Tech!
- 7 Troubleshooting
- 2.4K Virtualization

## 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 ■□□□□□□□□□44Member ■■■□□□□□□□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 ■□□□□□□□□□