<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Flow match with MAC mask in Software Defined Networking</title>
    <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6657476#M1503</link>
    <description>&lt;P&gt;Hello Dast,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for the delay.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please let us know if your problem is solved or you still facing some issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;HP SDN Team&lt;/P&gt;</description>
    <pubDate>Tue, 28 Oct 2014 06:43:10 GMT</pubDate>
    <dc:creator>sdnindia</dc:creator>
    <dc:date>2014-10-28T06:43:10Z</dc:date>
    <item>
      <title>Flow match with MAC mask</title>
      <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6560798#M1500</link>
      <description>&lt;P&gt;Hi everyone!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am trying to deploy a OF 1.0 flow enty on a flow table for a maskable MAC address. The intention is, to match a specific MAC vendor prefix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Therefore I set up a FlowMod Add message and created a match with the following sample match field:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;MatchField mf = FieldFactory.createBasicField(ProtocolVersion.V_1_0, OxmBasicFieldType.ETH_SRC, MacAddress.valueOf("01:02:03:04:05:06"), MacAddress.valueOf("ff:ff:ff:00:00:00"));&lt;/PRE&gt;&lt;P&gt;... according to the SDN documentation:&lt;/P&gt;&lt;PRE&gt;createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, MacAddress mac, MacAddress mask)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For developing purposes I am using the Mininet Open vSwitches. With the above code, a flow entry with an un-masked MAC match field is installed, e.g: eth_src=01:02:03:04:05:06.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Installing the flow manually via dpctl on the flow table, I get the desired result, e.g. eth_src=&lt;SPAN&gt;01:02:03:00:00:00/ff:ff:ff:00:00:00.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where is the problem? I would be glad if anyone could help me to achieve my intention.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dast&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 16:39:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6560798#M1500</guid>
      <dc:creator>Dast</dc:creator>
      <dc:date>2014-07-31T16:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Flow match with MAC mask</title>
      <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6574156#M1501</link>
      <description>&lt;P&gt;Hello Dast,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try as per the SDN Programming guide(page 27-29, An example : creating a FlowMod message)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private static final MacAddress MAC =MacAddress.valueOf("00001e:000000");&lt;/P&gt;&lt;P&gt;private static final MacAddress MAC_MASK =MacAddress.valueOf("ffffff:000000");&lt;/P&gt;&lt;P&gt;private static final PortNumber SMTP_PORT = PortNumber.valueOf(25);&lt;/P&gt;&lt;P&gt;private static final MacAddress MAC_DEST = MacAddress.BROADCAST;&lt;/P&gt;&lt;P&gt;private static final IpAddress IP_DEST = IpAddress.LOOPBACK_IPv4;&lt;/P&gt;&lt;P&gt;….&lt;/P&gt;&lt;P&gt;….&lt;/P&gt;&lt;P&gt;private Match createMatch() {&lt;/P&gt;&lt;P&gt;// NOTE static imports of:&lt;/P&gt;&lt;P&gt;// com.hp.of.lib.match.FieldFactory.createBasicField;&lt;/P&gt;&lt;P&gt;// com.hp.of.lib.match.OxmBasicFieldType.*;&lt;/P&gt;&lt;P&gt;MutableMatch mm = MatchFactory.createMatch(PV)&lt;/P&gt;&lt;P&gt;.addField(createBasicField(PV, ETH_SRC, MAC, MAC_MASK))&lt;/P&gt;&lt;P&gt;.addField(createBasicField(PV, ETH_TYPE, EthernetType.IPv4))&lt;/P&gt;&lt;P&gt;.addField(createBasicField(PV, IP_PROTO, IpProtocol.TCP))&lt;/P&gt;&lt;P&gt;.addField(createBasicField(PV, TCP_DST, SMTP_PORT));&lt;/P&gt;&lt;P&gt;return (Match) mm.toImmutable();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you still face the issue , please share your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;HP SDN Team&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2014 19:01:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6574156#M1501</guid>
      <dc:creator>sdnindia</dc:creator>
      <dc:date>2014-08-14T19:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Flow match with MAC mask</title>
      <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6574470#M1502</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your reply, but it didn't help. the result is the same:&amp;nbsp;the Flow Table has just a regular MAC address match without a mask (as shown in my initial post).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// dpId is given as a parameter

MacAddress MAC = MacAddress.valueOf("102030:000000");
MacAddress MAC_MASK =MacAddress.valueOf("ffffff:000000");
PortNumber SMTP_PORT = PortNumber.valueOf(25);
ProtocolVersion PV = ProtocolVersion.V_1_0;
		
MutableMatch mm = MatchFactory.createMatch(PV)
		.addField(FieldFactory.createBasicField(PV, OxmBasicFieldType.ETH_SRC, MAC, MAC_MASK))
		.addField(FieldFactory.createBasicField(PV, OxmBasicFieldType.ETH_TYPE, EthernetType.IPv4))
		.addField(FieldFactory.createBasicField(PV, OxmBasicFieldType.IP_PROTO, IpProtocol.TCP))
		.addField(FieldFactory.createBasicField(PV, OxmBasicFieldType.TCP_DST, SMTP_PORT));&lt;BR /&gt;
Match m = (Match) mm.toImmutable();
				
OfmMutableFlowMod deployFlowMsg = (OfmMutableFlowMod) MessageFactory.create(ProtocolVersion.V_1_0,
MessageType.FLOW_MOD, FlowModCommand.ADD);
		
deployFlowMsg.match(m);

Date now = new Date();
long cookie = now.getTime();

		deployFlowMsg.idleTimeout(0).hardTimeout(0).priority(155).bufferId(BufferId.NO_BUFFER).cookie(cookie);

controllerService.sendFlowMod(deployFlowMsg,toImmutable(), dpId);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before sending, my app logged the OpenFlow FlowModMessage:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{ofm:[V_1_0,FLOW_MOD,72,126],cmd=ADD,match={Match(V_1_0):[type=STANDARD,len=40],fields=ETH_SRC,ETH_TYPE,IP_PROTO,TCP_DST},...}
  Cookie   : 0x147ba070f37
  FMod Cmd : ADD
  Idle t/o : 0s
  Hard t/o : 0s
  Priority : 155
  Buffer ID: 0xffffffff(NO_BUFFER)
  Out Port : 0xffffffff(ANY)
  FMod Flgs: []
  Match    : {Match(V_1_0):[type=STANDARD,len=40],fields=ETH_SRC,ETH_TYPE,IP_PROTO,TCP_DST}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=4(ETH_SRC),hm=true,len=12],mac=10:20:30:00:00:00,mask=ff:ff:ff:00:00:00}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=5(ETH_TYPE),hm=false,len=2],type=0x0800(IPv4)}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=10(IP_PROTO),hm=false,len=1],ipp=6(TCP)}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=14(TCP_DST),hm=false,len=2],port=0x19(25)}
  Actions  : (none)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Aug 2014 07:58:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6574470#M1502</guid>
      <dc:creator>Dast</dc:creator>
      <dc:date>2014-08-15T07:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Flow match with MAC mask</title>
      <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6657476#M1503</link>
      <description>&lt;P&gt;Hello Dast,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for the delay.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please let us know if your problem is solved or you still facing some issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;HP SDN Team&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 06:43:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6657476#M1503</guid>
      <dc:creator>sdnindia</dc:creator>
      <dc:date>2014-10-28T06:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Flow match with MAC mask</title>
      <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6657548#M1504</link>
      <description>&lt;P&gt;Hello sdnindia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;didn't find a solution for this problem yet...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 08:27:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6657548#M1504</guid>
      <dc:creator>Dast</dc:creator>
      <dc:date>2014-10-28T08:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Flow match with MAC mask</title>
      <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6657686#M1505</link>
      <description>&lt;P&gt;Hi Dast&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Can you please do a packet capture of the the flow_mod message between the controller and switch, and attach the pcap to the thread ?&lt;/P&gt;&lt;P&gt;2. WHich version of the the HP VAN SDN Controller are you using ?&lt;/P&gt;&lt;P&gt;3. What kind of switch are you using ?&lt;/P&gt;&lt;P&gt;4. What software is on the switch ?&lt;/P&gt;&lt;P&gt;5. Would you mind attaching the switch configuration to this as well please ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Gerhard Roets&lt;/P&gt;&lt;P&gt;HP SDN Team&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:14:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6657686#M1505</guid>
      <dc:creator>Gerhard Roets</dc:creator>
      <dc:date>2014-10-28T11:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Flow match with MAC mask</title>
      <link>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6667924#M1506</link>
      <description>&lt;P&gt;&amp;nbsp;Hello Gerhard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently not working on the project anymore, but nevertheless this problem should be discussed / fixed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find subsequently the answers to your questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. This is currently not possible, but as mentioned above the FlowModMessage was sent like this:&lt;/P&gt;&lt;PRE&gt;{ofm:[V_1_0,FLOW_MOD,72,126],cmd=ADD,match={Match(V_1_0):[type=STANDARD,len=40],fields=ETH_SRC,ETH_TYPE,IP_PROTO,TCP_DST},...}
  Cookie   : 0x147ba070f37
  FMod Cmd : ADD
  Idle t/o : 0s
  Hard t/o : 0s
  Priority : 155
  Buffer ID: 0xffffffff(NO_BUFFER)
  Out Port : 0xffffffff(ANY)
  FMod Flgs: []
  Match    : {Match(V_1_0):[type=STANDARD,len=40],fields=ETH_SRC,ETH_TYPE,IP_PROTO,TCP_DST}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=4(ETH_SRC),hm=true,len=12],mac=10:20:30:00:00:00,mask=ff:ff:ff:00:00:00}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=5(ETH_TYPE),hm=false,len=2],type=0x0800(IPv4)}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=10(IP_PROTO),hm=false,len=1],ipp=6(TCP)}
    {Oxm:V_1_0:[cls=0x8000(OPENFLOW_BASIC),ft=14(TCP_DST),hm=false,len=2],port=0x19(25)}
  Actions  : (none)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I tried it with&amp;nbsp;version 2.2.5 and 2.3.5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. I used the Open vSwitches as well as an HP 5406 and 3500.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. and 5. see attached files.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your support!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2014 13:41:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/flow-match-with-mac-mask/m-p/6667924#M1506</guid>
      <dc:creator>Dast</dc:creator>
      <dc:date>2014-11-10T13:41:06Z</dc:date>
    </item>
  </channel>
</rss>

