# the simplest and fastest way to subnet

raaki_88
Member Posts:

**13**■□□□□□□□□□
i found these techniques in subnetting secrets and found them very effective hoping that these will help you too

firstly you need to have remember two tables ...

1.basic table of first host , last host table

2.the crucial one to all calculation table ...

here are the two

subnet

firsthost

lasthost

broadcast

hence in this way this can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

128

192

224

240

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

********************************************************************************

*********************************************

let me check with the formatter , if it comes correctly i will go ahead explaining the concept if not i will host it to image shack and explain it

regards

raaki

firstly you need to have remember two tables ...

1.basic table of first host , last host table

2.the crucial one to all calculation table ...

here are the two

subnet

firsthost

lasthost

broadcast

hence in this way this can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

128

192

224

240

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

********************************************************************************

*********************************************

let me check with the formatter , if it comes correctly i will go ahead explaining the concept if not i will host it to image shack and explain it

regards

raaki

#When You Aim For Perfection You Discover It As a Moving Target#

#### 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

- 110.5K All Categories
- 172 Welcome Center
- 32 Announcements
- 4 Forum Rules of Engagement
- 89 Introduce Yourself
- 44 TechExams Support
- 87.9K Certification Preparation
- 131 Check Point: CCSA & CCSE
- 32.9K Cisco
- 21.6K CCNA & CCENT
- 368 CCDA & CCDP
- 8.9K CCNP
- 1.7K CCIE
- 441 Cloud Certifications
- 164 Amazon Web Services (AWS)
- 11 Azure
- 109 CCSP
- 74 Cloud+ & Cloud Essentials
- 15.4K CompTIA
- 5K A+
- 228 CASP+
- 98 CySA+
- 971 Linux+
- 4.4K Network+
- 25 PenTest+
- 262 Project+
- 3.8K Security+
- 331 Server+
- 249 Other CompTIA Certifications
- 1.2K EC-Council
- 584 CHFI
- 605 CEH
- 1.4K GIAC
- 33 IAPP
- 992 ISACA
- 15 CRISC
- 273 CISA
- 688 CISM
- 4.2K (ISC)²
- 625 CISSP
- 33 CSSLP
- 3.6K SSCP
- 923 Juniper
- 726 LPI, Red Hat & Linux Foundation
- 18.5K Microsoft
- 148 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
- 529 Other Microsoft Electives
- 349 MCSA/MCSE: Security
- 300 Microsoft Developers Certifications
- 484 SQL Server exams
- 147 Offensive Security: OSCP & OSCE
- 2K Other Security Certifications
- 337 Virtualization Certifications
- 231 Citrix Certifications
- 99 VMware
- 1.9K Other Certifications
- 8 Business Analyst Certifications
- 387 CWNP Certifications
- 865 ITIL Certifications
- 216 Project Management Certifications
- 84 Apple Mac OS X Certifications
- 62 Novell Certification
- 81 Oracle Certifications
- 52 Sun Microsystems Java Certification
- 113 Storage Certifications
- 6.6K General Certification
- 17.7K Education & Development
- 48 Colleges & Schools
- 51 Educational Resources
- 17.5K IT Jobs / Degrees
- 44 Professional Development
- 204 Cybersecurity
- 8 Auditing & Compliance
- 7 Cloud Security & IoT
- 11 Cryptography & PKI
- 10 Cybersecurity Management
- 5 Data Science & Machine Learning
- 7 Forensics
- 5 ICS/SCADA Security
- 8 Incident Response
- 7 Linux Security
- 10 OWASP
- 16 Pentesting
- 32 Security Awareness & Training
- 50 Security News & Breaches
- 8 Windows Security
- 20K General
- 24 Conferences & Events
- 13 Computer Gaming
- 4 Data Center
- 51 Classifieds
- 30 For Sale
- 6 Wanted (ISO)
- 10 Help Wanted
- 13 Just for Fun
- 6 Networking
- 17.4K Off-Topic
- 14 Scripting
- 2 Show Us Your Tech!
- 8 Troubleshooting
- 2.4K Virtualization

## Comments

13■□□□□□□□□□class c

identify subnet , first and last host of the following ip or what ever it may be

here is the example 1

192.168.12.68 / 25 ***************** 25 bits so ...

firstly count in multiples of 8 till we get 24 .... as one octet has 8 bits right ...

so 8 + 8 + 8 + (1)

left ..

rest is the childs play... really .. now go to the table 2 and borrow or tick 1 bit horizontally and vertically so in this case

see the table two and come back you will find number 128 under subnets and 128 under bits ..

so subnet is 128 and bits 128 indicate that difference should be 128 --->we will see this point later

so our subnet is

255.255.255.128

as we all know we need to start any subnet with 0 .. so start it

subnet

firsthost

lasthost

broadcast

192.168.12.0

192.168.12.1

192.168.12.126(broad-1)

192.168.12.127(simple next subnet -1)

(see the difference of 128

which we got in bits )

192.168.12.128

hence in this way it can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets ******** *(1 bit vertically)

128 **** *(1 bit horizontally)

192

224

240

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

hence in this way it can be determined

more examples to follow .. let me know if this makes sense to anyone

regards

raaki

13■□□□□□□□□□192.200.200.167 / 28

now again count till 24 ...now are left with another 4 bits ... rest is childs play as usual... tick 4 horizontally and 4 vertically in the second table...

after seeing the table and seeing the number under subnets it is 240 and under bits it is 16 .. so simple subnet mask ends with 240 and it has a diff of 16 for every

so our subnet mask is ... 255.255.255.240

subnet we write

so we will start with 0 as usual

subnet

firsthost

lasthost

broadcast

192.200.200.0

192.200.200.1

192.200.200.16

192.200.200.32

192.200.200.48

etc

etc with increments of 16

192.200.200.160

192.200.200.161

192.200.200.174

192.200.200.175

our need fills here

192.200.200.176

hence in this way this can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

*

*

*

*

128

*

192

*

224

*

240

*

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

13■□□□□□□□□□150.200.155.23/18

18 bits .. so multiples of 8 ... now 24 will not work as 18 is less than 24 .. so next 8 multiple is 16 ... so ... we need two more bits from 16 to 18

so go to table two tick two horizontally and two vertically ... and you are done

so seeing the table ... under subnets it stopped at 192.. remember we had only 16 bits now not 24 .. so our mask would be

255.255.192.0

now see under the bits table ... we are stopped at 64 .. so for this we need to have increments of 64 ... as usual start with 0

subnet

firsthost

lasthost

broadcast

150.200.0.0

150.200.64.0

150.200.128.0

150.200.128.1

150.200.191.254

150.200.191.255(next subnet-1)

our ip statisfies here

150.200.192.0

hence in this way this can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

*

*

128

*

192

*

224

240

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

13■□□□□□□□□□191.20.56.65 / 25

as usual ...greater than 24 .. so we need to add one more bit to make it 25 .. so tick in the table two one start horizontally and vertically and rest is gone

so seeing it ... we got under subnets the value is 128 .. so the subnet mask is

255.255.255.128

now going on with next ..we got 128 under bits so the difference is 128..but now we need to have four octet subnets for every third octet one .. if this

confuses you see the below table

start with 0

since class b

x.x.0.0

subnet

firsthost

lasthost

broadcast

191.20.0.0

191.20.0.128

191.20.1.0

191.20.1.128

191.20.2.0

191.20.2.128

etc etc till our ip

191.20.56.0

191.20.56.1

191.20.56.126

191.20.56.127

this satisfies our ip

191.20.56.128

hence in this way this can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

*

128

*

192

224

240

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

13■□□□□□□□□□10.210.204.70/12

multiples of 8 .... 12 is not greater than 16 .. so multiple of 8 satisfying it is ...8...so to get 12 we need to add 4 more bits ...

there fore ..tick 4 bits horizontally and 4 bits vertically and game over

seeing the table under subnets it stops at 240..so remember we have only one multiple of 8 .. so only one 255 in subnet mask..

therefore subnet mask is 255.240.0.0

now seeing under bits section...it has stopped at 16 so...multiples of 16 or difference of 16 ..we need to start with zero ---- for class a x.0.0.0

subnet

firsthost

lasthost

broadcast

10.0.0.0

10.16.0.0

10.32.0.0

etc till our ip

10.208.0.0

10.208.0.1

10.223.255.254

10.223.255.255

this satisfies our ip

10.224.0.0

hence in this way this can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

*

*

*

*

128

*

192

*

224

*

240

*

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

13■□□□□□□□□□20.100.55.3 / 26

multiple of 8 again .. it ends at 24...to get to 26 we need to have two bits .. so tick two bits vertically and horizontally in the table two ..

under subnets it stopped at 192

so our subnet mask is

255.255.255.192

and under bits it stopped at 64 .. so the subnets increment at rate of 64

lets start with zero subnet

subnet

firsthost

lasthost

broadcast

20.0.0.0

20.0.0.64

20.0.0.128

20.0.0.192

etc

etc till our ip

20.100.55.0

20.100.55.1

20.100.55.62

20.100.55.63

our ip falls here ..

20.100.55.64

20.100.55.128

20.100.55.192

hence in this way this can be determined

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

*

*

128

*

192

*

224

240

248

252

254

255

powers of 2

subnets

hosts (-2)

2

4

8

16

32

64

128

256

512

1024

13■□□□□□□□□□192.168.1.0

4 subnets required

each subnet needs at least 10 hosts

firstly for its a class c addr ..so for our subnet mask it should have three octets full ... as class c is 255.255.255.x

so

fill it out as 255.255.255.x

now we need 4 subnets ... so tick till we meet our subnet requirements in the table

now as marked two bits under subnets ...you also need to mark two bits under subnets in the upper colomn

hence in this way this can be determined

as it stopped at 192..our subnet mask is ends with 192..there fore our subnet mask is 255.255.255.192

now as you tick two bits under upper subnets coloum...there are 6 bits remaining unticked right ..(unticked 224 240 248 252 254 255 total 6)

tick them under hosts wink.gif

look the table and come back ... we are left at 64 ..as we need to subtract two for broadcast and subnets .. there would be 62

solve simply

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

128

*

192

*

224

240

248

252

254

255

powers of 2

subnets

hosts (-2)

2

*

*

4

*

*

8

*

16

*

32

*

64

*

128

256

512

1024

13■□□□□□□□□□9 subnets

each host needs atleast 10 hosts

class c addr ..so subnet mask is 255.255.255.x

now we need 9 subnets .. tick in the subnets coloum till we meet the requirement of 9 subnets ...

so look at the table .. we have ticked 4 of them .. so tick 4 bits in the upper subnet table

it stopped at 240 so our subnet mask is 255.255.2555.240

now we are left with 4 empty bits (248 , 252, 254 , 255) tick them under hosts ... and subtract two we are done

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

128

*

192

*

224

*

240

*

248

252

254

255

powers of 2

subnets

hosts (-2)

2

*

*

4

*

*

8

*

*

we have met the requirement of 9 subnets

16

*

*(16-2 = 14 hosts )

32

64

128

256

512

1024

2,859■□□□□□□□□□Bsc (hons) Network Computing - 1st Class

WIP: Msc advanced networking

13■□□□□□□□□□130.100.0.0

we need 30 subnets

each subnet with atleast 1000 hosts

class b ..

so subnet mask is 255.255.x.x

we need 30 right .. so tick in the subnet table until we meet the requirement

after looking at the table ..we ticked 5 of the subnet ones ..so even tick the 5 bits of upper subnets

it ends at 248 so our subnet mask is 255.255.248.0

now we have unticked three of them

(252 ,254 , 255 ***********important (3 of the unticked third octet and 8 of the remaining 4th octet so a total of 11..so tick 11 in the host bits portion and

subtract 2 to get the number of hosts)

the crucial one

bits

128

64

32

16

8

4

2

1

subnets

128

*

192

*

224

*

240

*

248

*

252

254

255

powers of 2

subnets

hosts (-2)

2

*

*

4

*

*

8

*

*

16

*

*

32

*(we met 30 here)

*

64

*

128

*

256

*

512

*

1024

*

2048

* (total of 11 bits ticked 2048 - 2 = 2046 hosts / subnet)

hope this helped anyone ... any comments / suggestions are warmly welcomed ...

regards

rakesh

5■□□□□□□□□□right pinky=1, 2, 4, 8 then my left hand 16, 32, 64, 128.

then to get the mask, add from left-to-right:

left pinky = 128, then 192, 224, 240 then right hand 248, 252, 254, 255

each finger is a bit; quick and dirty visual aid.

245LOL, I do the same thing!

154thanks for this good tutorial but could you explain the power of 2 as I just cant get my head round that?

thanks

25■□□□□□□□□□2^0

2^1

2^2

2^3

and so on ...

thats what is meant by the power of 2 thing

the rightmost bit is 2^0

the one left to this is 2^1

and so on ...

hope this helps

1■□□□□□□□□□1■□□□□□□□□□I'd like to add the note that I've memorized to allow me to subnet in under 10 seconds, as recommended per the Academic version of ICND1 for anyone who may come across this via google like I did. I put this together in Notepad++ in the Java language so it looked all nice and pretty, and attached an image for you guys.

128 64 32 16 8 4 2 1

128

192

224

240

248

252

254

255

8 16 24 32

^^^ Count multiples of 8 till you

reach one of these below your bit notation

--- Take left over amount and tick

horizontally and vertically on chart above

So 192.168.12.68 /25 = 8+8+8+(1);

1 = H 128 V 128

H = range

V = mask

where h = horizontal and v = vertical

->Subnet = 192.168.12.0 FirstHost = 192.168.12.1

->LastHost = 192.168.12.126 Broadcast = 192.168.12.127

-To determine which subnet an address belongs to:

Example 172.31.77.201/27

27 - 24(8+8+ = 3 = 32 & 224

201 divided by 32 = 6.2ish

32 * 6 = 192

->Subnet = 172.31.77.192 FirstHost = 172.31.77.193

->LastHost = 172.31.77.222 Broadcast = 172.31.77.223

2dubs