Commands For Vlan Configuration

3.1 Commands for VLAN Configuration

 

3.1.1 debug gvrp

Command: debug gvrp {event | packet {receive|send}} interface [ethernet] <IFNAME>
debug gvrp error
no debug gvrp
Function: Enable the GVRP debugging function. The no command disables the function.
Parameters:

  • event: GVRP event information on the interface.
  • packet: GVRP send and received packets information on interface.
    • receive: Receive packet
    • send: Send packet
  • ethernet: Ethernet interface
  • <IFNAME>: Interface Name <1-16> characters
  • error: GVRP error information.

Command mode: Admin Mode
Default: GVRP debug information is disabled.
Usage guide: Use this command to enable GVRP debugging so that GVRP packet processing information can be displayed.
Example: Enable GVRP debugging to send GVRP error information.

active500EM#debug gvrp error

 

3.1.2 dot1q-tunnel enable

Command: dot1q-tunnel enable
no dot1q-tunnel enable
Function: Sets the access port of the switch to dot1q-tunnel mode. The no command restores the mode of the access port to default.
Parameters: None.
Command mode: Port Mode
Default: The dot1q-tunnel function is disabled on the port.
Usage guide: After enabling dot1q-tunnel on the port, data packets without a VLAN tag (referred to as a tag), will be packed with a tag when entering through the port. Those data packets identified as having a tag will be packed with an additional external tag. The TPID in the tag is 8100 and the VLAN ID is the VLAN ID associated with the port. Data packets with double tags will be forwarded according to the MAC address and external tag. The external tag is removed when the data packet is transmitted from the access port.
Since the length of the data packet may be oversized when packed with the external tag, this command should be used with the jumbo function. Generally, this command is used on access ports.
Note: The ?dot1q-tunnel? command and ?dot1q-tunnel tpid? command are mutually exclusive and vlan-translation should be enabled.
Example: Join port1 into VLAN3, enable the dot1q-tunnel function.

active500EM(config)#vlan 3
active500EM(config-vlan3)#switchport interface ethernet 1/0/1
active500EM(config-vlan3)#exit
active500EM(config)#interface ethernet 1/0/1
active500EM(config-if-ethernet1/0/1)#dot1q-tunnel enable
active500EM(config-if-ethernet1/0/1)#exit
active500EM(config)#

 

3.1.3 dot1q-tunnel selective enable

Command: dot1q-tunnel selective enable
no dot1q-tunnel selective enable
Function: Selective QinQ maps the specified customer VLANs (C-VLAN) entering the tunnel to the specified S-VLAN (Service provider VLAN) ID. The S-VLAN is added to the incoming unmodified C-VLAN. With this command, the user can enable this functionality to be supported for a specific interface. The no command restores the default.
Parameters: None.
Command mode: None
Default: Disabled
Usage guide: Selective QinQ maps the specified customer VLANs entering the tunnel to the specified S-VLAN ID. The S-VLAN is added to the incoming unmodified C-VLAN.
Example: The user can specify the interface where the selective dot1q tunnel can be enabled.

active500EM#config t
active500EM(config)#interface ethernet 1/0/1
active500EM(config-if-ethernet1/0/1)#dot1q-tunnel selective enable

 

3.1.4 dot1q-tunnel selective s-vlan

Command:dot1q-tunnel selective s-vlan <1-4094>
no dot1q-tunnel selecive s-vlan
Function: Selective QinQ maps the specified customer VLANs (C-VLAN) entering the tunnel to the specified S-VLAN (Service provider VLAN) ID. The S-VLAN is added to the incoming unmodified C-VLAN. With this command the user can specify which specific S-VLAN ID is to be used for a certain interface tunnel. You can also specify that traffic carrying all other customer VLAN IDs is dropped. The no command restores the default.
Parameter:

  • <1-4094>: Vlan ID

Command mode: None
Default: Disabled
Usage guide: Selective QinQ maps the specified customer VLANs entering the tunnel to the specified S-VLAN ID. The S-VLAN is added to the incoming unmodified C-VLAN. With this command the user can specify selective S-VLANs to be used. The user can also specify that traffic carrying all other customer VLAN IDs is dropped.
Example: The user can specify the selective S-VLAN to be used on a certain interface

active500EM#config t
active500EM(config)#interface ethernet 1/0/1
active500EM(config-if-ethernet1/0/1)#dot1q-tunnel selective s-vlan 1

 

3.1.5 dot1q-tunneltpid

Command: dot1q-tunnel tpid {0x8100|0x9100|0x9200| <1-65535> }
Function: Configure the type (TPID) of the switch trunk port protocol.
Parameters:

  • 0x8100: Set TPID value to 0x8100
  • 0x9100: Set TPID value to 0x9100
  • 0x9200: Set TPID value to 0x9200
  • <1-65535>: Set TPID value to 1-65535

Command mode: Port Mode
Default: 0x8100.
Usage guide: This function facilitates networking with equipment from other manufacturers. If the equipment connected with the switch trunk port sends a data packet with a TPID of 0x9100, the port TPID will be set to 0x9100.The switch will receive and process data packets normally. This command, and the dot1q-tunnel enable command, are mutually exclusive.
Example: Set port 10 of the switch to trunk port and send data packet with a TPID of 0x9100.

active500EM(config)#interface ethernet 1/0/10
active500EM(config-if-ethernet1/0/10)#switchport mode trunk
active500EM(config-if-ethernet1/0/10)#dot1q-tunnel tpid 0x9100
active500EM(config-if-ethernet1/0/10)#exit
active500EM(config)#

 

3.1.6 gvrp

Command: gvrp
no gvrp
Function: Enable the GVRP function for the switch or the current Trunk port. The no? command disables the GVRP function globally or for a specific port.
Parameters: None.
Command mode: Port Mode and Global Mode
Default: GVRP is disabled.
Usage guide: Port GVRP can only be enabled after global GVRP is enabled. When global GVRP is disabled, the GVRP configurations in the ports are also disabled.
Note: GVRP can only be enabled on trunk ports.
Example: Enable the GVRP function globally for trunk port 10.

active500EM(config)#gvrp
active500EM(config)#interface ethernet 1/0/10
active500EM(config-if-ethernet1/0/10)#gvrp
active500EM(config)#exit

 

3.1.7 garp timer hold

Command: garp timer hold <timer-value>
no garp timer hold
Function: Set the hold timer for GARP. The no command restores the default timer setting.
Parameters:

  • <timer-value>: value for GARP holdtimer. The valid range is 100 to 327650 milliseconds (ms).

Command mode:Port Mode
Default: 100ms.
Usage guide:When the GARP application receives a join message, the join message will not be sent immediately. Instead, the hold timer is started. After the hold timer reaches the set value, all join messages received during the hold time will be sent in one GVRP frame, effectively reducing protocol message traffic.
Example: Set the GARP hold timer value of port 1/0/10 to 500ms.

active500EM(config-if-ethernet1/0/10)#garp timer hold 500

 

3.1.8 garp timer join

Command:garp timer join<timer-value>
no garp timer join
Function: Set the join timer for GARP. The no command restores the default timer setting.
Parameter:

  • <timer-value>: value for join timer. The valid range is 100 to 327650 milliseconds (ms).

Command mode:Port Mode
Default: 200 ms.
Usage guide:If a GARP application sends a join message after the join timer period is over, other GARP applications receiving the join message will register the message.
Example:Set the GARP join timer value of port 10 to 1000 ms.

active500EM(config-of-ethernet1/0/10)#garp timer join 1000

 

3.1.9 garp timer leave

Command: garp timer leave<timer-value>
no garp timer leave
Function: Set the leave timer for GARP. The no command restores the default timer setting.
Parameter:

  • <timer-value>: value for the leave timer. The valid range is 100 to 327650 milliseconds (ms).

Command mode:Port Mode
Default: 600 ms.
Usage guide:When a GARP entity wants to cancel certain property information, it sends a leave message. A GARP application receiving this message will start the leave timer. If no join message is received before the leave timer expires, the property information will be canceled. The value of the leave timer must be twice as large as the join timer or else an error message will be displayed.
Example: Set the GARP leave timer value of port 1/0/10 to 3000 ms.

active500EM(config-if-ethernet1/0/10)#garp timer leave 3000

 

3.1.10 garp timer leaveall

Command: garp timer leaveall <timer-value>
no garp timer leaveall
Function: Set the leaveall timer for GARP. The no command restores the default timer setting.
Parameter:

  • <timer-value>: value for GARP leaveall timer. The valid range is 100 to 327650 milliseconds (ms).

Command mode: Global Mode
Default: 10000 ms.
Usage guide: When a GARP application entity starts, the leaveall timer is started at the same time. When the leaveall timer value is met, the GARP application entity will send a leaveall message. Other application entities will cancel all property information for that application entity, and the leaveall timer will be cleared for a new cycle.
Example: Set the GARP leaveall timer value to 50000 ms:

active500EM(config)#garp timer leaveall 50000

 

3.1.11 name

Command: name <vlan-name>
no name
Function: Specify a name or descriptive string for the VLAN. The no command deletes the name of the VLAN.
Parameter:

  • <vlan-name>: the specified name string.

Command mode: VLAN Configuration Mode
Default: The default VLAN name is vlanXXX, where xxx is the VID.
Usage guide: The switch can specify names for different VLANs making it easier for users to identify and manage VLANs.
Example: Specify the name of VLAN100 as TestVlan.

active500EM(config-vlan100)#name TestVlan

 

3.1.12 private-vlan

Command: private-vlan {primary | isolated | community}
no private-vlan
Function: Configure the current VLAN to a Private VLAN. The no command cancels the Private VLAN configuration.
Parameters:

  • primary: sets the current VLAN to the Primary VLAN.
  • isolated: sets the current VLAN to the Isolated VLAN.
  • community: sets the current VLAN to the Community VLAN.

Command mode: VLAN mode
Default: Private VLAN is not configured.
Usage guide: There are three Private VLANs: Primary VLAN, Isolated VLAN, and Community VLAN. These VLANS can communicate with Isolated and Community VLAN ports related to the Primary VLAN. Ports in Isolated VLAN are isolated between each other and can only communicate with ports they are related to in Primary VLAN. Ports in Community VLAN can communicate both with each other and with Primary VLAN related ports. There is no communication between ports in Community VLAN and ports in Isolated VLAN. Only VLANs containing empty Ethernet ports can be set to Private VLAN. Only Private VLANs configured with associated private relationships can set member ports on their Access Ethernet ports. Ethernet ports will be cleared when Normal VLAN is set to Private VLAN. Please note that Private VLAN messages will not be transmitted by GVRP.
Example: Set VLAN100, 200, 300 to private vlans, with respectively, Primary, Isolated, and Community types.
Note: This will remove all the ports from vlan 100.

active500EM(config)#vlan 100
active500EM(config-vlan100)#private-vlan primary
active500EM(config-vlan100)#exit

Note: This will remove all the ports from vlan 200.

active500EM(config)#vlan 200
active500EM(config-vlan200)#private-vlan isolated
active500EM(config-vlan200)#exit

Note: This will remove all the ports from vlan 300.

active500EM(config)#vlan 300
active500EM(config-vlan300)#private-vlan community
active500EM(config-vlan300)#exit

 

3.1.13 private-vlan association

Command: private-vlan association <secondary-vlan-list>
no private-vlan association
Function: Sets Private VLAN association. The no command cancels Private VLAN association.
Parameter:

  • <secondary-vlan-list>: sets the Secondary VLAN list which is associated to the Primary VLAN. There are two types of Secondary VLANs: Isolated and Community VLANs. Users can set multiple Secondary VLANs by ‘;’.

Command mode: VLAN Mode
Default: There is no Private VLAN association.
Usage guide: This command can only be used for a Private VLAN. The ports in Secondary VLANs, which are associated to Primary VLAN, can communicate to the ports in the Primary VLAN. Before setting a Private VLAN association, three types of Private VLANs should have no member ports.The Private VLAN with a Private VLAN association canâ????t be deleted. When users delete Private VLAN associations, all the member ports in the associated Private VLANs are removed.
Example: Associate Isolated VLAN200 and Community VLAN300 to Primary VLAN100.

active500EM(config-vlan100)#private-vlan association 200;300

 

3.1.14 show dot1q-tunnel

Command: show dot1q-tunnel
Function: Display the information of all the ports that have a state of dot1q-tunnel.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: This command is used to display the information for ports in dot1q-tunnel state.
Example: Display the current dot1q-tunnel state.

active500EM#show dot1q-tunnel
Interface Ethernet1/0/1:
dot1q-tunnel is enable
Interface Ethernet1/0/3:
dot1q-tunnel is enable

 

3.1.15 show garp timer

Command: show garp timer {join|leave|leaveall}
Function: Displays the global and individual timers.
Parameter:

  • join: show timer for join.
  • leave: show timer for leave.
  • leaveall show timer for leaveall.

Command mode: Admin Mode and other Configuration Mode
Default: None
Usage guide: Displays the global and individual timers for GARP.
Example: Display global GARP information and individual timers.

active500EM#show garp timer
GARP join timer value is : 200 (ms)
GARP leave timer value is : 600 (ms)
GARP leaveall timer value is : 10000 (ms)
active500EM#show garp timer join
GARP join timer value is : 200 (ms)
active500EM#show garp timer leave
GARP leave timer value is : 600 (ms)
active500EM#show garp timer leaveall
GARP leaveall timer value is : 10000 (ms)

 

3.1.16 show gvrp

Command: show gvrp {active|fsm|leaveall|leavetimer|port|port-member|timer|vlan}
Function: Display the global and port information for GVRP.
Parameters:

  • active: shows active GVRP port information.
  • fsm: the finite state machine; fsm information of the interface.
  • leaveall: information of leave all fsm on the interface.
  • leavetimer: leavetimer running information of GVRP on the interface or VLAN.
  • port: information of the port enabled with GVRP.
  • port-member: port member information.
  • timer: timer information of join and leaveall of running interfaces (in ms).
  • vlan: VLAN information.

Command mode: Admin Mode and other Configuration Mode
Default: None
Usage guide: Display the global and port information for GVRP.
Example: Display global GVRP information.

active500EM# show gvrp timer join
GVRP join timer value is 200 (ms)

 

3.1.17 show vlan

Command: show vlan [brief | summary] [id <vlan-id>] [name <vlan-name>] [internal usage [id <vlan-id> | name <vlanname>]] [private-vlan [id <vlan-id> | name <vlan-name> ]] Function: Display detailed information for all VLANs or a specified VLAN
Parameters:

  • brief: brief information.
  • summary: VLAN statistics.
  • <vlan-id>: VLAN ID of the VLAN to display status information, the valid range is 1 to 4094.
  • <vlan-name>: VLAN name for the VLAN to display status information, valid length is 1 to 11 characters.
  • internal usage: Internal VLAN usage information
  • private-vlan: displays the ID and name relating to the VLAN and port of the associated private-vlan.

Command mode: Admin Mode and Configuration Mode
Default: None.
Usage guide: If no <vlan-id> or <vlan-name> is specified, then information for all VLANs in the switch will be displayed.
Example: Display the status for the current VLAN; display statistics for the current VLAN.

active500EM#show vlan
VLAN Name         Type       Media     Ports
---- ------------ ---------- --------- ------------------------------------
1    default      Static     ENET      Ethernet1/0/1	   Ethernet1/0/2
                                       Ethernet1/0/3       Ethernet1/0/4
                                       Ethernet1/0/5       Ethernet1/0/6
                                       Ethernet1/0/7       Ethernet1/0/8
                                       Ethernet1/0/9       Ethernet1/0/10
                                       Ethernet1/0/11      Ethernet1/0/12
                                       Ethernet1/0/13      Ethernet1/0/14
                                       Ethernet1/0/15      Ethernet1/0/16
                                       Ethernet1/0/17      Ethernet1/0/18
                                       Ethernet1/0/19      Ethernet1/0/20
                                       Ethernet1/0/21      Ethernet1/0/22
                                       Ethernet1/0/23      Ethernet1/0/24
                                       Ethernet1/0/25      Ethernet1/0/26
                                       Ethernet1/0/27      Ethernet1/0/28
2    VLAN0002     Static     ENET
Displayed Information Explanation
VLAN VLAN number
Name VLAN name
Type VLAN type, statically configured or dynamically learned.
Media VLAN interface type: Ethernet
Ports Access port within a VLAN
active500EM#show vlan summary
The max. Vlan entries: 4094
Existing Vlan:
Universal Vlan:
1     12     13     15     16     22
Internal Vlan:
Total Existing Vlan:6
active500EM(config)#show vlan private-vlan
VLAN Name         Type       Asso   VLAN Ports
---- ------------ ---------- ----------- ----------------------------------
100  VLAN0100     Primary    101    102  Ethernet1/0/9     Ethernet1/0/10
                                         Ethernet1/0/11    Ethernet1/0/12
                                         Ethernet1/0/13
101  VLAN0101     Community  100         Ethernet1/0/9     Ethernet1/0/10
                                         Ethernet1/0/11    Ethernet1/0/12
                                         Ethernet1/0/13
102  VLAN0102     Isolate    100         Ethernet1/0/9

 

3.1.18 show vlan-translation

Command: show vlan-translation
Function: Show the related configuration of vlan-translation.
Parameters: None.
Command mode: Admin Mode
Default: None.
Usage guide: Show the related configuration of vlan-translation.
Example:Show the related configuration of vlan-translation.

active500EM#show vlan-translation
Interface Ethernet1/0/1:
vlan-translation is enable, miss drop is not set
vlan-translation 5 to 10 in
Interface Ethernet1/0/2:
vlan-translation is enable, miss drop is set both
vlan-translation 6 to 12 out

 

3.1.19 switchport access vlan

Command: switchport access vlan <vlan-id>
no switchport access vlan
Function: Add the current access port to the specified VLAN. The ??no command deletes the current port from the specified VLAN and the port will be partitioned to VLAN1.
Parameter:

  • <vlan-id>: the VID for the VLAN to be added the current port. The valid range is 1 to 4094.

Command mode: Port Mode
Default: All ports belong to VLAN1 by default.
Usage guide: Only ports in access mode can join specified VLANs and an access port can only join one VLAN at a time.
Example: Add an access port to VLAN100.

active500EM(config)#interface ethernet 1/0/8
active500EM(config-if-ethernet1/0/8)#switchport mode access
active500EM(config-if-ethernet1/0/8)#switchport access vlan 100
active500EM(config-if-ethernet1/0/8)#exit

 

3.1.20 switchport forbidden vlan

Command: switchport forbidden vlan {WORD | all | add WORD | except WORD | remove WORD}
no switchport forbidden vlan
Function: Configure the forbidden VLAN for a port. This command can only be used to configure with trunk or hybrid ports, as well as ports where GVRP is not enabled. The no command cancels the forbidden VLAN list for a port.
Parameters:

  • WORD: set the VLAN list to forbidden vlan and overwrite the previous configuration.
  • all: sets all VLANs as forbidden.
  • add WORD: adds the VLAN list to the current forbidden VLAN list.
  • except WORD: sets all VLANs as forbidden except the VLAN list.
  • remove WORD: removes theVLANspecified by the vlanList from the current forbidden VLAN list.

Command mode: Port Mode
Default: Forbidden VLAN list is empty.
Usage guide: Tag the corresponding position for the forbidden VLAN list and clear allowed VLAN list flags in the ports. A port leaves these VLANs if it joined them statically. The port will send a message to the GVRP module to set the corresponding registered machine to forbidden mode.
Example: Port quits the corresponding VLAN and sets the corresponding registered machine to forbidden mode.

active500EM(config-if-ethernet1/0/1)#switchport forbidden vlan all

 

3.1.21 switchport hybrid allowed vlan

Command: switchport hybrid allowed vlan {WORD | all | add WORD | except WORD | remove WORD} {tag | untag}
no switchport hybrid allowed vlan
Function: Sets the hybrid port which allows the VLAN to pass in tagged or untagged mode. The ?no switchport hybrid allowed vlan? command restores to default.
Parameters:

  • WORD: sets VLAN list to the allowed vlan, and the latest configuration will overwrite the previous configuration.
  • all: sets all VLANs to allowed VLAN.
  • add WORD: add the VLAN list to the existing allowed VLAN list.
  • except WORD: sets all VLANs to allowed VLAN except the configured VLAN list.
  • remove WORD: deletes the specific VLAN or VLAN list from the existing allow VLAN list.
  • tag: apply tag mode to a specific VLAN.
  • untag: apply untag mode to a specific VLAN.

Command mode:Port Mode
Default: Deny all VLAN traffic.
Usage guide: The user can set the VLAN traffic allowed to pass through the hybrid port.Traffic from VLANs not included remains prohibited. The difference between tag and untag mode is as follows: set VLAN to untag mode and the frame sent via the hybrid port will arrive without a VLAN tag; set VLAN to tag mode and the frame sent via hybrid port will arrive with the corresponding VLAN tag. The same VLAN cannot be set to both tag and untag mode concurrently with a single hybrid port. When setting the tag or untag mode on a VLAN, the latest configuration will overwrite the previous setting.
Example: Set hybrid port allowed vlan 1, 3, 5-20 with untag mode and allow vlan 100; 300; 500-2000 with tag mode.

active500EM(config)#interface ethernet1/0/5
active500EM(config-if-ethernet1/0/5)#switchport mode hybrid
active500EM(config-if-ethernet1/0/5)#switchport hybrid allowed vlan 1;3;5-20 untag
active500EM(config-if-ethernet1/0/5)#switchport hybrid allowed vlan 100; 300; 500-2000 tag
active500EM(config-if-ethernet1/0/5)#exit

 

3.1.22 switchport hybrid native vlan

Command: switchport hybrid native vlan <vlan-id>
no switchport hybrid native vlan
Function: Set the Hybrid port PVID. The no command restores to default.
Parameter:

  • <vlan-id>: hybrid port PVID.

Command mode: Port Mode
Default: Hybrid port PVID is 1.
Usage guide: When an untagged frame enters a Hybrid port, a tag of the native PVID which is set by this command, will be added as the frame is forwarded to the native VLAN.
Example: Set the native vlan to 100 for a Hybrid port.

active500EM(config)#interface ethernet1/0/5
active500EM(config-if-ethernet1/0/5)#switchport mode hybrid
active500EM(config-if-ethernet1/0/5)#switchport hybrid native vlan 100
active500EM(config-if-ethernet1/0/5)#exit

 

3.1.23 switchport interface

Command: switchport interface [ethernet | portchannel] [<interface-name> | <interface-list>] no switchport interface [ethernet | portchannel] [<interface-name> | <interface-list>] Functon: Specify an Ethernet port to a VLAN. The no command deletes one or more ports from a specified VLAN.
Parameters:

  • Ethernet: the Ethernet port to be added.
  • portchannel: the port to be added is a link-aggregation port.
  • <interface-name>: port name, such as e1/0/1. If this option is selected, Ethernet or port channel should not be selected.
  • <interface-list>: the port list to be added or deleted (???;??? and ???-??? are supported). For example: ethernet1/0/1;3;4-7;8.

Command mode: VLAN Mode
Default: A newly created VLAN contains no port by default.
Usage guide: Access ports are normal ports and can join a VLAN. A port can only join one VLAN at a time.
Example: Assign Ethernet port 1, 3, 4-7, and 8 to VLAN100.

active500EM(config-vlan100)#switchport interface ethernet 1/0/1;3;4-7;8

 

3.1.24 switchport mode

Command: switchport mode {trunk | access | hybrid}
Functon: Set the port to access mode, trunk mode, or hybrid mode.
Parameters:

  • trunk: the port allows traffic of multiple VLANs.
  • access: indicates the port belongs to one VLAN only.
  • hybrid: the port allows the traffic of multiple VLANs to pass through in tag or untag mode.

Command mode: Port Mode
Default: The port is in Access mode.
Usage guide: Ports in trunk mode are called Trunk ports. Trunk ports can allow traffic of multiple VLANs to pass through. VLANs in different switches can be interconnected with Trunk ports. Ports in access mode are called Access ports. An Access port can be assigned to one, and only one, VLAN at a time. Hybrid ports can pass traffic for multiple VLANs, receive and send multiple VLAN packets, connect switches, or connect computers. Hybrid and Trunk ports receive data in a similar manner but send data differently. Hybrid ports allow packets of multiple VLANs to be sent with no tag. Trunk ports only allow packets of the default VLAN to be sent with no tag. The port attribute cannot be directly converted between Hybrid and Trunk. The port must be configured for access first, and then it can be configured to Hybrid or Trunk. When the Trunk or Hybrid attribute is cancelled, the port attribute is restored to the default (access) attribute and belongs to vlan1.
Example: Set port 5 to trunk mode, port 8 to access mode, and port 10 to hybrid mode.

active500EM(config)#interface ethernet 1/0/5
active500EM(config-if-ethernet1/0/5)#switchport mode trunk
active500EM(config-if-ethernet1/0/5)#exit
active500EM(config)#interface ethernet 1/0/8
active500EM(config-if-ethernet1/0/8)#switchport mode access
active500EM(config-if-ethernet1/0/8)#exit
active500EM(config)#interface ethernet 1/0/10
active500EM(config-if-ethernet1/0/10)#switchport mode hybrid
active500EM(config-if-ethernet1/0/10)#exit

 

3.1.25 switchport trunk allowed vlan

Command: switchport trunk allowed vlan {WORD | all | add WORD | except WORD | remove WORD}
no switchport trunk allowed vlan
Functon: Set the trunk port to allow VLAN traffic. The no command restores the default setting.
Parameters:

  • WORD: specified VIDs (keywords).
  • all: all VIDs. The range is from 1 to 4094.
  • add: add assigned VIDs behind the allowed vlan.
  • except: add all VIDs to the allowed vlan except the assigned VIDs.
  • remove: delete assigned allowed vlans from allow vlan list.

Command mode: Port Mode
Default: Trunk port allows all VLAN traffic.
Usage guide: The user can use this command to set the VLAN traffic allowed to pass-through the Trunk port. VLAN traffic not included in the parameters is prohibited.
Example: Set the Trunk port to allow traffic of VLAN1, 3, 5-20.

active500EM(config)#interface ethernet 1/0/5
active500EM(config-if-ethernet1/0/5)#switchport mode trunk
active500EM(config-if-ethernet1/0/5)#switchport trunk allowed vlan 1;3;5-20
active500EM(config-if-ethernet1/0/5)#exit

 

3.1.26 switchport trunk native vlan

Command: switchport trunk native vlan <vlan-id>
no switchport trunk native vlan
Functon: Set the PVID for the Trunk port. The no?? command restores to the default setting.
Parameters:

  • <vlan-id>: the PVID for the Trunk port.

Command mode: Port Mode
Default: The default PVID of the Trunk port is 1.
Usage guide: PVID is defined in 802.1Q. Trunk port PVID is used to tag untagged frames. When an untagged frame enters a Trunk port, the port will tag the untagged frame with the native PVID.
Example: Set the native VLAN for a Trunk port to 100.

active500EM(config)#interface ethernet 1/0/5
active500EM(config-if-ethernet1/0/5)#switchport mode trunk
active500EM(config-if-ethernet1/0/5)#switchport trunk native vlan 100
active500EM(config-if-ethernet1/0/5)#exit

 

3.1.27 vlan

Command vlan WORD
no vlan WORD
Functon: Create VLANs and enter VLAN Configuration Mode. If using ‘;’ and ‘-‘ connect with multi-VLANs the command will create the specified VLANs. Enter the VLAN Configuration Mode for an existing VLAN. If the VLAN does not exist, then create the VLAN via VLAN Configuration Mode. In VLAN Mode, the user can set the VLAN name and assign the switch ports to the VLAN. The no command deletes specified VLANs.
Parameter:

  • WORD: the VLAN ID to be created/deleted. The valid range is 1 to 4094 ( connect with ‘;’ and ‘-‘).

Command mode: Global Mode
Default: VLAN1.
Usage guide: VLAN1 is the default VLAN and cannot be configured or deleted by the user. The maximum number of VLANs is 4094. Please note that dynamic VLANs configured using GVRP cannot be deleted with this Command.
Example: Create VLAN100 and enter the Configuration Mode for VLAN 100.

active500EM(config)#vlan 100
active500EM(config-vlan100)#

 

3.1.28 vlan internal

Command: vlan <2-4094> internal
Functon: Specify the internal VLAN ID. After an ID is specified as the internal VLAN ID, it is not allowed to be used by another VLAN. Internal VLAN is only used for the LOOPBACK interface, it cannot add a physical port. The new internal VLAN ID takes effect after saving the configuration and rebooting the switch.
Parameter:

  • <vlan-id>: The ID is specified as an internal VLAN ID with a range of 2 to 4094.

Command mode: Global Mode
Default: 1006.
Usage guide: Set 1006 as the default internal VLAN ID. The internal VLAN ID needs to be modified when the network sets the VLAN ID to 1006. Internal VLAN ID must select an unused ID, otherwise, other VLANs may be affected. This command takes effect after saving the configuration and rebooting the switch.
Example: Set 100 as the internal VLAN ID.

active500EM(config)#vlan 100 internal

 

3.1.29 vlan ingress enable

Command: vlan ingress enable
no vlan ingress enable
Function: Enable the VLAN ingress filtering for a port. The no command disables the ingress filtering.
Parameters: None.
Command mode: Port Mode
Default: VLAN ingress filtering function enabled.
Usage guide: After VLAN ingress filtering is enabled on the port, the system will check the source port first when it receives data.Then, it will forward the data to the destination port if it is aVLAN member port. Otherwise, it will drop the data.
Example:Disable VLAN ingress rules on the port.

active500EM(config-if-ethernet1/0/1)# novlan ingress enable

 

3.1.30 vlan-translation

Command: vlan-translation <old-vlan-id> to <new-vlan-id> {in | out}
no vlan-translation <old-vlan-id> {in | out}
Function: Add VLAN translation by creating a mapping between the original VLAN ID and the current VLAN ID. The no command deletes corresponding mapping.
Parameters:

  • <old-vlan-id>: the original VLAN ID.
  • <new-vlan-id>: the translated VLAN ID.
  • in: indicates ingress translation
  • out: indicates egress translation.

Command mode: Port Mode
Default: None
Usage guide: This command configures the in/out translation of the VLAN translation function. The data packets will be matched according to the configured translation. The VLAN ID will be changed to the configuration parameter. The ?vlan-translation miss drop? command will determine forwarding if there is no match. ?Vlan-translation miss drops? do not show a status of dropped for the egress translation. The packet will be untagged if there is not a match.
Example: Move the VLAN100 data entered from port1 to VLAN2 after ingress translation and the data traffic out from VLAN2 to VLAN100 after egress translation.

active500EM#config
active500EM(config)#interface ethernet 1/0/1
active500EM(config-if-ethernet1/0/1)#vlan-translation enable
active500EM(config-if-ethernet1/0/1)#vlan-translation 100 to 2 in
active500EM(config-if-ethernet1/0/1)#vlan-translation 2 to 100 out
active500EM(config-if-ethernet1/0/1)#exit
active500EM(config)#

 

3.1.31 vlan-translation enable

Command: vlan-translation enable
no vlan-translation enable
Function: Enable VLAN translation on the port. The no command restores to the default value.
Parameters: None
Command mode: Port Mode
Default: VLAN translation has not been enabled on the port.
Usage guide: This command and dot1q-tunnel are mutually exclusive.
Example: Enable the VLAN translation function on port1.

active500EM#config
active500EM(config)#interface ethernet 1/0/1
active500EM(config-if-ethernet1/0/1)#vlan-translation enable

 

3.1.32 vlan-translation miss drop

Command: vlan-translation miss drop {in | out |both}
no vlan-translation miss drop {in | out | both}
Function: Set packet dropping when checking for failures in vlan-translation. The no command restores to default.
Parameters:

  • in: indicates to ingress.
  • out: indicates egress.
  • both: indicates bi-directional flow.

Command mode: Port Mode
Default: Do not drop packets if failures are found in vlan-translation.
Usage guide: When performing the mapping translation between the original and the current VID, the packet will not be dropped if the corresponding translation is not configured. However, if failure occurs during mapping translation, the packet will drop the tag message if this command is used. This command has no effect on packets without tags.
Example: Set ingress packets to drop on port1 in the event of translation failure.

active500EM(config-if-ethernet1/0/1)#vlan-translation miss drop in

 


Return to Controller Wired CLI Table of Contents