<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Dear All<br><br>I would like to ask you about the following match commands and actions<br><br>       msg1 = nx.nx_flow_mod()<br>       msg1.match = nx.nx_match()<br>       msg1.match.eth_type = pkt.ethernet.MPLS_TYPE       <br>       msg1.match.mpls_label = 50# host 1 10.0.0.1<br>       msg1.actions.append(of.ofp_action_output(port = 1))<br><br>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)"<br>The push command is:<br><br>       msg = nx.nx_flow_mod()<br>       msg.match.of_eth_src = "00:00:00:00:00:04"<br>       msg.actions.append(nx.nx_action_push_mpls())<br>       msg.actions.append(nx.nx_reg_load(dst=nx.OXM_OF_MPLS_LABEL, value=50))<br>       msg.actions.append(of.ofp_action_output(port = 2))<br>       core.openflow.sendToDPID(event.dpid, msg)<br><br>Also, when I tried to use pop command as the following I received the down error<br><br>       msg1 = nx.nx_flow_mod()<br>       msg1.match = nx.nx_match()<br>       msg1.match.eth_type = pkt.ethernet.MPLS_TYPE       <br>       msg1.match.mpls_label = 50# host 1 10.0.0.1<br>       msg1.actions.append(nx.nx_action_pop_mpls()) ######<-- POP<br>       msg1.actions.append(of.ofp_action_output(port = 1))<br><br>The error is:<br><br>POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.<br>INFO:forwarding.l2_mid:Simple NX switch running.<br>INFO:core:POX 0.2.0 (carp) is up.<br>INFO:openflow.of_01:[00-00-00-00-00-02 1] connected<br>INFO:forwarding.l2_mid:2 switches in path<br>INFO:openflow.of_01:[00-00-00-00-00-01 2] connected<br>INFO:forwarding.l2_mid:1 switches in path<br>ERROR:core:Exception while handling OpenFlowNexus!ConnectionUp...<br>Traceback (most recent call last):<br>  File "/home/alghada/pox/pox/lib/revent/revent.py", line 231, in raiseEventNoErrors<br>    return self.raiseEvent(event, *args, **kw)<br>  File "/home/alghada/pox/pox/lib/revent/revent.py", line 278, in raiseEvent<br>    rv = event._invoke(handler, *args, **kw)<br>  File "/home/alghada/pox/pox/lib/revent/revent.py", line 156, in _invoke<br>    return handler(self, *args, **kw)<br>  File "/home/alghada/pox/pox/forwarding/l2_mid.py", line 110, in _handle_ConnectionUp<br>    core.openflow.sendToDPID(event.dpid, msg1)<br>  File "/home/alghada/pox/pox/openflow/__init__.py", line 353, in sendToDPID<br>    self._connections[dpid].send(data)<br>  File "/home/alghada/pox/pox/openflow/of_01.py", line 692, in send<br>    data = data.pack()<br>  File "/home/alghada/pox/pox/openflow/nicira.py", line 387, in pack<br>    packed += i.pack()<br>  File "/home/alghada/pox/pox/openflow/libopenflow_01.py", line 2036, in pack<br>    body = self._pack_body()<br>  File "/home/alghada/pox/pox/openflow/nicira.py", line 815, in _pack_body<br>    p = struct.pack('!HHI', self.subtype, self.ethertype, 0) # 4 bytes pad<br>error: cannot convert argument to integer<br><br><br>Any help is appreciated<br><br>Best regards,<br><br><font style="" color="#800000" face="Lucida Handwriting, Cursive"><strong>Eng Amer Alghadhban</strong></font><br>
<font style="" color="#800000" face="Lucida Handwriting"><strong>COE</strong></font><br>
<font style="" color="#800000" face="Lucida Handwriting"><strong>SANS-GCFW</strong></font><br>
<strong><font color="#800000"><font face="Lucida Handwriting">CEH, </font><font face="Lucida Handwriting">SCNP, </font><font face="Lucida Handwriting">CCNA</font></font></strong><br><br><br><br>                                    </div></body>
</html>