Q:

VLSM Assistance

I have a quick query about using VLSM. I need to adopt a optimized addressing scheme making use of VLSM, I have 3 networks in total connected via two different routers, router 1 has a network of 300 hosts and another network of 25 hosts. Router 1 is connected to router 2 and that has an additional 82 hosts. Would it be possible to do this scheme over two IP addresses?
Lets say my starting IP is 182.20.1.0, how would this work?

A:

With VLSM you start with the biggest number of hosts:
300 hosts means you need 302 IP's. 302 IP's means you will be needing a /23 because you want to start at 182.20.1.0, you will lose some IP's because 300 hosts will not fit into  182.20.1.x:

So the first IP will be 182.20.2.1
The last IP will be 182.20.3.254
network address will be 182.20.2.0
broadcast address wil be 182.20.3.254
The subnetmask will be 255.255.254.0

Then we take the next biggest amount which is 82 (so the smallest available subnet is /25):

The first IP will be 182.20.4.1
The last IP will 182.20.4.126
network address will be 182.20.4.0
the broadcast address wil be 182.20.4.127
The subnetmask will be 255.255.255.128

Then we still have our network with 25 hosts left (27 IP's, the next subnet available that can handle this much hosts is /27):

The first IP will be 182.20.4.129
The last IP will be  182.20.4.158
The network address will be 182.20.4.128
The broadcast address will be 182.20.4.159
The subnetmask will be  255.255.255.224

Mind though that in reality you can make the last 2 networks fit into a /24, this allows some breathing space if you ever need to add more hosts. 

