Operating System - HP-UX
1827243 Members
2186 Online
109716 Solutions
New Discussion

Telnet/Ftp response very slow

 
SOLVED
Go to solution
Asif Sharif
Honored Contributor

Telnet/Ftp response very slow

Hi,
I have HP 9000 servers, which are running in cluster environment & having HP-UX 11.11,three lan interfaces are configured on each machine,DNS is also configured. Now the problem is when i am going to telnet or ftp to the machine its response is almost dead. After a long time it gives me response. What would be the issue? please guide me.


Regards,

Asif Sharif
Regards,
Asif Sharif
14 REPLIES 14
Stephen Keane
Honored Contributor

Re: Telnet/Ftp response very slow

Is ping slow?

If you do a DNS lookup with nslookup, is that slow?

Pete Randall
Outstanding Contributor

Re: Telnet/Ftp response very slow

What speed and duplex are your lan interfaces set to? Run lanscan to get the card instance number and then run "lanadmin -x 0" where 0 is the instance number of the card. If these are 100Base/T cards, you're best off to force both the card and the switch port to 100FD - do not let them auto-negotiate!


Pete

Pete
Uday_S_Ankolekar
Honored Contributor

Re: Telnet/Ftp response very slow

Check /etc/resolv.conf file.
It should be

domain yourdomain.com
nameserver x.x.x.x # DNS server (primary)
nameserver x.x.x.x # DNS server (Secondary)

Also check /etc/nsswitch.conf file The hosts entry should look like this.

hosts: files [NOTFOUND=continue UNAVAIL=continue] dns


-USA

Good Luck..
harry d brown jr
Honored Contributor

Re: Telnet/Ftp response very slow

To determine if it a DNS issue, try using the IP addresses:

telnet IPADDR

ftp IPADDR


If using the IP is fast, then post these files:

/etc/resolv.conf
/etc/nsswitch.conf

and maybe:

/etc/named.conf

Post the output of these commands:

what `which named`

ps -ef | grep named

netstat -rvn


live free or die
harry d brown jr
Live Free or Die
Asif Sharif
Honored Contributor

Re: Telnet/Ftp response very slow

Hi Stephen ,

Ping & nslookup both are fine.

Hi Pete,
this is the lanscan result.

#lanscan

Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/1/0 0x000F203C229F 0 UP lan0 snap0 1 ETHER Yes 119
0/0/2/1/0/6/0 0x000F203CD452 1 UP lan1 snap1 2 ETHER Yes 119
0/0/8/1/0/6/0 0x000F203CF4A4 3 UP lan3 snap3 3 ETHER Yes 119
0/0/9/1/0/6/0 0x00306EF2483F 4 UP lan4 snap4 4 ETHER Yes 119
0/0/3/1/0 0x00306EF4B885 2 UP lan2 snap2 5 ETHER Yes 119
0/0/4/1/0 0x00306EF4888F 5 UP lan5 snap5 6 ETHER Yes 119
Regards,
Asif Sharif
Bharat Katkar
Honored Contributor

Re: Telnet/Ftp response very slow

HI Asif,

This could be the problem with Malfunctioning NIC card also. Can you go thr' the NIC statistics of all server or try isolating each server one by one to locate the problem area if that is possible in your setup.

Regards,

You need to know a lot to actually know how little you know
Asif Sharif
Honored Contributor

Re: Telnet/Ftp response very slow

How can i try that??
Regards,
Asif Sharif
Stephen Keane
Honored Contributor

Re: Telnet/Ftp response very slow

Run lanadmin and select each card in turn (by number). Clear statistics, do your telnet/ftp test, then display statistics for each NIC and see if any have loads of errors (e.g. collisions)
Bill Hassell
Honored Contributor
Solution

Re: Telnet/Ftp response very slow

It's important to determine whether the response is slow for *ALL* commands or just slow during login. If response is normal once you are logged in, you can forget about any hardware issues--you are seeing a DNS failure. To prove this, rename the //etc/resolv.conf and /eetc/nsswitch.conf files. Then put the IP address of your client into /etc/hosts on the target machine. The hostname you give this client for the hosts file is unimportant. Now try telnet and ftp using the IP address, not the hostname. Does it respond normally? Then, one or more of your DNS servers is blocked, dead, or otherwise not responding. The timeout for each blocked DNS server is about 25 seconds, probably the delay you're seeing. A delay of 75-80 seconds means that all 3 of your DNS servers are blocked (or have the wrong address in resolv.conf, etc)


Bill Hassell, sysadmin
Asif Sharif
Honored Contributor

Re: Telnet/Ftp response very slow


Hi All,
Thanks a lot for your support.Telnet/ftp response is slow during login but after logged in its works fine. DNS is working fine, no issue in it. Actully in this senerio we have Three LAN interfaces having class A ip's which are mentioned below.

lan2: flags=1843
inet 10.1.4.12 netmask ffffff00 broadcast 10.1.4.255

lan3: flags=1843
inet 10.1.7.12 netmask ffffff00 broadcast 10.1.7.255

lan4: flags=1843
inet 10.1.5.12 netmask ffffff00 broadcast 10.1.5.255

Lan4 is using for data backup.
LAN3 is using for Hearbeat.
LAN2 is using for Data.

Now when we are going to traceroute any our client ip it waits for some time and then it goes through from LAN3 or LAN4.we want traceroute to go by LAN2 10.1.4.1 What would be the issue.
This is netstat output.

netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.1.5.12 10.1.5.12 UH 0 lan4 4136
10.1.4.12 10.1.4.12 UH 0 lan2 4136
10.1.7.12 10.1.7.12 UH 0 lan3 4136
10.1.4.0 10.1.4.12 U 2 lan2 1500
10.1.7.0 10.1.7.12 U 2 lan3 1500
10.1.5.0 10.1.5.12 U 2 lan4 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.1.4.1 UG 0 lan2 0

Thanks,
Asif
Regards,
Asif Sharif
Todd Whitcher
Esteemed Contributor

Re: Telnet/Ftp response very slow

I agree with Bill. It's important to eliminate DNS all together before you spend a lot of time troubleshooting everything else. Name resolution is one of the more common issues w/ initial slow responses from telnet and ftp.

When you say telnet is slow at first then responds where does it hang?

Is it slow before the login prompt is presented or after?

When you telnet to the localhost on the console is it slow?

Telnetd and ftpd will do a reverse lookup on the incoming request. Make sure you can
reverse lookup the address with either dig or nslookup.

For the incoming request hostname and ip address try this.

nslookup hostname
nslookup ip_address

Try putting the hostnames and ip addresses of the clients in the /etc/hosts file and change the switch order of the hosts entry in the /etc/nsswitch.conf file to look to files first then dns.
/etc/nsswitch.conf
hosts [NOTFOUUND=continue] DNS

Then test again.

Once you eliminate DNS then I would look to other causes. Speed and duplex mis-matches of the interfaces and the switches are the next most common problems w/ slow connections.

Check you nettl log file for hardware type issues also.

Run this command to read the nettl log.

# nettl -NnNlf /var/adm/nettl.LOGXXX > net.out.

Review the net.out for any errors.

Hope this helps.




Bill Hassell
Honored Contributor

Re: Telnet/Ftp response very slow

Actually, your DNS may not be working as you stated. If you're seeing increments of 20-30 second delays at login, what you're seeing is the DNS timeout value. ftp and telnet attempt to verify the incoming client (DNS is often used as a security measure) and if the first DNS server fails to respond, it will take 20+ secs to try the next one listed in /etc/resolv.conf. And another 20+ seconds for the next and the third, which is the max allowed for HP-UX. After the timeout waiting for a response, the connection will be made and data will flow at full speed.

The test for proper DNS operation is nslookup. Each line is important, especially the first couple of lines. For this example, we'll look at: mycomputer which is 12.34.56.78 and a DNS server called dnsserver at 87.65.43.21:

nslookup mycomputer
nslookup 12.34.56.78

These two commands are testing very different sections of the DNS server, "A" records which are hostname=IP and "PTR" or reverse-lookup records where IP=hostname. It is not uncommon for a newbie DNS admin to forget reverse-lookup records, yet they are critical to good DNS security. Most Unix systems will use both records to verify incoming clients. A missing record can produce the delay you're seeing.

A second failure is that the DNS server doesn't know it's own name or IP. You'll see this in the first couple of lines for nslookup where it first tries to validate the DNS server by asking: do you know who you are? If either an Arecord or PTRrecord are missing, nslookup will warn you that the DNS server is misconfigured.

Start the troublseshooting by telling nslookup to use a specific server, thereby overriding the policy in /etc/nsswitch.conf. nslookup allows the desired DNS server to be specified as in:

nslookup mycomputer 87.65.43.21
nslookup 12.34.56.78 87.65.43.21

Notice the IP address of the DNS server at the end? Run through all 3 DNS servers to verify operation. An error message indicates a misconfigured DNS server. Also verify that the DNS servers know their own name:

nslookup 87.65.43.21 87.65.43.21
nslookup 87.65.43.21 87.65.43.21

Both types of problems can easily be verified (and fixed immediately) in your local machine (in case your DNS admins are a bit slow to respond...). Leave the /etc/resolv.conf files as is, and modify /etc/nsswitch.conf to read as follows for your hosts line:

osts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue]

This tells the resolver routines in HP-UX to look in your local /eetc/hosts file first, then try the DNS server. Now to fix the problems:

1. Make an entry in /etc/hosts for each DNS server. The name is unimportant (I am assuming that your /etc/resolv.conf file has 100% IP addresses and not DNS hostnames), just add IP and hostname as in:

87.65.43.21 dns1
87.65.43.22 dns2
87.65.43.23 dns3

2. Now make an entry for your client:

12.12.12.12 myclient

Now try your ftp and telnet connections. Note that these files (/etc/resolv.conf, /etc/hosts and /etc/nsswitch.conf) are examined in realtime so no special update process is needed to activate the changes. You should see the delay disappear. You can leave the changes in place until the DNS servers are corrected.


Bill Hassell, sysadmin
Asif Sharif
Honored Contributor

Re: Telnet/Ftp response very slow

Hi,
After checking DNS's as per your's response in fourm, They seems fine, but the result is same.On one machine where we have
these configurations is working good.

#netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan2 1500 10.1.4.0 10.1.4.20 58159877 0 86729189 0 0
lan5:1 1500 10.1.5.0 10.1.5.19 3184 0 3184 0 0
lan0 1500 10.1.7.0 10.1.7.20 3001295 0 1523314 0 0
lo0 4136 127.0.0.0 127.0.0.1 48847944 0 48847947 0 0
lan2:1 1500 10.1.4.0 10.1.4.19 37336227 0 10555906 0 0
lan5 1500 10.1.5.0 10.1.5.20 27644939 0 157704128 0 0
lan4* 1500 none none 0 0 0 0 0

#traceroute 10.3.11.212
traceroute: Warning: Multiple interfaces found; using 10.1.4.20 @ lan2
traceroute to 10.3.11.212 (10.3.11.212), 30 hops max, 40 byte packets
1 10.1.4.1 (10.1.4.1) 0.309 ms 0.174 ms 0.174 ms
2 10.3.105.249 (10.3.105.249) 1.064 ms 0.831 ms 0.815 ms
3 10.3.103.249 (10.3.103.249) 1.374 ms 1.077 ms 1.072 ms
4 10.3.11.212 (10.3.11.212) 0.709 ms 3.755 ms 0.685 ms

But on bad machine we have this lan configuration

#netstat -ni

Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan4:1* 1500 10.1.5.0 10.1.5.17 17188 0 17121 0 0
lan3* 1500 10.1.7.0 10.1.7.10 14753581 0 7628457 0 0
lan2 1500 10.1.4.0 10.1.4.10 218120597 0 224115604 0 0
lo0 4136 127.0.0.0 127.0.0.1 40712406 0 40712412 0 0
lan2:1 1500 10.1.4.0 10.1.4.17 73760681 0 65223995 0 0
lan5* 1500 none none 396 0 75 0 0
lan4 1500 10.1.5.0 10.1.5.10 110955458 0 366168235 0 0

tppora01:/#traceroute 10.3.11.212

traceroute: Warning: Multiple interfaces found; using 10.1.4.10 @ lan2

traceroute to 10.3.11.212 (10.3.11.212), 30 hops max, 40 byte packets

1 10.1.4.1 (10.1.4.1) 0.266 ms 0.171 ms 0.164 ms
2 10.3.105.249 (10.3.105.249) 0.980 ms 0.811 ms 0.812 ms
3 10.3.103.249 (10.3.103.249) 1.089 ms 1.076 ms 1.071 ms
4 10.3.11.212 (10.3.11.212) 0.699 ms 0.671 ms 0.683 ms

In this case we disabled LAN 3 and LAN 4 interfaces and then our traffic is routing through LAN2. My question is now can we set priority of interfaces. like lan 2 comes first then lan 3 after that lan4 etc.

Thanks for your help.

Regards,

Asif
Regards,
Asif Sharif
Asif Sharif
Honored Contributor

Re: Telnet/Ftp response very slow

Thanks a lot all,
Problem has been solved. After enabling the LAN 3 and LAN 4 and rechecking DNS.Thanks again for your help.


Regards,

Asif Sharif
Regards,
Asif Sharif