Cannot ping hostname

Hello,

I’m running 4 PC’s in my network. All connected to one router running as DHCP server.

2 PC’s are running Windows XP and 2 PC’s are running openSUSE 10.3.

The problem:
From the openSUSE machines it is imposible to ping another machine by hostname. Pinging the IP is working.
The Windows machines can ping other windows PC’s by hostname but not the openSUSE PC’s.

What can i do to make it possible to ping other PC’s by hostname?

On Thu January 22 2009 07:36 am, Dinand34 wrote:

>
> Hello,
>
> I’m running 4 PC’s in my network. All connected to one router running
> as DHCP server.
>
> 2 PC’s are running Windows XP and 2 PC’s are running openSUSE 10.3.
>
> The problem:
> From the openSUSE machines it is imposible to ping another machine by
> hostname. Pinging the IP is working.
> The Windows machines can ping other windows PC’s by hostname but not
> the openSUSE PC’s.
>
> What can i do to make it possible to ping other PC’s by hostname?
>
>
If the other computers have a fixed IP then, enter the other machines
in /etc/hosts. Each line of the hosts file has the form:
<IP> <full host name> <short host name>

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Yast->etc/sysconfig->firewall

FW_ALLOW_PING=YES

also try an nslookup on the ip address within windows. This will give you the FQDN. Try pinging that “hostname”.

What is the reason Windows is capable of pinging by hostname and Linux is not?

P.S What do you mean with ‘Red/Green’?

FW_Allow_Ping=Yes was set OK

If I try to nslookup the linux machine from a windows machine I get the following result:

nslookup 193.168.1.34
*** Can’t find server name for address 192.168.1.254: Non existent domain server: ns3.tiscali.nl
Address: 195.241.77.55

On Fri January 23 2009 05:36 pm, Dinand34 wrote:

<snip>

> What is the reason Windows is capable of pinging by hostname and Linux
> is not?
>
> P.S What do you mean with ‘Red/Green’?
>
>
Not sure about Windows. “Red Green” is the author of the quote from a little
known TV show.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Hi,

Are you sure the address should be 193.168.1.34 and not 192.168.1.34 ?

Are all your machines on one subnet ?

The ability to resolve a name is normally via a static hosts file or a dns server.

The file /etc/nsswitch.conf decides the order of lookup and will normally have those two services in it.

If you do not have a dns server setup then add the entries into the static hosts file /etc/hosts

entries would be of the form

192.168.1.34 Hostname

hth
J

Tux-IT Open Source - BSD and Linux Solutions

I agree you may want to do it in YAST so you do not make any mistakes.

One more thing. The reason why you likely didn’t get a response was your /etc/hosts file was not configured properly.

The format for /etc/hosts is as follows:
IP Address FQDN NAME

If using this method remember to shutdown and startup the eth0 device so that it grabs the updated information.