0

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. 192.168.1.0/24 and 192.168.2.0/24 each having 20 hosts for each subnetwork. Hence so far I have determined the following

For the network 192.168.1.0/24 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 192.168.1.0/27

The subnets will be

192.168.1.0
192.168.1.32
192.168.1.64
192.168.1.96
192.168.1.128
192.168.1.160
192.168.1.192
192.168.1.224

The broadcast addresses will be

192.168.1.31
192.168.1.63
192.168.1.95
192.168.1.127
192.168.1.159
192.168.1.191
192.168.1.223

The available number of host addresses will

192.168.1.1 - 192.168.1.30
192.168.1.33 - 192.168.1.62
192.168.1.65 - 192.168.1.94
192.168.1.97 - 192.168.1.126
192.168.1.129 - 192.168.1.158
192.168.1.161 - 192.168.1.190
192.168.1.193 - 192.168.1.222
192.168.1.225 - 192.168.1.254

For the network 192.168.2.0/24 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 192.168.2.0/27

The subnets will be

192.168.2.0
192.168.2.32
192.168.2.64
192.168.2.96
192.168.2.128
192.168.2.160
192.168.2.192
192.168.2.224

The broadcast address will be

192.168.2.31
192.168.2.63
192.168.2.95
192.168.2.127
192.168.2.159
192.168.2.191
192.168.2.223

The available number of host address will be

192.168.2.1 - 192.168.2.30
192.168.2.33 - 192.168.2.62
192.168.2.65 - 192.168.2.94
192.168.2.97 - 192.168.2.126
192.168.2.129 - 192.168.2.158
192.168.2.161 - 192.168.2.190
192.168.2.193 - 192.168.2.222
192.168.2.225 - 192.168.2.254

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 192.168.1.1, subnet mask would be 255.255.255.254 and the gateway would be say 192.168.1.254 (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. 192.168.1.1 - 192.168.1.30 and 192.168.2.1 - 192.168.2.30, 192.168.1.65 - 192.168.1.94 and 192.168.2.65 - 192.168.2.94?
  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
0

1 Answer 1

1

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 255.255.255.224. The default gateway needs to reside in the network, one of the 192.168.1.1 - 192.168.1.30 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 192.168.1.1, 192.168.1.33, 192.168.1.65 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 192.168.2.31 network might be VLAN ID 231
  7. A switch is a prerequisite for connecting any devices, but I think 6 answers this queston.

Update

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 192.168.1.1, 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.

9
  • 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 255.255.255.224. Oct 27, 2011 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, 2011 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? Oct 27, 2011 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? Oct 27, 2011 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 192.168.1.33 - 192.168.1.62, the default gateway would still be 192.168.1.1? Oct 27, 2011 at 3:36

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