Operating System - HP-UX
1834279 Members
1827 Online
110066 Solutions
New Discussion

Re: ping - icmp: unkown protocol

 
Tarek
Super Advisor

ping - icmp: unkown protocol

Hi all,
i have a problem with a ws. While i try to remote login by telnet i have this error:
Trying...
telnet: Unable to connect to remote host: Connection refused.
When the user (logged in as root) try to ping from that ws (locally) to another he has this error:
at the beginning it doesn't ping, then it have this error:
icmp: unkown protocol
The problem is that the ws is far from me, in another town, so i have to work remotely and to tell the user by phone how to proceed.
Thanks for your help.
Tarek
8 REPLIES 8
Bill McNAMARA_1
Honored Contributor

Re: ping - icmp: unkown protocol

verify the file /etc/protocols is good..
/etc/inetd.conf and /etc/services should have service telnet port defined 23

You may want to try restarting network services and rereading the inetd.conf file.. inetd -c and /sbin/init.d/net stop
and start.

You might have the solution in your syslog if you take a look there.

Later,
Bill
It works for me (tm)
Tarek
Super Advisor

Re: ping - icmp: unkown protocol

Thanks Bill.
This is my entry in /etc/protocols
ip 0 IP
icmp 1 ICMP
igmp 2 IGMP
ggp 3 GGP
tcp 6 TCP
egp 8 EGP
pup 12 PUP
udp 17 UDP
hmp 20 HMP
xns-idp 22 XNS-IDP
rdp 27 RDP

The entry in /etc/inetd.conf:
about ftp and telnet
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l
telnet stream tcp nowait root /usr/lbin/telnetd telnetd

The entry in /etc/services about telnet and ftp is:
ftp 21/tcp
telnet 23/tcp

I also issued those commands, stopping and restarting services but nothing changed, it's still giving me icmp: unknown protocol
something else?
Thanks very much.
Tarek

Santosh Nair_1
Honored Contributor

Re: ping - icmp: unkown protocol

If you're using NIS, change the search order in /etc/nsswitch.conf for services from nis files to file nis.

-Santosh
Life is what's happening while you're busy making other plans
Tarek
Super Advisor

Re: ping - icmp: unkown protocol

Hi again. I have problems with all tcp protocols. So also FTP, TELNET, RLOGIN ....
Message errors:
ftp: ftp/tcp: unknown service
telnet: tcp/telnet: unknown service
rlogin: login/tcp: unknown service
What it could be??
Really thanks very much !!
Tarek
Tarek
Super Advisor

Re: ping - icmp: unkown protocol

Thanks Santosh. But i'm not using nis.
Before this ws was in nis, but now it isn't.
So i modified the /etc/nsswitch.conf and /etc/namesvrs to unconfigure nis.
My entry in /etc/nsswitch.conf is:
hosts: files dns hosts
Santosh Nair_1
Honored Contributor

Re: ping - icmp: unkown protocol

Tarek,

Not clear on when you unconfigured the ws, but if you just did that, then you'd have to restart inetd using inetd -c. Also you don't need to have hosts in your nsswitch.conf file for host name resolution, i.e. the line should read:

hosts: files dns

and not

hosts: files dns hosts

-Santosh
Life is what's happening while you're busy making other plans
eran maor
Honored Contributor

Re: ping - icmp: unkown protocol

Hi

The problem was casued by a corruption in the /etc/nsswitch.conf file.
This file had an entry for the /etc/services file which was corrupt, replacing
the nsswitch.conf file with a new copy resolved the problem. There are several
sample copies of the nsswitch.conf file provided on hpux 11.0 systems.
There is a man page, "man switch" which describes the function of the file
nsswitch.conf.

you can copy it also form the /usr/newconfig/etc

from what i look all this error that you are getting is from the nsswitch.conf
love computers
Tarek
Super Advisor

Re: ping - icmp: unkown protocol

Thanks all.
Santosh you're right. I was fast typing and i wrote hosts, but there isn't that entry :)
I also made inetd -c.
After all these changes i made a reboot and now everything's ok. But i haven't understand why before all tcp protocols weren't working and after a simple reboot they worked. (I didn't change anything, even nsswitch.conf).
However everything's ok and all seems working.
Thanks again all for your kindly and precious help.
Regards
Tarek