Hi Alvaro

The best way, if you are in OF1.3 is to split up things. Look at the
documentation regarding VLAN traffic. When I have VLAN traffic, I create a
specific table where I differentiate between non-tagged and tagged VLAN
traffic and if I need to get down to IP in VLAN traffic, I add an
additional table and pop the VLAN traffic before going to it.

Best, /PA

On 22 March 2018 at 16:07, Alvaro Jimenez Moreno <chavalva...@gmail.com>
wrote:

> Hi,
>
> Im having some issues to send a packet out message between 2 ovs. Im have
> 3 PCs. 2 of them act like an ovs and the third one has the Ryu controller.
> Im have a vlan (vid=44) por signal traffic between both ovs and the
> controller and a vlan (vid=10) just for transport between both ovs. I also
> have the 3 PCs physically connected by a Cisco Catalyst 2960 switch. Im
> figuring out how to send a packet out from one ovs (172.16.10.10) to the
> other ovs (172.16.10.20) without receiving a packet in message first. Now
> im sending the packet out in the switch features handler as follows:
>
> @set_ev_cls(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)
> def switch_features_handler(self, ev):
>     msg = ev.msg
>     datapath = msg.datapath
>     ofproto = datapath.ofproto
>     parser = datapath.ofproto_parser
>
>     match_miss = parser.OFPMatch()
>     actions_miss = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
>                                            ofproto.OFPCML_NO_BUFFER)]
>
>
> self.add_flow(datapath, 0, match_miss, actions_miss)
>     match_2 = parser.OFPMatch(in_port=1, eth_type=0x800, 
> ipv4_dst='172.16.10.20')
>
>     actions_out = [parser.OFPActionOutput(port=1)]
>     self.add_flow(datapath, 1, match_2, actions_out)
>
>
>     #I send the packet out just from one ovs:
>     if msg.datapath_id == 233669375027733:
>         p = packet.Packet()
>         ip = ipv4.ipv4(src='172.16.10.10', dst='172.16.10.20')
>         #v_lan = vlan.vlan(vid=10)
>         p.add_protocol(ip)
>         #p.add_protocol(v_lan)
>         p.serialize()
>         match_out = parser.OFPMatch(in_port=1)
>         out = parser.OFPPacketOut(datapath=msg.datapath,
>                                 buffer_id=ofproto.OFP_NO_BUFFER,
>                                 match=match_out, actions=actions_out, 
> data=p.data)
>         datapath.send_msg(out)
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>


-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellet zu werden
Georg Kreisler
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to