OpenFlowMPLS Control Plane

From OpenFlow Wiki

Jump to: navigation, search

This page is no longer maintained. For up to date information on the OpenFlow MPLS Extension, please visit the main page and the pages linked from there: OpenFlowMPLS.

Contents

Overview

There are many possible directions we could take to manage the control plane for our project. For example we could provide a controller that could interoperate with an existing MPLS networks by supporting various LDP (Label Distribution Protocol) protocols and exchange LDP messages on behalf of the switches it controls. At present we have chosen to provide a simple controller that can configure an OpenFlow switch to reflect the forwarding state of an MPLS-switch that has been statically specified in a file.


Simple MPLS Controller


A simple abstract representation of the controller is shown above. The controller runs a logical MPLS switch for every MPLS-enabled OpenFlow switch it controls. This logical switch instance has its forwarding information populated from an externally supplied file. The controller determines the switch's capabilities during the initial handshake phase. The controller then uses the capabilities of the switch to determine how to translate the switch's forwarding information (FIB) into OpenFlow messages.

MPLS FIB

The format of the forwarding information of an MPLS switch is dependant on the implementation but the FIB includes two tables:

  • FTN (FEC To NHLFE) Table:
    • Used for unlabeled packets
    • Maps FECs (Forwarding Equivalence Class) to NHLFE entries
    • We define the FEC to match the original OpenFlow 10 tuple
  • ILM (Incoming Label Map) Table:
    • Used for labeled packets
    • Maps labels for incoming packets to NHLFE entries

NHLFE (Next Hop Label Forwarding Entry):

  • Specifies the action the switch should take
  • E.g. push a label, pop label stack, etc

XML FIB File

As mentioned above, the MPLS forwarding information is specified in a simple XML file. We presently dont have a DTD or a XSD for this file but an example is shown below:

  <?xml version="1.0"?>
  <mpls:MPLS_FIB xmlns:mpls="mpls">
        <!-- Define one FEC to NHFLE Table -->
        <mpls:FTN_Table>

                <!-- Define as many FTN Table entires as you want -->
		<mpls:FTN>
			<!-- FEC is defined to be the OpenFlow 10 tuple-->
			<!-- omitting a field will result in it being wildcarded -->
			<mpls:in_port>0</mpls:in_port>
			<mpls:dl_src>00:1a:4b:53:f7:2c</mpls:dl_src>
			<mpls:dl_dst>00:1a:4b:53:f7:2c</mpls:dl_dst>
			<mpls:dl_vlan>0</mpls:dl_vlan>
			<mpls:dl_type>2048</mpls:dl_type>
			<mpls:nw_proto>17</mpls:nw_proto>
			<!-- IP addresses specified in standard dotted decimal notation -->
			<mpls:nw_src>10.0.0.2/30</mpls:nw_src>
			<mpls:nw_dst>10.0.0.1</mpls:nw_dst>
			<mpls:tp_src>3840</mpls:tp_src>
			<mpls:tp_dst>3840</mpls:tp_dst>

			<mpls:NHLFE>
				<!-- Currently each NHLFE entry can have one action -->
				<!-- MPLS push action -->
				<mpls:push>
					<!-- send packet out this port -->
					<mpls:out_port>1</mpls:out_port>
					<!-- rewrite the src & dst MAC addresses -->
					<mpls:src_mac>11:22:33:00:00:00</mpls:src_mac>
					<mpls:dst_mac>66:77:88:00:00:01</mpls:dst_mac>
					<!-- push this MPLS label -->
					<mpls:mpls_label>768</mpls:mpls_label>
				</mpls:push>
			</mpls:NHLFE>
		</mpls:FTN>

	</mpls:FTN_Table>

	<!-- Define one Incoming Label Map Table -->
	<mpls:ILM_Table>

		<!-- Define as many ILM Table entries as you like -->
		<mpls:ILM>
			<mpls:in_port>0</mpls:in_port>
			<mpls:mpls_label>256</mpls:mpls_label>

			<mpls:NHLFE>
				<mpls:pop>
					<mpls:out_port>2</mpls:out_port>
					<mpls:src_mac>11:22:33:00:00:00</mpls:src_mac>
					<mpls:dst_mac>66:77:88:00:00:02</mpls:dst_mac>
				</mpls:pop>
			</mpls:NHLFE>

		</mpls:ILM>

		<mpls:ILM>
			<mpls:in_port>1</mpls:in_port>
			<mpls:mpls_label>512</mpls:mpls_label>

			<mpls:NHLFE>
				<!-- MPLS swap action -->
				<mpls:swap>
					<mpls:mpls_label>768</mpls:mpls_label>
					<mpls:out_port>1</mpls:out_port>
					<mpls:src_mac>11:22:33:00:00:01</mpls:src_mac>
					<mpls:dst_mac>66:77:88:00:00:01</mpls:dst_mac>
				</mpls:swap>
			</mpls:NHLFE>

		</mpls:ILM>

	</mpls:ILM_Table>
  </mpls:MPLS_FIB>

Limitations

  • Currently for each switch the controller simply reads the MPLS FIB file, sends the OpenFlow messages to configure the switch appropriately and then sits idle. While the controller has the logic to remove and query statistics for the flow table and virtual port table entries that it installs, this is not currently being used.
  • The OpenFlow-MPLS controller currently does not support usage scenarios involving matching on multiple labels. While the datapath supports matching on 2 labels in all of our implementations, it isn't clear how this would be represented in the FIB. In scenarios that involve matching on more than one label, real MPLS switches perform multiple lookups but our OpenFlow switches match on up to 2 labels at once. This means the controller may have to merge the forwarding information from more than one FIB entry into a Flow table entry and we currently do not support this.
  • Currently only one NHLFE entry can be specified per FTN or ILM entry.

Overview of Source Files

The source for the controller can be found under downloads. Note that this code requires the libxml2 library. The code is commented heavily with all the changes to existing files encapsulated in comment blocks that start with // MAH: start and end with // MAH: end. The following provides an overview of the files that have been added/modified for the simple MPLS controller.

  • controller/controller.c
    The simple controller has been modified. If the pre-compiler macro MPLS_CONTROLLER is defined, then the controller will instantiate an mpls_switch instance rather than the default l_switch (Ethernet learning switch) instance for each new OpenFlow switch.
  • lib/freelist.{c,h}
    A freelist data structure used by the controller to manage the virtual port space for a switch.
  • lib/mpls-fib.{c,h}
    Defines the data structures for the MPLS forwarding information as well as the functionality to translate this information into OpenFlow messages.
  • lib/mpls-switch.{c,h}
    Effectively a stripped down version of learning-switch.{c,h}, this defines is a logical representation for an MPLS switch that the controller instantiates to manage an MPLS-enabled OpenFlow switch.
  • lib/read-mpls.{c,h}
    Reads the MPLS forwarding information (FIB) from an XML file using the libxml2 library.
  • lib/vconn-mpls.{c,h}
    Defines functions to add or remove flow table and virtual port table entries needed to configure an MPLS-enabled OpenFlow switch.
  • controller/example_mpls_fib.xml
    Is an example MPLS FIB file as described above.



--Mart Haitjema 22:59, 25 August 2009 (UTC)