Can't ping gateway (default) by name, but otherwise fine... why?

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Rev. Don Koo » Fri, 21 Apr 2000 04:00:00




> Since my only *BSD experience comes from OpenBSD I am a bit at sea
> about the definition of hosts and routes in FBSD.  The FBSD machine is
> connected by kue0 to the gateway, which runs OpenBSD.  For some reason
> my default gateway works just fine, but I cannot ping it by name from
> the FBSD machine.

> The FBSD machine is configured like this:
> /etc/rc.conf says:
> hostname="stencil.foo.com"
> ..blabla...
> ifconfig_kue0="inet 192.168.0.8 netmask 255.255.255.0"
> defaultrouter="192.168.0.40" /* this is the gateway machine */
> ..blabla...

> /etc/hosts says:
> 127.0.0.1       localhost       localhost.foo.com
> 192.168.0.8     stencil         stencil.foo.com
> 192.168.0.40    pointsman       pointsman.foo.com
> 192.168.0.10    eigenvalue      eigenvalue.foo.com

> /etc/resolv.conf says
> domain foo.com
> lookup file bind
> nameserver <my.ISP.name.server1>
> nameserver <my.ISP.name.server2>

> Pinging the gateway by IP works.  There is a default route.  The FBSD
> machine can ping the os/2 box by name.  Name service from my ISP works
> and I can ping e.g. www.yahoo.com; the ISP's nameservers are in
> /etc/resolv.conf.

> Why can the gateway not be pinged by name?

        If you were running a UNIX system, I would say that you have a
problem with host name resolution.  In FreeBSD, it could be the same
thing.  Your best bet is to do a "man gethostbyname" and then read
the page to see what mechanism FreeBSD uses to resolve host names.
That should give you the information you need.

                        Hope this helps,
                              Don

--
**********************      You a bounty hunter?
* Rev. Don McDonald  *      Man's gotta earn a living.
* Baltimore, MD      *      Dying ain't much of a living, boy.
**********************             "Outlaw Josey Wales"
http://members.home.net/oldno7

 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Chris » Fri, 21 Apr 2000 04:00:00


Quote:> /etc/resolv.conf says
> domain foo.com
> lookup file bind
> nameserver <my.ISP.name.server1>
> nameserver <my.ISP.name.server2>

hmmm..how about removing  "domain foo.com" from
ur /etc/resolv.conf ..?

Quote:>/etc/hosts says:
>127.0.0.1 localhost localhost.foo.com
>192.168.0.8 stencil stencil.foo.com
>192.168.0.40 pointsman pointsman.foo.com
>192.168.0.10 eigenvalue eigenvalue.foo.com

and I dont really sure if this matters
in my "etc/resolv.conf", the format is
<IP>   <NICK NAME> <FULL NAME>
eg  192.168.0.8  stencil.foo.com stencil

;-)

CH

 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Konstantin Nikonenk » Fri, 21 Apr 2000 04:00:00



> /etc/resolv.conf says
> domain foo.com
> lookup file bind
> nameserver <my.ISP.name.server1>
> nameserver <my.ISP.name.server2>

May be in /etc/resolv.conf You must add strings
hostresorder local bind
search YOU.ISP.DNS.SERVER
to view at first /etc/hosts and in second - YOU.ISP.DNS.SERVER

--
Kostya Nikonenko

ICQ: 63813379

 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Bill Vermilli » Sat, 22 Apr 2000 04:00:00





>> /etc/resolv.conf says
>> domain foo.com
>> lookup file bind
>> nameserver <my.ISP.name.server1>
>> nameserver <my.ISP.name.server2>
>May be in /etc/resolv.conf You must add strings
>hostresorder local bind

^^^^^^^^^^^^   'hostresorder' looks like an SCO format to me

In BSD you put the order in the host.conf file not in resolv.conf

--

 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Bill Vermilli » Sat, 22 Apr 2000 04:00:00




>Thank you all for the help.  None of these ideas worked, but if they
>did all I'd be able to do is *use* the computer instead of playing
>with it.  
>If I figure it out I'll post.

# $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

Try that.

--

 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Chris » Sun, 23 Apr 2000 04:00:00


hmmm...I forgot .....also
check you "/etc/nsswitch.conf"/
and look for a line starting with " host"

you want  it as

host     files dns

instead of

host     dns files

let me know if it works

CH


> Thank you all for the help.  None of these ideas worked, but if they
> did all I'd be able to do is *use* the computer instead of playing
> with it.

> Chris is correct that you are supposed to put lines in /etc/hosts that
> say

> <ip-address>   <fully.qualified.domainname>  <nickname>.

> I've been getting away with the other way but there's no point in
> tempting Murphy.

> If I figure it out I'll post.

> -Greg


> address.

> It don't mean a thing ... if it ain't got that other thing.

 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Bill Vermilli » Mon, 24 Apr 2000 04:00:00




>hmmm...I forgot .....also
>check you "/etc/nsswitch.conf"/

nsswitch.conf is for solaris.

--

 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Chris » Mon, 24 Apr 2000 04:00:00


nah....BSDs have it too.....

CH




> >hmmm...I forgot .....also
> >check you "/etc/nsswitch.conf"/

> nsswitch.conf is for solaris.

> --


 
 
 

Can't ping gateway (default) by name, but otherwise fine... why?

Post by Bill Vermilli » Thu, 27 Apr 2000 04:00:00




>nah....BSDs have it too.....

Hm.  Mine doesn't.

>CH





>> >hmmm...I forgot .....also
>> >check you "/etc/nsswitch.conf"/

>> nsswitch.conf is for solaris.

>> --


--