Identity and Policy Control
Network Edge Services
Network Management
Network Operating System
Packet Optical
Register New Product
Serial Number Entitlement
Search Contracts/Products
Order Status
Support >
Technical Documentation >
QFX Series > Example: Enabling OpenFlow on QFX5100 Switches
Rate and give feedback:
Feedback Received. Thank You!
DynamicBook 0
Select All
Add Topics To DynamicBook
EX Series
Understanding Support for OpenFlow on Devices Running Junos OS
Installing Support for OpenFlow on Devices Running Junos OS
OpenFlow Operational Mode Commands
openflow (Protocols OpenFlow)
[edit protocols openflow] Hierarchy Level
MX Series
Understanding Support for OpenFlow on Devices Running Junos OS
Installing Support for OpenFlow on Devices Running Junos OS
OpenFlow Operational Mode Commands
openflow (Protocols OpenFlow)
[edit protocols openflow] Hierarchy Level
QFX Series standalone switches
Understanding Support for OpenFlow on Devices Running Junos OS
Installing Support for OpenFlow on Devices Running Junos OS
Configuring Support for OpenFlow on QFX5100 Switches
OpenFlow Operational Mode Commands
openflow (Protocols OpenFlow)
[edit protocols openflow] Hierarchy Level
Example: Enabling OpenFlow on QFX5100 Switches
OpenFlow is an open standard that enables you to control traffic paths in a network by creating, deleting, and modifying flows in each device along a path. This example shows how to configure OpenFlow support on a QFX5100 switch.
To isolate and control OpenFlow traffic on a QFX5100 switch, you configure a virtual switch. You also configure a Secure Sockets Layer (SSL) or TCP/IP connection between the virtual switch and a remote OpenFlow controller. Using this connection, the OpenFlow controller can access the flows in the virtual switch.
Requirements
Overview
Configuration
Verification
Requirements
This example uses the following hardware and software components:
A QFX5100 switch running Junos OS Release 14.1X53-D10 or later.
An OpenFlow software package is installed on the switch, and the release of this package matches the Junos OS release running on the switch.
A TCP connection between the switch and an OpenFlow controller.
A connection between the management interface (em0 or em1) of the switch and the management network.
Overview
In this example, you configure support for OpenFlow on a QFX5100 switch. The switch has three interfaces that are dedicated to handling OpenFlow traffic: xe-0/0/10.0, xe-0/0/11.0, and xe-0/0/12.0. Note that on QFX5100 switches, you can configure only a single logical interface, using logical unit number 0 for each OpenFlow interface.
In an OpenFlow topology, a virtual switch is used to isolate and control OpenFlow traffic. You configure the OpenFlow virtual switch and OpenFlow protocol statements at the [edit protocols openflow] hierarchy level.
Virtual switch 100 also connects to an OpenFlow controller over a TCP connection at the IP address 10.51.100.174. The virtual switch configuration must include all of the logical interfaces participating in OpenFlow; OpenFlow traffic enters and exits only through these interfaces.
A flow entry consists of a match condition against which packets entering an OpenFlow interface are compared, and the action that is applied to packets that match the condition. Each OpenFlow interface can have one or more flow entries. The default-action statement in the OpenFlow configuration indicates the action the switch applies to packets that do not have a matching flow entry. This example uses the drop option, which specifies that packets that do not match a flow entry are dropped.
This example also configures OpenFlow traceoptions, along with the flag all statement, which captures and logs all OpenFlow events. This example does not configure a specific filename for the log file. As a result, OpenFlow events are logged in the default OpenFlow log directory /var/log/ofd.
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.
set interfaces xe-0/0/10 unit 0 family ethernet-switching
set interfaces xe-0/0/11 unit 0 family ethernet-switching
set interfaces xe-0/0/12 unit 0 family ethernet-switching
set protocols openflow switch 100 controller address 10.51.100.174
set protocols openflow switch 100 controller protocol tcp
set protocols openflow switch 100 interfaces xe-0/0/10.0
set protocols openflow switch 100 interfaces xe-0/0/11.0
set protocols openflow switch 100 interfaces xe-0/0/12.0
set protocols openflow switch 100 default-action drop
set protocols openflow traceoptions flag all
Step-by-Step Procedure
To configure support for OpenFlow:
Configure the OpenFlow interfaces as Layer 2 interfaces.
[edit interfaces]
user@switch# set xe-0/0/10 unit 0 family ethernet-switching
user@switch# set xe-0/0/11 unit 0 family ethernet-switching
user@switch# set xe-0/0/12 unit 0 family ethernet-switching
Configure an OpenFlow virtual switch named 100.
[edit protocols openflow]
user@switch# set switch 100
Configure the OpenFlow controller IP address and the connection protocol.
[edit protocols openflow switch 100]
user@switch# set controller address 10.51.100.174
user@switch# set controller protocol tcp
Configure the logical interfaces in this virtual switch that participate in OpenFlow.
[edit protocols openflow switch 100]
user@switch# set interfaces xe-0/0/10.0
user@switch# set interfaces xe-0/0/11.0
user@switch# set interfaces xe-0/0/12.0
Configure the default action for packets that do not have a matching flow entry.
[edit protocols openflow switch 100]
user@switch# set default-action drop
[edit protocols openflow]
user@switch# set traceoptions flag all
Results
From operational mode, confirm your configuration by entering the show configuration interfacesand show configuration protocols openflow commands.
user@switch> show configuration interfaces
xe-0/0/10 {
unit 0 {family ethernet-switching;}
xe-0/0/11 {
unit 0 {family ethernet-switching;}
xe-0/0/12 {
unit 0 {family ethernet-switching;}
user@switch> show configuration protocols openflow
switch 100 {
default-action {
drop;
interfaces {
xe-0/0/10.0;
xe-0/0/11.0;
xe-0/0/12.0;
controller {
protocol {
tcp {
address 10.51.100.174;
traceoptions {
flag all;
Verification
Confirm that the configuration is working properly.
Verifying That the OpenFlow Controller Connection Is Up
Verifying that the OpenFlow Interfaces Are Up
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 automatically initiates a connection to the controller after you commit the configuration.
user@switch> show openflow controller
Openflowd controller information:
Controller socket: 12
Controller IP address: 10.51.100.174
Controller protocol: tcp
Controller port: 6633
Controller connection state: up
Number of connection attempt: 4
Controller role: equal
Negotiated version: 4
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.
user@switch> show openflow interfaces
Switch name: 100
Interface Name: xe-0/0/10.0
Interface port number: 41507
Interface Hardware Address: 00:00:5e:00:53:00
Interface speed: 10Gb Full-duplex
Interface Auto-Negotiation: Disabled
Interface media type: Fiber
Interface state: Up
Switch name: 100
Interface Name: xe-0/0/11.0
Interface port number: 44538
Interface Hardware Address: 00:00:5e:00:53:01
Interface speed: 10Gb Full-duplex
Interface Auto-Negotiation: Disabled
Interface media type: Fiber
Interface state: Up
Switch name: 100
Interface Name: xe-0/0/12.0
Interface port number: 45549
Interface Hardware Address: 00:00:5e:00:53:02
Interface speed: 10Gb Full-duplex
Interface Auto-Negotiation: Disabled
Interface media type: Fiber
Interface state: Up
Meaning
The output shows that the state of each OpenFlow interface is Up, in addition to other information about the interfaces.
EX Series
Understanding Support for OpenFlow on Devices Running Junos OS
Installing Support for OpenFlow on Devices Running Junos OS
OpenFlow Operational Mode Commands
openflow (Protocols OpenFlow)
[edit protocols openflow] Hierarchy Level
MX Series
Understanding Support for OpenFlow on Devices Running Junos OS
Installing Support for OpenFlow on Devices Running Junos OS
OpenFlow Operational Mode Commands
openflow (Protocols OpenFlow)
[edit protocols openflow] Hierarchy Level
QFX Series standalone switches
Understanding Support for OpenFlow on Devices Running Junos OS
Installing Support for OpenFlow on Devices Running Junos OS
Configuring Support for OpenFlow on QFX5100 Switches
OpenFlow Operational Mode Commands
openflow (Protocols OpenFlow)
[edit protocols openflow] Hierarchy Level
Published: 2014-10-13
Country SelectorUnited StatesDeutschland - GermanyFranceUnited Kingdom中国 - China日本 - Japan대한민국 - Korea