Can I use DNS instead of static IP?

Discussion in 'Networking' started by cgunn, May 24, 2013.

  1. cgunn

    cgunn Member

    My pangolin system is built into a mobile wireless trolley. In the trolley is a computer which port-forwards any input packets on a certain port to the actual QM2000.NET device over a local ethernet cable. The Pangolin control software (my own code, using the LD2000 API) runs elsewhere on our network, and communicates over wireless with the trolley computer, thinking it is the QM2000.NET device. This works fine.
    However, our networking administrator will not allow the wireless network adaptor on the trolley computer to have a static IP address. So that computer may have a different IP on different days. This means that each time it is used, we have to do the manual operation of getting the IP address from DNS and running QM2000.NET_Config.exe to enter it.
    As this is intended to be a turn-key system, I need to make this automatic. Is there some way to start the software with a supplied IP address as a parameter? What I am thinking of is BeginSessionEx() with a supplied IP. Or perhaps I could write software to automatically edit a config file somewhere at startup?
     
  2. As far as I know, by default this is not possible.

    But is it not easier to create an second virtual network card.

    The second virtual network card you connect through fixed ip to the .net, and through the first virtual network card you connect to the internet.
    Than you can even run an small application as dyndns to retrieve the public domain name every time.
    Or just retrieve the ip address by an trace.

    You can also retrieve your ip by something like this site:
    http://www.whatismyip.com
     
    Last edited by a moderator: May 27, 2013
  3. cgunn

    cgunn Member

    Not sure I understand what you mean by "the .net". Do you mean the QM2000.net card? If so, I don't think this solves it, because my LD2000 software is running elsewhere on the network, not on the computer that the card is directly connected to.
    To restate the problem a different way: I need to run my LD2000-based software to communicate with a QM2000.net card over a network that cannot have static IP addresses. So when I run my laser drawing code, I need to first automatically do what QM2000_config.exe does with its manual user interface. I just want to get rid of that user interface. I would have thought QM2000_config.exe writes the IP address somewhere when it is typed in by the user. If I knew that, I could automatically write it, and my problem would be solved (I think).
    Retrieving the IP is not the problem, it is setting it on the QM2000 card without having to do any user input that is the problem.
     
  4. cgunn

    cgunn Member

    OK, I have this working now. For the benefit of others who may be interested here is what I did.
    My mobile trolley has a computer (actually just a windows tablet) that is on my company's wireless network and gets its IP allocated from its computer name via DNS. Inside the trolley, the laser projector (and an IP camera) are connected to the computer via ethernet cables, and have their own static IP addresses on that local wired network. The computer starts up a port-forwarding program that simply passes packets arriving on the wireless network on certain ports, across to the laser projector or camera with their static IPs and vice versa.
    My LD2000 software exists elsewhere on my company's network. At startup it uses a DNS lookup to get the current IP address of the computer using its name. It then automatically edits the LD2000.ini file to insert that IP address. It then continues with the usual LD2000 startup procedure. The software reads the ini file, gets the IP address (of the computer) , but it thinks it is the laser device so starts sending packets to it. The computer receives the packets and 'hand-balls' them on to the actual laser device.
     

Share This Page