I solved this Issue meanwhile,
But now I face another issue: When I have one switch that is connected to
another switch that has two hosts (both in different vlans) connected and I
receive a packet on my contreoller from host a (vlan 5) that is targeted
for host b (vlan 6) I create an ofp_flow_mod adjust the vlan_id and send
the packet back from the port I received it.
Whysoever, there is always a "DROP" rules created within my OVS
in_port(3),eth(src=00:00:00:00:00:05,dst=00:00:00:00:00:06),eth_type(0x8100),vlan(vid
=5,pcp=0),encap(eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.6,proto=1,tos=0,ttl=64,
│frag=no),icmp(type=8,code=0)), packets:4, bytes:392, used:0.348s,
actions:drop
I wonder why that is?!
If I ping from another host to another this problem does not occur. it's
only in this specific case where I have to send out the packet on the same
port it came in, thus with a different vlan id.
I am sending as follows:
msg = of.ofp_flow_mod()
log.debug("FORWARDING PACKET!!!!")
match = of.ofp_match.from_packet(packet)
msg.match = match
port = self.determineOutPort(str(packet.dst))
log.debug("PACKET FROM: " + str(packet.src))
log.debug("PACKET TO: " + str(packet.dst))
log.debug("PACKET IN PORT: " + str(packet_in.in_port))
log.debug( "Determined OutPort: " + str(port))
vlan_id = self.determineVlanId(str(packet.dst), port)
if vlan_id > -1:
log.debug( "Set VLAN ID: " + str(vlan_id))
vlan_action = of.ofp_action_vlan_vid()
vlan_action.vlan_vid = vlan_id
msg.actions.append(vlan_action)
msg.actions.append(of.ofp_action_output(port = port))
log.debug("ACTIONS: " + str(msg.actions))
log.debug("Sending packet...")
self.connection.send(msg)
and the correct Actions are indeed shown when I debug but whysoever they
are not applied to the table.
Regards,
Julius
On Mon, Jan 28, 2013 at 3:53 PM, Murphy McCauley
<[email protected]>wrote:
> On Jan 28, 2013, at 6:44 AM, Julius Bachnick wrote:
>
> > As I'm trying to implement a COntroller that does ProxyARP within a
> topology with different VLANs I wonder how to correctly generate a
> ARP_Reply Frame with VLAN Header, as the "next" and "payload" variables in
> the corresponding POX modules confuse me a bit tbh.
>
> I don't think you should use or think about next -- just use payload.
>
> You also might check some of the existing POX examples -- l3_learning and
> arp_responder in particular may be useful to you.
>
> You might also take a look in the FAQ of the POX manual for help on
> troubleshooting:
> https://openflow.stanford.edu/display/ONL/POX+Wiki
>
> > This is my code so far:
> > ...
> > But it does not work due to
> >
> > ERROR:openflow.of_01:[00-00-00-00-00-05 1] OpenFlow Error:
> > [...]
> > [00-00-00-00-00-05 1] Error: type: OFPET_BAD_ACTION (2)
> > [00-00-00-00-00-05 1] Error: code: OFPBAC_BAD_LEN (1)
> >
> > Anyone any idea or suggestion?
>
> I don't think you've actually pasted the most relevant section of your
> code. You should include the portion where you actually send the data.
> Forced to guess, I would wager that you're calling connection.send() on
> the packed ethernet frame or something when you should be constructing an
> ofp_packet_out and sending that, as is done in the aforementioned examples.
>
> -- Murphy
>
>