IP - VLSM 1

Major Network : 192.168.1.0/24

This IP assign to 4 department
A - 95 hosts
B - 45 hosts
C - 25 hosts
D -  5 hosts

Calculate now ...
A - Allocate the highest ranges of IP to highest requirement
192.168.1.0/25 -> give 126 IP
192.168.1.1 - 192.168.1.126 //remaining 192.168.1.128

B - Allocate the next highest ranges of IP to next highest requirement
192.168.1.128/26 -> give 62 IP
192.168.1.129 - 192.168.1.190 //remaining 192.168.1.192

C -
192.168.1.192/27 -> give 32 IP
192.168.1.193 - 192.168.1.222 //remaining 192.168.1.224

D -
192.168.1.224/29 -> give 8 IP
192.168.1.225 - 192.168.1.230 //remaining 192.168.1.232

End

A: 192.168.1.1 - 192.168.1.126
B: 192.168.1.129 - 192.168.1.190
C: 192.168.1.193 - 192.168.1.222
D: 192.168.1.225 - 192.168.1.230