[pox-dev] Load bancing with multiple switchs
Murphy McCauley
murphy.mccauley at gmail.com
Tue Apr 15 21:28:47 PDT 2014
This has come up before and isn't really unreasonable, so I've just pushed an improvement to ip_loadbalancer in dart. You can now pass the DPID of the switch you want to act as the load balancer on the commandline and it will ignore all the other switches.
Then, for example, you can make all the *other* switches act like l2_learning by doing something like creating ext/selective_switch.py containing:
from pox.core import core
from pox.lib.util import str_to_dpid
from pox.forwarding.l2_learning import LearningSwitch
def launch (ignore_dpid):
ignore_dpid = str_to_dpid(ignore_dpid)
def _handle_ConnectionUp (event):
if event.dpid != ignore_dpid:
core.getLogger().info("Connection %s" % (event.connection,))
LearningSwitch(event.connection, False)
core.openflow.addListenerByName("ConnectionUp", _handle_ConnectionUp)
Then you can run the two together with something like:
./pox.py misc.ip_loadbalancer --ip=10.10.10.10 --servers=10.0.0.3,10.0.0.2 --dpid=3 selective_switch --ignore-dpid=3
Note that ip_loadbalancer's --dpid and selective_switch's --ignore-dpid refer to the same switch!
-- Murphy
On Apr 15, 2014, at 8:35 PM, Murphy McCauley <murphy.mccauley at gmail.com> wrote:
> Modify the example to only run the load balancer on a single switch and do something else (e.g., learning switch) on other switches.
>
> -- Murphy
>
> On Apr 15, 2014, at 8:21 PM, Ambica Raina <ambicaraina363 at gmail.com> wrote:
>
>> Sir,
>>
>> I have tried load balancing using single switch and it worked fine. But as I used more switches i.e. servers connected to one switch and hosts on other, in this scenario load balancing do not work.
>> Servers are not up. Please tell me what to do?
>>
>> Thanks and Regards
>> Ambica Raina
>
More information about the pox-dev
mailing list