0

I have a number of systems connected to a Windows computer that acts as a server in a Home Group. The problem is that if this local server turns off and on or restarts, its IP Address might change for that system.

How will the remain devices find out the new IP address of this server? I want to automate the entire process since I want to host software and there won't be any network administrators to help.

Jibin Mathew
  • 101
  • 1
  • 1
  • 4
  • Why do you think this might be a problem? Normally servers are configured to use a fixed IP address. – DavidPostill Nov 04 '15 at 20:04
  • Even in a localgroup? – Jibin Mathew Nov 04 '15 at 20:06
  • Why not? It's very easy to set that up in your router. – DavidPostill Nov 04 '15 at 20:06
  • problem is that i want to have a generalized method since I cannot configure the router manually for every system to which i distribute the software – Jibin Mathew Nov 04 '15 at 20:08
  • If you are distributing the software to a third party then it is up to the Administrator who installs it to make sure his network is set up correctly. You cannot impose your rules on some other persons network. – DavidPostill Nov 04 '15 at 20:11
  • i can't actually do that since there wont be any administrator for that – Jibin Mathew Nov 04 '15 at 20:15
  • There is always an adminstrator on every network. If you think there isn't then you need to clarify your question. – DavidPostill Nov 04 '15 at 20:17
  • 1. What OSes are in use, for both the server and clients? 2. Why can't your router handle the naming? Why are you fiddling with IP Addresses? 3. Why can't the "server" stay on? 4. Why can't the server keep a static IP address? 4. What have you researched about this problem already? – Canadian Luke Nov 04 '15 at 20:35
  • @CanadianLuke The server would be just a windows based pc that would be in a shop and the pc would be turned off once the shop is closed, the client devices would be again windows and ios, the problem is that i want to distribute the software and i cannot manually change the router settings for every device to which the software is distributed – Jibin Mathew Nov 04 '15 at 20:38
  • @CanadianLuke all the processing is being done by the local server which requires that the client devices must know the ip of the local server inorder to make requests – Jibin Mathew Nov 04 '15 at 20:39
  • I repeat, point 4 (the first one, typo on the second): Why can't the server keep a static IP address? – Canadian Luke Nov 04 '15 at 20:41
  • @CanadianLuke I run a xampp server on the local server machine every time the system turns on and so at that time the ip address seems to change , I don't know much about networking that has been bugging me,. On my research i came across things like using DHCP server , configuring the routers – Jibin Mathew Nov 04 '15 at 20:45
  • The simple answer? Don't use IP addresses. This is why we have systems like Bonjour, DNS, and Workgroups and HomeGroups in the first place, so we can give computers sensible (non-changing) names that are not subject to the whims of a network that is trying to manage itself properly. If your software is trying to distribute itself on a company network and has hard-coded IP addresses then you've already failed. – Mokubai Nov 04 '15 at 21:58
  • @Mokubai Please help me with how to solve this problem – Jibin Mathew Nov 04 '15 at 22:02
  • I can't see what your problem is beyond needing to set up a static IP. Either you need to set up your DHCP server to always give that machine the address you want, or you give it a static address as below. The *right* way to go is to use the computer **NAME** rather than address. I suggest you actually describe what this software is, how it works and why it can only work the way you are asking as no one here can understand why this is a problem. IP addresses have *never* been seen as a valid way to assure that something is coming from a particular computer. – Mokubai Nov 04 '15 at 22:05
  • ok, the problem is that the there is software that needs to run on a computer, there are number of client devices and they need to make a ajax post request to this server. The software running on this server does all the processing and return the response back to the client. The issue is the server may be turned off at times and i want that on turning on the server the clients must be able to make request to this server. The software would be distributed to a number of networks and manual configuration is not feasible, I want a programmatic solution @Mokubai – Jibin Mathew Nov 04 '15 at 22:14
  • So what's wrong with using network name resolution? Your question seems to be hung up on an IP address problem and the edits don't clarify much. Focus on what your actual problem is, not what solution you think might work. Almost all corporate networks use computer names for servers because it leaves the network infrastructure able to change as the needs arise. If this is a "how do I write my program to take account of this?" question then maybe [so] is better, but here I would suggest telling us what machines types (Windows, etc) and asking how to set up name servers within that network. – Mokubai Nov 04 '15 at 22:25
  • OK Its a windows system and how do i set up name server in that network. Please help @Mokubai – Jibin Mathew Nov 04 '15 at 22:33
  • I would suggest you ask a new question telling us every last detail of your actual problem and include the details that you've given me, don't get hung up on what you think is the solution and be open to suggestions of new ways. See our [how to ask](http://superuser.com/help/how-to-ask) page. – Mokubai Nov 04 '15 at 23:00

1 Answers1

0
  1. Click on Start, then Control Panel
  2. Choose Network and Internet -> Network and Sharing Center (or just Network and Sharing Center)
  3. Click Change Adapter Settings on the left
  4. Find the network adapter (NIC) that you are currently connecting with. Right-click it and click Properties (requires Admin access)
  5. Choose Internet Protocol version 4 (TCP/IPv4) and choose Properties enter image description here
  6. Choose the option to Use the following IP address: and fill in the blanks for your network. enter image description here
  7. Click OK, and close the next window. Verify you can access the Internet.

You will now have the IP Address always set to this address. Because it is getting set to whatever was found below, once your computers find the new address, it will remember it. Your router (more specifically, the DNS Service) will match the name with the IP Address, and HomeGroups are built to just know (using IPv6, usually).

How do you find out what you can put here?

  1. Click on Start, type cmd and press Enter to bring up the Command Prompt.
  2. Type ipconfig /all and press Enter
  3. Check for the following items:

    IPv4 Address. . . . . . . . . . . : 192.168.0.xxx
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.0.xxx
    DNS Servers . . . . . . . . . . . : 192.168.0.xxx
    

    Your screen will output different numbers. Keep the information handy, and put them into the dialog above.

  4. Type exit and press Enter to exit.

Canadian Luke
  • 24,199
  • 39
  • 117
  • 171