Operating System - HP-UX
1835035 Members
3676 Online
110073 Solutions
New Discussion

Re: using pkg-ip instead of machine-ip for ftp

 
Jürgen Heim
Frequent Advisor

using pkg-ip instead of machine-ip for ftp

Hello!
I have a machine with ip xxxx running a cluster-package with ip yyyy. How can I do a ftp from this machine to another machine so that the other machine sees the yyyy(pkg-ip) and not the proper xxxx-ip? thanks!
11 REPLIES 11
G. Vrijhoeven
Honored Contributor

Re: using pkg-ip instead of machine-ip for ftp

Hi,

I am sorrie but this is not possible.
You can login to the server using the package ip-address ( alias ipaddress ontop of the servers ipaddress.) But once logged into that server that machines ipaddress is your sourceip.

Gideon
Geoff Wild
Honored Contributor

Re: using pkg-ip instead of machine-ip for ftp

You should be able to do this by creating a static route to the remote machine - using your floating ip address...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jürgen Heim
Frequent Advisor

Re: using pkg-ip instead of machine-ip for ftp

Hi Geoff!
Can you tell me how I can define a floating ip-address, pls?
thanks
RAC_1
Honored Contributor

Re: using pkg-ip instead of machine-ip for ftp

man route

route add host "dest_ip_address" netmask "netmask" "floating_ip" 0
To sustain the reboots, you can set it in /etc/rc.config.d/netconf file.

Anil
There is no substitute to HARDWORK
Geoff Wild
Honored Contributor

Re: using pkg-ip instead of machine-ip for ftp

Anil has it...

Here's your netconf

# Route to ftp, important static route - do not remove
ROUTE_DESTINATION[1]="net X.X.X.X"
ROUTE_MASK[1]="S.S.S.S"
ROUTE_GATEWAY[1]="G.G.G.G"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

where the X's are the destination IP, S, is the mask, and G is the Gateway.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: using pkg-ip instead of machine-ip for ftp

Sorry - rout count should be 0...

BTW - Gateway is the floating ip.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: using pkg-ip instead of machine-ip for ftp

You should be able to built the ftp server into a SG package that provices ftp service on the active node. If this includes a floating or failover ip address, your ojective may be achieved.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
rick jones
Honored Contributor

Re: using pkg-ip instead of machine-ip for ftp

using the package IP as the gateway with a metric of 0 will be fine - so long as the actual first-hop routers are supporting proxy- ARP. it is indeed rare for that not to be the case but still, worth mentioning.

might be worthwhile to excercise the support contract and submit an ER against the FTP client to allow it to take-in a desired local IP address - it could then make a call to bind() to bind to that IP before calling connect().

the truly adventuresome could write a shim library and LD_PRELOAD it into the ftp client. said library would intercept a few of the socket calls - enough to figure-out when the connect() call being made was for the ftp stuff and issue a bind() call on the ftp client's behalf :)
there is no rest for the wicked yet the virtuous have no pillows
Jürgen Heim
Frequent Advisor

Re: using pkg-ip instead of machine-ip for ftp

Thanks to you all, I have installed the new route using the pkg-ip-address as the gateway, still the other machine sees the ip-address of the network interface and not the gateway ... Any other ideas?
rick jones
Honored Contributor

Re: using pkg-ip instead of machine-ip for ftp

When an application calls connect() to establish a connection, if it has not previously called bind() to select a local (source) IP address and/or port number, the stack will select one for it. That selection is based at least in part by the route selected to reach the destination.

If you want to be 100% certain that the source IP address is the package IP address, you need the application(s) in question to make a bind() call to bind to the package IP address.

If the application(s) in question do not have a configuration option to do that, you need to file an enhancement request against the application(s) in question.
there is no rest for the wicked yet the virtuous have no pillows
Jürgen Heim
Frequent Advisor

Re: using pkg-ip instead of machine-ip for ftp

Hi!
Rich thanks, the application owners will provide some kind of solution, they will use different ports in their application.
For the other guys: the sending hosts sends it's own ip-address no matter if there's a different gateway in between. Thanks to you all.