[VLAN] Routing traffic between identical IP addrs on different vlan's?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, there is a selection process for differentiating between vA and
vB. I have a MySQL table that lists the hostnames that the virtual
machines run on, the ip addresses for the virtual machines, and the
"cluster id" for the virtual machines.  So, if I specify cluster-id
'0', I want to be able to make HTTP requests to vA. And, if I specify
cluster-id '1', I want to be able to make HTTP requests to vB.

I have a perl script that takes one parameter: a URL to GET from vA or
vB. The URL looks like this:
http://<vA or Vb's ipv4 address>/<cluster_id of vA or Vb>/some_webpage.html

So, given that URL the perl script knows the ip-address of vA, it
knows that vA is on sA, and it knows the ipv4 address of sA (it
figures this out by using the cluster_id to do a lookup in MySQL).

Now, I feel that if I have vA and vB on different VLAN's, the perl
script should be able to use the information it has to route the HTTP
request correctly.

Once I figure that out, I can figure out how to do likewise for rsync
and scp to vA and vB.

My target application is load-balancing. I'm modifying APSIS Pound.
I'm using virtual machines because I want to be able to transfer
virtual machines from one physical server to another (using rsync)
based on the load of a server. After I rsync a virtual machine to a
different server, I update the
virtual_machine_ip_address/clusterid--->hostname mapping in MySQL so
that the perl script still works. Only problem is, I can't figure out
how to use VLANS to deal with the ipv4 address overlap.

Thanks again!

On 10/8/06, Peter Stuge <stuge-vlan@xxxxxxx> wrote:
> On Sat, Oct 07, 2006 at 07:45:53PM -0700, EKC wrote:
> > I have two servers with different ipv4 addresses on an
> > 802.1Q-capable ethernet switch.
> >
> > Each server is running a VMware virtual machine running an apache
> > web server. However, both of the virtual machines have the same ip
> > address. Changing the ip addresses is not an option.
> >
> > I want server A to be able to choose whether to make HTTP requests to
> > the virtual machine on server B or the virtual machine on server A.
> > Likewise, I want server B to be able to make HTTP requests to
> > whichever virtual machine it chooses. And, I want both server A and
> > server B to still be able to communicate with each other (ssh traffic,
> > rsync trafffic, etc...)
>
> I'm calling your physical machines sA and sB (server A/B) and your
> virtual machines vA and vB.
>
> sA and sB have different IP addresses so they can communicate with
> eachother without any problems.
>
> You want vA and vB to both use the same IPv4 address but you still
> want to be able to differentiate between them using only IPv4
> addressing, is that correct?
>
> Unfortunately it can not succeed, since there is no way of knowing
> which of vA and vB is really refered to when the shared IP address is
> used.
>
> This is not a straightforward setup. I assume you're doing some kind
> of HA system. Perhaps you should have a look at ha-forum.org?
>
>
> If my description above is incorrect and you in fact have some way
> besides IPv4 to differentiate between vA and vB then there's
> certainly a solution to be found, and VLANs are likely part of it.
>
>
> > However, how do I get the physical servers to selectively route
> > traffic to two identical ip addresses on different VLAN's?
>
> What is the selection process?
>
>
> //Peter
> _______________________________________________
> Vlan mailing list
> Vlan@xxxxxxxxxxxxxxx
> http://www.candelatech.com/mailman/listinfo/vlan
>
>

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux