Hi everyone,

I'm trying to route packets based on their IP destination. I tried to do
the querying of selected IP addresses using ofpmatch as can be seen in the
code below. So as an example, the code below shows I tried to ofpmatch ip
only with destination 10.0.0.102 to a specific switch. Packets that have a
different ip destination are not yet dealt with in my implementation. When
I run tcpdump on that switch's interfaces, I expect to see IP packets only
with destination 10.0.0.102. However, I also see IP packets that do not
have the destination 10.0.0.102. What would be your suggestion in how I
should fix this? Thanks so much for your help.

actions = [ofp_parser.OFPActionOutput(1)]
                inst =
[ofp_parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS, actions)]
                match = ofp_parser.OFPMatch(eth_type=0x0800,
ipv4_dst='10.0.0.102')
                print ("match: {}".format(match.items()))
                mod =
ofp_parser.OFPFlowMod(datapath=self._lb_switch.server_port[0], priority=1,
                                            match=match,
command=ofp.OFPFC_MODIFY,
                                            instructions=inst,
buffer_id=ofp.OFP_NO_BUFFER)

                out =
ofp_parser.OFPPacketOut(datapath=self._server_switches[0],
buffer_id=ofp.OFP_NO_BUFFER, in_port=1, actions=actions)
                self._lb_dp.send_msg(out)

Best regards,
Josiah Regencia
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to