Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring OpenFlow Hybrid Interfaces on MX Series Routers

On MX series routers that support OpenFlow, you can configure physical interfaces that support multiple logical interfaces as hybrid interfaces. A hybrid interface concurrently supports both OpenFlow logical interfaces and non-OpenFlow logical interfaces, thus allowing OpenFlow and non-OpenFlow traffic to traverse the same interface.

Hybrid interfaces enable you to use your physical interfaces more efficiently, especially in a situation where port density is an issue.

This example shows how to configure an MX Series router with OpenFlow hybrid interfaces.

Requirements

This example uses the following hardware and software components:

  • MX240 router running Junos OS Release 13.3 or a later release

  • OpenFlow software package with a software package release that matches the Junos OS release of the device on which it is installed

  • TCP connection between the router and an OpenFlow controller

  • Connection between the fxp0 management interface of the router and the management network, which is reachable from the OpenFlow controller IP address

Overview

In this example, you configure an MX240 router with a hybrid interface, ge-1/0/1, an OpenFlow interface, ge-1/0/2, and a non-OpenFlow interface, ge-1/0/3. On the hybrid interface, logical interface ge-1/0/1.0 participates in OpenFlow, and logical interfaces ge-1/0/1.1 and ge-1/0/1.2 do not participate in OpenFlow.

When using OpenFlow hybrid interfaces, you use VLANs to distinguish the OpenFlow traffic from the normal traffic. Thus, you must enable VLAN tagging on all interfaces, and traffic entering the interfaces must be vlan-tagged. Untagged traffic entering the hybrid interface is dropped. In this example, you configure the hybrid interface using flexible-vlan-tagging, which enables VLAN tagging and supports both 802.1Q VLAN single-tag and dual-tag frames for all traffic on the interface. You configure interfaces ge-1/0/2 and ge-1/0/3 using vlan-tagging.

You configure the hybrid interface encapsulation as flexible Ethernet services. Note that for interfaces with this encapsulation, all VLAN IDs are valid. VLAN IDs from 1 through 511 are no longer reserved for normal VLANs. In this example, VLANs 1 through 100 are used for OpenFlow traffic, and VLANs 101 through 200 and VLAN 300 are used for normal traffic.

All logical interfaces except ge-1/0/1.2 are configured as Layer 2 trunk interfaces using family bridge and interface mode trunk. Logical interfaces ge-1/0/1.0 and ge-1/0/2.0 participate in OpenFlow and receive and forward traffic with OpenFlow VLAN IDs 1 through 100. Logical interfaces ge-1/0/1.1 and ge-1/0/3.0 do not participate in OpenFlow and receive and forward traffic with non-OpenFlow VLAN IDs 101 through 200.

ge-1/0/1.2 is a Layer 3 logical interface with IP address 198.51.100.10/24 that performs Layer 3 routing. This interface does not participate in OpenFlow and routes traffic with VLAN ID 300.

Table 1 summarizes the logical interfaces, traffic type, and associated VLAN IDs.

Table 1: Summary of Logical Interfaces

Logical Interface

Traffic Type

VLANs

ge-1/0/1.0

OpenFlow

1 through 100

ge-1/0/1.1

non-OpenFlow

101 through 200

ge-1/0/1.2

non-OpenFlow

300

ge-1/0/2.0

OpenFlow

1 through 100

ge-1/0/3.0

non-OpenFlow

101 through 200

You configure the OpenFlow virtual switch and OpenFlow protocol statements at the [edit protocols openflow] hierarchy level. The virtual switch, OFswitch2, connects to the controller over a TCP connection at IP address 172.16.1.1. The virtual switch configuration must include all of the logical interfaces participating in OpenFlow, which includes ge-1/0/1.0 and ge-1/0/2.0.

When configuring OpenFlow on MX Series routers, you must configure a virtual switch routing instance for the OpenFlow traffic that isolates it from the normal network traffic. Additionally, when using hybrid interfaces, you configure both a virtual switch routing instance for the OpenFlow traffic and also a separate virtual switch routing instance for the normal traffic. In this example, you configure routing instance rt1 for the OpenFlow traffic and routing instance rt2 for the normal traffic.

Routing instance rt1 includes the interfaces participating in OpenFlow, ge-1/0/1.0 and ge-1/0/2.0. Within the routing instance you configure the bridge domain to include all OpenFlow VLANs 1 through 100. Routing instance rt2 includes the Layer 2 interfaces that do not participate in OpenFlow, ge-1/0/1.1 and ge-1/0/3.0. Within the routing instance you configure the bridge domain to include the non-OpenFlow VLANs 101 through 200.

Note:

In order to direct OpenFlow traffic, the OpenFlow controller must install flow entries that select the appropriate traffic and forward it to the correct OpenFlow interface.

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Configuring the Interfaces

Step-by-Step Procedure

To configure the interfaces:

  1. On the hybrid physical interface, enable VLAN tagging and configure the encapsulation.

  2. Configure OpenFlow logical interface ge-1/0/1.0 as a Layer 2 trunk that supports VLANs 1-100.

  3. Configure non-OpenFlow logical interface ge-1/0/1.1 as a Layer 2 trunk that supports VLANs 101-200.

  4. Configure non-OpenFlow logical interface ge-1/0/1.2 as a Layer 3 subinterface.

  5. On ge-1/0/2, enable VLAN tagging, and configure the logical interface as a Layer 2 trunk that supports VLANs 1-100.

  6. On ge-1/0/3, enable VLAN tagging, and configure the logical interface as a Layer 2 trunk that supports VLANs 101-200:

Configuring OpenFlow

Step-by-Step Procedure

To configure OpenFlow:

  1. Configure the OpenFlow controller IP address and the connection protocol.

  2. Specify the logical interfaces participating in OpenFlow under this virtual switch instance.

Configuring the Virtual Switch Routing Instances

Step-by-Step Procedure

To configure the virtual switch routing instances:

  1. Configure the virtual switch routing instance for the OpenFlow traffic.

  2. Configure the virtual switch routing instance for the non-OpenFlow traffic.

  3. Commit the configuration.

Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols openflow, and show routing-instances commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct the configuration.

Verification

Confirm that the configuration is working properly.

Verifying that the OpenFlow Controller Connection is Up

Purpose

Verify that the OpenFlow controller connection is up.

Action

Issue the show openflow controller operational mode command, and verify that the controller connection state is up. Because the virtual switch configuration has only a single controller, the virtual switch should automatically initiate a connection to the controller after you commit the configuration.

Meaning

The output shows that the connection state of the OpenFlow controller is up, in addition to other information about the controller.

Verifying that the OpenFlow Interfaces Are Up

Purpose

Verify that the OpenFlow interfaces are up.

Action

Issue the show openflow interfaces operational mode command, and verify that the state of each OpenFlow interface is Up.

Meaning

The output shows that the state of each OpenFlow interface is Up, in addition to other information about the interfaces.