https://github.com/tehmessiah75/randomsubnetgenerator
This is a powershell script to generate a random subnet address range that falls within a private addressing class (A, B or C)
https://github.com/tehmessiah75/randomsubnetgenerator
classless-subnetting powershell subnet subnetting subnetting-ipv4-addresses
Last synced: about 1 month ago
JSON representation
This is a powershell script to generate a random subnet address range that falls within a private addressing class (A, B or C)
- Host: GitHub
- URL: https://github.com/tehmessiah75/randomsubnetgenerator
- Owner: tehmessiah75
- License: mit
- Created: 2025-02-05T12:06:13.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-28T05:27:36.000Z (3 months ago)
- Last Synced: 2025-02-28T12:48:05.742Z (3 months ago)
- Topics: classless-subnetting, powershell, subnet, subnetting, subnetting-ipv4-addresses
- Language: PowerShell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Do you ever get sick of using the same subnets when you're designing networks?
Cant decide what ip address range you should use?
Dont want to use the default 192.168.0.1/24 172.16.0.1/12 or 10.0.0.1/8
Want to limit the amount of addresses to suit your use case?Never fear, I have created this powershell script to fix your indecision.
It prompts for an input of how many ip addresses that you need and then generates a random subnet to fullfil your needs.-----------------------------------------------------------------------------------
Sample Outputs:
Enter the required number of IP addresses for the subnet: 70Name Value
---- -----
Starting IP 172.16.139.100
Ending IP 172.16.139.225
Subnet Mask 255.255.255.128
CIDR /25
Usable Addresses 126
Range Type PrivateEnter the required number of IP addresses for the subnet: 300
Name Value
---- -----
Starting IP 10.33.149.50
Ending IP 10.33.151.47
Subnet Mask 255.255.254.0
CIDR /23
Usable Addresses 510
Range Type PrivateEnter the required number of IP addresses for the subnet: 600
Name Value
---- -----
Starting IP 10.47.75.231
Ending IP 10.47.79.228
Subnet Mask 255.255.252.0
CIDR /22
Usable Addresses 1022
Range Type PrivateEnter the required number of IP addresses for the subnet: 15000000 (yes that is 15 Million)
Name Value
---- -----
Starting IP 10.221.110.47
Ending IP 11.221.110.44
Subnet Mask 255.0.0.0
CIDR /8
Usable Addresses 16777214
Range Type Private
-----------------------------------------------------------------------------------
Current known issue is if you need more ip address than what private networking allows it will still give a valid range which will of course then not be within the private addressing range.