How to change the dhcp range alloted through ICS in Windows 7 to 192.168.1.x range?

25,607

I googled for "internet connection sharing" "windows 7" internal subnet, and the first hit was Microsoft's knowledge base article KB230148 How to Change the IP Range for the Internet Connection Sharing DHCP service which was last reviewed in 2011, was considered at the time to be "retired", and was stated as applying to:

  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Ultimate

From that article:

To change the IP address that is assigned to the host and the IP address range that is used by the DHCP service on the Connection Sharing host, use Registry Editor to change the following values. These values are located in the following folder: HKLM\System\CurrentControlSet\services\SharedAccess\Parameters

(REG_SZ) ScopeAddress
(REG_SZ) StandaloneDhcpAddress

The ScopeAddress value is set to the address range that you want to use with Connection Sharing. The StandaloneDhcpAddress value is the address range that is used when Virtual Wi-Fi/SoftAP is enabled. For both values, a network mask of 255.255.255.0 is used and is not configurable.

So, it seems to me that to get the effect you are after you'd set ScopeAddress and StandaloneDhcpAddress to C0A80000 hex. That will cause Windows to assign ICS clients IP addresses out of the range 192.168.0/24 (CIDR). (If the value in the question title is correct and the one in the question is not, use C0A80100 instead.)

However, doing so will likely cause IP address collisions because both your router and your laptop are now assigning IP addresses out of the same address pool. And even if by sheer stroke of luck it doesn't cause address collisions, chances are it'll wreak havoc with IP routing either on your laptop, on ICS clients, or quite possibly both. For that reason, there might actually be safeguards in place to prevent a setup like this.

If you explain why you so much want the IP address range of ICS clients to be the same as the (from that host's perspective) external IP subnet of the ICS server, maybe someone can propose a solution that will actually work, and work reliably.

Share:
25,607

Related videos on Youtube

srikanth chandrasekaran
Author by

srikanth chandrasekaran

Updated on September 18, 2022

Comments

  • srikanth chandrasekaran
    srikanth chandrasekaran over 1 year

    I have set up Internet Connection Sharing in my Windows 7 laptop. Currently the IP range alloted for ICS clients from DHCP is in the range of 192.168.137.x. I am not able to find a way to change the range manually to 192.168.0.x range (i.e the same range as my wireless router)

    I tried googling but did not find any answer.

    EDIT: I found this http://support.microsoft.com/kb/230148 from microsoft site , but this article may be very old, since I am not able to find that particular path in my regedit.

    EDIT2: This is the specific scenario for which I need to do this. Note: I am not going to buy new hardware for atleast some time. (I know that buying a multiport wifi router will solve my problem) I have a pocket wifi router, which has only WAN port and no ethernet out. I have a desktop which has only ethernet and no wifi. Desktop has a i7 processor and 16GB RAM. So very powerful. I have a laptop with windows 7 with both wifi and ethernet. But my laptop has very low config and not very powerful I have set up ICS in my laptop to share internet connection in my laptop.

    I have RHL Linux running inside a Virtual Machine in my dekstop. I want to set up a site-to-site VPN from my Linux VM inside desktop to my friend's VM in his house. His comp is also behind a NAT. I wanted my wifi router to be able to ping my desktop (so that i can set up natting in my pocket wifi router) and I thought that by giving the ip address in the 192.168.0.x range, I can achieve this. But I was wrong. My desktop did get ip address of 192.169.0.119 after trying out the below solution by @michael-kjorling . But neither my desktop nor my wifi router can ping each other.

    So is there any way I can achieve this?

    • Paul
      Paul about 11 years
      The Windows 7 part of that article is about half-way down.
  • Danny Staple
    Danny Staple over 7 years
    My self - just needed to AVOID my router and other address ranges. This worked perfectly on windows 10!
  • David d C e Freitas
    David d C e Freitas about 5 years
    Article linked to is now a broken link 404 page not found
  • user
    user about 5 years
    @DaviddCeFreitas Thanks for the heads up. I've replaced the link with one to the Internet Archive from around the time when this answer was written.