# How to determine the number of subnets needed

I just started networking and was given this exercise I'm trying to determine how many subnets are needed for this network.: The main network ID is 192.168.0.0/16. Given that I know that this is a class B IP address and the subnet mask is 255.255.0.0. Based on my calculations maximum number of subnet with the given information is 11. But since I have 4 routers and 6 switches, I won't need more than 10 subnets. To achieve this should I change the network id to 192.168.0.0/28 which will give me a subnet mask of 255.255.255.240 where I will get 14 maximum number of hosts. Is my logic correct or am I missing something?

• I'm just impressed with the graphic :) – Thufir Feb 26 '18 at 19:19

For me the better is use the different 3rd octet and have a appropriate netmask.

For example

4 Routers and internet router :

192.168.0.0/29

Different hall (s1 to s5)

And DMZ :

192.168.254.0/29

In this configuration you can change netmask if the number of pc's or server is increases.

`````` ipcalc 192.168.0.0/29
``````

You can use the 4rd octet to all subnet in gateway. For example 192.168.x.1 = gateway for subnet x

For your case, with 6 ips/subnet is enough so you'd have a mask of `255.255.255.248` which is the same as `192.168.0.0/29`