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 EX9200 Switches

 

On EX9200 switches that have the OpenFlow software package installed, you can configure physical interfaces that support multiple logical interfaces as OpenFlow hybrid interfaces. A hybrid interface concurrently supports OpenFlow logical interfaces and non-OpenFlow logical interfaces. A hybrid interface enables OpenFlow and non-OpenFlow traffic to traverse the same physical interface while keeping the traffic in separate VLANs.

Hybrid interfaces enable you to use physical interfaces more efficiently, especially in a situation where having an adequate number of physical interfaces available is important.

This example shows how to configure an OpenFlow hybrid interface on an EX9200 switch.

Requirements

This example uses the following hardware and software components:

  • An EX9200 switch running Junos OS Release 13.3 or a later release.

  • An OpenFlow software package is installed on the switch, and the software package release matches the Junos OS release running on the switch.

  • The switch has a TCP connection to an OpenFlow controller, which needs to access the data plane of the switch.

  • The switch is connected to the management network through the fxp0 interface and is reachable from the controller IP address.

Overview and Topology

In this example, you configure an EX9200 switch with:

  • One hybrid interface, xe-2/1/0

  • One non-hybrid interface, xe-2/1/1, which handles OpenFlow traffic only

  • One non-hybrid interface, xe-2/1/2, which handles non-OpenFlow traffic only

On the hybrid interface, logical interface xe-2/1/0.0 participates in OpenFlow, and logical interfaces xe-2/1/0.1 and xe-2/1/0.2 do not participate in OpenFlow.

When using hybrid interfaces, you use VLAN tagging to distinguish OpenFlow traffic from non-OpenFlow traffic. Thus, you must enable VLAN tagging on all interfaces, and traffic entering the interfaces must be VLAN-tagged. If you do not configure a native VLAN, untagged traffic entering a hybrid interface is dropped. In this example, you configure the hybrid interface by 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 also configure the OpenFlow interface xe-2/1/1 and the non-OpenFlow interface xe-2/1/2 by using vlan-tagging, which enables VLAN tagging and supports only 802.1Q VLAN single-tag frames for all traffic on the interface.

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

All logical interfaces except xe-2/1/0.2 are configured as Layer 2 trunk interfaces by using family ethernet-switching and interface mode trunk. Logical interfaces xe-2/1/0.0 and xe-2/1/1.0 participate in OpenFlow and receive and forward traffic with OpenFlow VLAN IDs 100 through 200. Logical interfaces xe-2/1/0.1 and xe-2/1/2.0 do not participate in OpenFlow and receive and forward traffic with non-OpenFlow VLAN ID 700.

Logical interface xe-2/1/0.2 is a subinterface with the IP address 198.51.100.10/24 and performs Layer 3 routing. This interface does not participate in OpenFlow and routes traffic with VLAN ID 800.

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

Table 1: Summary of Logical Interface Configuration in EX9200 Hybrid Interface Example

Logical Interface

Traffic Type

VLANs

xe-2/1/0.0

OpenFlow

100 through 200

xe-2/1/0.1

Non-OpenFlow

700

xe-2/1/0.2

Non-OpenFlow

800

xe-2/1/1.0

OpenFlow

200

xe-2/1/2.0

Non-OpenFlow

700

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

An EX9200 switch requires a separate routing instance for a virtual switch. This routing instance isolates the OpenFlow traffic from the non-OpenFlow traffic. When using hybrid interfaces, you configure a virtual switch routing instance for the OpenFlow traffic and another virtual switch routing instance for non-OpenFlow traffic. In this example, you configure routing instance OF for the OpenFlow traffic and routing instance NON-OF for the non-OpenFlow traffic.

Routing instance OF includes the interfaces participating in OpenFlow—xe-2/1/0.0 and xe-2/1/1.0. Within this routing instance, you configure a VLAN to include OpenFlow VLANs 100 through 200. Routing instance NON-OF includes the Layer 2 interfaces that do not participate in OpenFlow—xe-2/1/0.1 and xe-2/1/2.0. Within this routing instance, you configure a VLAN to include the non-OpenFlow VLAN 700.

Note

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 the OpenFlow logical interface xe-2/1/0.0 as a Layer 2 trunk that supports VLANs 100 through 200:
  3. Configure the non-OpenFlow logical interface xe-2/1/0.1 as a Layer 2 trunk that supports VLAN 700:
  4. Configure the non-OpenFlow logical interface xe-2/1/0.2 as a Layer 3 subinterface:
  5. On xe-2/1/1, enable VLAN tagging, and configure the logical interface as a Layer 2 trunk that supports VLAN 200:

  6. On xe-2/1/2, enable VLAN tagging, and configure the logical interface as a Layer 2 trunk that supports VLAN 700:

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 virtual switch 100:

Configuring the Virtual Switch Routing Instances

Step-by-Step Procedure

To configure the routing instances:

  1. Configure the routing instance for the OpenFlow traffic.

  2. Configure the routing instance for the non-OpenFlow traffic on Layer 2 interfaces:

  3. Commit the configuration:

Results

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

user@switch> show configuration protocols openflow
user@switch> show configuration routing-instances

Verification

Confirm that the configuration is working properly.

Verifying the OpenFlow Controller Connection

Purpose

Verify that the OpenFlow controller connection is up.

Action

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

user@switch> show openflow controller

Meaning

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

Verifying the OpenFlow Interfaces

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.

user@switch> show openflow interfaces

Meaning

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