What IP addresses does Windows Internet Connection Sharing (ICS) configure when enabled?
Posted: (EET/GMT+2)
The Windows operating system contains a nice little feature called Internet Connection Sharing (ICS) which allows you to operate a Windows machine as a simple router for your network. Usually, your network probably has a hardware router, but there are situations where you might need to use your Windows machine as a router to share an Internet connection.
Internet Connection Sharing is a feature in the desktop Windows operating system versions, but it is also available in the server OS editions. For instance, Windows Vista, Windows 7, Windows 8 and 8.1 and Windows Server 2008, 2008 R2, 2012 and 2012 R2 all support ICS, among others (I believe Windows 2000 was the first one to support ICS in some form).
There's good documentation of the feature in TechNet for instance, but all this lack to answer a simple question: how is your network configured after you enable the feature?
ICS configuration settings are set through a couple of registry values, namely "ScopeAddress", "ScopeAddressBackup" and "StandaloneDhcpAddress". When enabling ICS, these three settings control the IP address that will become the new IP address of the local LAN network address of the computer on which you are enabling ICS.
Say, you have a server with a static IP address which's Internet connection you want to share. If you simply enable ICS on the server, its LAN IP address will become 192.168.137.1, which is the default value for ICS' configuration.
However, if you want to keep the original IP address of the server intact but still be able to share an Internet connection through it, be sure to edit the registry values before enabling ICS.
For example, if you wish to keep the server's existing address 192.5.10.10, simply set that same IP address to all the previously mentioned three registry settings:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters] "ScopeAddress"="192.5.10.10" "ScopeAddressBackup"="192.5.10.10" "StandaloneDhcpAddress"="192.5.10.10"
The above snippet can be saved to a .REG file, which you can then simply merge into the registry. But of course before editing the registry, make sure you have a backup.
Hope this clarifies how ICS works!