× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes you can bind to a specific IP address.  What I would do is create a
virtual IP address on your AS400.  Just like adding a physical with a couple
of parameters changed.  Then on your default router add the two physical IP
addresses as routes to the Virtual IP address, which must be in it's own
subnet.

For example with both Ethernets in the same subnet:
Eth01 = 10.0.0.1 / 255.255.255.0
Eth02 = 10.0.0.2 / 255.255.255.0
VirtIP= 10.254.254.1 / 255.255.255.255

Route 1 = 10.254.254.1 255.255.255.255 10.0.0.1 metric 1
Route 2 = 10.254.254.1 255.255.255.255 10.0.0.2 metric 2

This does not give you inbound balancing but will give you outbound
balancing.

For example with each ethernet in a different subnet:
Eth01 = 10.0.1.1 / 255.255.255.0
Eth02 = 10.0.2.1 / 255.255.255.0
VirtIP= 10.254.254.1 / 255.255.255.255

Router in subnet 1 = 10.0.1.254:
Route 1 = 10.254.254.1 255.255.255.255 10.0.1.1 metric 1
Route 2 = 10.254.254.1 255.255.255.255 10.0.2.254 metric 2

Router in subnet 2 = 10.0.2.254:
Route 1 = 10.254.254.1 255.255.255.255 10.0.2.1 metric 1
Route 2 = 10.254.254.1 255.255.255.255 10.0.1.254 metric 2

This will give you failover in each subnet but no outbound load balancing.

For inbound load balancing you will need an external box running monitoring
and load balancing software.

Now we let our server programs bind to all IP address but only hand out the
Virtual IP via Wins and DNS.  As far as client connecting consistently using
the same interface or the Virtual IP interface, here is a code snippet:
d dsServerAddr    ds                      
d  sin_family                    5i 0 inz 
d  sin_port                      5u 0 inz 
d  sin_addr                     10i 0 inz 
d  sin_zero                      8a   inz 
 * Bind server IP & port to socket descriptor
c                   eval      sin_port        = s_ports               
c                   eval      sin_family      = AF_INET               
c                   eval      sin_addr        = INetAddr(*VirtualIP*)
<-retrieved using DNS query
c                   eval      sin_zero        = X'0000000000000000'   
c                   eval      iServiceAddrLen = %size(dsServerAddr)   
c                   eval      iRC = Bind( iListeningSocket            
c                                       : %addr(dsServerAddr)         
c                                       : iServiceAddrLen     )       

-----Original Message-----
From: York, Albert

I have an AS/400 with two ethernet cards in it,  for redundancy. They each
have their own IP address.

Is there a way for me to select a specific ethernet line when I open a
socket? The AS/400 always seems to select the first line unless its
interface is inactive.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.