Thanks peter it worked. Can you confirm are the following way are the right
way to write it?
"msg4.actions.append(of.ofp_action_output(port = 0xfff8))"
"msg4.actions.append(of.ofp_action_output(port = of.OFPP_IN_PORT))"


because this has worked for me but after installing this rule i.e. packet
is going back from input port only but I am getting an error from on POX.


I am getting this error when a switch tried to install a rule for the same
packet which we have redirected through the in_port rule we discussed above.
So i am in doubt that is the error occurred because I have written this
"(port = 0xfff8) or (port = of.OFPP_IN_PORT)" in wrong way.

Or this error is not related to this at all.

Thanks and Regards.
​

On Tue, Mar 3, 2015 at 7:09 PM, Peter Peresini <peter.peres...@epfl.ch>
wrote:

> Hi,
>  if you want to send packet back the same port, you need to explicitely
> use OFPP_IN_PORT as a port number. This is to prevent packets looping in
> the network as usually sending packets back is a bad idea (i.e., the peer
> switch would probably send the packet again to us)
>
> Peter
>
> On Tue, Mar 3, 2015 at 2:35 PM, chaitanya tanwar <
> chaitanya.tan...@gmail.com> wrote:
>
>> Hello everyone,
>>
>> Lets say we have switch s1, connected to h1 through port 1 and connected
>> to s2 through port 2.
>>
>> As a packet arrives at port 2 from s2 to s1. I am modifying its
>> destination mac and ip addresses and sending that back from the same port
>> i.e. output port 2.
>>
>> But wireshark is not showing the same. Packet is arriving at port 2 from
>> s2 to s1 but not going anywhere after that.
>>
>> Is there any trivial problem in sending the packet back through same port
>> from where it has arrived?
>> Because I have tried the same thing but sending the packet to port 1 and
>> this time packet is going to port 1 but in case where I am sending it back
>> through same port, Its not happening.
>>
>> Best Regards.
>>
>
>

Reply via email to