Configuring a VLAN
A VLAN must include a set of logical interfaces that participate in Layer 2 learning and forwarding. You can optionally configure a VLAN identifier and a Layer 3 interface for the VLAN to also support Layer 3 IP routing.
To enable a VLAN, include the following statements:
You cannot use the slash (/) character in VLAN names. If you do, the configuration does not commit and an error is generated.
For the vlan-id statement, you can specify either a valid VLAN identifier or the none or all options.
To include one or more logical interfaces in the VLAN, specify an interface-name for an Ethernet interface you configured at the [edit interfaces] hierarchy level.
![]() | Note: A maximum of 4096 active logical interfaces are supported for a VLAN or on each mesh group in a virtual private LAN service (VPLS) instance configured for Layer 2 bridging. |
By default, each VLAN maintains a Layer 2 forwarding database that contains media access control (MAC) addresses learned from packets received on the ports that belong to the VLAN. You can modify Layer 2 forwarding properties, for example, disabling MAC learning for the entire system or a VLAN, adding static MAC addresses for specific logical interfaces, and limiting the number of MAC addresses learned by the entire system, the VLAN, or a logical interface.
You can also configure spanning tree protocols to prevent forwarding loops.