To activate an
application installed in a virtual services container, use the
activate
command in virtual services configuration mode. To deactivate the application,
use the
no form of
this command.
activate
noactivate
Syntax Description
This command has
no arguments or keywords.
Command Default
The application
installed in the virtual services container is not activated.
Command Modes
Virtual services configuration (config-virt-serv)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Release 1.0
This
command was introduced.
Examples
The following
example shows how an application installed in a virtual services container is
activated .
Device# virtual-service install name openflow_agent package bootflash:/ofa-1.0.0-n3000-SPA-k9.ova
Note: Installing package 'bootflash:/ofa-1.0.0-n3000-SPA-k9.ova' for virtual service 'openflow_agent'. Once the install has finished, the VM may be activated. Use 'show virtual-service list' for progress.
Device# 2013 Mar 8 20:35:23 n3k-202-194-2 %$ VDC-1 %$ %VMAN-2-INSTALL_STATE: Successfully installed virtual service 'openflow_agent'
Device# configure terminal
Device(config)# virtual-service openflow_agent
Device(config-virt-serv)# activate
Installs an application on the virtual services container of a device.
controller
To configure a
controller for a
Cisco Plug-in for OpenFlow logical switch, use the
controller
command in logical switch configuration mode. To remove the controller
definitions for the logical switch, use the
no form of
this command.
(Optional)
Specifies the port through which the device must connect to the controller.
The
default value is 6533.
vrfvrf-name
(Optional)
Specifies the virtual routing and forwarding (VRF) instance defined for the
controller.
The
default value is default.
security none
(Optional) Disables Transport Layer Security (TLS) for the
controller connection.
security tls
(Optional) Enables Transport Layer Security (TLS) for the
controller connection.
Command Default
No controllers are
defined for
Cisco Plug-in for OpenFlow. If the
security
none keyword is not used, TLS has to be configured using the
security
tls command.
Command Modes
Logical switch configuration (config-ofa-switch)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Release 1.0
This
command was introduced.
Cisco Plug-in for OpenFlow Release 1.1
This
command was modified. The
no-tls
keyword was added.
Examples
The following
example shows how the
controller
command is used to configure a controller for an
Cisco Plug-in for OpenFlowt logical switch.
Displays the match and action capabilities of a device.
hardware profile
openflow
To enable support
and allocates resources for
Cisco Plug-in for OpenFlow VLAN tagging actions on the device
hardware, use the
hardware profile openflow
command in global configuration mode. To disable VLAN
tagging actions, use the
no form of
this command.
hardware profile openflow
no hardware profile openflow
Syntax Description
This command has
no keywords or arguments.
Command Default
VLAN tagging actions for Cisco Plug-in for OpenFlow are disabled.
Command Modes
Global configuration (config)
Command History
Release
Modification
6.0(2)U1(1)
This
command was introduced.
Usage Guidelines
The
hardware profile openflow
command must be entered before an application is
installed on the virtual services container of a device.
Installs an application on the virtual services container of a device.
of-port interface
(OpenFlow)
To configure an
interface as a port of an
Cisco Plug-in for OpenFlow logical switch, use the
of-port
interface command in logical switch configuration mode. To remove
port configurations for an interface on an
Cisco Plug-in for OpenFlow logical switch, use the
no form of
this command.
of-portinterfaceinterface-name
noof-portinterfaceinterface-name
Syntax Description
interface-name
Name of
interface to be configured.
Command Default
No ports are
configured for the
Cisco Plug-in for OpenFlow logical switch.
Command Modes
Logical switch configuration (config-ofa-switch)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Release 1.0
This
command was introduced.
Usage Guidelines
Do not
abbreviate the interface type. Ensure that interface types used are spelled out
clearly and typed in lowercase, as shown in the examples. For example,
ethernet
and
port-channel. If the keyword is abbreviated or not
in lowercase, the interface is not configured. Ensure that the interface name
does not have a space between the interface type and number.
The Ethernet
interface configured can be a member interface of a port channel.
You must configure an interface as a port of
Cisco Plug-in for OpenFlow
only when
Cisco Plug-in for OpenFlow
is active and running. When an interface is configured as a port of
Cisco Plug-in for OpenFlow,
the
mode openflow configuration is added to the
interface. This configuration is removed when the
no form of
of-port interface is used only if the
Cisco Plug-in for OpenFlow
is running and active.
Examples
The following
example shows how the
interface
command is used to configure an interface to be a port of an
Cisco Plug-in for OpenFlow logical switch.
Configures Cisco Plug-in for OpenFlow logical switch used for Layer 2 switching and enter logical switch configuration mode
max-backoff
To configure the
maximum TCP triggered backoff interval for which
Cisco Plug-in for OpenFlow can wait before retrying a
connection to the controller, use the
max-backoff
command in logical switch configuration mode. To restore the default backoff
interval, use the
no form of
this command.
max-backoffbackoff-timer
nomax-backoffbackoff-timer
Syntax Description
backoff-timer
Interval,
in seconds, for which a device can wait before retrying a connection to the
controller.
Range is from 1 to 65535.
Default value is 8 seconds.
Command Default
A maximum backoff
of 8 seconds is configured.
Command Modes
Logical switch configuration (config-ofa-switch)
Command History
Release
Modification
Cisco Plug-in for OpenFlow 1.1
This
command was introduced.
Examples
The following
example shows how the
max-backoff
command is used to configure a controller for an OpenFlow Agent logical switch.
To configure
Cisco Plug-in for OpenFlow
and enter
Cisco Plug-in for OpenFlow
Release configuration mode, use the
openflow
command in global configuration mode. To remove all configurations made forCisco Plug-in for OpenFlow
and exit
Cisco Plug-in for OpenFlow
Release configuration mode, use the
no form of
this command.
openflow
no openflow
Command Default
The
Cisco Plug-in for OpenFlow
is not configured.
Command Modes
Global configuration (config)
Command History
Release
Modification
Cisco Plug-in for OpenFlow
Release 1.0
This
command was introduced.
Examples
The following
example shows how the
openflow
command is used to configure the
Cisco Plug-in for OpenFlow.
Configures the rate at which packets are sent to a controller by Cisco Plug-in for OpenFlow logical switch.
pipeline
To configure a
pipeline for a
Cisco Plug-in for OpenFlow logical switch, use the
pipeline
command in logical switch configuration mode. To remove the pipeline
configurations, use the
no form of
this command.
pipelinepipeline-id
nopipeline
Syntax Description
pipeline-id
Configures
pipeline number. This value must be taken from the output of the
show openflow hardware
capabilities
Command Default
A pipeline is not
configured.
Command Modes
Logical switch configuration (config-ofa-switch)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Release 1.1
This
command was introduced.
Usage Guidelines
This command
specifies the forwarding table used by
Cisco Plug-in for OpenFlow logical switch. You can use the
show openflow hardware capabilities command
to view supported pipelines for a device.
Examples
The following
example shows how to configure a pipeline for an
Cisco Plug-in for OpenFlow logical switch for a Nexus 3000
Series device.
Device(config)# openflow
Device(config-ofa)# switch 1
! Specifies the pipeline that enables the L3 ACL Forwarding Table.
Device(config-ofa)# pipeline 201
Displays the match and action capabilities of a device.
probe-interval
To configure an
interval that
Cisco Plug-in for OpenFlow logical switch waits before
sending a probe to query an idle connection to controller, use the
probe-interval command in logical switch
configuration mode. To restore the default probe interval, use the
no form of
this command.
probe-intervalprobe-interval
noprobe-intervalprobe-interval
Syntax Description
probe-interval
Interval,
in seconds, at which an idle controller connection is probed.
Default value is 5 seconds.
Range is from 5 to 65535.
Command Default
The idle
controller connection is probed every 5 seconds.
Command Modes
Logical switch configuration (config-ofa-switch)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Release 1.1
This
command was introduced.
Examples
The following
example shows how the
probe-interval command is used to configure a
probe interval for an idle controller connection.
To configure the
rate at which packets are sent to the controller by
Cisco Plug-in for OpenFlow logical switch, use the
rate-limit
command in the logical switch configuration mode. To remove the rate limit
configurations, use the
no form of
this command.
To display
copyright and open-source information related to
Cisco Plug-in for OpenFlow,
use the
show openflow copyright
command in privileged EXEC mode.
showopenflowcopyright
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
Cisco Plug-in for OpenFlow
Version 1.0
This
command was introduced.
Examples
The following is
sample output of the
show openflow
copyright command:
Device# show openflow copyright
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2013, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
(Optional)
Name of the interface. See Usage Guidelines for more details.
switch-id
(Optional)
Unique switch identifier.
1 is the
only permitted value.
Command Default
Displays a list of
all interfaces associated with the
Cisco Plug-in for OpenFlow logical switch.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Version 1.0
This
command was introduced.
Usage Guidelines
Do not abbreviate
the interface. Ensure that the
ethernet or
port-channel keywords are spelled out completely
and are typed in lowercase. For example,
ethernet1/1
or
port-channel2. If the keyword is abbreviated or
not in lowercase, the interface is not configured.
Only interfaces
specified by the
interface
(OpenFlow) command can display an output.
Examples
The following is
sample output of the
show openflow
interface command:
Controllers connected to this device, port number used, protocol
used for between the controller and the device, and the VRF on which the
controller is defined.
Interfaces:
List of
interfaces defined for the device.
show openflow
switch controller
To display
information about controllers connected to an
Cisco Plug-in for OpenFlow switch, use the
show openflow switch
controller command in privileged EXEC mode.
Configures Cisco Plug-in for OpenFlow logical switch used for Layer 2 switching and enter logical switch configuration mode
show openflow
switch flows
To display a list
of flows defined for
Cisco Plug-in for OpenFlow logical switch and related
information, use the
show openflow switch
flows command in privileged EXEC mode.
(Optional)
Cisco Plug-in for OpenFlow logical switch identifier.
configured
(Optional) Displays information related to configured flows.
controller
(Optional) Displays flow information related to controllers.
default
(Optional) Displays default information related to flows.
fixed
(Optional) Displays information related to fixed flows.
fixed
(Optional) Displays information related to fixed flows.
pending
(Optional) Displays information related to pending flows.
pending-del
(Optional)
Displays brief information related to flows pending deletion.
summary
(Optional)
Displays a summary of information related to flows.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Version 1.0
This
command was introduced.
Usage Guidelines
The flows
displayed are configured by the controller that is connected to
Cisco Plug-in for OpenFlow logical switch on the device.
Examples
The following is
sample output of the
show openflow switch 1
flows
command:
Device# show openflow switch 1 flows
Logical Switch Id: 1
Total flows: 1
1
Rule: ip,dl_vlan=99
Actions: strip_vlan,output:1
Priority: 0x8000
Table: 0
Cookie: 0x466c6f7732
Duration: 176.383s
Number of packets: 0
Number of bytes: 0
Device# show openflow switch 1 flows
Total flows: 2
Flow: 1
Rule: ip,dl_vlan=99
Actions: strip_vlan,output:1
Priority: 0x8000
Table: 0
Cookie: 0x466c6f7732
Duration: 96.359s
Number of packets: 0
Number of bytes: 0
Flow: 2
Rule: ip,in_port=2,dl_vlan=50
Actions: output:1
Priority: 0x8000
Table: 0
Cookie: 0x1
Duration: 95.504s
Number of packets: 0
Number of bytes:
Table 3 show openflow
switch flows Field Descriptions
Field
Descriptions
Rule
List of
rules defined for the flow. This is related to the match capabilities of the
device. The possible rules are listed below:
dl_vlan=vlan-id—Packet has the given VLAN ID.
in_port—Packet has arrived on the given input port.
ip—Packet uses the IP protocol.
nw_dst—Packet is destined for a given destination address
prefix.
nw_src—Packet is from a given source address prefix.
nw_tos—Packet has the given IP ToS bits set.
tp_dst—Packet is destined for the given TCP/UDP destination
port.
tp_src—Packet is from for the given TCP/UDP source port.
Actions
List of
actions to be defined if a packet matches the flow (abides by the rules defined
in the flow). The possible actions are:
drop—Drop.
mod_vlan_vid—Rewrite VLAN ID.
output:number—Output to one or more physical ports.
output:6533—Output to the controller.
strip_vlan—Strip the VLAN ID.
mod_dl_src—Modify the source MAC address.
mod_dl_dst—Modify the destination MAC address.
If
multiple actions are associated with a flow, they are processed in the order
specified. The output action should be the last action in the action list. Any
action after the output action is not supported.
Priority
Priority
of the flow.
Table
Table
number.
Cookies
Cookies
defined for the flow.
Duration
Duration,
in seconds, for which the flow was executed.
Configures Cisco Plug-in for OpenFlow logical switch used for Layer 2 switching and enter logical switch configuration mode
show openflow
switch ports
To display the
mapping between the
Cisco Plug-in for OpenFlow
logical switch ports and the device’s physical interfaces, use the
show openflow switch
ports command in privileged EXEC mode.
showopenflowswitch
[ switch-id
[ ports ] ]
Syntax Description
switch-id
(Optional)
Cisco Plug-in for OpenFlow
logical switch identifier.
ports
(Optional)
Displays send and receive statistics for each port defined for an
Cisco Plug-in for OpenFlow
logical switch.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
Cisco Plug-in for OpenFlow
Version 1.0
This
command was introduced.
Examples
The following is
sample output of the
show openflow switch 1
ports command:
Configures Cisco Plug-in for OpenFlow logical switch used for Layer 2 switching and enter logical switch configuration mode
show openflow
switch stats
To display send
and receive statistics for each port defined for the
Cisco Plug-in for OpenFlow logical switch, use the
show openflow switch
stats command in privileged EXEC mode.
showopenflowswitchswitch-idstats
Syntax Description
switch-id
(Optional)
Cisco Plug-in for OpenFlow logical switch identifier.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Version 1.0
This
command was introduced.
Examples
The following is
sample output of the
show openflow switch 1
stats command:
Device# show openflow switch 1 stats
Logical Switch Id: 1
Total ports 9
Port 4: rx pkts=8570, bytes=2459590, drop=0, errs=0,
tx pkts=8585, bytes=2461949, drop=0, errs=0,
Port 2: rx pkts=0, bytes=0, drop=0, errs=0,
tx pkts=0, bytes=0, drop=0, errs=0,
Total tables 1
Table 0: classifier
Wildcards = 0x3fffff
Max entries = 1000000
Active entries = 0
Number of lookups = 0
Number of matches = 0
The following is
sample output of the
show openflow switch 1
stats command:
Device# show openflow switch 1 stats
Logical Switch Id: 1
Total ports: 1
Port 4: rx pkts=8570, bytes=2459590, drop=0, errs=0,
tx pkts=8585, bytes=2461949, drop=0, errs=0,
Port 2: rx pkts=0, bytes=0, drop=0, errs=0,
tx pkts=0, bytes=0, drop=0, errs=0,
Total tables: 1
Table 0: classifier
Wildcards = 0x3fffff
Max entries = 1500
Active entries = 0
Number of lookups = 0
Number of matches = 0
Table 5 Field
Description table for show openflow openflow_agent switch 1 stats
Field
Descriptions
Logical
Switch Id: 1
Indicates
the unique switch identifier.
Total
ports: 1
Indicates
the total number of ports defined for the switch.
Port: N
Indicates
the port number.
rx pkts=0,
bytes=0, errs=0
Indicates
the number of packets and bytes received by the port and the number of errors
generated while receiving data.
tx pkts=0,
bytes=376480
Indicates
number of packets and bytes sent by the port.
Total
tables
Indicates
the total number of tables defined for the device on the controller.
Table 0:
classifier
Indicates
the name of the table.
Wildcards
Indicates
the wildcard character.
Max
entries
Indicates
the maximum number of flow
entries defined in the table.
Active
entries
Indicates
the number of active flow entries in the table.
Number of
lookups
Indicates
the number of table lookups that have occurred.
Number of
matches
Indicates
the number of matches that have occurred for the flow entries in the table.
Configures Cisco Plug-in for OpenFlow logical switch used for Layer 2 switching and enter logical switch configuration mode
show openflow
hardware capabilities
To display the
match and action capabilities of a device, use the
show openflow hardware
capabilities command in privileged EXEC mode.
showopenflowhardwarecapabilities
Syntax Description
This command has
no arguments or keywords.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Release 1.0
This
command was introduced.
Usage Guidelines
This command
displays the list of match and action capabilities supported on this device.
The controller connected to this device can define flows using this match
criteria and can associate actions to be executed when packets match the flow
criteria. The match and action criteria supported for various devices are given
below.
Examples
The following is
sample output for the
show openflow hardware
capabilities command.
The following is
sample output for Nexus 3000 Series device.
Device# show openflow hardware capabilities
Pipeline ID: 201
Flow table ID: 0
Match Capabilities Match Types
------------------ -----------
ethernet type mandatory
VLAN ID optional
VLAN priority code point optional
IP DSCP optional
IP protocol optional
IPv4 source address lengthmask
IPv4 destination address lengthmask
source port optional
destination port optional
in port (virtual or physical) optional
Actions:
output to: specified interface, use normal forwading, controller
set: set eth source mac, set eth destination mac, set vlan id
pop: pop vlan tag
other actions: drop packet
Pipeline ID: 202
Flow table ID: 0
Match Capabilities Match Types
------------------ -----------
ethernet type mandatory
VLAN ID optional
VLAN priority code point optional
IP DSCP optional
IP protocol optional
IPv4 source address lengthmask
IPv4 destination address lengthmask
source port optional
destination port optional
in port (virtual or physical) optional
Actions:
output to: specified interface, use normal forwading, controller
set: set eth source mac, set eth destination mac, set vlan id
pop: pop vlan tag
other actions: drop packet
Flow table ID: 1
Match Capabilities Match Types
------------------ -----------
ethernet mac destination mandatory
VLAN ID mandatory
Actions:
output to: specified interface
other actions: drop packet
Table 6 show openflow
hardware capabilities Field Descriptions
Command
Description
Pipeline
ID
Pipeline
to be configured for using the table.
Flow table
ID
Table
number in a logical switch.
Min Timer
Minimum
time at which polling for statistics occurs.
Max Timer
Maximum
time at which polling for statistics occurs.
Match
Capabilities
Displays a
list of match capabilities that can be defined for this device. The definitions
of the different match criteria can be found in the OpenFlow 1.0 specification.
Match
Types
Displays
the type of match criteria. The match types and their meaning are as followed:
required—This criteria must be defined for a flow.
optional—This criteria may be defined for a flow. It is
optional.
prefix—This criteria is an IP prefix.
Actions
Displays a
list of actions that can be defined for this device, if a packet matches the
flow criteria. The actions can be as follows:
output
to—Output the packet to the specified location.
set—Set the specified parameter for a packet.
pop—Remove the specified parameter for a packet.
other
actions—Execute the specified action. The actions can be as follows:
drop—Drop the packet.
Stats
Displays a
list of parameters for which statistics are collected.
Others:
packet out
Sending of
packets to an output location (packet out) is supported by this
Cisco Plug-in for OpenFlow.
Enables support and allocates resources for Cisco Plug-in for OpenFlow VLAN tagging actions on the device hardware.
switch
(OpenFlow)
To configure
Cisco Plug-in for OpenFlow
logical switch used for Layer 2 switching and enter logical switch
configuration mode, use the
switch
command in
Cisco Plug-in for OpenFlow
Release configuration mode. To remove the
Cisco Plug-in for OpenFlow
logical switch configurations, use the
no form of
this command.
switchlogical-switch-id
noswitchlogical-switch-id
Syntax Description
logical-switch-id
Specifies a numerical ID for the logical switch.
Only
logical switch ID 1 is supported.
Command Default
Cisco Plug-in for OpenFlow
logical switch is not defined.
Command Modes
Cisco Plug-in for OpenFlow Release configuration (config-ofa)
Command History
Release
Modification
Cisco Plug-in for OpenFlow
Version 1.0
This
command was introduced.
Examples
The following
example describes how the
switch
command is used in configuring
Cisco Plug-in for OpenFlow
logical switch.
Configures the rate at which packets are sent to a controller by Cisco Plug-in for OpenFlow logical switch.
shutdown
(OpenFlow)
To disable an
Cisco Plug-in for OpenFlow
logical switch, use the
shutdown
command in logical switch configuration mode. To re-enable the
Cisco Plug-in for OpenFlow
logical switch, use the
no form of
this command.
shutdown
noshutdown
Syntax Description
This command has
no arguments or keywords.
Command Default
The
Cisco Plug-in for OpenFlow
logical switch is enabled.
Command Modes
Logical switch configuration (config-ofa-switch)
Command History
Release
Modification
Cisco Plug-in for OpenFlow
Version 1.0
This
command was introduced.
Examples
The following
example describes how the
shutdown
command is used to disable an
Cisco Plug-in for OpenFlow
logical switch.
To configure local
and remote trust points needed for a Transport Layer Security (TLS) connection
to the controller, use the
tls trust-point
command in logical switch configuration mode.
TLS is enabled
for controller connections, but TLS trust points are not configured.
Command Modes
Logical switch configuration (config-ofa-switch)
Command History
Release
Modification
Cisco Plug-in for OpenFlow Release 1.1
This
command was introduced.
Usage Guidelines
This command does not set up the TLS connection and only configures
the trust points.
If this command is
not configured, TLS must be disabled in order for the controller connection to
work using the
no-tls
keyword of the
controller
command. Otherwise the controller connection fails.
Examples
The following
example shows how the
tls
trust-point command is used to configure a TLS connection to a
controller.