Thursday, 21 November 2019

windows - How do I assign a static IP address to an ICS client?


I have Internet Connection Sharing enabled on a Windows computer that's hosting the Internet connection. I have manually assigned what IP address to be used with the DHCP service on the host by changing the value data for ScopeAddress in registry. (See Microsoft KB article 230148.) That address is now 192.168.120.1. The client has address 192.168.120.247 right now. (This had to be done because the default value data 192.168.0.1 caused an IP conflict with my router.)


screenshot


The connection is working and everything, e.g. the client has Internet access. But the IP address keeps changing. So I would like to set a static address, i.e. reserve an IP address for the client, on the DHCP server side, so that it always gets the same IP address when negotiating. How do I do that? Is there a yet another registry value for this perhaps?


This is on Windows Vista, but it also applies to Windows 7.



Answer



I have been searching the web far and wide and I have not found any method for assigning static IP address on the server/host side of things when using ICS. There appears to be no way to make a DHCP IP reservation list on the computer hosting the ICS, like you would normally do on the DHCP server of a network router. The DHCP service used for ICS in Windows is limited in that regard. For instance, it has no web interface, i.e. I can't just enter 192.168.120.1 in a web browse and administer the internal DHCP server used by the ICS in Windows.


So the only working solution to this problem is assigning the static IP address on the client side of things. In other words, the static IP address must be assigned manually on each and every computer that gets its Internet connection from the DHCP server of the ICS host. This is of course more cumbersome but it's a workable solution if you only have a few computers connected to the Internet this way. For a large number of computers a centralized network router would be preferred.


Here's a short how-to on assigning static IP on client side.



  1. Click Start menu button.

  2. Click on Control Panel.

  3. Double-click on Network Connections.

  4. Right-click on Local Area Connection and click Properties.

  5. Double-click on Internet Protocol (TCP/IP), or select it and click Properties.

  6. Click on Use the following IP address and type in the following. IP address 192.168.120.115, Subnet mask 255.255.255.0, Default gateway 192.168.120.1. Leave the DNS fields empty.

  7. Click OK, OK to save changes and close the dialog boxes.


I used Windows XP here, but it will be similar in Windows Vista and Windows 7, you just need to find the Network Connections applet. The easiest thing to do is to use the Run prompt. Here's a quick how-to.



  1. Press Win+R

  2. Type in ncpa.cpl (OR control netconnections)

  3. Press Enter


Screenshots



No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...