Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Question source

Problem: Your company has been assigned the following IP address: /27
Your group has been assigned the fourth subnet.

Question 5: How many useable subnets are available for assignment?

Why the answer is 6? I would shoot it's 8 , because 255/32 = 8.
More generally - what is an correct algorithm to compute the number of available subnetworks for the same mask?

share|improve this question
another useful reference... CIDR calculator – JoshP Jul 8 '12 at 15:40
up vote 6 down vote accepted

First of all /27 is not an IP adress. It is an IP and netmask.

Writing Your company has been assigned the following IP address: /27 seems careless. Definitively not what you would expect from exercises or textbooks.

Back in the dawn of time IP networks had 32 bits to identify themselves. Part of those 32 bits where used to identify the network. Part of them to identify the host on the network. Networks in that time mostly used 8, 16 or 24 bits for the network and where called resp. class A, class B or class C networks. Technically no netmask was needed since you could calculate what is should be from the IP address.

That was the past. In the last decade we moved to a more flexible approach called Classless InterDomain Routing.

Your /27 is a CIDR notation. The /27 indicates which part of the address is the network. In other words, the /27 defines which part of the address is used to indicate the network, and which part of for the host 27 bits are most easily read as:

---8--- ---8---- ---8--- --3-5---
Network Network  Network net host

with the first 27 (8+8+8+3) as the network identification, and 5 bits remaining as numbers for the NICs.

Translated that is a network mask of FF FF FF E0 ( It allows you to use that as a single network with up to 30 network interfaces. (2^5 -2)

Question 5: How many useable subnets are available for assignment?

CHANGED: This is where I went wrong before.

I am assuming they mean how many more subnets you can create with the remaining 5 bits. .

As Oliver pointed out, that was not the intended question. The intended question was “We have a network of unknown size and split it into several networks. If you guess we had an old fashioned /24 (which is most common), then how many subnetworks did we create?”.

Given information:

  • your have a /27, aka your network mask is 11111111.11111111.11111111.11100000
  • Your given IP begins with 192.

Not given, but probably assumed:

  • Old fashioned Classful networks where used before we divided our net into subnets.
  • An IP address beginning with 192 (192.something.something.something) starts with binary 1 1 0.
    A networks starting with this used to indicate class C networks.

To solve the actual question you have two parts:

  1. We had /24. We give you /27. How many bits did we used to make subnets.
  2. How many subnets can you make with those bits?

27-24=3 bits used. 2^3 is 8 possible combinations for nets. Two unused as explained in the post made by other people. 8-2=6.

share|improve this answer
The question isn't about further division of the network. The question is into how many segments did you divide your network by using that netmask. And the answer of 6 is, to my understanding, correct. The amount of upvotes on this deeply confuses me. – Oliver Salzburg Jul 8 '12 at 16:09
Ah. Suddenly the question makes sense. Thank you @Oliver Salzburg. I was quite puzzled by it, but I tried to give a nice clear elaborate answer. I guess the upvotes are for trying to explain it (even though I explained the wrong answer). – Hennes Jul 8 '12 at 16:31
@Hennes, you can edit your answer. – Synetech Jul 8 '12 at 17:56
@Synetech: Done. – Hennes Jul 8 '12 at 19:50

Before you can determine the number of valid subnets with a given network number and subnet mask, you must know the network masks for Class A, B, and C networks. And the first key to answering this type of question is to remember that the number of network bits never changes. Subnetting always borrows bits from the host bits – always. is a CLASS C

EDIT: 11111111.11111111.11111111.11100000

/27 = 24+3 bits- which leaves 5 bits for subnet

The number of valid subnets = (2 raised to the power of the number of subnet bits) – 2

answer = (2 raised to the power of the number of 5) - 2

You must subtract those two subnets at the end. Why are the two subnets are being subtracted? The “all-zeroes” subnet and the “all-ones” subnet are considered unusable, and therefore are not considered valid.

share|improve this answer
The "classless" nature of the x.x.x.x/x CIDR representation actually alters the straight class C mask. /27, as Hennes describes, means, not -- meaning there are only 5 bits to work with after the network definition. – JoshP Jul 8 '12 at 15:34
you are right, I did it wrong. I will edit the answer above. – Logman Jul 8 '12 at 15:41

The number of networks is equal to 2 to the power of the number of extra bits taken for subnetting minus 2.

In your case, it's a class C network. Which means the first 24 bits are taken to address the network, the last 8 are taken to address the host.

Your example uses 3 further bits for subnetting.

23-2 = 6

It's also well explained on the Wikipedia article about IP Subnetting.

What are these networks?

First Network

Network:      11000000.01110000.10001000.000 00000 (Class C)
Broadcast:        11000000.01110000.10001000.000 11111
HostMin:         11000000.01110000.10001000.000 00001
HostMax:        11000000.01110000.10001000.000 11110

Second Network

Network:     11000000.01110000.10001000.001 00000 (Class C)
Broadcast:        11000000.01110000.10001000.001 11111
HostMin:        11000000.01110000.10001000.001 00001
HostMax:        11000000.01110000.10001000.001 11110

Third Network

Network:     11000000.01110000.10001000.010 00000 (Class C)
Broadcast:        11000000.01110000.10001000.010 11111
HostMin:        11000000.01110000.10001000.010 00001
HostMax:        11000000.01110000.10001000.010 11110

Fourth Network

Network:     11000000.01110000.10001000.011 00000 (Class C)
Broadcast:       11000000.01110000.10001000.011 11111
HostMin:        11000000.01110000.10001000.011 00001
HostMax:       11000000.01110000.10001000.011 11110

Fifth Network

Network:    11000000.01110000.10001000.100 00000 (Class C)
Broadcast:       11000000.01110000.10001000.100 11111
HostMin:       11000000.01110000.10001000.100 00001
HostMax:       11000000.01110000.10001000.100 11110

Sixth Network

Network:    11000000.01110000.10001000.101 00000 (Class C)
Broadcast:       11000000.01110000.10001000.101 11111
HostMin:       11000000.01110000.10001000.101 00001
HostMax:       11000000.01110000.10001000.101 11110

Seventh Network

Network:    11000000.01110000.10001000.110 00000 (Class C)
Broadcast:       11000000.01110000.10001000.110 11111
HostMin:       11000000.01110000.10001000.110 00001
HostMax:       11000000.01110000.10001000.110 11110

Eight Network

Network:    11000000.01110000.10001000.111 00000 (Class C)
Broadcast:       11000000.01110000.10001000.111 11111
HostMin:       11000000.01110000.10001000.111 00001
HostMax:       11000000.01110000.10001000.111 11110

Dude, I can count. Those are 8!

Correct. According to Wikipedia:

The RFC 950 specification reserves the subnet values consisting of all zeros (see above) and all ones (broadcast), reducing the number of available subnets by two. However, due to the inefficiencies introduced by this convention it was abandoned for use on the public Internet, and is only relevant when dealing with legacy equipment that does not implement CIDR.

share|improve this answer
HostMin is the same as broadcast in the eight network. – 0x6B6F77616C74 Jul 8 '12 at 15:54
@kutacz: No, it isn't – Oliver Salzburg Jul 8 '12 at 15:55
@Synetech: Yeah, I think I'm aware of it. Why? Any mistakes? – Oliver Salzburg Jul 8 '12 at 15:56
@Oliver Salzburg: My oversight. – 0x6B6F77616C74 Jul 8 '12 at 15:57
I've asked about universal algorithm. – 0x6B6F77616C74 Jul 8 '12 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .