You can add a second IP to the sane NIC if the NIC is not set to DHCP.
Which means that you either:
- Need to get a fixed IP for your work laptop, so you can do this.
- go to start, settings, control panel, network connections
- Select the LAN and go to properties
- Go to advanced, tab "IP settings" and add a second IP
- Or still need to:
- write down the current IP/netmask
- go to start, settings, control panel, network connections.
- Select the LAN and go to properties.
- Unmark DHCP. Set a manual IP as written own in the first step.
- Go to advanced, tab IP settings and add a second IP.
- Or use a second network card for the second IP (usually the easiest way)
- Or install additional software for more network management.
I assume the last is not an option on corporate networks.
- Or you can install a VM and configure that to the alternate IP. (Probably only useful if you already use VM and do not want to break existing connections from your main desktop).
http://answers.microsoft.com has this as a C sharp solution for win 7:
However it has no explanation as to why it works, how it works, or how it has to be used.
public class IPAdder
[DllImport("iphlpapi.dll", EntryPoint = "AddIPAddress", SetLastError = true)]
private static extern UInt32 MyAddIPAddress(UInt32 Address, UInt32 IpMaskint, int IfIndex,
out IntPtr NTEContext, out IntPtr NTEInstance);
public static void AddIPAddress(String IPAddress, String SubnetMask, int ifIndex)
IPAddress IPAdd = System.Net.IPAddress.Parse(IPAddress);
IPAddress SubNet = System.Net.IPAddress.Parse(SubnetMask);
int MyNTEContext = 0;
int MyNTEInstance = 0;
IntPtr ptrMyNTEContext = new IntPtr(MyNTEContext);
IntPtr ptrMyNTEInstance = new IntPtr(MyNTEInstance);
UInt32 Result = MyAddIPAddress((uint)IPAdd.Address,
(uint)SubNet.Address,ifIndex, out ptrMyNTEContext, out ptrMyNTEInstance);
public IPAddress Get37()
IPAddress ipa = IPAddress.Any;
// check network interfaces
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
if ((ni.OperationalStatus != OperationalStatus.Up) ||
(ni.NetworkInterfaceType ==NetworkInterfaceType.Loopback) ||
(ni.NetworkInterfaceType == NetworkInterfaceType.Tunnel))
if ((ni.Description.IndexOf("virtual", StringComparison.OrdinalIgnoreCase) >= 0) ||
(ni.Name.IndexOf("virtual", StringComparison.OrdinalIgnoreCase) >= 0))
if (ni.Description.Equals("Microsoft Loopback Adapter", StringComparison.OrdinalIgnoreCase))
IPInterfaceProperties ipip = ni.GetIPProperties();
bool found37 = false;
foreach (IPAddressInformation unic in ipip.UnicastAddresses)
string strip = unic.Address.ToString();
if (strip == "22.214.171.124")
ipa = unic.Address;
found37 = true;
(int)(uint)ni.GetType().GetField("index", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(ni));
If external software is allowed then Win IP config seems to do the job.