TCP/IP DHCP auto connect

I would like my QNX box to auto connect to any network that has DHCP available automatically. For example, when I boot my QNX box with network cable pulled out the network setting automatically changes to Manual and when I plug the network cable back into the computer, I have to manually change the setting to “DHCP” again from “phlip” to connect to network again. I haven’t tried but I also assume that when QNX box is connected to one network and if I hot swap the cable to another network I think I have to basically ask the QNX box to re-establish connection manually again. How can I setup the box so that this happens all automatically.

For example, in Windows XP laptop; if unplug and boot and plug the network cable back it make connection automatically, also if I hot swap to a different network it gets IP again automatically.

Thanks for your responses in advance.

I think there are different approaches to this idea:

  1. You only need the connection as soon as you try connecting to a remote host (so no DMZ/Service is provided). You could use /etc/autoconnect as a script checking which connections would be available.

  2. Generally you should be able to read a signal/notice as soon as your network cable would be reattached (not sure how this could be done on QNX now, on Linux you would have your ifup.d/ifdown.d scripts, but should be catching a *SIG/MSG somehow).

Both ways end up in shell scripting and kind of “polling” at some spots.
I did not find docs about any ifup/ifdown scripts provided directly, which makes it a lot harder…
You then could parse “netstat” and “nicinfo” for getting desired information and startup if adequate “dhcp.client” with a timeout. If dhcp.client does fail, set it up manually via “ifconfig” and “route”.
It sure will be some kind of mess ^^

wow, this does looks messy. I was hoping for a solution that is already provided from the OS it self. I am surprised this kind of feature is not implemented already. Is there any other solution out there?

As of now I can start my DHCP service and get internet over my wired connection by removing TDX (the tcp/ip driver) from the dependency. Is this procedure is right? Have any idea??

mcts exams | microsoft exams | cisco certification