Configuring Switch-vlan
Context
VLAN Switch is a forwarding method that forwards data according to the information in VLAN tags of received frames. This method requires a pre-configured static forwarding path along switching nodes on the network. When receiving VLAN-tagged frames matching VLAN Switch entries, a switching node forwards the frames to the interfaces manually specified in the VLAN Switch table. VLAN Switch improves device forwarding efficiency and security, and prevents MAC address attacks as well as broadcast storms.
Similar to the VLAN mapping function, the switch-vlan function replaces outer VLAN tags of frames to implement inter-VLAN communication.
Procedure
- Run:
system-view
The system view is displayed.
- Run:
vlan-switch vlan-switch-name interface interface-type1 interface-number1 vlan vlan-id1 [ inner-vlan vlan-id2 [ to vlan-id3 ] ] interface interface-type2 interface-number2 [ switch-vlan vlan-id4 ]
Switch-vlan is configured to replace outer VLAN tags.
VLAN Switch has the following requirements on interfaces:
The source and destination interfaces specified in the VLAN Switch configuration command must be hybrid or trunk interfaces, and cannot be access or Eth-Trunk member interfaces.
VLAN Switch has the following requirements on VLANs:
- The VLANs used in VLAN Switch cannot be created in the system view.
- The VLANs used in QinQ cannot be used by VLAN Switch.
- When an outer VLAN tag in double-tagged frames is used for VLAN stacking, VLAN mapping, or control VLAN, the VLAN tag cannot be used by VLAN Switch.
SA boards of S series cannot specify double tags before VLAN Switch.
When double-tagged VLAN switching is configured, both inbound and outbound interfaces must be located on the X series cards or non X series cards.
- On a ring network, packets matching VLAN Switch entries can pass through the interfaces blocked by loop prevention protocols. Consequently, broadcast storms may occur. Therefore, VLAN Switch is not recommended for a ring network running a loop prevention protocol.