Configuring subnets quandry

4

I am learning the basics of subnetting however am faced with a dilemma on approaching the issue. For example I have been tasked to set up a network with 20 hosts using a Class C network addressing scheme which I understand to be 192.168.0.0 with the default subnet mask of 255.255.255.0. Now I understand that it leaves me with 254 hosts 0 being the subnet and 255 being the broadcast.

So if I have 20 hosts to setup that leaves 234 host spaces wasted unless the network grows to include that many hosts. Based on the requirements of 20 hosts I have the following questions.

  1. How do I accommodate future growth e.g. how many hosts do I allow for?
  2. If I were to simply restrict the number of hosts to 20 I take it that would leave me with a /27 subnet i.e. 192.168.0.0/27. Is that right?
  3. If 2 point is correct I would have 8 subnets with the following network subnet address, broadcast addess and starting and ending host address. Is that right?
  4. If 3 is right do I still a router to allow each subnet to communicate with one another?

Subnet addresses

192.168.0.0
192.168.0.32
192.168.0.64
192.168.0.96
192.168.0.128
192.168.0.160
192.168.0.192
192.168.0.224

The broadcast address of each of these would be

192.168.0.31
192.168.0.63
192.168.0.95
192.168.0.127
192.168.0.159
192.168.0.191
192.168.0.223

The starting and ending host addresses for each of these would be

192.168.0.1 - 192.168.0.30
192.168.0.62 - 192.168.0.94
192.168.0.126 - 192.168.0.158
192.168.0.190 - 192.168.0.222

Unless I have understood it incorrectly my host addresses should be as follows as opposed to what I thought they were above

192.168.0.1  - 192.168.0.30
192.168.0.64 - 192.168.0.94
192.168.0.96 - 192.168.0.126
192.168.0.128 - 192.168.0.158
192.168.0.192 - 192.168.0.222
192.168.0.224 - 192.168.0.254

PeanutsMonkey

Posted 2011-10-25T21:12:06.070

Reputation: 7 780

The fact you refer to it as a Class C network addressing schemes tells me this is homework.... – Supercereal – 2011-10-25T21:24:15.707

@Kyle - Actually no. This is a real network deployment I have been asked to implement as part of my internship – PeanutsMonkey – 2011-10-25T21:54:47.927

@Kyle - Out of interest, what is wrong calling it as a Class C network? Almost very book I have read refers to Classes – PeanutsMonkey – 2011-10-25T21:57:39.843

1It's not wrong, but this classification is somehow outdated and used in academic context, because you're able to divide in other subnetwork sizes than these classes. See you /27-network above! – Jens Erat – 2011-10-25T22:58:22.030

.1-.30 is correct, .33-.62 is missing, then .65-.94, .97-.126 and so on. You always forgot the "network address" I guess (apart from the first subnet). – Jens Erat – 2011-10-26T09:39:05.453

1@PeanutsMonkey Nothing in particular is wrong with the phrasing. It's just very rare (I have never seen it) for someone refer to a network as class c outside of a school since classless inter-domain routing was introduced in 93 over 15 years ago... – Supercereal – 2011-10-26T12:31:52.807

Answers

2

  1. You're totally right, 254 hosts are allowed, so you can add 234.
  2. Exactly, /28 would be too small, /27 fits fine (30 hosts allowed)
  3. Exactly.
  4. If you have a router, it can route traffic between the subnets (if they're connected of course and the router knows how to route between them).

Jens Erat

Posted 2011-10-25T21:12:06.070

Reputation: 14 141

Thanks Ranon. So my subnets, broadcast and host addresses are correct? When you say route traffic between the subnets, I take it I don't require to have anything else as they are on the same network i.e. 192.168.. unlike if the network was say a different network such as 192.168.1.? Is that right? Now if I wanted to have the 192.168..* network communicate with 192.168.1.*, what would I need to do? – PeanutsMonkey – 2011-10-25T21:49:21.457

How do I also accommodate a larger number of hosts for the future if the requirement now is only 20? – PeanutsMonkey – 2011-10-25T21:54:17.617

Your answer in 4 reads if I have a router, what if I don't have a router, I take it a switch would suffice? If I do have a router, I take it I would either need a router with 8 ports or a single router with a switch with 8 ports? Is that correct? – PeanutsMonkey – 2011-10-25T22:00:17.310

No, a switch (at least the devices usually called switch) wouldn't suffice. You need a router (that is sometimes called "layer 3 switch") which knows about the other networks. A switch can only pass packets to other computers in the same subnet, have a look at wikipedia which has a really good explanation.

– Jens Erat – 2011-10-25T22:51:58.323

For having some free IPs for new hosts left, estimate how much that could get. Think about possible splits into multiple subnets if your networks grows really much. That depends on your situation and cannot be judged without detailed knowledge only you (or even your boss) can have. – Jens Erat – 2011-10-25T23:10:44.463

Thanks. I take it I would only require a single router for the entire network even if it has 8 subnets. Is that right? Would I need to configure the router to support the subnets? – PeanutsMonkey – 2011-10-26T00:40:26.440

You will need one router between each two networks you want to connect. That mustn't be between each two networks (that's why we use routing), but each network should be somehow connected. Though in practice there are devices which can route multiple attached networks (compare them to a switch with multiple attached routers). You can either configure them manually or use some routing protocol.

– Jens Erat – 2011-10-26T09:33:00.577

Thanks. Sorry for being such as n00b but can you please further elaborate on what you meant by the following sentences ou will need one router between each two networks you want to connect. That mustn't be between each two networks (that's why we use routing), but each network should be somehow connected – PeanutsMonkey – 2011-10-26T18:14:22.337