Quick IP Address Subnetting a /24
Had a client that needed a range of IP's specifically 8. The only trouble was getting a block that would suffice out of the /24 and distribute it into chunks.
If you're handy with math and understand CIDR / Subnetting this is an easy way to get your numbers quickly.
Lets say our range is 1.1.1.0/24 and we need a total of 8 ip's ( 6 usable ).
What is the subnet mask going to be?
Well there are 256 TOTAL numbers of bits on or off in an octect (X.X.X.X each x represents an octet) to make up an actual number.
0 through 255 = 256 total because we count 0
So simple math:
I need 8 right ?
256 - 8 = 248
Subnet mask = 255.255.255.248
Now we just need to find a block or range. Lets say we want to have 200 as a range. If you just take that number (200 for example) and divide by 8 you will see if it goes into it evenly or not. If it does this is the starting network address.
For example = 200 / 8= 25 EVENLY
205 / 8 = 25.6 NOT EVEN!!!!
So we now know X.X.X.200 to X.X.X.207 is a range because 200 to 207 are 8 total numbers making the range look like the following:
200 - Network Address
201 : usable
202 : usable
203 : usable
204 : usable
205 : usable
206 : usable
207 - Broadcast Address
208 / 8 = Even ------ So continuing on
208 - Network Address
209 : usable
210 : usable
211 : usable
212 : usable
ETC......
If you're handy with math and understand CIDR / Subnetting this is an easy way to get your numbers quickly.
Lets say our range is 1.1.1.0/24 and we need a total of 8 ip's ( 6 usable ).
What is the subnet mask going to be?
Well there are 256 TOTAL numbers of bits on or off in an octect (X.X.X.X each x represents an octet) to make up an actual number.
0 through 255 = 256 total because we count 0
So simple math:
I need 8 right ?
256 - 8 = 248
Subnet mask = 255.255.255.248
Now we just need to find a block or range. Lets say we want to have 200 as a range. If you just take that number (200 for example) and divide by 8 you will see if it goes into it evenly or not. If it does this is the starting network address.
For example = 200 / 8= 25 EVENLY
205 / 8 = 25.6 NOT EVEN!!!!
So we now know X.X.X.200 to X.X.X.207 is a range because 200 to 207 are 8 total numbers making the range look like the following:
200 - Network Address
201 : usable
202 : usable
203 : usable
204 : usable
205 : usable
206 : usable
207 - Broadcast Address
208 / 8 = Even ------ So continuing on
208 - Network Address
209 : usable
210 : usable
211 : usable
212 : usable
ETC......
Comments
Post a Comment