Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to set pdnsd in this situation

    I'm using Ubuntu Hardy, no NetworkManager installed. I installed pdnsd server to speed up hostnames resolving. The server is started at the boot time, but at this time no internet connection is available so it marks all DNS servers as unreachable. Then I manually launch a script which configures my wifi card a connects the machine to internet. Here comes the problem: pdnsd doesn't want to resolve, because all servers are marked as unreachable. I have to manually restart pdnsd.

    How can I configure pdnsd to eliminate this problem?

    Thanks for answers.

  2. #2
    Add a line to the end of your wifi script that restarts pdnsd?

    Is this a trick question?

  3. #3
    Can be. But I expected something like "force pdnsd not to check the availability of servers and send dns requests no matter the server is down or not".

  4. $spacer_open
  5. #4
    And so....we go visit pdnsd's FAQ page:

    Q: What do I need the status control (option -s) for?
    A: It enables you to do some things you might or might not need. With it, you can:

    * query pdnsd's settings at runtime to debug configuration files and see which servers are regarded to be available
    * mark servers as available or unavailable, or force a status retest - very handy if you want to control which servers pdnsd queries, e.g for muliple dial-up accounts
    * delete, invalidate or add DNS records - useful e.g. when you want to build records for dynamically assigned IP addresses or domain names
    * reload pdnsd's configuration file without restarting pdnsd
    * print information about the contents of pdnsd's cache.

  6. #5
    Sure I can control the running daemon, that's what I've already tried. But I wanted to configure it in a way so it can run without any manual interference.

  7. #6
    So you're already manually running a script that connects your wifi, but don't want to add a line to that script that:

    1) restarts pdnsd -OR-
    2) sends a command to pdnsd using the -s switch to update the nameserver status

    Let's copy/paste some more from the pdnsd Documentation:

    Determine the method to check whether the server is available. Currently defined methods are:

    * ping: Send an ICMP_ECHO request to the server. If it doesn't respond within the timeout, it is regarded to be unavailable until the next probe.
    * none: The availability status is not changed, only the time stamp is updated.
    * if: Check whether the interface (specified in the interface= option) is existent, up and running. This currently works for all "ordinary" network interfaces, interfaces that disappear when down (e.g. ppp?), and additionally for Linux isdn interfaces (as of kernel 2.2). Note that you need a /dev/isdninfo device file (major#45, minor#255), or the isdn uptest will always fail.
    * dev and diald: Perform an if uptest, and, if that was succesful, additionally check whether a program is running that has locked a given (modem-) device. The needed parameters are an interface (specified as for the if uptest, e.g. "ppp0") and a device relative to /dev (e.g. "modem" for /dev/modem specified using the device= option. pdnsd will then look for a pid file for the given interface in /var/lock (e.g. /var/run/ and for a lockfile for the given device (e.g. /var/lock/LCK..modem), and then test whether the locking process is the process that created the pid file and this process is still alive. If this is the case, the normal if uptest is executed for the given interface.
    The dev option is for pppd dial-on-demand, diald is the same for diald users.
    * exec: Executes a given command in the /bin/sh shell (as /bin/sh -c <command>) and evaluates the result (the return code of the last command) in the shell's way of handling return codes, i.e. 0 indicates success, all other indicate failure. The shell's process name will be uptest_sh. The command is given with the uptest_cmd option (see below). For secuity issues, also see that entry.
    * query: New in version 1.2: This works like the ping test, except it sends an empty DNS query to the remote server. If the server sends a well-formed response back within the timeout period (except SERVFAIL), it will be regarded as available. This test is useful if a remote server does not respond to ICMP_ECHO requests at all, which unfortunately is quite common these days. In many cases this test will be a more reliable indicator of availability than the ones mentioned before.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts