2
Parameters
global
: Specifies the global mode.
vlan
: Specifies the VLAN mode.
vlan-id
: Specifies a VLAN ID in the range of 1 to 4094.
vlan-mask
: Specifies a VLAN mask in the range of 0 to 4095. The default value is 4095.
loosen
: Specifies the loosen mode. If the loosen mode is used, a port belongs to the OpenFlow
instance when VLANs associated with the OpenFlow instance overlap with the port's allowed VLANs.
If you do not specify the loosen mode, a port belongs to an OpenFlow instance only when VLANs
associated with the OpenFlow instance are within the port's allowed VLAN list.
Usage guidelines
The VLANs to be associated are calculated by a bitwise AND operation on the specified VLAN ID
and mask. The VLAN mask supports non-contiguous 1s and ignores all 0 bits. To view the
associated VLANs, use the
display openflow instance
command.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Enable the global mode for OpenFlow instance 1.
<Sysname> system-view
[Sysname
]
openflow instance 1
[Sysname-of-inst-1
]
classification global
# Enable the VLAN mode for OpenFlow instance 1 and associate OpenFlow instance 1 with VLANs
determined by VLAN ID 255 and VLAN mask 7.
<Sysname> system-view
[Sysname] openflow instance 1
[Sysname-of-inst-1] classification vlan 255 mask 7
Related commands
display openflow instance
controller address
Use
controller address
to specify a controller for an OpenFlow switch and configure the main
connection to the controller.
Use
undo
controller address
to delete the main connection to the specified controller.
Syntax
controller controller-id address
{
ip
ipv4-address
|
ipv6
ipv6-address
}
[
port
port-number
]
[
local address
{
ip
local-ipv4-address
|
ipv6
local-ipv6-address
}
[
port
local-port-number
]
]
[
ssl ssl-policy-name
]
[
vrf
vrf-name
]
undo
controller
controller-id
address
Default
An OpenFlow instance does not have a main connection to a controller.
Views
OpenFlow instance view