From owner-freebsd-questions Mon Mar 27 10:43:46 2000 Delivered-To: freebsd-questions@freebsd.org Received: from janus.afccc.af.mil (janus.afccc.af.mil [209.22.30.2]) by hub.freebsd.org (Postfix) with ESMTP id 6567E37C0F3 for ; Mon, 27 Mar 2000 10:42:44 -0800 (PST) (envelope-from kevin.havener@afccc.af.mil) Received: from janus.afccc.af.mil (root@localhost) by janus.afccc.af.mil with ESMTP id SAA27755; Mon, 27 Mar 2000 18:42:34 GMT Received: from thor.afccc.af.mil (thor.afccc.af.mil [209.22.31.24]) by janus.afccc.af.mil with ESMTP id SAA27751; Mon, 27 Mar 2000 18:42:33 GMT Received: from afccc.af.mil (olasun7.afccc.af.mil [209.22.31.56]) by thor.afccc.af.mil with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id HMJLK6G6; Mon, 27 Mar 2000 13:38:58 -0500 Message-ID: <38DFAB59.B64E42C0@afccc.af.mil> Date: Mon, 27 Mar 2000 13:41:29 -0500 From: Kevin Havener X-Mailer: Mozilla 4.08 [en] (X11; U; SunOS 5.7 sun4u) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Can't resolve localhost--redux Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It's been a week or so, so I'll repost some of my previous post on the same subject. This is rather long--sorry. I desparately need a ticket to ride the cluetrain here! Bottom line is I can't resolve localhost since I dorked around trying to set up a caching nameserver--since turned off. Setup is 3.4R, standalone, dial-in to ISP. Relevant config files follow. Also at Ben Smithurst's suggestion, I ran 'ktrace ping localhost'. Plus at the bottom of this dump, I've also included the output of 'netstat -r' and 'ifconfig -a' if that helps. Kevin ============================================================================ $ more /etc/hosts 127.0.0.1 localhost #there is a tab here. Is this tab sensitive? #just tried it without --doesn't seem to be ============================================================================= $ more /etc/host.conf # $Id: host.conf,v 1.5 1998/11/16 02:02:30 jkh Exp $ # First try the /etc/hosts file hosts # Now try the nameserver next. bind # If you have YP/NIS configured, uncomment the next line # nis ============================================================================== $ more /etc/resolv.conf nameserver 209.215.82.130 nameserver 209.215.82.133 #ISP says secondary is now x.x.x.190 ============================================================================== $ more rc.conf # This file now contains just the overrides from /etc/defaults/rc.conf # please make all changes to this file. # -- sysinstall generated deltas -- # ifconfig_ppp0="inet netmask 255.255.255.0" moused_enable="YES" defaultrouter="NO" network_interfaces="ppp0 lo0" hostname="freebsd" linux_enable="YES" lpd_enable="YES" browserPackage="lynx" ============================================================================= kdump from "ktrace ping localhost" 312 ktrace RET ktrace 0 312 ktrace CALL readlink(0x280cf3e8,0xbfbfd2fc,0x3f) 312 ktrace NAMI "/etc/malloc.conf" 312 ktrace RET readlink -1 errno 2 No such file or directory 312 ktrace CALL mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0,0) 312 ktrace RET mmap 672018432/0x280e3000 312 ktrace CALL break(0x804c000) 312 ktrace RET break 0 312 ktrace CALL break(0x804d000) 312 ktrace RET break 0 312 ktrace CALL execve(0xbfbfd404,0xbfbfd8c8,0xbfbfd8d4) 312 ktrace NAMI "/sbin/ping" 312 ping RET execve 0 312 ping CALL socket(0x2,0x3,0x1) 312 ping RET socket 3 312 ping CALL getuid 312 ping RET getuid 0 312 ping CALL setuid(0) 312 ping RET setuid 0 312 ping CALL getuid 312 ping RET getuid 0 312 ping CALL open(0x8066ec9,0,0x1b6) 312 ping NAMI "/etc/host.conf" 312 ping RET open 4 312 ping CALL fstat(0x4,0xbfbfd00c) 312 ping RET fstat 0 312 ping CALL readlink(0x8067f20,0xbfbfd00c,0x3f) 312 ping NAMI "/etc/malloc.conf" 312 ping RET readlink -1 errno 2 No such file or directory 312 ping CALL mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0,0) 312 ping RET mmap 671518720/0x28069000 312 ping CALL break(0x8086000) 312 ping RET break 0 312 ping CALL break(0x8088000) 312 ping RET break 0 312 ping CALL read(0x4,0x8086000,0x2000) 312 ping GIO fd 4 read 190 bytes "# $Id: host.conf,v 1.5 1998/11/16 02:02:30 jkh Exp $ # First try the /etc/hosts file hosts # Now try the nameserver next. bind # If you have YP/NIS configured, uncomment the next line # nis " 312 ping RET read 190/0xbe 312 ping CALL read(0x4,0x8086000,0x2000) 312 ping GIO fd 4 read 0 bytes "" 312 ping RET read 0 312 ping CALL close(0x4) 312 ping RET close 0 312 ping CALL open(0x8066efe,0,0x1b6) 312 ping NAMI "/etc/hosts" 312 ping RET open 4 312 ping CALL gettimeofday(0xbfbfd068,0) 312 ping RET gettimeofday 0 312 ping CALL getpid 312 ping RET getpid 312/0x138 312 ping CALL issetugid 312 ping RET issetugid 0 312 ping CALL open(0x8067cba,0,0x1b6) 312 ping NAMI "/etc/resolv.conf" 312 ping RET open 5 312 ping CALL fstat(0x5,0xbfbfcfb4) 312 ping RET fstat 0 312 ping CALL read(0x5,0x8086000,0x2000) 312 ping GIO fd 5 read 51 bytes "nameserver 209.215.82.130 nameserver 209.215.82.133" 312 ping RET read 51/0x33 312 ping CALL read(0x5,0x8086000,0x2000) 312 ping GIO fd 5 read 0 bytes "" 312 ping RET read 0 312 ping CALL close(0x5) 312 ping RET close 0 312 ping CALL __sysctl(0xbfbfd05c,0x2,0xbfbfd0a8,0xbfbfd064,0,0) 312 ping RET __sysctl 0 312 ping CALL issetugid 312 ping RET issetugid 0 312 ping CALL fstat(0x4,0xbfbfd400) 312 ping RET fstat 0 312 ping CALL read(0x4,0x8086000,0x2000) 312 ping GIO fd 4 read 19 bytes "127.0.0.1 localhost" 312 ping RET read 19/0x13 312 ping CALL read(0x4,0x8086000,0x2000) 312 ping GIO fd 4 read 0 bytes "" 312 ping RET read 0 312 ping CALL close(0x4) 312 ping RET close 0 312 ping CALL issetugid 312 ping RET issetugid 0 312 ping CALL issetugid 312 ping RET issetugid 0 312 ping CALL socket(0x2,0x2,0) 312 ping RET socket 4 312 ping CALL connect(0x4,0x808495c,0x10) 312 ping RET connect 0 312 ping CALL sendto(0x4,0xbfbfc840,0x1b,0,0,0) 312 ping RET sendto -1 errno 65 No route to host 312 ping CALL close(0x4) 312 ping RET close 0 312 ping CALL socket(0x2,0x2,0) 312 ping RET socket 4 312 ping CALL sendto(0x4,0xbfbfc840,0x1b,0,0x808496c,0x10) 312 ping RET sendto -1 errno 65 No route to host 312 ping CALL close(0x4) 312 ping RET close 0 312 ping CALL write(0x2,0xbfbfcdfc,0x6) 312 ping GIO fd 2 wrote 6 bytes "ping: " 312 ping RET write 6 312 ping CALL write(0x2,0xbfbfce10,0x32) 312 ping GIO fd 2 wrote 50 bytes "cannot resolve localhost: Host name lookup failure" 312 ping RET write 50/0x32 312 ping CALL write(0x2,0xbfbfce00,0x1) 312 ping GIO fd 2 wrote 1 byte " " 312 ping RET write 1 312 ping CALL exit(0x44) ================================================================================ freebsd# netstat -r Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 209.215.82.140 UGSc 3 0 ppp0 localhost localhost UH 0 0 lo0 209.215.82.140 ppp160.cytechcis.n UH 4 0 ppp0 ================================================================================ freebsd# ifconfig -a lp0: flags=8810 mtu 1500 tun0: flags=8010 mtu 1500 sl0: flags=c010 mtu 552 ppp0: flags=8051 mtu 1524 inet 216.77.34.160 --> 209.215.82.140 netmask 0xffffff00 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message