[Cialug] Networks service detection/configuration

Jim Popken stuff at jscada.com
Fri Mar 2 11:47:42 CST 2012


On Fri, Mar 2, 2012 at 11:28 AM, Nicolai <nicolai-cialug at chocolatine.org>wrote:

> On Fri, Mar 02, 2012 at 08:43:34AM -0600, Jim Popken wrote:
>
> > I have portable linux box application that needs to be a server with DNS
> > and dhcp when it is "isolated" and use the a corporate network's DNS and
> > dhcp server when it is a connected to the corporate network. "Isolated"
> for
> > example would be a two node network with only a linux box and windows
> > laptop. The linux box needs to detect and configure itself with no user
> > interaction at the time of system boot up. It should be able to connect
> to
> > an arbitrary corporate network without user input.
> >
> > In short I think I need to have a network port do:
> >
> > 1. Detect if there is a DNS server available and if not start it's own
> DNS
> > server.
> > 2. Detect if there is a dhcp server available and if not start it's own
> > dhcp server.
> >
> > Any guidance on how to configure a linux box (ubuntu 10)  do this would
> be
> > appreciated.
>
> First, welcome to the list. :)
>
> You could issue commands like dhclient (or whatever you machine on your
> machine) and dig, check the exit codes, and run your own software on
> failure.


I have tried dhclient in a script. However if there is no dhcp server on
the network the retries and time outs add up to minutes before the program
returns. That is a problem in this application. I have not found any way to
adjust the time outs or retires.


> (I'm assuming by DNS server you really mean a DNS recursive
> resolver, like dnscache or unbound.)
>

I am using dnsmasq.


> Just curious, when you say you have a "portable linux box application"
> does that mean the machine in question is a laptop?
>

It is a standalone box in a pelican case. It is intended to be used without
a keyboard or monitor.

Thanks for the response.

Jim


> Nicolai
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>



-- 
920 Clark Avenue
Ames, Iowa 50010
515 233-0855 (work)


More information about the Cialug mailing list