Operating System - HP-UX
1822736 Members
3819 Online
109644 Solutions
New Discussion юеВ

Re: telnet : Unknown host

 
SOLVED
Go to solution
Vamsi Nukala
New Member

telnet : Unknown host

This is not a generic question:
telnet/rlogin from the same machine to itself fails, but ftp/ping work on HP-UX11i.I have hosts.equiv, .rhosts files set. In /etc/nsswitch.conf for the hosts field i have "files nis" as the lookup.
nslookup looks up FILES and succeeds.


/etc/hosts:
127.0.0.1 localhost loopback
172.23.111.3 biscayne

This works (from biscayne):
biscayne] /etc > ping localhost
PING localhost: 64 byte packets
64 bytes from 127.0.0.1: icmp_seq=0. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=1. time=0. ms

This too works(from biscayne):
[biscayne] /etc > ping biscayne
PING biscayne: 64 byte packets
64 bytes from 172.23.111.3: icmp_seq=0. time=0. ms
64 bytes from 172.23.111.3: icmp_seq=1. time=0. ms

telnet localhost fails (from biscayne)
[biscayne] /etc > telnet localhost
localhost: Unknown host

telnet biscayne from biscayne fails
biscayne] /etc > telnet biscayne
biscayne: Unknown host

..so does rlogin fail from biscayne
[biscayne] /etc > rlogin biscayne
rcmd_af: biscayne: Unknown host


However, if I specify the IP address, it works.
Can anyone help me with this?



Thanks,
Vamsi
16 REPLIES 16
Paul Sperry
Honored Contributor

Re: telnet : Unknown host

in order to use files first you should have

hosts: files [NOTFOUND=continue] dns


in your /etc/nsswitch.conf file
Paula J Frazer-Campbell
Honored Contributor

Re: telnet : Unknown host

HI

First question is why are you trying this?

Host file is ok as the ftp proves.

Try and entry in netconf>

Paula
If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: telnet : Unknown host

HI

First question is why are you trying this?

Host file is ok as the ftp proves.

Try an entry in netconf>

Paula
If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: telnet : Unknown host

Sorry

Mouse problems
If you can spell SysAdmin then you is one - anon
Hai Nguyen_1
Honored Contributor

Re: telnet : Unknown host

Vamsi,

What is the content of your /etc/resolv.conf?

Hai
Patrick Wallek
Honored Contributor

Re: telnet : Unknown host

What happens if you do the following:

#nslookup localhost

#nslookup biscayne

#nslookup 127.0.0.1

#nslookup 172.23.111.3


You might also want to check the permissions on your /etc/hosts file and your /etc/nsswitch.conf file. Both should be readable by owner, group, and world.

-rw-r--r-- /etc/hosts
-rw-r--r-- /etc/nsswitch.conf
Shannon Petry
Honored Contributor

Re: telnet : Unknown host

Obviously this is a name resolution problem.

Use SAM -> Networking -> nsswitch and properly configure it.

Your probably using a default of DNS

In this case, if the loopback is not in the DNS tables gethostbyname() will return nothing.

Same can be true for NIS (but easier to add the loopback/localhost entry)

Simply change your nsswitch.conf file to "continue" to the next method if lookup fails, instead of returning.

Regards,
Shannon
Microsoft. When do you want a virus today?
Sridhar Bhaskarla
Honored Contributor

Re: telnet : Unknown host

HI Vamsi,

For testing purposes, take nis completely out of your nsswitch.conf and try.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Vamsi Nukala
New Member

Re: telnet : Unknown host

Tried all the solutions:

1. Yes permissions are correct:
[biscayne] /etc > ls -l
-rw-r--r-- hosts
-rw-r--r-- nsswitch.conf

Result: Still fails

2. added hosts: files [NOTFOUND=continue] dns nis
Result: Still fails

3. nslookup localhost
Using /etc/hosts on: biscayne

looking up FILES
Name: localhost
Address: 127.0.0.1
Aliases: loopback


>First question is why are you trying this?
:Because I cannot telnet from this box to any host. To downsize the problem tried to telnet to localhost/hostname

> What is the content of your /etc/resolv.conf?

domain numega.com
nameserver 172.23.96.10
nameserver 10.0.3.14


>For testing purposes, take nis completely out of your nsswitch.conf and try
:Still fails


-----------------------------------------
The same configuration of files ( atleast I think ) exists on couple of other HP systems and all can network fine(telnet, ftp, rlogin, ping) except with biscayne.


Regards,
Vamsi
Sridhar Bhaskarla
Honored Contributor

Re: telnet : Unknown host

Hi Vamsi,

//
>First question is why are you trying this?
:Because I cannot telnet from this box to any host. To downsize the problem tried to telnet to localhost/hostname
//

What error do you get when you try to telnet to this box from other boxes?.

Try looking at /var/adm/syslog/syslog.log (by enabling connection logging by 'inetd -l').

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Hai Nguyen_1
Honored Contributor

Re: telnet : Unknown host

What is the fully qualified hostname of this box? Is it biscayne.numega.com?

Can you post the output of this command:

# nslookup 172.23.96.10

Hai
Massimo Bianchi
Honored Contributor

Re: telnet : Unknown host

Hi,
is inetd workin properly ?

It is inetd that forks the link for incoming rlogin and telnet...

Have you any strange entry in /etc/inetd.conf or /var/adm/inetd.sec ?


Are the lan cables O.K. ?

HTH,
Massimo
Joris Denayer
Respected Contributor
Solution

Re: telnet : Unknown host

I guess that the inetd works fine, because the telnetd starts when you execute
# telnet
To err is human, but to really faul things up requires a computer
Bill Hassell
Honored Contributor

Re: telnet : Unknown host

To eliminate all the issues with DNS (NIS in your case), rename/remove /etc/resolv.conf and /etc/nsswitch.conf. This forces name resolution to be limited to /etc/hosts. nslookup will report that it is looking up FILES. Try nsllokup with both IP as well as hostname. Then add some outside system names to the /etc/hosts file. You are correct to start troubleshooting with the local system and if that is working OK, add an additional layer of name resolution.

But before you do that, use ping and telnet to the IP addresses of remote systems. If they are on the same subnet, all should be OK. If they are across a router and they fail to connect then most likely your routing is incorrect, which may also explain why NIS is not working correctly. You'll have to be able to ping the DNS/NIS servers before name resoltuin will work beyond /etc/hosts.


Bill Hassell, sysadmin
Vamsi Nukala
New Member

Re: telnet : Unknown host

Sri,
I enabled logging and did a telnet from another system. It is fine.
Jun 26 16:46:34 biscayne inetd[5437]: telnet/tcp: Connection from unknown (::ffff:172.23.101.225) at Thu Jun 26 16:46:34 2003

There is no log info when I do telnet localhost.

Regards,
Vamsi
Vamsi Nukala
New Member

Re: telnet : Unknown host

>To eliminate all the issues with DNS (NIS in your case), rename/remove /etc/resolv.conf and /etc/nsswitch.conf.

YES! THIS WORKED. The problem was with the nameserver entry in /etc/resolv.conf. Once I pointed it to a different nameserver, hostnames started getting resolved properly.

Thanks,
Vamsi