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

Possible Duplicate:
Configuring subnets quandry

I am new to the world of subnetworks and have been tasked as part of my internship to create 2 separate distint networks i.e. and each having 20 hosts for each subnetwork. Hence so far I have determined the following

For the network I will have the following subnet masks, broadcasts and available hosts if I am to limit each subnet to 20 hosts/nodes

My network will be

The subnets will be

The broadcast addresses will be

The available number of host addresses will - - - - - - - -

For the network I will have the following subnet masks, broadcasts and available hosts if I am to limit each subnet to 20 hosts/nodes

My network will be

The subnets will be

The broadcast address will be

The available number of host address will be - - - - - - - -

My questions are;

  1. Are my subnet masks, broadcast and available host address right?
  2. If they are correct and if I were setting up a single PC running Windows, the IP address would be, subnet mask would be and the gateway would be say (if that is the assigned gateway IP address). Is that right?
  3. Seeing we only have a single internet connection, what would I need to do to setup each subnet so that it could access the internet?
  4. What would I need to do if I need to allow particular subnets to communicate between each other e.g. - and -, - and -
  5. Currently there is no DHCP server but if I were to introduce a DHCP server how would it look different? I take it I would need two DHCP servers for each network
  6. What type of router would I need?
  7. I am confused about when I would use a switch in this scenario
share|improve this question

marked as duplicate by Linker3000, Simon Sheehan, studiohack Oct 31 '11 at 23:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

Your question states you need two /24 networks with 20 hosts each, then go on to define 16 /27 networks.

If you required 16 networks capable of 20 hosts each, then you are on the right track.

  1. Yes
  2. No, with a /27 network, the subnet mask is The default gateway needs to reside in the network, one of the - addresses. Commonly you pick the first or last IP.
  3. You would need a router that has an interface on each network - this can be a layer 3 switch that has a vlan in each network. So it would have addresses,, etc
  4. By default a router or layer 3 switch that is connected to each of these networks would automatically route between them.
  5. I would create a seperate network that contains the two DHCP servers. You can use a feature called "IP Helper" or "DHCP relay" on the router which will forward DHCP requests from each of the networks through to the two DHCP servers. The DHCP servers would have scopes defined for each of the 16 networks.
  6. A layer 3 switch would be your best bet, something that has enough port density to plug all 320 hosts in. You would create VLANs for each of the networks, and place physical ports into the VLANs. Then give the switches VLAN interfaces the first IP address in each range. Commonly you would make the VLAN ID similar to the subnet. So the VLAN for the network might be VLAN ID 231
  7. A switch is a prerequisite for connecting any devices, but I think 6 answers this queston.


Default Gateway

The default gateway must reside in the same network as the other devices. Think of it like this - when contacting an IP address outside of its subnet range, the device is thinking "This IP address is not on my network, so what on my network knows how to get to it?". Note that the subnet mask dictates what IP addresses a device can directly communicate with. So if the PC was in the range .33 - .62 it can only communicate directly with other devices in the .33 to .62 range, and this includes the device with the default gateway IP address. If the default gateway IP was, then a PC at .33 with a subnet mask of /27, then it cannot talk to 1.1 - it has no way to get to it.

share|improve this answer
Sorry what I meant was that I have been issued a /24 and I need to create a subnetwork that supports 20 hosts each hence the /27. Sorry that was a typo. It was meant to be – PeanutsMonkey Oct 27 '11 at 3:30
Excellent, it all looks good then, just note the default gateway must reside in the range you allocate for the /27 – Paul Oct 27 '11 at 3:32
So does that mean I need a router that has 16 physical interfaces or a VLAN that support 16 subnetworks? When you say a separate network that contains the 2 DHCP servers, what do you mean exactly? – PeanutsMonkey Oct 27 '11 at 3:33
So what sort of router or layer 3 switch would you recommend? I assume when you say Layer 3 you mean you mean network layer of the OSI model? – PeanutsMonkey Oct 27 '11 at 3:35
When you say that the default gateway must reside in the range your allocate what do you mean exactly? I would thought that for example if the network range were -, the default gateway would still be – PeanutsMonkey Oct 27 '11 at 3:36

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