<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TCP/IP using Service Guard in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709641#M713053</link>
    <description>For an example of socket programming using bind() look at:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pont.net/socket/prog/tcpClient.c" target="_blank"&gt;http://pont.net/socket/prog/tcpClient.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The important part (apologies if the HP forums mangle the spacing):&lt;BR /&gt;&lt;BR /&gt;-----&lt;BR /&gt;  localAddr.sin_family = AF_INET;&lt;BR /&gt;  localAddr.sin_addr.s_addr = htonl(INADDR_ANY);&lt;BR /&gt;  localAddr.sin_port = htons(0);&lt;BR /&gt;  &lt;BR /&gt;  rc = bind(sd, (struct sockaddr *) &amp;amp;localAddr, sizeof(localAddr));&lt;BR /&gt;  if(rc&amp;lt;0) {&lt;BR /&gt;    printf("%s: cannot bind port TCP %u\n",argv[0],SERVER_PORT);&lt;BR /&gt;    perror("error ");&lt;BR /&gt;    exit(1);&lt;BR /&gt;  }&lt;BR /&gt;    &lt;BR /&gt;  /* connect to server */&lt;BR /&gt;  rc = connect(sd, (struct sockaddr *) &amp;amp;servAddr, sizeof(servAddr));&lt;BR /&gt;  if(rc&amp;lt;0) {&lt;BR /&gt;    perror("cannot connect ");&lt;BR /&gt;    exit(1);&lt;BR /&gt;  }&lt;BR /&gt;-----&lt;BR /&gt;&lt;BR /&gt;In your case the INADDR_ANY would be replaced with the virtual IP address you want to use as your source IP.&lt;BR /&gt;&lt;BR /&gt;  -- Steve&lt;BR /&gt;</description>
    <pubDate>Thu, 25 Apr 2002 21:19:13 GMT</pubDate>
    <dc:creator>Steve Bonds</dc:creator>
    <dc:date>2002-04-25T21:19:13Z</dc:date>
    <item>
      <title>TCP/IP using Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709638#M713050</link>
      <description>I have a clustered environment which uses service guard. I've been told by my sys admin that the virtual IP address functionality of service guard only works for inbound connections - i.e. when a client enters the virual name in a web browser it will automatically come to the active machine in the cluster.&lt;BR /&gt;&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;Does anyone know if service guard supports this type of virtual ip use?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Patrick Meade&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 22:32:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709638#M713050</guid>
      <dc:creator>Patrick Meade</dc:creator>
      <dc:date>2002-04-23T22:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP using Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709639#M713051</link>
      <description>Hi Patrick:&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 23 Apr 2002 23:02:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709639#M713051</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-04-23T23:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP using Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709640#M713052</link>
      <description>This behavior is dependent on the application and the option the application used when binding to an IP/port combination.&lt;BR /&gt;&lt;BR /&gt;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.  &lt;BR /&gt;&lt;BR /&gt;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.  &lt;BR /&gt;&lt;BR /&gt;In our SG implementation, we float these IPs.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Apr 2002 03:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709640#M713052</guid>
      <dc:creator>Christopher Caldwell</dc:creator>
      <dc:date>2002-04-24T03:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP using Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709641#M713053</link>
      <description>For an example of socket programming using bind() look at:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pont.net/socket/prog/tcpClient.c" target="_blank"&gt;http://pont.net/socket/prog/tcpClient.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The important part (apologies if the HP forums mangle the spacing):&lt;BR /&gt;&lt;BR /&gt;-----&lt;BR /&gt;  localAddr.sin_family = AF_INET;&lt;BR /&gt;  localAddr.sin_addr.s_addr = htonl(INADDR_ANY);&lt;BR /&gt;  localAddr.sin_port = htons(0);&lt;BR /&gt;  &lt;BR /&gt;  rc = bind(sd, (struct sockaddr *) &amp;amp;localAddr, sizeof(localAddr));&lt;BR /&gt;  if(rc&amp;lt;0) {&lt;BR /&gt;    printf("%s: cannot bind port TCP %u\n",argv[0],SERVER_PORT);&lt;BR /&gt;    perror("error ");&lt;BR /&gt;    exit(1);&lt;BR /&gt;  }&lt;BR /&gt;    &lt;BR /&gt;  /* connect to server */&lt;BR /&gt;  rc = connect(sd, (struct sockaddr *) &amp;amp;servAddr, sizeof(servAddr));&lt;BR /&gt;  if(rc&amp;lt;0) {&lt;BR /&gt;    perror("cannot connect ");&lt;BR /&gt;    exit(1);&lt;BR /&gt;  }&lt;BR /&gt;-----&lt;BR /&gt;&lt;BR /&gt;In your case the INADDR_ANY would be replaced with the virtual IP address you want to use as your source IP.&lt;BR /&gt;&lt;BR /&gt;  -- Steve&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Apr 2002 21:19:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709641#M713053</guid>
      <dc:creator>Steve Bonds</dc:creator>
      <dc:date>2002-04-25T21:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP using Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709642#M713054</link>
      <description>Thanks for all the answers guys, but the problem I'm having is with connections initiated in the other direction. Binding to the virtual IP would help me if I were a server, but in this case my application is a client, so I don't ever bind to an address. I need to request a connection from a foreign server and use my virtual IP address. Its beginning to look like that might not be possible.</description>
      <pubDate>Thu, 25 Apr 2002 21:50:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709642#M713054</guid>
      <dc:creator>Patrick Meade</dc:creator>
      <dc:date>2002-04-25T21:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP using Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709643#M713055</link>
      <description>Hi Patrick, &lt;BR /&gt;&lt;BR /&gt;Even 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. &lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Jim</description>
      <pubDate>Fri, 26 Apr 2002 15:54:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709643#M713055</guid>
      <dc:creator>Jim Keeble</dc:creator>
      <dc:date>2002-04-26T15:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP using Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709644#M713056</link>
      <description>Yes, if you look at the code I copied over you do not see any listen() call-- this is TCP *client* side code.  (I.e. this code initiates the TCP connection.)&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;You can get more info from the connect() man page:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90682&amp;amp;service=hpux&amp;amp;path=../B2355-90682/00/00/31&amp;amp;title=HP-UX%20Reference%20Volume%203%3A%20Sections%202%20and%204" target="_blank"&gt;http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90682&amp;amp;service=hpux&amp;amp;path=../B2355-90682/00/00/31&amp;amp;title=HP-UX%20Reference%20Volume%203%3A%20Sections%202%20and%204&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In particular:&lt;BR /&gt;&lt;BR /&gt;-----&lt;BR /&gt;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.&lt;BR /&gt;-----&lt;BR /&gt;&lt;BR /&gt;  -- Steve&lt;BR /&gt;</description>
      <pubDate>Sat, 27 Apr 2002 00:38:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tcp-ip-using-service-guard/m-p/2709644#M713056</guid>
      <dc:creator>Steve Bonds</dc:creator>
      <dc:date>2002-04-27T00:38:04Z</dc:date>
    </item>
  </channel>
</rss>

