<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>It is done after I used the following statement when I run mininet<br>--switch ovsk, datapath='user'<br><br>the mininet fire command will be is<br>sudo mn --custom ~/xxxxx.py --topo mytopos --switch ovsk, datapath='user' --controller=remote .......<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><div><hr id="stopSpelling">From: amer7777@hotmail.com<br>To: murphy.mccauley@gmail.com<br>Date: Mon, 9 Nov 2015 14:05:58 +0000<br>CC: pox-dev@lists.noxrepo.org<br>Subject: Re: [pox-dev] MPLS match and labels popping<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Dear Murphy<br><br>Thank you for your advises<br>Which version of OvS you suggest to use for MPLS.<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><div><hr id="ecxstopSpelling">Subject: Re: MPLS match and labels popping<br>From: murphy.mccauley@gmail.com<br>Date: Sun, 8 Nov 2015 13:07:59 -0800<br>CC: pox-dev@lists.noxrepo.org<br>To: amer7777@hotmail.com<br><br>On Nov 8, 2015, at 8:04 AM, AMER <<a href="mailto:amer7777@hotmail.com">amer7777@hotmail.com</a>> wrote:<br><div><br class="ecxApple-interchange-newline"><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><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 <span class="ecxApple-converted-space"> </span><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</div></div></blockquote><div><br></div><div>I'd suggest trying to narrow down why it doesn't work. If you remove the label match, do all MPLS packets go out port 1? Have you used Wireshark or something to confirm that there are packets that you think should match with label 50?</div><div><br></div><div>It's also possible that some MPLS stuff just plain doesn't work with current/almost-current OVS, I suppose. It was added to POX when MPLS support was pretty experimental...</div><br><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><div dir="ltr">when I tested it in mininet 2.2.1, OvS 2.3.2 , POX is "POX 0.2.0 (carp)"<br></div></div></blockquote><div><br></div><div>Carp is pretty old. I have no memory of whether there are known problems with it.</div><br><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><div dir="ltr">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 <span class="ecxApple-converted-space"> </span><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></div></div></blockquote><div><br></div><div>This one is very easy. pop requires the new Ethertype to be given.</div><div><br></div><div>nx_action_pop_mpls(ethertype=0x0800) or something like that will be more likely to work (if the packet was IP).</div><br><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><div dir="ltr">Any help is appreciated<br><br>Best regards,<br><br><font color="#800000" face="Lucida Handwriting, Cursive"><strong>Eng Amer Alghadhban</strong></font><br><font color="#800000" face="Lucida Handwriting"><strong>COE</strong></font><br><font color="#800000" face="Lucida Handwriting"><strong>SANS-GCFW</strong></font><br><strong><font color="#800000"><font face="Lucida Handwriting">CEH,<span class="ecxApple-converted-space"> </span></font><font face="Lucida Handwriting">SCNP,<span class="ecxApple-converted-space"> </span></font><font face="Lucida Handwriting">CCNA</font></font></strong></div></div></blockquote></div><br></div> </div></div> </div></body>
</html>