0

I am developing a number of mobile websites (using IIS), and I want to test them using my mobile device which is connected on the same LAN. I would like to access each website via a different local IP address, such as 10.0.0.5, 10.0.0.6 etc. (Using the same IP address with different ports makes HTTPS difficult.)

For this, my computer will have to be assigned multiple IPs. This can be done in Network and Sharing Center -> Change adapter settings -> right click connection -> Properties -> IP4 -> Properties -> Advanced. However additional IPs cannot be added when DHCP is enabled.

I therefore would like my Netgear router to be DHCP enabled as I have other devices connected to it, but my computer should be connected without DHCP. My Netgear router supports multiple LAN groups. Group 1 is 10.0.0.x, and Group 3 is 192.168.1.x. So I though the best thing to do is to keep Group 1 DHCP enabled (I checked the 'Use Router as DHCP server' checkbox for this group), and to disabled DHCP for Group 3. Then in IP4 -> Properties on my computer, I clicked 'Use the following IP address', and entered

IP=192.168.1.2
Subnet mask=255.255.255.0
Default gateway=192.168.1.138

but there was an error in connecting - the Windows network troubleshooter came up and kindly 'fixed' it by using DHCP which connected it to Group 1 as normal.

How can I connect my computer to the router without DHCP while keeping DHCP enabled for other devices, or is there another way I can test multiple websites from my smartphone?

1 Answer 1

1

I probably misunderstood something but to set static IP you do not need to disable DHCP from the router. Add to the server as many ipv4 ip as you want by going to its advanced settings. I do not even think you'd need to have groups, I'd only use 1 lan for everything (since a router is not a firewall, so I'd not push it too far). Your server would have all the ips you want but only the devices with same subnet will reach it, in a simple case.

5
  • What will happen though I assign my server IPs 10.0.0.7 & 10.0.0.8, but when my server is switched off, DHCP happened to assign these IPs to other devices?
    – wezten
    Jan 21, 2016 at 15:17
  • @wezten You need to use addresses from outside the DHCP range.
    – kasperd
    Jan 21, 2016 at 15:21
  • Just found, you can set the DHCP Starting IP Address, and Ending IP Address. This worked great, thanks.
    – wezten
    Jan 21, 2016 at 15:21
  • I'd use a range out of the dhcp assignment. let's say that your dhcp uses the range 10.0.0.2 to 10.0.0.50 you will have from 10.0.0.51 to 10.0.0.254 free so let the server use these ;) or viceversa .. But, if your lan is 192.168.0.0 so your dhcp works only on this subnet, you can add any virtual ip addresses to the server. To reach the server 10.0.0.7 using the lan 192.168.0.0, set the same 10.0.0.0 network address to another devices.. you can use /24 subnet (255.255.255.0) so only 10.0.0. from 1 to 255 can be accessed.
    – aPugLife
    Jan 21, 2016 at 15:25
  • glad you solved! I was too slow writing the reply ;)
    – aPugLife
    Jan 21, 2016 at 15:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .