Chapter 2 Definitions of Command Line
2.7 Commands of ETH switch function
2.7.1 rate-limit
[Function]
Limit port rate, no command can be used to cancel this command.
[no] rate-limit <1-1048576>
[Parameter]
<1-1048576>: limit the rate, unit: Kbps [Command modes]
Switchport mode
[Executing Command Instruction]
Rate limit provides limit for bi-direction rate, since hardware rate limit range is integral times of granularity, the actual rate limit may different from configured rate.
[Command Execute Echo]
If the limit rate higher than 100M or lower than the rate limit granularity, error information will be displayed.
[Example]
Configure switchport 1 rate to be 2 M:
OPCOM3107(config-eswif/0/1)# rate-limit 2048 Cancel export rate limit:
OPCOM3107(config-eswif/0/1)# no rate-limit [Related commands]
Commands Description show rate-limit Show rate limit configuration information.
2.7.2 show rate-limit
[Function]
Show rate limit configuration information.
show rate-limit [Command modes]
Global configuration mode, switchport mode [Example]
Show rate limit configuration information:
OPCOM3107(config-esw/1)# show rate-limit [Related commands]
Commands Description [no] rate-limit Rate limit configuration.
rate-limit step Rate limit granularity configuration.
2.7.3 strom-control-global
[Function]
Configure storm control function.
storm-control-global ( broadcast | multicast | dlf | disable | all ) [Parameter]
broadcast: broadcast the message;
multicast: multicast and broadcast message;
dlf: dlf message;
all: all messages;
disable: storm control disable.
[Command modes]
Global configuration mode [Example]
Configure multicast storm control enable:
OPCOM3107(config)# storm-control-global multicast enable [Related commands]
Commands Description show strom-control-global Show storm control configuration information.
2.7.4 storm-control-global rate
[Function]
Configure switchport storm control rate.
storm-control-global rate <62-262144>
[Parameter]
<62-262144>: storm control rate, unit: kbit/s.
[Parameter]
62 kbit/s
[Command modes]
Global configuration mode [Example]
Configure switchport storm control rate to be 64 kbit/s:
OPCOM3107(config)# storm-control-global rate 64 [Related commands]
Commands Description show strom-control-global Show storm control configuration information.
2.7.5 show strom-control-global
[Function]
Show storm control configuration information.
show storm-control-global [Command modes]
Global configuration mode [Example]
Show storm control configuration information:
OPCOM3107(config)# show storm-control-global [Related commands]
Commands Description strom-control-global Configure storm control function.
2.7.6 vlan
[Function]
This command is used to create vlan or enter static vlan mode, no command can be used to delete vlan.
[no] vlan <2-4094>
[Parameter]
<2-4094>: vlan ID.
[Default]
Port 1 is access interface belonged to vlan 101;
Port 2 is access interface belonged to vlan 102;
Port 3 is access interface belonged to vlan 103;
Port 4 is internal aggregation interface, belongs to trank allow vlan 1, 101, 102, 103 port by default.
[Command modes]
Global configuration mode, switchport mode, vlan mode [Example]
Create vlan 15:
OPCOM3107 (config)# vlan 15
2.7.7 state
[Function]
Configure vlan working status.
state (active | suspend) [Parameter]
active: vlan enable;
suspend: vlan disable.
[Command modes]
vlan mode
[Example]
Enable vlan at this node:
OPCOM3107 (config-vlan/2)# state active
2.7.8 interface switchport
[Function]
Enter switchport mode.
interface switchport <1-4>
[Parameter]
<1-4>: switchport number [Command modes]
Global configuration mode, switchport mode [Example]
Enter switchport 1:
OPCOM3107 (config)# interface switchport 1
2.7.9 switchport
[Function]
Add assigned switchport to current vlan. The assigned port mode won’t be changed. It change the port direct to vlan id if current port is in access or tunnel mode; It is allowed to add vlan in the vlan list if the port is in hybrid mode; if the display assigned vlan list in trunk mode, add the vlan to the list.
switchport GLOBALPORTIDLIST
No command can be used to delete assigned switchport from current vlan. The assigned port mode won’t be changed. It change vlan id direct to global port id if current port is in access or tunnel mode; it deletes vlan from the allowed vlan list if the port is in hybrid mode; if the display assigned allowing vlan list in trunk mode, delete the vlan from the list.
no switchport GLOBALPORTIDLIST [Parameter]
GLOBALPORTIDLIST: switchport ID number, range from 1-4, use “,” and “-” when input several ports id.
[Command modes]
vlan mode
[Executing Command Instruction]
Configure switchport can also realize this function. Vlan configuration will be saved in form of switchport configuration.
[Example]
Add switchport 5 to current vlan list:
OPCOM3107 (config-vlan/12)# switchport 5
2.7.10 switchport access vlan
[Function]
Configure port mode to be access mode and assign vlan for the port.
switchport access vlan <2-4094>
[Parameter]
<2-4094>: vlanID index.
[Command modes]
Switchport mode [Example]
Configure port to be access port of vlan 15:
OPCOM3107 (config-eswif/0/2)# switchport access vlan 15
2.7.11 switchport dot1q-tunnel vlan
[Function]
Configure port mode to be tunnel mode and assign vlan for the port.
switchport dot1q-tunnel vlan <2-4094>
[Parameter]
<2-4094>: vlanID index.
[Command modes]
Switchport mode [Example]
Configure port to be tunnel port of vlan 15:
OPCOM3107 (config-eswif/0/2)# switchport dot1q-tunnel vlan 15
2.7.12 switchport trunk allowed vlan list
[Function]
Configure port mode to be trunk mode and assign vlan allowed by the port.
switchport trunk allowed vlan list [Parameter]
list: vlanID list.
[Command modes]
Switchport mode [Example]
Configure port to be trunk port permitting vlan 3, 4, 5:
OPCOM3107 (config-eswif/0/4)# switchport trunk vlan 3-5
2.7.13 switchport hybrid allowed vlan
[Function]
Configure port mode to be hybrid mode and assign vlan allowed by the port.
switchport hybrid allowed vlan list [Parameter]
list: vlanID list, use “,” and “-” to separate several vlan.
[Command modes]
Switchport mode [Example]
Configure port to be hybrid port permitting vlan 3, 4, 5:
OPCOM3107 (config-eswif/0/2)# switchport hybrid allowed vlan 3-5
2.7.14 switchport mode
[Function]
Configure port mode without change the port vlan id.
switchport mode (access | dot1q-tunnel) [Parameter]
access: access mode;
dotlq-tunnel: tunnel mode.
[Command modes]
Switchport mode [Example]
Configure port 2 to be access port:
OPCOM3107 (config-eswif/0/2)# switchport mode access
2.7.15 switchport vlan
[Function]
Configure port vlan id without change port mode.
switchport vlan <2-4094>
[Parameter]
<2-4094>: vlan id [Command modes]
Switchport mode [Example]
Configure vlan id of port 2 to be 24:
OPCOM3107 (config-eswif/0/2)# switchport vlan 24
2.7.16 show interface
[Function]
Show interface configuration information.
show interface [Command modes]
Ethernet interface mode, Switchport mode, E1 interface mode [Example]
Show configuration information of switchport 2:
OPCOM3107 (config-eswif/0/2)# show interface
2.7.17 show esw
[Function]
Show basic information of Eth-switch interface.
show esw
[Command modes]
Privileged EXECmode, Global configuration mode [Example]
Show basic information of Eth-switch interface:
OPCOM3107 (config)# show esw
2.7.18 show interface switchport
[Function]
Show information of assigned switchport.
show interface switchport <1-4>
<1-4>: switchport index [Command modes]
Global configuration mode, switchport mode [Example]
Show information of switchport 4:
OPCOM3107 (config-eswif/0/2)# show interface switchport 4
2.7.19 show vlan
[Function]
Show vlan configuration information.
show vlan [<2-4094>]
[Parameter]
<2-4094>: vlan id [Command modes]
Privileged EXEC mode, Global configuration mode, Static vlan mode, Switchport mode [Executing Command Instruction]
Show all vlan information if no vlan ID was assigned.
[Example]
Show information of vlan 15:
OPCOM3107 (config-eswif/2)# show vlan 15
2.7.20 qos
[Function]
Configure qos function; no command can used to cancel qos. This function always aims at all ports.
[no] qos [Default]
No qos
[Command modes]
Global configuration mode [Executing Command Instruction]
Cancel QOS function means using port priority configuration, and all ports priorities are 0 (the highest).
[Example]
Configure QOS function disable:
OPCOM3107 (config)# no qos
2.7.21 qos default-cos
[Function]
Configure default cos value for current switchport.
qos default-cos <0-7>
[Parameter]
<0-7>: cos value [Default]
0
[Command modes]
Switchport mode [Example]
Configure cos value of switchport 1 to be 1:
OPCOM3107 (config-eswif/1)# qos default-cos 1 [Related commands]
Commands Description qos Qos function configuration.
2.7.22 qos trust cos
[Function]
Enable QOS based on cos section in tag message, no command can be used to disable this function.
[no] qos trust cos [Command modes]
Global configuration mode [Example]
Configure QOS function of COS enable:
OPCOM3107 (config)# qos trust cos [Related commands]
Commands Description qos Qos function configuration.
show qos Show qos configuration information.
2.7.23 qos map cos-queue
[Function]
Configure priority corresponding to COS value.
qos map cos-queue cos0 cos1 cos2 cos3 cos4 cos5 cos6 cos7 [Parameter]
cos0-7: COS value from 0-7 corresponding priority number, 0 means the highest priority.
[Default]
cos0 - cos1: 0 cos2 – cos3: 1 cos4 – cos5: 2 cos6 – cos7: 3 [Command modes]
Global configuration mode [Example]
Configure QOS of COS to be cos0: 0, cos1: 1, cos2: 1, cos3: 1, cos4: 3, cos5: 3, cos6: 2, cos7: 2:
OPCOM3107 (config-eswif/1)# qos map cos-queue 0 1 1 1 3 3 2 2 [Related commands]
Commands Description qos Qos function configuration.
show qos Show qos configuration information.
2.7.24 show qos
[Function]
Show qos configuration information.
show qos
[Command modes]
Global configuration mode [Example]
Configure QOS confiugration information:
OPCOM3107 (config-eswif/0/1)# show qos [Related commands]
Commands Description qos Qos function configuration.
show qos Show qos configuration information.
2.7.25 mac-address-table aging-time
[Function]
Configure mac-address-table aging time.
mac-address-table aging-time <0-3825>
[Parameter]
<0-3825>: aging time, unit : s.
[Default]
300s
[Command modes]
Global configuration mode [Executing Command Instruction]
System adopts hierarchical aging time, it will manual adopt 300, 75, 18, 1s automatically according to user configuration.
[Example]
Configure MAC address table aging time to be 75:
OPCOM3107 (config)# mac-address-table aging-time 75 [Related commands]
Commands Description mac-address-table learning Configure mac learning function.
mac-address-table static
HHHH.HHHH.HHHH vlan vlan_id port <1-4> Add table item of static mac address.
mac-polling Configure mac address polling function.
show mac Show mac address table configuration information.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.
2.7.26 no mac-address-table aging-time
[Function]
Configure mac-address-table aging time to defaulted value.
no mac-address-table aging-time [Default]
300s
[Command modes]
Global configuration mode [Example]
Configure MAC address table aging time to default value:
OPCOM3107 (config)# no mac-address-table aging-time [Related commands]
Commands Description mac-address-table learning Configure mac learning function.
mac-address-table static
HHHH.HHHH.HHHH vlan vlan_id port <1-4> Add table item of static mac address.
mac-polling Configure mac address polling function.
show mac Show mac address table configuration information.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.
2.7.27 mac-address-table learning
[Function]
Configure mac-address learning function.
mac-address-table learning (enable | disable) [Parameter]
enable: MAC address learning enable ; disable: MAC address learning disable.
[Default]
enable
[Command modes]
Global configuration mode [Example]
Disable MAC address learning function:
OPCOM3107 (config)# mac-address-table learning disable [Related commands]
Commands Description mac-address-table aging-time Configure mac address table aging time.
mac-address-table static
HHHH.HHHH.HHHH vlan vlan_id port <0-5> Add table item of static mac address.
mac-polling Configure mac address polling function.
show mac Show mac address table configuration information.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.
2.7.28 mac-address-table static HHHH.HHHH.HHHH vlan <2-4094> port <1-4>
[Function]
Add static MAC address table, no command can used to delete static MAC address table.
[no] mac-address-table static HHHH.HHHH.HHHH vlan <2-4094> port <1-4>
[Parameter]
HHHH.HHHH.HHHH: MAC address ;
<2-4094>: vlan ID;
<1-4>: switchport number.
[Default]
No static MAC address [Command modes]
Global configuration mode [Executing Command Instruction]
Use mac-polling command to fulfill mac polling at first to get valid mac address information.
[Example]
Add MAC address 0001.2345.6789 to vlan ID 12, transferring port is 3:
OPCOM3107 (config)# mac-address-table static 0001.2345.6789 vlan 12 port 3 [Related commands]
Commands Description mac-address-table aging-time Configure mac address table aging time.
mac-address-table learning Configure mac address table learning function.
mac-polling Configure mac address polling function.
show mac Show mac address table configuration information.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.
2.7.29 mac-polling
[Function]
Enable MAC address polling, no command can used to disable this function.
[no] mac-polling [Default]
No mac-polling [Command modes]
Global configuration mode [Example]
Enable mac polling function:
OPCOM3107 (config)# mac-polling [Related commands]
Commands Description mac-address-table learning Configure mac address learning function.
mac-address-table static HHHH.HHHH.HHHH
vlan vlan_id port <0-5> Add table item of static mac address table.
show mac Show mac address table configuration information.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.
2.7.30 clear mac-address-table
[Function]
Clear table item in mac-address-table.
clear mac-address-table (all|dynamic|static) [Parameter]
all: all table items;
dynamic: dynamic table items;
static: static table items.
[Command modes]
Global configuration mode [Example]
Clear all mac address table items:
OPCOM3107 (config)# clear mac-address-table all Clear all static mac address table items:
OPCOM3107 (config)# clear mac-address-table static Clear all dynamic mac address table items:
OPCOM3107 (config)# clear mac-address-table dynamic [Related commands]
Commands Description mac-address-table learning Configure mac learning function.
mac-address-table static
HHHH.HHHH.HHHH vlan vlan_id port <1-4> Add static mac address table item.
show mac Show mac address table configuration information.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.
2.7.31 search mac-address
[Function]
Search mac-address in current mac address table.
search mac-address HHHH.HHHH.HHHH [Parameter]
HHHH.HHHH.HHHH: MAC address.
[Command modes]
Global configuration mode [Example]
Search table item 000e.5e01.0203 in mac address table:
OPCOM3107 (config)# search mac-address 000e.5e01.0203 [Related commands]
Commands Description mac-address-table learning Configure mac address learning function.
mac-address-table static
HHHH.HHHH.HHHH vlan vlan_id port <1-4> Add static mac address table item.
show mac Show mac address table configuration information.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.
2.7.32 show mac
[Function]
Show mac address learning function and aging time configuration information.
show mac [Command modes]
Global configuration mode [Example]
Show MAC address learning function and aging time configuration information:
OPCOM3107 (config)# show mac [Related commands]
Commands Description mac-address-table learning Configure mac address learning function.
mac-address-table static
HHHH.HHHH.HHHH vlan vlan_id port <1-4> Add item of static mac address table.
mac-polling Configure mac address polling function.
show mac-address-table ( all | static |
dynamic ) [ port port-number | vlan vlan_id ] Show mac address table information.