Operating System - HP-UX
1752678 Members
5532 Online
108789 Solutions
New Discussion юеВ

Re: traceroute and ssh not working with short name

 
ROSS HANSON
Regular Advisor

traceroute and ssh not working with short name

On hp ux 11.31 when performing a traceroute by short name or a ssh shortname it seems to just
hang. Using the FQDN works just fine.

I do not have any other machines running 11.31 but I have several running 11.23 and 11.11 and I have looked at the network settings on those and I am sure I have the same settings on the box I am having difficulties with. Can anyone tell me what I may have missed?
Ross Hanson
9 REPLIES 9
Cortes Albertino
Trusted Contributor

Re: traceroute and ssh not working with short name

Hello,

So just for testing try first,

# ping ipaddr_of_host1 -n 2
# ping shortname_of_host1 -n 2

# nsquery hosts shortname_of_host1
# ping FQDN_of_host1 -n 2
# nsquery hosts FQDN_of_host1
Rita C Workman
Honored Contributor

Re: traceroute and ssh not working with short name

Both of these will use the same method of 'resolution' that is set up on the box and DNS.

1.Check your /etc/nsswitch.conf. One common setting in this file is:
hosts: files [NOTFOUND=continue] dns

>>so if it doesn't find it in your server's hostfile it will try resolve using DNS.
2.Check your /etc/hosts file. Does it show:
x.x.x.x FQDN alias

>> alias being the shortname you use.
3. Whoever handles the DNS have then check to ensure a proper entry was made for the alias (shortname).

Just a couple thoughts,
Rita
ROSS HANSON
Regular Advisor

Re: traceroute and ssh not working with short name

root@blade8:/sbin
# ping 142.20.111.50 -n 2
PING 142.20.111.50: 64 byte packets

with the ip this command hangs
*******************************
root@blade8:/sbin
# ping server1 -n 2
PING server1.com: 64 byte packets

This command hangs
*******************************
# ping server1.com
PING server1.com: 64 byte packets

This also hangs
******************************
root@blade8:/sbin
# nsquery hosts server1.com

Using "files[NOTFOUND=continue TRYAGAIN=continue UNAVAIL=continue] dns" for the hosts policy.

Searching /etc/hosts for server1.com
Hostname: server1.com
Aliases: server1
Address: 142.20.111.50
Switch configuration: Terminates Search

The /etc/nsswitch is set properly. We need this for other reasons and all servers are set in this manner without problems
******************************
Ross Hanson
Rita C Workman
Honored Contributor

Re: traceroute and ssh not working with short name

A thought,

nslookup

nslookup

nslookup

nslookup

Then post the results please..

Thanks,
Rita

Cortes Albertino
Trusted Contributor

Re: traceroute and ssh not working with short name

Could you also post the following,

# netstat -rn
# netstat -in

Are you sure that using the FQDN works fine ?

( Check also if ipnodes line is present in /etc/nsswitch.conf file, if not add it).
ROSS HANSON
Regular Advisor

Re: traceroute and ssh not working with short name

root@blade8:/sbin
# nslookup server1
Using /etc/hosts on: blade8

looking up FILES
Name: server1.com
Address: 142.20.111.50
Aliases: server1
*********************************
# nslookup 142.20.111.50
Using /etc/hosts on: blade8

looking up FILES
Name: zeus.mcao.maricopa.gov
Address: 142.20.111.50
Aliases: server1
**********************************
root@blade8:/sbin
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
142.20.111.58 142.20.111.58 UH 0 lan0 32808
142.20.111.56 142.20.111.56 UH 0 lan6 32808
142.20.111.57 142.20.111.57 UH 0 lan7 32808
142.20.111.51 142.20.111.51 UH 0 lan1 32808
142.20.111.54 142.20.111.54 UH 0 lan4 32808
142.20.111.55 142.20.111.55 UH 0 lan5 32808
142.20.111.52 142.20.111.52 UH 0 lan2 32808
142.20.111.53 142.20.111.53 UH 0 lan3 32808
142.20.111.0 142.20.111.57 U 2 lan7 1500
142.20.111.0 142.20.111.56 U 2 lan6 1500
142.20.111.0 142.20.111.55 U 2 lan5 1500
142.20.111.0 142.20.111.54 U 2 lan4 1500
142.20.111.0 142.20.111.53 U 2 lan3 1500
142.20.111.0 142.20.111.52 U 2 lan2 1500
142.20.111.0 142.20.111.51 U 2 lan1 1500
142.20.111.0 142.20.111.58 U 2 lan0 1500
42.20.111.0 142.20.111.252 UG 0 lan7 1500
42.20.111.0 142.20.111.252 UG 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 32808
default 142.20.111.252 UG 0 lan7 1500
default 142.20.111.252 UG 0 lan0 1500
root@blade8:/sbin
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan3 1500 142.20.111.0 142.20.111.53 55371 0 88 0 0
lan2 1500 142.20.111.0 142.20.111.52 58309 0 88 0 0
lan1 1500 142.20.111.0 142.20.111.51 55415 0 88 0 0
lan0 1500 142.20.111.0 142.20.111.58 979658 0 851851 0 0
lo0 32808 127.0.0.0 127.0.0.1 215857 0 215857 0 0
lan7 1500 142.20.111.0 142.20.111.57 132648 0 433991 0 0
lan6 1500 142.20.111.0 142.20.111.56 55362 0 88 0 0
lan5 1500 142.20.111.0 142.20.111.55 254521 0 103 0 0
lan4 1500 142.20.111.0 142.20.111.54 55379 0 88 0 0

Ross Hanson
Rita C Workman
Honored Contributor

Re: traceroute and ssh not working with short name

root@blade8:/sbin
# nslookup server1
Using /etc/hosts on: blade8

looking up FILES
Name: server1.com
Address: 142.20.111.50
Aliases: server1
*********************************
# nslookup 142.20.111.50
Using /etc/hosts on: blade8

looking up FILES
Name: zeus.mcao.maricopa.gov
Address: 142.20.111.50
Aliases: server1
>>>>>>>>>>
What I see is that when you go by the IP your FQDN is different than when you simply type the alias. That is via FILES (/etc/hosts). However, when doing a reverse lookup you should have gotten exactly the same result. To me that constitutes an IP conflict in your hostfile.
===================
You didn't do any nslookups for your DNS server, so I will have to assume (and assuming things is not something I care to do) that your UNIX box is what is running DNS. If it is...then again - IP conflict.
If DNS is not running on HPUX, then do the last two nslookups mentioned resourcing your DNS servername-or-IP to see the results.

Just a thought,
Rita
ROSS HANSON
Regular Advisor

Re: traceroute and ssh not working with short name

I noticed something with the netstat -r -v

I get an entry of
default/* PX2in.com

default/* PX2in.com

I do not know what these name are?!?
Ross Hanson
Cortes Albertino
Trusted Contributor

Re: traceroute and ssh not working with short name

Hello,

>default/* PX2in.com
Is the name of your default gateway, in your case, ip@ 142.20.111.252, you may check it using nslookup and/or nsquery.

So as previously written by Rita, be careful with your host file, DNS resolving issues
and ip conflicts.

In the meantime you had set up the same default gateway on two different LAN cards lan0 and lan7.

May be a path/route is not operational( even if some packets are listed), you may also test, performing other tests using ping -r ip_address or traceroute -i interface_name ip_address traceroute -r etc.. Or if possible and for testing, without lan7 for example( removing it from the ip configuration)...