public static IPAddress GenerateIPAddress(int seed) { byte[] result = new byte[4]; MSRandom rand = new MSRandom(seed); bool validAddressFound = false; IPAddress r = IPAddress.None; while (!validAddressFound) { rand.NextBytes(result); r = new IPAddress(result); validAddressFound = !IPRange.IsReservedIP(r); } return(r); }