1.2.1

Rating: No reviews yet
Downloads: 69
Released: Aug 10, 2009
Updated: Aug 10, 2009 by LukeSkywalker
Dev status: Stable Help Icon

Recommended Download

Application IPNetwork-1.2.1.zip
application, 7K, uploaded Aug 10, 2009 - 69 downloads

Release Notes

IPNetwork 1.2 extended with Supernet and Subnet methods

Subnet method

IPNetwork wholeInternet = IPNetwork.Parse("0.0.0.0/0");
byte newCidr = 2;
IPNetwork subneted = IPNetwork.Subnet(wholeInternet, newCidr);

Console.WriteLine("{0} was subnetted into {1} subnets", wholeInternet, subneted.Count);
Console.WriteLine("First: {0}", subneted[0]);
Console.WriteLine("Last : {0}", subneted[subneted.Count - 1]);
Console.WriteLine("All  :");

foreach (IPNetwork ipnetwork in subneted)
{
    Console.WriteLine("{0}", ipnetwork);
}


Output

0.0.0.0/0 was subnetted into 4 subnets
First: 0.0.0.0/2
Last : 192.0.0.0/2
All  :
0.0.0.0/2
64.0.0.0/2
128.0.0.0/2
192.0.0.0/2

Supernet method

IPNetwork ipnetwork1 = IPNetwork.Parse("192.168.0.0/24");
IPNetwork ipnetwork2 = IPNetwork.Parse("192.168.1.0/24");
IPNetwork[] ipnetwork3 = IPNetwork.Supernet(new[]{ipnetwork1, ipnetwork2});

Console.WriteLine("{0} + {1} = {2}", ipnetwork1, ipnetwork2, ipnetwork3[0]);


Output

192.168.0.0/24 + 192.168.1.0/24 = 192.168.0.0/23


Usable IP returned a wrong value, that has been corrected in this release

Reviews for this release

No reviews yet for this release.