Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring VLANs

Switches use VLANs to make logical groupings of network nodes with their own broadcast domains. You can use VLANs to limit the traffic flowing across the entire LAN and reduce collisions and packet retransmissions.

Note: This task supports the Enhanced Layer 2 Software (ELS) configuration style. For ELS details, see Getting Started with Enhanced Layer 2 Software. If your switch runs software that does not support ELS, see Configuring VLANs.

For each endpoint on the VLAN, configure the following VLAN parameters on the corresponding interface:

  1. Specify the description of the VLAN:
    [edit interfaces interface-name unit 0]
    user@switch# set description vlan-description
  2. Specify the unique name of the VLAN:

    Note: Switches that run Junos OS with the ELS configuration style do not support a default VLAN. Therefore, on such switches, you must explicitly configure at least one VLAN, even if your network is simple and you want only one broadcast domain to exist.

    [edit interfaces interface-name unit 0]
    user@switch# set family ethernet-switching vlan members vlan-name
  3. Create the subnet for the VLAN:
    [edit interfaces]
    user@switch# set vlan unit 0 family inet address ip-address
  4. Configure the VLAN tag ID or VLAN ID list for the VLAN:
    [edit vlans]
    user@switch# set vlan-name vlan-id vlan-id-number

    or

    [edit vlans]
    user@switch# set vlan-name vlan-id-list [vlan-ids | vlan-id--vlan-id-]
  5. Specify the maximum time that an entry can remain in the forwarding table before it ages out:
    [edit vlans]
    user@switch# set vlan-name switch-options mac-table-aging-time time
  6. Specify a VLAN firewall filter to be applied to incoming or outgoing packets:
    [edit vlans]
    user@switch# set vlan-name filter (input | output) filter-name

Published: 2014-07-23