From owner-freebsd-questions@FreeBSD.ORG Tue Jan 16 05:39:22 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE35616A415 for ; Tue, 16 Jan 2007 05:39:22 +0000 (UTC) (envelope-from bobmc@bobmc.net) Received: from smtp-out.fcibroadband.com (smtp-out.fcibroadband.com [64.119.104.17]) by mx1.freebsd.org (Postfix) with ESMTP id B4B6D13C428 for ; Tue, 16 Jan 2007 05:39:22 +0000 (UTC) (envelope-from bobmc@bobmc.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-in1.fcibroadband.com (Postfix) with ESMTP id 0900C1B182A; Tue, 16 Jan 2007 00:39:18 -0500 (EST) Received: from smtp-out1 ([127.0.0.1]) by localhost (smtp-out1 [127.0.0.1]) (amavisd-new, port 10025) with SMTP id 19498-03; Tue, 16 Jan 2007 00:39:17 -0500 (EST) Received: from [192.168.1.102] (host6614614327.dsl.res.tor.fcibroadband.com [66.146.143.39]) by smtp-out.fcibroadband.com (Postfix) with ESMTP id 4CFBD1B1745; Tue, 16 Jan 2007 00:39:17 -0500 (EST) Message-ID: <45AC64AB.6080407@bobmc.net> Date: Tue, 16 Jan 2007 00:37:47 -0500 From: Bob McIsaac User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: questions@freebsd.org References: <20070115145736.16000.qmail@web59204.mail.re1.yahoo.com> In-Reply-To: <20070115145736.16000.qmail@web59204.mail.re1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: DNS Resolver Problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 05:39:23 -0000 linux quest wrote: > I have a problem with the DNS setting in FreeBSD. Every 1 hour, I will not be able to ping google.com (because I need to type in my ISP's DNS into /etc/resolv.conf) May I know what is the best solution for this, so that I do not have to type in my ISP's DNS to the resolver all the time? Perhaps, should I set a static IP configuration? If so, may I know which file should I modify? > > Thanks. > > Regards, > Linux Quest > Hi Mr Linux Quest: I too have had a significant problem with the service provided by my ISP. Too confuse the issue, I am new to FreeBSD and Linux thought my ISP was fine. Ping of anything worked fine but email and any brower were slow making a TCP connection. Using tcpdump showed a 10 second wait. Ian Smith made very helpful suggestions to guide me in solving the problem. I was surprised to find that dhclient overwrites /etc/resolv.conf since I assumed that programs did not write to /etc. My ISP is apparently misconfigured since the dhcp lease names the router as the nameserver. Fortunately, such problems can be fixed by modifying /etc/dhclient.conf. But the first step is to use command line "whois" to get the real nameserver IP. Example follows. interface "vr0" { prepend domain-name-servers 64.119.104.2; ;;; the above becomes the first line in /etc/resolv.conf request subnet-mask, domain-name, domain-name-servers, host-name, routers, broadcast-address, dhcp-lease-time, dhcp-message-type, dhcp-server-identifier, dhcp-renewal-time, dhcp-rebinding-time; } You can look at the lease in /var/db/dhclient.leases. Here is /etc/rc.conf linux_enable="NO" moused_enable="YES" moused_port="/dev/psm0" moused_type="intellimouse" usbd_enable="YES" ifconfig_vr0="DHCP" hostname="buffy.den.com" apache_enable="NO" And /etc/hosts .. not sure what is needed here??? ::1 localhost.den.com localhost 127.0.0.1 localhost.den.com localhost 192.168.1.102 buffy.den.com buffy 254.1.168.192.in-addr.arpa 192.168.1.254 102.1.168.192.in-addr.arpa 192.168.1.102 The hostname gets the fixed address from the dhcp lease. regards, -Bob- PS:- Do you have a person name? "John Doe" ?