1844337 Members
3824 Online
110230 Solutions
New Discussion

Virtual IP

 
SOLVED
Go to solution
ShivKumar_1
Frequent Advisor

Virtual IP

Hi experts,
I have a question with regard to Virtual IP.
We have a L-Class box running , WEBMETHODS. It has 2 instances(cluster) within the same box. The box has 2 NIC cards with 2 IP adresses
We are planning to have a load balancer software that can be assigned a virtual IP so that , virtual IP points to the 2 physical IPs for accessing the applications.
Is it possible to do it?

Thnks
SK
6 REPLIES 6
John Dvorchak
Honored Contributor
Solution

Re: Virtual IP

If you are asking if you can assign a virtual IP address to a LAN card, yes. Edit /etc/rc.config.d/netconf and add a new stanza below the stanza defining the current lan instance. Here is an example for lan0:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=132.201.90.73
SUBNET_MASK[0]=255.255.255.224
BROADCAST_ADDRESS[0]=132.201.90.95
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0


INTERFACE_NAME[0]=lan0:1
IP_ADDRESS[0]=132.201.90.81
SUBNET_MASK[0]=255.255.255.224
BROADCAST_ADDRESS[0]=132.201.90.95
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0
If it has wheels or a skirt, you can't afford it.
ShivKumar_1
Frequent Advisor

Re: Virtual IP

Hi
John thnks for the response. I assume in your post the VIRTUAL IP is 132.201.90.81
Suppose my system has 2 physical LAN cards can the virtual IP of 1st LAN card bind the physical IP of the 2nd LAN card

The basic idea is to give a single virtual IP to the application users, so that they access the system and in turn the load balancing software routes the requests to the 2 instances( 2 physical IPs )

Thnks
SK



INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=132.201.90.73
SUBNET_MASK[0]=255.255.255.224
BROADCAST_ADDRESS[0]=132.201.90.95
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0


INTERFACE_NAME[0]=lan0:1
IP_ADDRESS[0]=132.201.90.81
SUBNET_MASK[0]=255.255.255.224
BROADCAST_ADDRESS[0]=132.201.90.95
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0
Michael Steele_2
Honored Contributor

Re: Virtual IP

I believe that you're going to have to implement this at the application level. With Apache, refer to Name-based Virtual Host Support.

http://httpd.apache.org/docs/vhosts/name-based.html

NameVirtualHost *


ServerName www.domain.tld
DocumentRoot /www/domain



ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain



With MC/ServiceGuard refer to the floating IP address. But in MC/SG like Apache, the floating ip is managed by the application and not the O/S. SG binaries in the package.cntl file note the floating ip associated to the package so user log to this.
Support Fatherhood - Stop Family Law
rick jones
Honored Contributor

Re: Virtual IP

In the context of load balancing, a virtual IP is typicaly done as an address alias on the lo0 interface:

ifconfig lo0:1

This is only necessary though if you want replies from the server to bypass the load balancer box - this is sometimes called triangle routing, or perhaps "direct reply" The vip alias is required so that responses from the backend server are sent with the VIP as their source IP address

If you have all traffic - requests and responses flow through the load balancer then you do not need to assign the VIP to the back-end servers because the load balancer will do the IP address rewriting.

Now, if what you want is load balancing across two NICs in the same system, the better (opinion) way to go is to use Auto Port Aggregation (APA). You configure both NICs to be part of an aggregate, and assign the IP address(es) to the aggregate interface. APA then load balances and does failover between the two (or more) NICs
there is no rest for the wicked yet the virtuous have no pillows
ShivKumar_1
Frequent Advisor

Re: Virtual IP

Thnks experts, for your advice, I m going to procure the APA license so that I can implement the same out here.

SK
Steven E. Protter
Exalted Contributor

Re: Virtual IP

Of the above solutions, only APA will do load balancing. All the other solutions will add IP addresses running right through the same NIC card with no load balance effect.

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