On Fri, 16 Apr 2004, Jonathon McKitrick wrote:

> On Fri, Apr 16, 2004 at 11:06:48AM -0700, peter lageotakes wrote:
> : FYI:  If I remember correctly, running dhcpd
> : overwrites the resolve.conf.
>
> That's what caused my problem.  I need a way to restore it when using the
> other network with assigned IPs.

In your /etc/dhclient.conf you can use default/prepend statements, see
dhclient.conf (5)

You can rather finetune this, or have other ways:

When you have @home some kind of server, have him also playing DHCP with
assignment of gateway, dns etc.

when it comes to dns, then you could setup named with split forward.

So make sure that you have @home a different network than that from your
work.

Steps to do:

in /etc/namedb, run ./make-localhost after /etc/hosts is populated with
reasonable name for your box.
make sure that a recent named.root is available.

in named.conf:

zone "." {
        type hint;
        file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "localhost.rev";
};


then comes the magic:
//Aufsetzen des split forward fuer intern
zone "0.168.192.IN-ADDR.ARPA" {
        type forward;
        forward only;
        forwarders {
                        192.168.0.1;
        };
        };

zone "example.de" {
        type forward;
        forward only;
        forwarders {
                        192.168.0.1;
        };
        };





Add forwarder statements where approp.

I use this setup in a production environment on a box running nagios for
monitoring several subnets, all VLAN with their own DNS in those
VLANS...

named will act as a caching nameserver only, when it comes to private
VLAN, it will use those other DNS, anything not in those forwarders
clauses will be resolved on his own, generating queries himself up to
the root Nameservers.

That would be the smart way of dealing with this, when you want, you
could add a default forwarders statement to the ns of your ISP @home...

HTH
Olaf


-- 
Olaf Hoyer        [EMAIL PROTECTED]
Fuerchterliche Erlebniss geben zu raten,
ob der, welcher sie erlebt, nicht etwas Fuerchterliches ist.
(Nietzsche, Jenseits von Gut und Boese)
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to