[pox-dev] MPLS match and labels popping
AMER
amer7777 at hotmail.com
Sun Nov 8 08:04:07 PST 2015
Dear All
I would like to ask you about the following match commands and actions
msg1 = nx.nx_flow_mod()
msg1.match = nx.nx_match()
msg1.match.eth_type = pkt.ethernet.MPLS_TYPE
msg1.match.mpls_label = 50# host 1 10.0.0.1
msg1.actions.append(of.ofp_action_output(port = 1))
The above matches didn't work when I tested it in mininet 2.2.1, OvS 2.3.2 , POX is "POX 0.2.0 (carp)"
The push command is:
msg = nx.nx_flow_mod()
msg.match.of_eth_src = "00:00:00:00:00:04"
msg.actions.append(nx.nx_action_push_mpls())
msg.actions.append(nx.nx_reg_load(dst=nx.OXM_OF_MPLS_LABEL, value=50))
msg.actions.append(of.ofp_action_output(port = 2))
core.openflow.sendToDPID(event.dpid, msg)
Also, when I tried to use pop command as the following I received the down error
msg1 = nx.nx_flow_mod()
msg1.match = nx.nx_match()
msg1.match.eth_type = pkt.ethernet.MPLS_TYPE
msg1.match.mpls_label = 50# host 1 10.0.0.1
msg1.actions.append(nx.nx_action_pop_mpls()) ######<-- POP
msg1.actions.append(of.ofp_action_output(port = 1))
The error is:
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
INFO:forwarding.l2_mid:Simple NX switch running.
INFO:core:POX 0.2.0 (carp) is up.
INFO:openflow.of_01:[00-00-00-00-00-02 1] connected
INFO:forwarding.l2_mid:2 switches in path
INFO:openflow.of_01:[00-00-00-00-00-01 2] connected
INFO:forwarding.l2_mid:1 switches in path
ERROR:core:Exception while handling OpenFlowNexus!ConnectionUp...
Traceback (most recent call last):
File "/home/alghada/pox/pox/lib/revent/revent.py", line 231, in raiseEventNoErrors
return self.raiseEvent(event, *args, **kw)
File "/home/alghada/pox/pox/lib/revent/revent.py", line 278, in raiseEvent
rv = event._invoke(handler, *args, **kw)
File "/home/alghada/pox/pox/lib/revent/revent.py", line 156, in _invoke
return handler(self, *args, **kw)
File "/home/alghada/pox/pox/forwarding/l2_mid.py", line 110, in _handle_ConnectionUp
core.openflow.sendToDPID(event.dpid, msg1)
File "/home/alghada/pox/pox/openflow/__init__.py", line 353, in sendToDPID
self._connections[dpid].send(data)
File "/home/alghada/pox/pox/openflow/of_01.py", line 692, in send
data = data.pack()
File "/home/alghada/pox/pox/openflow/nicira.py", line 387, in pack
packed += i.pack()
File "/home/alghada/pox/pox/openflow/libopenflow_01.py", line 2036, in pack
body = self._pack_body()
File "/home/alghada/pox/pox/openflow/nicira.py", line 815, in _pack_body
p = struct.pack('!HHI', self.subtype, self.ethertype, 0) # 4 bytes pad
error: cannot convert argument to integer
Any help is appreciated
Best regards,
Eng Amer Alghadhban
COE
SANS-GCFW
CEH, SCNP, CCNA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20151108/e0bb9296/attachment.htm>
More information about the pox-dev
mailing list