PDA

View Full Version : How are DHCP bootup network config settings determined?


tmart
09-10-2009, 01:04 PM
As far as I understand the DHCP boot cycle process, after the DHCP lease is assigned to a newly started component, the component issues several wget requests. One of these requests is for the applogic_network.conf file which is then sourced and invokes some user-defined functions defined in the boot scripts.

I am wondering about how AppLogic formulates the contents of these files that are retrieved. The general DHCP and wget sequencing makes sense to me, but I'm wondering how some of the contents for these files are assigned. Specifically about how the "ncfg_nameserver 'XXX.XXX.XXX.XXX' gets determined.

Does AppLogic assume that whatever the default gateway is connected to is the appropriate internal 10.* IP address to use? Or is something else going on... like "If the default gateway is connected to a NET appliance, then ... " ?

On a related topic: if we want to use an internal nameserver but use a NET for our outbound gateway, is there a "right way" to do this?

tmart
09-10-2009, 01:24 PM
Ok, I see that AppLogic appears to use whatever the default gateway/"net" terminal is connected to as the nameserver. Can we override this in a property, or do we need to retool the startup scripts to use a non-standard nameserver in /etc/resolv.conf?

PeterNic
09-11-2009, 10:07 AM
Tim,

Nameservers can be defined in one of three ways:

- in VDS, you have control via properties, so you can set anything you like. All controlled in the startup scripts which pull the desired values from the properties
- in appliances without a connected gateway output, there is no name server; the only hosts the appliance has access to are those that are connected to it; their names are pre-resolved and available without DNS query
- in appliances that have a gateway output and it is connected, first we try to resolve to names of other connected appliances (as above), then send a DNS query out to the gateway output (the gateway output serves both DNS request and network gateway, similar to simple office routers).

Two simple ways to extend the mechanism in the last case:
- add a terminal specifically for name resolutions; at boot time of the appliance, extend the /etc/resolv.conf with the IP of that terminal; the nameserver appliance may want to also support forward of unrecognized names to the NET appliance for external resolution (if needed)
OR
- branch the NET gateway appliance and create a custom gateway that provides additional nameserving.

At this time there is no easy way to intercept only the DNS query without modifying either appliance (something for us to thing about).

Does this help?

Regards,
-- Peter