[Cialug] Networks service detection/configuration
Nicolai
nicolai-cialug at chocolatine.org
Fri Mar 2 11:28:43 CST 2012
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'm assuming by DNS server you really mean a DNS recursive
resolver, like dnscache or unbound.)
Just curious, when you say you have a "portable linux box application"
does that mean the machine in question is a laptop?
Nicolai
More information about the Cialug
mailing list