Operating System - HP-UX
1844070 Members
3141 Online
110227 Solutions
New Discussion

two defaults gateway possible ftp error

 
Jimbo04
Occasional Contributor

two defaults gateway possible ftp error

HI,

Sometimes when use ftp from hp-ux11i to others servers in a LAN that is in other building (connected by WAN) i have this error:

ftp: connection timeout

I don't have this error in the same LAN.

I'am not a networkig expert. I have two nics:
ip1: 10.151.1.10, gateway: 10.151.1.254
ip2: 10.151.0.28, gateway: 10.151.1.28

The nic2 don't have router because its only a LAN.

The networking guys check the network and it's fine. The STDOUT of netstat -rn is:

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.151.0.28 10.151.0.28 UH 0 lan1 4136
10.151.1.12 10.151.1.12 UH 0 lan2 4136
10.151.0.0 10.151.0.28 U 2 lan1 1500
10.151.1.0 10.151.1.12 U 2 lan2 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.151.1.254 UG 0 lan2 0
default 10.151.0.28 U 0 lan1 1500


Is correct have two defaults LAN?
Is this produce the ftp error?

Thanks,
4 REPLIES 4
Jeff Schussele
Honored Contributor

Re: two defaults gateway possible ftp error

Hi Jimbo,

That netstat -rn output looks funny. Why is there an entry that routes to the 10.151.1 subnet through 10.151.1.12 when the NIC is .10? Is the NIC .10 or .12?
Also, no, you should not have 2 default gateways. Remove that 2nd default as you don't need a gateway to get to the 10.151.0 subnet - you can set up a 0 hop static route if you want, but it's not necessary.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Ron Kinner
Honored Contributor

Re: two defaults gateway possible ftp error

Remove the second default gateway. If you need to send traffic that way then you need to add individual routes for the subnets that can be reached via gateway2. Having two gateways can indeed cause strange problems. Depending upon the way they implement routing it can either ignore one, alternate between them, or randomly pick one. Only if you are using the strong end-system model is it OK to use two defaults. In that case the routing process keeps track of which interface a packet came in on and automatically uses that same interface to reply.

Also your box may be confused about its masks. I presume since you have two NICs that the mask for each is 255.255.255.0 so make sure you specifically call out the mask for each in /etc/rc.config.d/netconf. If you are trying to use a 255.255.0.0 mask you are in trouble since that is not supported in HPUX.

Also you may need to turn off subnet checking in ndd in order to make sure it accepts the 10.151.0.0 255.255.255.0 mask subnet. This violates an obsolete RFC which 11.0 started following. Don't know about 11i.

if
ndd -get /dev/ip ip_check_subnet_addr
comes back with 1 then you need to change it:

ndd -set /dev/ip ip_check_subnet_addr 0

will do it for now but you need to put it in nddconf in order for it to be remembered at boot.

edit /etc/rc.config.d/nddconf to add:

TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_check_subnet_addr
NDD_VALUE[0]=0

If there is already an entry then you have to change the numbers in brackets to the next higher number.


Ron
Ron Kinner
Honored Contributor

Re: two defaults gateway possible ftp error

I forgot to add: If you are able to log on OK but cannot transfer data or even do a simple ls command then you probably have a firewall blocking you. You can usually get around this by using the passive command in ftp after logging on.

Ron
Jimbo04
Occasional Contributor

Re: two defaults gateway possible ftp error

Excuseme, my ip1= 10.151.1.12