Re: How do I eliminate resolver delay??

2004-04-20 Thread Dick Davies
* Jonathon McKitrick <[EMAIL PROTECTED]> [0414 19:14]:
> 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.

> -- 
> My other computer is your Windows box.

I recognize that sig, how's it going boy? Still selling your soul
to GNUstep? :)

I walked in halfway through this, am I right in thinking you want
to use a particular nameserver no matter where you are?

If you don't want dhclient to whack your resolver, you can tell it
to append your DNS to resolv.conf:

[EMAIL PROTECTED]:rasputin$ cat /etc/dhclient.conf
interface "cue0" {
 prepend domain-name-servers 127.0.0.1;
 supersede domain-name "tenfour";
 supersede host-name "lb";
}
[EMAIL PROTECTED]:rasputin$

Drop me a mail off list when you get five, we'll have a cuppa.
-- 
How long a minute is depends on which side of the bathroom door you're
on.
Rasputin :: Jack of All Trades - Master of Nuns
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-19 Thread Jonathon McKitrick
: up. And let's not forget the routing tables. Rather than having it in 
: rc.conf, maybe throwing that into entry and exit hooks to set up the 
: default gateway for the wireless is a good idea as well?
: 
: But like I said, I haven't gotten around to trying it out yet. If you 
: beat me to it, do tell how it worked out, ok? ;-)

I might give that a shot this week.  Thanks for the ideas.  It's my first
experience delving into BSD networking.


jm
-- 
My other computer is your Windows box.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread Henrik W Lund
Subject:
Re: How do I eliminate resolver delay??
From:
Jonathon McKitrick <[EMAIL PROTECTED]>
Date:
Fri, 16 Apr 2004 19:12:58 +0100
To:
peter lageotakes <[EMAIL PROTECTED]>
To:
peter lageotakes <[EMAIL PROTECTED]>
CC:
[EMAIL PROTECTED]
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.


jm
Your situation is identical to mine, I have a wireless card I use for my 
 home network with DHCP, and an Ethernet card for school on a fixed-IP 
network. I've thought about using enter and exit hooks with the 
dhclient, but haven't gotten around to trying it out yet.

Maybe having an exit hook that sets resolv.conf up for the fixed-IP 
nameservers whenever the wireless link is taken down? Since it's 
automatically set up when dhclient first assigns an IP you don't really 
need an entry hook, but if you want to do some fancy checks (for a 
connection on the Ether card, for instance) I guess you could set one 
up. And let's not forget the routing tables. Rather than having it in 
rc.conf, maybe throwing that into entry and exit hooks to set up the 
default gateway for the wireless is a good idea as well?

But like I said, I haven't gotten around to trying it out yet. If you 
beat me to it, do tell how it worked out, ok? ;-)

-Henrik W Lund

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread Olaf Hoyer
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]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread peter lageotakes

--- Jonathon McKitrick <[EMAIL PROTECTED]> 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.
> 
> 
> 
> jm
> -- 
> My other computer is your Windows box.
> ___
> [EMAIL PROTECTED] mailing list
>
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"[EMAIL PROTECTED]"

I dont believe that the dchpd is truely the cause of
the issue, with respect to the overwriting of
resolv.conf.  As you plug into a new network, the
resolve.conf file should be updated correctly.  I
believe that it is the defaultrouter entry in the
rc.conf file that is causing the issue with your DNS.

Additonal thoughts and suggest (corrections) welcomed.

Pete







__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread Jonathon McKitrick
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.



jm
-- 
My other computer is your Windows box.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread peter lageotakes

--- Jonathon McKitrick <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 16, 2004 at 07:26:00PM +0200, Olaf Hoyer
> wrote:
> : > So maybe I need to replace these when I connect
> to my wireless network?
> : >
> : Yes, because in that case your notebook tries to
> reach your DNS server
> : at your workplace, and times out.
> 
> Ah, now it all makes sense.  I fixed hosts when
> using the network, but
> forgot about resolv.conf.
> 
> Is there an easier way to replace resolv rather than
> just running a script,
> which is what I (will) do now?
> 
> : Or you run named as a caching-only NS, and add
> nameserver 127.0.0.1
> : first place in /etc/resolv.conf.
> : 
> : 
> : pris 18:57 >host batcave.org
> : batcave.org has address 64.12.47.237
> : 
> : something like batcave.home or so will be fine...
> 
> So batcave.home will solve the problem rather than
> setting up named?
> 
> Vielen dank!
> 
> jm
> -- 
> My other computer is your Windows box.
> ___
> [EMAIL PROTECTED] mailing list
>
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"[EMAIL PROTECTED]"

FYI:  If I remember correctly, running dhcpd
overwrites the resolve.conf.

Pete




__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread Jonathon McKitrick
On Fri, Apr 16, 2004 at 07:26:00PM +0200, Olaf Hoyer wrote:
: > So maybe I need to replace these when I connect to my wireless network?
: >
: Yes, because in that case your notebook tries to reach your DNS server
: at your workplace, and times out.

Ah, now it all makes sense.  I fixed hosts when using the network, but
forgot about resolv.conf.

Is there an easier way to replace resolv rather than just running a script,
which is what I (will) do now?

: Or you run named as a caching-only NS, and add nameserver 127.0.0.1
: first place in /etc/resolv.conf.
: 
: 
: pris 18:57 >host batcave.org
: batcave.org has address 64.12.47.237
: 
: something like batcave.home or so will be fine...

So batcave.home will solve the problem rather than setting up named?

Vielen dank!

jm
-- 
My other computer is your Windows box.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread Olaf Hoyer
On Fri, 16 Apr 2004, Jonathon McKitrick wrote:
>
> The ed1 is when I am at work.  The wi0 is at home.  I just checked
> resolv.conf, and found this:
>
> search winnt.net
> nameserver 10.100.20.70
> nameserver 10.100.20.76
>
> So maybe I need to replace these when I connect to my wireless network?
>
Yes, because in that case your notebook tries to reach your DNS server
at your workplace, and times out.

You also should choose another domain for home use, batcave.org is
registered in the internet, so there are replies for that, also for a
root name server its a legit domain, so it forwards the query to the
approp. NS in the net, and there you get some results back you surely
will not want to get.

Or you run named as a caching-only NS, and add nameserver 127.0.0.1
first place in /etc/resolv.conf.


pris 18:57 >host batcave.org
batcave.org has address 64.12.47.237

something like batcave.home or so will be fine...


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]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread Jonathon McKitrick
On Fri, Apr 16, 2004 at 09:05:30AM -0700, peter lageotakes wrote:
: Just curious, what do you have in your resolv.conf and
: rc.conf file?  Are you also running DHCP or any
: routing daemons?


Hmm.  I have 2 setups:

hostname="snakepit"
network_interfaces="lo0 tun0"
ifconfig_ed1="dhcp"
#ifconfig_ed1="inet 192.168.0.2 netmask 255.255.255.0"
#ifconfig_ed1="inet 10.0.0.2 netmask 255.255.255.0"
ifconfig_wi0="inet 10.0.0.2 netmask 255.255.255.0"
defaultrouter="10.0.0.1"
sshd_enable="yes"

The ed1 is when I am at work.  The wi0 is at home.  I just checked
resolv.conf, and found this:

search winnt.net
nameserver 10.100.20.70
nameserver 10.100.20.76

So maybe I need to replace these when I connect to my wireless network?

jonathon

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread peter lageotakes

--- Jonathon McKitrick <[EMAIL PROTECTED]> wrote:
> 
> Since I started my wireless network, I am getting
> odd delays when starting
> apps that I am told is the resolver.  With the wired
> network, this does not
> happen.
> 
> I've had ssh take longer than normal, I've had X
> take 3 minutes, and today
> Xemacs didn't start so I shut it down and rebooted
> without the network.  It
> came right up.
> 
> In all of these cases, xauth is running and stuck in
> the kqueue read state.
> 
> I HAVE the host listed in /etc/hosts:
> 
> ::1 localhost
> localhost.my.domain
> 127.0.0.1   localhost
> localhost.my.domain
> 10.0.0.1neptune  
> neptune.batcave.org
> 
> Of course, 'batcave.org' is not a registered domain
> name.
> 
> What can I do to reduce or eliminate this annoying
> delay?
> 
> NOTE: Please CC me, as I am not currently
> subscribed.  Thanks.
> 
> jm
> -- 
> My other computer is your windows box.
> ___
> [EMAIL PROTECTED] mailing list
>
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"[EMAIL PROTECTED]"

Hello Jonathon,

Just curious, what do you have in your resolv.conf and
rc.conf file?  Are you also running DHCP or any
routing daemons?




__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How do I eliminate resolver delay??

2004-04-16 Thread Matthew Seaman
On Fri, Apr 16, 2004 at 02:23:11PM +0100, Jonathon McKitrick wrote:
> 
> Since I started my wireless network, I am getting odd delays when starting
> apps that I am told is the resolver.  With the wired network, this does not
> happen.
 
> I've had ssh take longer than normal, I've had X take 3 minutes, and today
> Xemacs didn't start so I shut it down and rebooted without the network.  It
> came right up.

Hmmm... This could be due to packet loss on your wireless network.
DNS, being a UDP protocol in the main, can't distinguish between
"response lost in transit" and "no response made by server", so it has
to sit and wait for the timeout before trying again.

You should be able to tcpdump(1) the port 53 traffic from your caching
DNS (or the DNS traffic out of your LAN, if you don't run your own
DNS), and cross reference that with the traffic generated by one of
your client machines, in order to get clues about exactly where things
are going wrong.

> Of course, 'batcave.org' is not a registered domain name.

Oh yes it is... Just not your registered domain name.
 
Cheers,

Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature