Operating System - HP-UX
1824846 Members
3640 Online
109674 Solutions
New Discussion юеВ

Re: Server cannot ping any computer on the network

 
Diadina Cotte
Advisor

Server cannot ping any computer on the network

Hello

Our HP-UX server cannot ping any of the computers in the network, just the servers.

What is the right way to edit the hosts file without SAM???

thanks!
D
Coffee please ;-)
13 REPLIES 13
Sanjay_6
Honored Contributor

Re: Server cannot ping any computer on the network

Hi Diadina,

You can use vi to edit the /etc/hosts file. Can you ping the servers on the netowrk using their ip addresses. If not you have a network problem.

If you are able to ping the servers using their ip addresses, edit the /etc/hosts file using vi and put the server name and the ip address over there. Use "man vi" for info on vi editor.

You can also use the DNS resolver if you have a DNS configured on the network.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90685/B2355-90685_top.html&con=/hpux/onlinedocs/B2355-90685/00/00/26-con.html&toc=/hpux/onlinedocs/B2355-90685/00/00/26-toc.html&searchterms=resolv.conf&queryid=20020603-114407

Hope this helps.

Regds
PIYUSH D. PATEL
Honored Contributor

Re: Server cannot ping any computer on the network

Hi,

make a copy of the /etc/hosts file and then do a vi /etc/hosts file and modify the required information.

Is your network card working fine ??

Run commands lanscan and landiag. If the hardware status is down in the lanscan command then run

#ifconfig lan0 up

Or go to landiag and Reset the lancard.

Check for network card and cable and then go to the OS side.

Piyush
MANOJ SRIVASTAVA
Honored Contributor

Re: Server cannot ping any computer on the network

Hi Diandina

I think the deafult gateway is meesed up so you cant go out , do a netstat -nr and check for the default gateway , you can try pinging the same , in case you cant , you have to delte the default route and add new one.

You may like to look inot this
http://support1.itrc.hp.com/service/cki/docDisplay.do?docId=200000049791567

also to edit /etc/hosts just vi the file and the entries like

IP ADDRESS hostname. hostname.domain.com.


Manoj Srivastava
Diadina Cotte
Advisor

Re: Server cannot ping any computer on the network

Output from netstat -nr and the hosts file.

root@apache:/etc#>netstat -nr
Routing tables
Destination Gateway Flags Refs Use Interface Pmtu PmtuTime
63.161.60.66 172.21.30.3 UGHD 0 180 btlan01 1500
64.4.49.135 172.21.30.3 UGHD 0 9 btlan01 1500
65.54.232.71 172.21.30.3 UGHD 0 0 btlan01 1500
127.0.0.1 127.0.0.1 UH 0 1607 lo0 4608
172.21.30.25 127.0.0.1 UH 40 1044042 lo0 4608
209.67.50.203 172.21.30.3 UGHD 0 0 btlan01 1500
216.148.222.35 172.21.30.3 UGHD 0 90 btlan01 1500
default 172.21.30.2 UG 0 148 btlan01 1500
172.21.30.0 172.21.30.25 U 2 250837 btlan01 1500
root@apache:/etc#>


root@apache:/etc#>more hosts
## Configured using SAM by root on Thu May 16 16:01:20 2002
# @(#)hosts $Revision: 1.9.212.1 $ $Date: 95/10/12 19:28:22 $
#
# The form for each entry is:
#
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#
172.21.30.3 fw.jostra-bentley.local fw
172.21.30.2 ip2.jostra-bentley.local ip2
172.21.30.25 apache apache.anasco.jostra-bentley.com
127.0.0.1 localhost loopback
root@apache:/etc#>


thanks!
Coffee please ;-)
Sachin Patel
Honored Contributor

Re: Server cannot ping any computer on the network

Are you able to ping your default gateway?
172.21.30.2

Sachin
Is photography a hobby or another way to spend $
Diadina Cotte
Advisor

Re: Server cannot ping any computer on the network

Yes the server can ping any ip address but not hostnames just the ones define on the DNS. Does HP-UX 10.20 has an option to set the WINS server?
Coffee please ;-)
Pete Randall
Outstanding Contributor

Re: Server cannot ping any computer on the network

Diadana,

From what you said -
"Our HP-UX server cannot ping any of the computers in the network, just the servers." and from looking at your /etc/hosts file, I'm going to take a wild guess here that all you need to do is add the other computers into /etc/hosts. You can try pinging one of the other computers by ip address to be certain that routing is not an issue. Assuming that works, putting the other computers in /etc/hosts will allow you to ping them by name.

Good luck,
Pete

Pete
MANOJ SRIVASTAVA
Honored Contributor

Re: Server cannot ping any computer on the network

Hi Diadina


in you /etc/hosts file

172.21.30.2 ip2.jostra-bentley.local ip2

where as this is also defined as the default gateway . this may not be correct .

try this

route delete default

and then route add default 172.21.30.1

genraelly the gateways end with .1

Do a man route incase the syntax doesnt work.


Manoj Srivastava
harry d brown jr
Honored Contributor

Re: Server cannot ping any computer on the network

Diadina,

Can you ping the servers via IP?

If not, then they are setup not to answer, or your routers are filtering out ICMP Echo Request's.

Another test:

nslookup HOSTNAMEHERE

If it can't find a hit, then you need to use vi or some other editor to add them to /etc/hosts.

What OS revision are you running?

live free or die
harry
Live Free or Die
Diadina Cotte
Advisor

Re: Server cannot ping any computer on the network

Hi

Well the os version is 10.20
I can do a nslookup just for the entries in the dns server... the clients using DHCP cannot be ping using the hostname just the ip. So in other words, the server is not resolving any names.

I don't any experience configuring networking issues on HP-UX so i guess the server only can resolve the entries in the dns server and the hosts table?
Coffee please ;-)
Sachin Patel
Honored Contributor

Re: Server cannot ping any computer on the network

Hi Diadian,
That explains more.
When you do ping sysname it will goes in to dns or hosts file and try to gets ip address then using that ip address it runs ping.
When you have DHCP your ip is not static (most cases depends on how DHCP is configure).

So you have twp choice. setup static ip for unix system. or setup ip in hosts table and when ever that system reboots change that new ip on your servers hosts entry.

Sachin
Is photography a hobby or another way to spend $
harry d brown jr
Honored Contributor

Re: Server cannot ping any computer on the network

Diadina,

Correct, the server can only resolve NAMES that are in DNS and /etc/hosts.

IT should ALWAYS be able to ping them using IP - wether or not they are in DNS or /etc/hosts!!

If you can't hit them using IP, then it's either the router stopping you or the server/pc is configured to ignore ping (ICMP echo requests).

live free or die
harry
Live Free or Die
Steven Sim Kok Leong
Honored Contributor

Re: Server cannot ping any computer on the network

Hi,

Once your /etc/hosts has been updated with the additional hostname-IP entries (i.e. the ones not found in the DNS), remember to verify that your /etc/nsswitch.conf is correct.

To ensure that your hosts file is used before the DNS is used for hostname-IP resolution, following entry should be there in /etc/nsswitch.conf:

hosts: files [NOTFOUND=continue] dns

Hope this helps. Regards.

Steven Sim Kok Leong