- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- TCP/IP using Service Guard
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 03:32 PM
04-23-2002 03:32 PM
That sounds great, but I need to use the virtual IP address for outbound connections - i.e. when my application connects to an outside server, I want the outside server to see the virtual ip address, and not the physical ip address of my machine. I'm being told that this is not possible with service guard, however I have doubts about whether or not that is true. I know that there are serveral packages out there that will do what I am asking.
Does anyone know if service guard supports this type of virtual ip use?
Thanks,
Patrick Meade
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 04:02 PM
04-23-2002 04:02 PM
Re: TCP/IP using Service Guard
What has been described to you is what I have experienced, too. Interrogation of the source of a connection yields the fixed IPAddress of the node hosting the application, not the virtual (floating) IPaddress as one might wish.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:37 PM
04-23-2002 08:37 PM
Re: TCP/IP using Service Guard
Older apps (telnet, rlogin, etc.) tend to bind with the INADDR_ANY option (bind to every available IP). Communications from these services "appear" like they're coming from the base IP of the box.
Newer apps (webservers, sendmail with port options added, etc), bind to the IP/port combination you specify, and the communications "appear" like they're coming from the IP/port combination.
In our SG implementation, we float these IPs.
So the answer is yes - Service Guard supports what you'd like to do with virtual IPs if your application support it this use of virtual IPs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 02:19 PM
04-25-2002 02:19 PM
Re: TCP/IP using Service Guard
http://pont.net/socket/prog/tcpClient.c
The important part (apologies if the HP forums mangle the spacing):
-----
localAddr.sin_family = AF_INET;
localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
localAddr.sin_port = htons(0);
rc = bind(sd, (struct sockaddr *) &localAddr, sizeof(localAddr));
if(rc<0) {
printf("%s: cannot bind port TCP %u\n",argv[0],SERVER_PORT);
perror("error ");
exit(1);
}
/* connect to server */
rc = connect(sd, (struct sockaddr *) &servAddr, sizeof(servAddr));
if(rc<0) {
perror("cannot connect ");
exit(1);
}
-----
In your case the INADDR_ANY would be replaced with the virtual IP address you want to use as your source IP.
-- Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 02:50 PM
04-25-2002 02:50 PM
Re: TCP/IP using Service Guard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 08:54 AM
04-26-2002 08:54 AM
SolutionEven though you are a client calling connect(), you can still call bind() first to bind the local address for the socket. That will force the local IP on the TCP connection to the address you choose, in your case, the package IP.
Best regards,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 05:38 PM
04-26-2002 05:38 PM
Re: TCP/IP using Service Guard
This threw me off at first until I realized that even though it's unusual to call bind() from a TCP client it's possible.
You can get more info from the connect() man page:
http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90682&service=hpux&path=../B2355-90682/00/00/31&title=HP-UX%20Reference%20Volume%203%3A%20Sections%202%20and%204
In particular:
-----
If the AF_INET socket does not already have a local address bound to it (see bind(2) ), connect() also binds the socket to a local address chosen by the system.
-----
-- Steve