How can I configure the default VLAN ID of an interface on a CE switch

67

The default VLAN ID of interfaces is VLAN 1. # Set the default VLAN of an access interface to VLAN 3.
system-view
[~HUAWEI] vlan batch 3
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port link-type access
[*HUAWEI-10GE1/0/1] port default vlan 3
[*HUAWEI-10GE1/0/1] commit
# Set the default VLAN of a trunk interface to VLAN 4.
system-view
[~HUAWEI] vlan batch 4
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port link-type trunk
[*HUAWEI-10GE1/0/1] port trunk pvid vlan 4
[*HUAWEI-10GE1/0/1] commit
# Set the default VLAN of a hybrid interface to VLAN 5.
system-view 
[~HUAWEI] vlan batch 5
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port link-type hybrid
[*HUAWEI-10GE1/0/1] port hybrid pvid vlan 5
[*HUAWEI-10GE1/0/1] commit

Other related questions:
How can I configure VLAN mirroring on a CE switch
Perform the following operations to configure VLAN mirroring.
  1. Run the system-view command to enter the system view.
  2. Run the observe-port [ observe-port-index ] interface interface-type interface-number command to configure a local observing port.
    To configure multiple observing ports, run the preceding command multiple times.
  3. Run the vlan vlan-id command to enter the VLAN view.
  4. Run the mirroring observe-port observe-port-index inbound command to copy traffic of the VLAN to the specified observing port.
    To copy traffic to multiple observing ports, run this command multiple times.
  5. Run the commit command to commit the configuration.


For example, you can run the following command to copy traffic of VLAN 10 to the observing port 10GE1/0/2.
<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/2
[*HUAWEI] vlan 10
[*HUAWEI-vlan10] mirroring observe-port 1 inbound
[*HUAWEI-vlan10] commit

How can I configure reserved VLANs on a CE switch
Reserved VLANs are the bearer channels for the internal control plane of switches and user service data of some features. By default, VLANs 4064 to 4094 are reserved. You can adjust the range of reserved VLANs by running the vlan reserved vlan-id command in the system view. When vlan-id is configured, the VLANs from vlan-id to vlan-id + 30 are set to reserved VLANs. For example, set the reserved VLAN ID range to 1000 to 1030. system-view [~HUAWEI] vlan reserved 1000 [*HUAWEI] commit //After the configuration is committed, restart the switch to validate the configuration. Description: VLANs in use cannot be configured as reserved VLANs. You can only adjust the range of reserved VLANs, but cannot delete them. If reserved VLANs conflict with common VLANs, the range of reserved VLANs cannot be used to create common VLANs. The reserved VLANs will not take effect until the switch restarts. The original reserved VLANs are used as common VLANs.

How to restore the default VLAN configuration of an interface
The default VLAN configuration of an interface involves the default VLAN of the interface and the VLAN that the interface joins. By default, the default VLAN configuration of an interface is as follows: Access: The default VLAN is VLAN 1, and an access interface joins VLAN 1 in untagged mode. Trunk: The default VLAN is VLAN 1, and a trunk interface joins VLAN 1 to VLAN 4094 in tagged mode. That is, a trunk interface allows all VLANs. Hybrid: The default VLAN is VLAN 1, and a hybrid interface joins VLAN 1 in untagged mode. Dot1q-tunnel: The default VLAN is VLAN 1, and a dot1q-tunnel interface joins VLAN 1. Negotiation-auto or Negotiation-desirable: If the interface is negotiated as an access interface, the default VLAN configuration of the interface is the same as that of the access interface. If the interface is negotiated as a trunk interface, the default VLAN is VLAN 1 and the interface joins VLANs 1 to 4094 in tagged mode. That is, the interface allows all VLANs. Run the display this include-default | include link-type command in the interface view to check the link type of the interface, and then perform one of the following configurations to restore the default configuration of the interface. Restore the default VLAN configuration of an access or dot1q-tunnel interface. system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo port default vlan Restore the default VLAN configuration of a trunk interface. system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo port trunk pvid vlan [HUAWEI-GigabitEthernet0/0/1] undo port trunk allow-pass vlan all [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 1 Restore the default VLAN configuration of a hybrid interface. system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo port hybrid pvid vlan [HUAWEI-GigabitEthernet0/0/1] undo port hybrid vlan all [HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 1 Restore the default VLAN configuration of the Negotiation-auto or Negotiation-desirable interface. system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo port default vlan [HUAWEI-GigabitEthernet0/0/1] undo port trunk pvid vlan [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan all

Must the default VLAN ID be configured in the EFM loopback test
In V100R005, the default VLAN ID must be configured. In V100R006 and later versions, you can choose not to configure the default VLAN ID.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top