This sounds like it's strictly Ethernet-address based, so I might start with 
l2_pairs instead of l2_learning.

Before doing a packet-out or flow-mod, check if the destination is to the host 
that you're diverting traffic for (h3 in your example).  If so, put an dl_dst 
to rewrite the MAC to the intermediary (h2 in your example), and set the output 
action to be the port that leads to the intermediary (again, h2 in your 
example).

The gotcha here is that you'll need to know h2's port and MAC before you can do 
the above.  You could just take them as commandline parameters or something.  
Or if you knew the MAC but not the port, you could have the controller ARP for 
it or something...

-- Murphy

On Nov 30, 2014, at 8:43 AM, Ali Reza Zamani <az...@cs.rutgers.edu> wrote:

> Thanks Murphy for your response.
> The reason that I said I want to use l2_learning is that I want to have the 
> learning behavior and I just want to forward some of the traffic for one of 
> the hosts to other host and the rest of the network should work with 
> l2_learning.
> 
> Regards,
> 
> On 11/29/14 8:02 PM, Murphy McCauley wrote:
>> This doesn't sound like learning behavior.  Do you just want to set up the 
>> table by hand?  Do that by just crafting a flow_mod for each direction of 
>> communication.  Match on a destination MAC address, and include actions to 
>> change the dl_dst (possibly) and send out a specific port (definitely).
>> 
>> -- Murphy
>> 
>> On Nov 29, 2014, at 4:55 PM, Ali Reza Zamani <az...@cs.rutgers.edu> wrote:
>> 
>>> Hi,
>>> 
>>> I have a question regarding the changing the destination of the packet in 
>>> the switches. I am using l2_learning controller in pox. I was wondering how 
>>> can I forward packet to one host to another host. For example if I have 3 
>>> hosts e.g h1 h2 h3; and if h1 ping h3 the traffic should go from h1 to h2 
>>> and then h2 sends it to h3.
>>> 
>>> Thanks,
>>> 
> 

Reply via email to