[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

255.255.248 netmask?  find number of subnet and host?

Posted on 2001-07-02
3
Medium Priority
?
4,759 Views
Last Modified: 2012-06-22
Hi,
   If I have netmask of 255.255.248.0, how can
I find the total number of subnet it has and
what hosts belong to what subnet?
I use ip calculator, but I want to learn how
to do it manually.

thanks
0
Comment
Question by:usaperl
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
dcgames earned 200 total points
ID: 6246435
You say you want to do it manually, so that's what I'm giving.... :)

--

A mask of 255.255.248.0 can also be seen as this:

11111111.11111111.11111000.00000000

What you see is that you have 5 bits in the 3rd piece to define a network address.

5 bits = 32 addresses, but the first and last addreses are usually NOT available (.0 and .255 usually), so you have 30 addresses only in the 3rd setup.

On the HOST side, you have not 8 bits but rather 11 bits, which is 2048. But again, first and last are NOT supposed to be used.

So, the # of bits gives you the count. But, then you have to convert it to "dot notation". Your available network addresses are:

xxxxxxxx.yyyyyyyy.zzzzz000.00000000

zzzzz is 00000 to 11111 binary or 0 to 31 decimal, but in DOT notation you take the 000 at the end also, so the network addresses possible are
00000+000 = .0 (not valid)
00001+000 = .8
00010+000 = .16
00011+000 = .24
00100+000 = .32
00101+000 = .40 .. etc.

A simple way is to take the number of zero bits (3) which means binary 7 (111=7) and add one. (8). Now count by 8 starting with zero but ignore 0 and 255. so the valid subnets are: 8, 16, 24, 32, 40, 48, 56, 64, 72, ...

Given any network address, say x.y.32.0, what is the range of host numbers?

well, it's really x.y.00100 + 000.00000000, so:

000.00000000 makes x.y.32.0 (invalid (.0))
000.00000001 makes x.y.32.1 ok
..
000.11111110 makes x.y.32.254 ok
000.11111111 makes x.y.32.255 usually NOT ok (255) but in THEORY ok because real "host" is 000.11111111 not 111.11111111 (all ones) which is the REAL end of the subnet. BUT, I recommend NOT using it anyway because SOME software can get confused.

keep going with:

001.00000000 makes x.y.33.0 (still in same subnet, VALID in THEORY again because it's not the start of the sub-net, but I would ignore it for the same reason)

001.00000001 makes x.y.33.1 ok.
etc.

All the way to:

111.11111110 makes x.y.39.254 = ok
111.11111111 makes x.y.39.255 = NOT VALID (end of subnet)

So, while theory says you have 2^11-2 = 2048-2 = 2046 hosts, I say 2^11 - 2*7 = 2048-14 = 2034 hosts.

I hope I got this right. Did it on the fly

Dave



0
 
LVL 5

Expert Comment

by:dcgames
ID: 6246436
p.s. this is explained in FULL in

http://www.learntosubnet.com

But specially in:

http://www.learntosubnet.com/Subnet_Section_helper.htm

Dave
0
 

Author Comment

by:usaperl
ID: 6246671
excellent info...
thanks
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question