|
|
#1 |
|
FFR Player
Join Date: Dec 2008
Age: 35
Posts: 6,205
|
In this program, we're currently working with complex subnetting, which includes CIDR and VLSM. I'm a tad bit ahead of the class so I figured I'd work a bit more with powershell. I'm trying to write a script that calculates valid network IP addresses based on two inputs: A random host IP and a complex subnet mask. I've already wrote a script that calculates network IP based on a host IP and a classful subnet mask, but that's effectively useless and simple.
I'm wondering what would be the best way to go about this? My current plan is to take the host IP and subnet mask, convert them to binary, separate the bits, and use ANDing to get the network IPs. This is probably going to be terribly inefficient though. This is the code I have for classful subnet masks. Hate on my commenting please, I haven't used a comment in coding since high school xfd.
__________________
|
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|