< Back

Get-VLSMBreakdown

Wed Jan 15, 2020 7:40 am

NAME Get-VLSMBreakdown



SYNOPSIS

This command is to calculate the network range breakdown to subnets, given the list of subnets and their sizes





SYNTAX

Get-VLSMBreakdown [-Network] <IPNetwork> [-SubnetSize] <Array> [<CommonParameters>]





DESCRIPTION

This command is to calculate the network range breakdown to subnets, given the list of subnets and their sizes.

Command takes a list of subnets in a form of hashtable with subnet names and their sizes, and the IP range to

break in a form of a CIDR notation. Then in calculates the breakdown and returns it. If it is not possible -

nothing is returned.





PARAMETERS

-Network <IPNetwork>

The network range we want to break



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SubnetSize <Array>

The array of subnets in a form of a hashtable @{type = "<name>"; size = <int>} we want to put into the

specified network range



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

System.Object







NOTES









-------------------------- Example 1 --------------------------



PS C:\\> $subnets = @{type = "GTWSUBNET"; size = 30},

>> @{type = "DMZSUBNET"; size = 62},

>> @{type = "EDGSUBNET"; size = 30},

>> @{type = "APPSUBNET"; size = 62},

>> @{type = "CRESUBNET"; size = 62}

PS C:\\> Get-VLSMBreakdown -Network 10.10.5.0/24 -SubnetSize $subnets



The variable $subnets contains subnets, or subnet zones we want to use. "Type" - specifies the name of the zone or

subnet. "Size" - sets the maximum number of IPs which will be available for the subnet.



RELATED LINKS

ipnetwork2 library https://github.com/lduchosal/ipnetwork

cloudmgmt module https://github.com/eosfor/cloudmgmt

ipmgmt module https://github.com/eosfor/ipmgmt