Using the pox controller, Im trying to create a load balancer between 2 hosts on a switch. E.g send every second packet to the second host. The balancer will need to modify each packet to do this. e.g NAT.
Is it possible to delete a flow rule after a match?
I had a look at the IP load balancer in the POX misc directory but I'm not too familiar with python so I'm not so sure whats actually happening.
My plan was to add a flow for each packet and then drop it. The flow added would depend on a variable that gets incremented when each packet arrives. so if the variable was odd it would go to the second host. I know its not the best method but its probably the simplistic method.
______added extra info___
Below is the topo. the http servers 10.0.0.3 and 10.0.0.4 cant be accessed directly. They can only be accessed via their global address 10.0.0.5.
What i want to do is if host 10.0.0.1 establishes a connect to the server 10.0.0.5. that host will then be sent to either 10.0.0.3 or 10.0.0.4.
if host 10.0.0.2 establishes a connect to the server 10.0.0.5. it will then be sent to the other server.
for every tcp connection sent to the server the load is balance between the 2 servers.