OpenFlow Commands
protocol openflow no protocol openflow Unhides the OpenFlow commands. The no form of the command hides the OpenFlow commands. |
||
Syntax Description |
N/A |
|
Default |
no protocol openflow |
|
Configuration Mode |
config |
|
History |
3.3.4200 |
|
Example |
switch (config) # protocol openflow |
|
Related Commands |
||
Notes |
openflow mode hybrid no openflow mode Enables OpenFlow on the port. The no form of the command returns the port to its default state. |
||
Syntax Description |
N/A |
|
Default |
no openflow mode |
|
Configuration Mode |
config interface ethernet config interface port-channel config interface mlag-port-channel |
|
History |
3.3.4200 |
|
3.6.2100 |
Updated notes |
|
3.9.2000 |
Updated example and notes |
|
3.9.2400 |
Added mlag-port-channel configuration option and updated note |
|
Example |
switch (config interface ethernet 1/1)# openflow mode hybrid |
|
Related Commands |
protocol openflow |
|
Notes |
Running OpenFlow on the MLAG interface has several limitations. Please see them in the section "Support of MLAG Interface in OpenFlow" section |
openflow add-flows <flow-id> [[table-id],[priority-id],<match-parameter1> [,...,< match-parameterN>],<action1>[,...,<actionN>]] Adds OpenFlow flow. |
||
Syntax Description |
flow-id |
ID number to give this flow Range: 0-65535 |
priority-id |
Priority to give this flow Range: 0-65535 |
|
match-parameter |
Rule according to which a match is made. For a list of supported matches, see the match column in the “OpenFlow 1.3 Pipeline Capabilities Summary Table”. |
|
table-id |
Range:
|
|
action |
Action to perform on the matched traffic. For a list of supported actions, see the action column in “OpenFlow 1.3 Pipeline Capabilities Summary Table”. |
|
Default |
table-id default is 0 |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
Example |
||
switch (config)# openflow add-flows 1, priority=10,in_port=Eth1/1,nw_src=192.168.0.1/32,nw_dst=239.0.1.2/32,actions=output=Eth 1/11,Eth 1/22,Eth 1/33 switch (config)# openflow add-flows 3 table=3,in_port=121,actions=output:117 switch (config)# openflow add-flows 2 in_port=ANY,actions=push_vlan:33024,mod_vlan_vid:4111 switch (config)# openflow add-flows 4 table=0,priority=101,dl_type=0x0800,in_port=79,dl_vlan=233,nw_dst=172.0.0.0/8,actions=pop_vlan,goto_table:251 switch (config)# openflow add-flows 5 in_port=1,actions=dec_ttl switch (config)# openflow add-flows 6 table=0,priority=777,in_port=121,dl_type=0x0800,nw_proto=6,actions=mod_nw_ttl:55,output:99 switch (config)# openflow add-flows 7 table=0,priority=777,in_port=121,dl_type=0x0800,nw_proto=6,actions=Set_field:55-\>nw_ttl,output:99 switch (config)# openflow add-flows 8 table=0,priority=777,in_port=121,actions=output:99,Set_field:11:22:33:44:00:00-\>eth_dst switch (config)# openflow add-flows 9 table=0,priority=777,in_port=121,dl_type=0x0800,nw_proto=6,actions=Set_field:0-\>ip_ecn,output:99 switch (config)# openflow add-flows 10 table=0,priority=777,in_port=121,actions=output:99,Set_field:ff:ff:ff:ff:55:66-\>eth_src switch (config)# openflow add-flows 11 table=0,priority=777,in_port=127,actions=group:11 switch (config)# openflow add-flows 12 priority=12,in_port=105,actions=group:5 switch (config)# openflow add-flows 13 table=0,priority=777,in_port=127,actions=meter:6,output:117 switch (config)# openflow add-flows 14 table=2,priority=777,in_port=127,actions=meter:2,output:117 switch (config)# openflow add-flows 10 ip,priority=10,in_port=Eth1/1,dl_vlan=10,actions=output=Eth1/11 switch (config)# openflow add-flows 40 ip,priority=10,in_port=Eth1/1,action=set_field:00:0c:e9:00:00:01→eth_src,output=Eth1/11 switch (config)# openflow add-flows 30 ip,priority=100,actions=output=normal switch (config)# openflow add-flows 10 priority=10,in_port=ANY,actions=DROP |
||
Related Commands |
||
Notes |
|
openflow del-flows [<flow-id>] Deletes OpenFlow flow. |
||
Syntax Description |
flow-id |
ID number to give this flow Range: 0-65535 |
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
3.9.1000 |
Updated note |
|
Example |
switch (config)# openflow del-flows 1 |
|
Related Commands |
||
Notes |
If flow ID "all" is provided, the command deletes all configured OpenFlow flows |
openflow add-group <group-id> <group-type> <bucket-parameter1>[,...,<bucket-parameterN>] Adds an OpenFlow group. |
||
Syntax Description |
group-id |
Group ID number |
group-type |
For a list of supported group types, see the group column in “OpenFlow 1.3 Pipeline Capabilities Summary Table” |
|
bucket parameter |
Possible values:
|
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
3.9.1600 |
Added note |
|
Example |
switch (config) # openflow add-group group_id=3,type=ff,bucket=watch_port:117,output:123,bucket=watch_port:123,output:119,bucket=watch_port:111,output:119,113,121,115,123,109,117 |
|
Related Commands |
||
Notes |
The maximum number of ports in one OpenFlow group is as follows:
Warning
More than one group in the action list of OpenFlow is not supported
|
openflow del-group <group-id> Deletes matching OpenFlow group ID. |
||
Syntax Description |
group-id |
Group ID number |
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
3.9.1000 |
Updated note |
|
Example |
switch (config)# openflow del-group |
|
Related Commands |
||
Notes |
If group ID "all" is provided, the command deletes all configured OpenFlow groups. |
openflow mod-group <group-id> <group-type> <bucket-parameter1>[,...,<bucket-parameterN>] Modifies matching OpenFlow group ID. |
||
Syntax Description |
group-id |
Group ID number |
group-type |
For a list of supported group types, see the group column in “OpenFlow 1.3 Pipeline Capabilities Summary Table” |
|
bucket parameter |
Possible values:
|
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
Example |
switch (config)# openflow mod-group group_id=3,type=ff,bucket=watch_port:117,output:123,bucket=watch_port:123,output:119,bucket=watch_port:111,output:119,113,121,115,123,109,117,119 |
|
Related Commands |
openflow add-group |
|
Notes |
A group must exist in order to execute this command |
openflow add-meter <meter-id> <meter-rule> <band-parameter1>[,...,<band-parameterN>] Adds OpenFlow meter. |
||
Syntax Description |
meter-id |
Meter ID number |
meter-rule |
For a list of supported meters types, see the meter column in “OpenFlow 1.3 Pipeline Capabilities Summary Table” |
|
band-parameter |
Possible values:
|
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
Example |
switch (config)# openflow add-meter meter=6,pktps,band=type=drop,rate=10 |
|
Related Commands |
||
Notes |
openflow del-meter <meter-id> Deletes matching OpenFlow meter ID. |
||
Syntax Description |
meter-id |
Meter ID number |
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
3.9.1000 |
Updated note |
|
Example |
switch (config)# openflow del-meter meter=6 |
|
Related Commands |
||
Notes |
If meter ID "all" is provided, the command deletes all configured OpenFlow meters. |
openflow fail-mode secure no openflow fail-mode secure Enables the “fail secure mode” of the switch. The no form of the command disables the “fail secure mode” of the switch. |
||
Syntax Description |
N/A |
|
Default |
Enabled |
|
Configuration Mode |
Config |
|
History |
3.8.2100 |
|
3.9.1600 |
Added note below |
|
Example |
switch (config) # no openflow fail-mode secure |
|
Related Commands |
||
Notes |
In the case that a switch loses contact with all controllers as a result of echo request timeouts, TLS session timeouts, or other disconnections, the switch should immediately enter either “fail secure mode” or “fail standalone mode" (depending upon the switch implementation and configuration). "Fail secure mode" only affects the switch behavior in that packets and messages destined to go to the controllers are dropped. Flow entries should continue to expire according to their timeouts in “fail secure mode." In “fail standalone mode," the switch processes all packets using the OFPP_NORMAL reserved port and the switch acts as a legacy Ethernet switch or router. |
Note that the default fail-mode is "secure". There is no default rule with action normal for this mode. All traffic will be affected, including protocols, until required rule is added or fail-mode is changed to "standalone". If using controller, add required rule via controller in any fail-mode.
openflow mod-meter <meter-id> <meter-rule> <band-parameter1>[,...,<band-parameterN>] Modifies matching OpenFlow meter ID. |
||
Syntax Description |
meter-id |
Meter ID number |
meter-rule |
For a list of supported meters types, see the meter column in “OpenFlow 1.3 Pipeline Capabilities Summary Table” |
|
band-parameter |
Possible values:
|
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
Example |
switch (config)# openflow mod-meter meter=6,pktps,band=type=drop,rate=10 |
|
Related Commands |
||
Notes |
openflow re-apply flows <flow-id> Reapplies matching flow ID. |
||
Syntax Description |
flow-id |
Range: 0-65535 |
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
Example |
switch (config)# openflow re-apply flows 58 |
|
Related Commands |
||
Notes |
openflow re-apply groups <group-id> Reapplies matching group ID. |
||
Syntax Description |
group-id |
Range: 0-65535 |
Default |
N/A |
|
Configuration Mode |
config |
|
History |
3.6.4006 |
|
Example |
switch (config)# openflow re-apply groups group_id=2 |
|
Related Commands |
||
Notes |
openflow re-apply meters <meter-id> Reapplies matching meters ID. |
||
Syntax Description |
meter-id |
Range: 0-65535 |
Default |
N/A |
|
Configuration Mode |
config interface ethernet |
|
History |
3.6.4006 |
|
Example |
switch (config interface ethernet 1/1)# openflow re-apply meters 13 |
|
Related Commands |
||
Notes |
openflow controller-ip <ip-address> [tls] [tcp-port <tcp-port>] no openflow controller-ip <ip-address> [tls] [tcp-port <tcp-port>] Configures the OpenFlow controller’s IP & TCP port. The command “no openflow controller-ip <ip-address>” deletes all OpenFlow controller configurations related to its IP address. The command “no openflow controller-ip <ip-address> tcp-port” deletes all the OpenFlow controller configurations related to IP address, and any tcp-port except for TLS ones. The command “no openflow controller-ip <ip-address> [tls] tcp-port <tcp-port>” deletes the entry for the OpenFlow controller IP address, TLS (if applicable), and the TCP port |
||
Syntax Description |
ip-address |
The IPv4 address of the OpenFlow controller |
tls |
Configures secure connection to OpenFlow controller |
|
tcp-port |
Sets the TCP port number of the OpenFlow controller |
|
Default |
TCP port 6633 |
|
Configuration Mode |
config openflow |
|
History |
3.6.1002 |
|
3.6.2002 |
Added “tls” parameter |
|
Example |
switch (config openflow) # controller-ip 10.10.10.10 tls tcp-port 6633 |
|
Related Commands |
||
Notes |
datapath-id <value> no datapath-id Sets a specific identifier for the switch with which the controller is communicating. The no form of the command resets the parameter to its default value. |
||
Syntax Description |
value |
The most significant 16 bits of the agent data-path ID Range: 0x0000-0xFFFF in hexa |
Default |
0x0000 |
|
Configuration Mode |
config openflow |
|
History |
3.3.4200 |
|
Example |
switch (config openflow) # datapath-id 0x1234 |
|
Related Commands |
||
Notes |
openflow table <table_id[-table_id]> match-keys <key_list> no openflow table <table_id[-table_id]> match-keys [<key_list>] Adds ACL keys to an OpenFlow table. The no form of the command removes ACL keys from the OpenFlow table. |
||
Syntax Description |
table_id |
OpenFlow table ID for adding/removing key values. Can be one ID or range. Range: 0-249. |
key_list |
Key value(s) |
|
Default |
0x0000 |
|
Configuration Mode |
config |
|
History |
3.3.4200 |
|
3.9.0300 |
Added note of supported keys |
|
Example |
switch (config) # openflow table 1 match-keys metadata ip_proto |
|
Related Commands |
||
Notes |
Key name Description |
openflow acl table <id/range> counter disable no openflow acl table <id/range> counter disable Disables counter for a specific ACL or range of ACL OpenFlow tables. The no form of the command enables counter for ACL table. |
||
Syntax Description |
id/range |
Specific ACL or range of ACL OpenFlow tables. |
Default |
Enabled counter for all ACL tables. |
|
Configuration Mode |
config |
|
History |
3.9.2000 |
|
Example |
switch (config) # openflow acl table 10 counter disable |
|
Related Commands |
||
Notes |
show openflow Displays general information about the OpenFlow protocol configuration. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.3.4200 |
|
3.6.1002 |
Updated example |
|
Example |
||
switch (config) # show openflow |
||
Related Commands |
||
Notes |
show openflow flows Displays information about the OpenFlow flows. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.3.4302 |
|
3.6.1002 |
Updated example |
|
Example |
switch (config) # show openflow flows |
|
Related Commands |
||
Notes |
show openflow flows <cookie | table> ethernet-names Displays OpenFlow flows configuration with interface names. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.4006 |
|
3.9.2400 |
Updated example with LAG and MLAG interfaces |
|
Example |
||
switch (config) # show openflow flows ethernet-names |
||
Related Commands |
||
Notes |
show openflow groups Displays OpenFlow flows configuration with interface names. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.3004 |
|
Example |
||
switch (config) # show openflow groups |
||
Related Commands |
||
Notes |
show openflow groups ethernet-names Displays all the configured OpenFlow groups with their interface names. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.4006 |
|
3.9.2400 |
Updated Example with LAG and MLAG interfaces |
|
Example |
||
switch (config) # show openflow groups |
||
Related Commands |
||
Notes |
show openflow meters [<ID>] Displays all/specified OpenFlow meters. |
||
Syntax Description |
ID |
Requested meter ID |
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.3004 |
|
Example |
switch (config) # show openflow meters |
|
Related Commands |
||
Notes |
show openflow flows table <NUM> [summary] Displays information/summary of a given OpenFlow flows table. |
||
Syntax Description |
NUM |
NUM range: 0-252 |
summary |
Displays given OpenFlow flow table summary |
|
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.3004 |
|
Example |
||
switch (config) # show openflow flows table 1 |
||
Related Commands |
||
Notes |
show openflow flows cookie <cookie> [summary] Displays information/summary of a given OpenFlow flows cookie. |
||
Syntax Description |
cookie |
Requested cookie ID in the following format: cookie_id.cookie_id/mask_id (e.g., 0x2A, 0x12/0x2) |
summary |
Displays given OpenFlow flow table summary |
|
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.3004 |
|
Example |
||
switch (config) # show openflow flows cookie 0x11 |
||
Related Commands |
||
Notes |
A cookie may be associated with a flow using the add-flows, and mod-flows commands. |
show openflow table <table_id[-table_id]> match-keys Displays configured ACL keys in OpenFlow table. |
||
Syntax Description |
table_id |
OpenFlow table ID for adding/removing key values. Can be one ID or range. Range: 0-249. |
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.3004 |
|
Example |
switch (config) # show openflow table 2 match-keys |
|
Related Commands |
||
Notes |
show openflow table <table_id[-table_id]> match-keys supported Displays list of ACL keys which can be configured in OpenFlow table. |
||
Syntax Description |
table_id |
OpenFlow table ID for adding/removing key values. Can be one ID or range. Range: 0-249. |
Default |
N/A |
|
Configuration Mode |
Any command mode |
|
History |
3.6.3004 |
|
Example |
switch (config) # show openflow table 2 match-keys supported |
|
Related Commands |
||
Notes |