A variable-length subnet mask (VLSM) is designed to allow greater use of IP address space by borrowing bits from the subnet mask and allocating them to host devices. To allow a greater number of devices to connect to the Internet and intranets, the standards body of various routing protocols designed an IP routing algorithm to cater to IP networks with a different subnet mask than the default used in classful networks.
Routing algorithms that support VLSM are as follows:
RIP Version 2
Additionally, Cisco IOS allows the use of any 0 subnets (for example, subnet 18.104.22.168/24) with the global IOS command, ip subnet-zero. This can be very useful for networks running out of IP address space.