MPLS Matching - Zodiac FX not Matching labels

  • 11 Replies
  • 3291 Views
*

Carlos Ferreira

  • Newbie
  • *
  • 12
    • View Profile
MPLS Matching - Zodiac FX not Matching labels
« on: December 29, 2017, 03:49:14 AM »
Hello to all!

I'm having some issues with the configuration of MPLS Label Matching flows with the Zodiac FX Switches.
I'm using the Ryu controller to install the flows and after submitting the respective OFPFlowMod the switch, the MPLS Label matching is not being performed correctly.

This is an example of the Python code using Ryu to setup the OFPFlowMod, which will match the MPLS label.
Code: [Select]
match = ofp_parser.OFPMatch(
    eth_type=ether.ETH_TYPE_MPLS,
    mpls_label=available_label
)
actions = [
    ofp_parser.OFPActionOutput(port=out_port)
]
inst = [ofp_parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS, actions)]
switch_datapath.send_msg(
    ofp_parser.OFPFlowMod(
        datapath=switch_datapath,
        cookie=(1 << 24) | available_label,
        cookie_mask=0,
        table_id=0,
        command=ofp.OFPFC_ADD,
        idle_timeout=0,
        hard_timeout=0,
        priority=ofp.OFP_DEFAULT_PRIORITY,
        buffer_id=ofp.OFP_NO_BUFFER,
        out_port=ofp.OFPP_ANY,
        out_group=ofp.OFPG_ANY,
        flags=ofp.OFPFF_SEND_FLOW_REM | ofp.OFPFF_CHECK_OVERLAP,
        match=match,
        instructions=inst
    )
)

Also, I have added bellow, the images which show the configured flows, one for the webportal and the other for the serial console. Both are showing the supposed two MPLS flows, by none of them seems to show information regarding the Matching fields

Where it says Match, shouldn't I see the MPLS label or at least, the MPLS EtherType ?

Flows seen at the Web Portal: https://www.dropbox.com/s/yhnp22lqirmc9ic/Zodiac_Fx_Flows_MPLS.png
Flows seen at the Serial console:
 https://www.dropbox.com/s/ogv8ylbn1r97l8z/Zodiac_Fx_Flows_MPLS_serial.png

With those flows, the switch is not properly switching the MPLS packets, because every packet received at port 3 with the specific MPLS label, should be matched only by the Flow #6,  but instead, it is Matched by Flow #5 and being dropped after that.

Can anyone help me with this issue? I really need this working for a research project.
Thank you all for the assistance!
« Last Edit: December 29, 2017, 03:52:36 AM by Claymore »

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #1 on: December 31, 2017, 12:13:48 PM »
Hi,

There is an issue printing some EtherTypes in the match field, it will be fixed in the next update. As for the actually matching can you please provide a little more info on the labels you are matching.

Regards,
Paul

*

Carlos Ferreira

  • Newbie
  • *
  • 12
    • View Profile
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #2 on: January 01, 2018, 01:48:02 AM »
Hello Paul,

As for the MPLS labels, the control system I'm implementing, establishes MPLS tunnels between hosts. For that, I'm using a sequence of values starting at the value 0xF, up to 0xFFFFF.
There shouldn't be any issue with this.

For the test which is not working, the labels value are the 16 and 17.

*

Carlos Ferreira

  • Newbie
  • *
  • 12
    • View Profile
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #3 on: January 05, 2018, 01:37:16 AM »
Bump, so it doesn't fall into the pit of forgotness.

I remember.
I'm only matching the MPLS labels and then, redirecting the packets into a new port. This should be enough but it does not work as intended.

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #4 on: January 05, 2018, 07:24:35 AM »
I haven't forgotten  ;)

How are you generating the labels for your testing?

Regards,
Paul

*

Carlos Ferreira

  • Newbie
  • *
  • 12
    • View Profile
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #5 on: January 05, 2018, 08:13:16 AM »
I have an internal dataset to track the labels being used in the network.

To decide which label I use, I search for an available label between 256 and 1048575.

Then, I configure a flowmod, as the following Python code shows:
Code: [Select]
match = ofp_parser.OFPMatch(
    in_port=source_host_info["port"], eth_type=ether.ETH_TYPE_IP,
    ipv4_src=str(source_host_info["ipv4"]), ipv4_dst=str(target_host_info["ipv4"])
)
actions = [
    ofp_parser.OFPActionPushMpls(),
    ofp_parser.OFPActionSetField(mpls_label=available_label),
    ofp_parser.OFPActionSetField(mpls_bos=1),
    ofp_parser.OFPActionSetMplsTtl(mpls_ttl=255),
    ofp_parser.OFPActionOutput(port=target_host_info["port"])
]
inst = [ofp_parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS, actions)]
switch_datapath.send_msg(
    ofp_parser.OFPFlowMod(
        datapath=switch_datapath,
        cookie=(1 << 24) | available_label,
        cookie_mask=0,
        table_id=0,
        command=ofp.OFPFC_ADD,
        idle_timeout=0,
        hard_timeout=0,
        priority=ofp.OFP_DEFAULT_PRIORITY,
        buffer_id=ofp.OFP_NO_BUFFER,
        out_port=ofp.OFPP_ANY,
        out_group=ofp.OFPG_ANY,
        flags=ofp.OFPFF_SEND_FLOW_REM | ofp.OFPFF_CHECK_OVERLAP,
        match=match,
        instructions=inst
    )
)

1º -> I push an MPLS label
2º -> Then, I set the MPLSlabel field
3º -> Set the bos field
4º -> Set the TTL field
5º -> Set the output port.

Hope this helps.
« Last Edit: January 05, 2018, 08:18:27 AM by Claymore »

*

Carlos Ferreira

  • Newbie
  • *
  • 12
    • View Profile
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #6 on: January 06, 2018, 03:48:21 AM »
Hello Again.

I have been traying to use VLan's instead, to achieve my objective, but it seems that there are also issues regarding the VLANS.
 
To test the Zodiac Filtering of VLANs, I decided to setup a simple flow, by matching the VLAN ethertype (0x8100) of the packets and redirect them to a different port
It did not work. The packets are not redirected.

Then I tested a different type of flow.
Instead of matching the ethertype with the VLAN type (0x8100), I simply matched the input port and switched the packets to another port. This worked and the packets were switched, where the VLAN tag is still present.

Useful Info:
I noticed that at the console, using the trace debug function, I was able to see the log output, where the Zodiac mechanism, was trying to filter the Ethernet header of the actual packet, inside the VLAN tag, instead of processing first, the VLAN header.

Question:
PS: I have noticed that in the serial port, I'm able to configure an option called ethertype-filter.
What does this option do exactly?

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #7 on: January 07, 2018, 11:13:40 AM »
If you would like to send me an email directly (support@northboundnetworks.com) we can work through what you are doing and make sure it is all OK while I'm doing the current update.

Regards,
Paul

*

Carlos Ferreira

  • Newbie
  • *
  • 12
    • View Profile
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #8 on: January 07, 2018, 11:47:51 AM »
Sure!
What info should I include in the e-mail, in order to speed up the debug process?

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #9 on: January 07, 2018, 12:11:24 PM »
Main thing is how you are generating the traffic so I can reproduce / confirm the issue and verify any fixes.

Regards,
Paul

*

Carlos Ferreira

  • Newbie
  • *
  • 12
    • View Profile
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #10 on: January 09, 2018, 02:01:22 AM »
Paul, I have sent the E-mail.

I'll be waiting for a response. I hope the information is detailed enough for you to reproduce the issue.
If you need anything else, just reply to the e-mail and I will provide with the necessary information.

Thank you for the assistance.

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: MPLS Matching - Zodiac FX not Matching labels
« Reply #11 on: February 03, 2018, 03:04:13 PM »
MPLS issues are now fixed in v0.83 which can be downloaded from HERE

Regards,
Paul