Reserved VLANs and VLAN 0 and 1

The VLAN identifier is a 12-bit field in the header of each packet. Therefore, the maximum number of VLANs you can define is 4091. Netvisor OS switches reserve VLANs 0, 1, 4093, 4094, and 4095 for internal use.VLAN 0 is not a standard VLAN in Netvisor OS. It is used to represent all untagged or non-VLAN traffic. VLAN 1 is the default untagged traffic VLAN. Untagged traffic can be mapped to any VLAN, but by default, it is mapped to VLAN 1.


 

Warning: If you create a VLAN with scope fabric and untag all ports, you can cause problems with the fabric communication.


 

Informational Note:The untagged VLAN feature is not the same as the default VLAN using the IEEE 802.1Q tag 1.

1. To create a VLAN on the current switch, with the identifier 595, use the following command:

CLI network-admin@Leaf1 > vlan-create id 595 name VLAN595 scope local

By default, all ports are trunked on the new VLAN. If you want to specify ports that are trunked, use the optional parameter, ports, with a comma separated list of ports, or specify a range of ports.

In some cases, you may not want the VLAN created on all ports. You can specify none to apply the VLAN to internal ports only.

CLI network-admin@Leaf1 > vlan-create id 35 scope fabric ports none

CLI network-admin@Leaf1 > vlan-show

switch:            pubdev01

id:                35

nvid:              a000030:23

scope:             fabric

name:              vlan-35

active:            yes

stats:             yes

vrg:               0:0

ports:             65-72,255

untagged-ports:    none

active-edge-ports: none

switch:            pubdev02

 

To map ports on different switches into the scope fabric VLAN, use the following command:

CLI network-admin@Leaf1 > vlan-port-add switch switch-name ports

To modify a VLAN name, use the vlan-modify command to modify VLAN 25 description from blue to red:

CLI network-admin@Leaf1 > vlan-modify id 25 description blue

To modify the port list, use the vlan-port-add and the vlan-port-remove commands. If you want to remove a VLAN with the scope, fabric, you need to specify the switch name.

To display the VLANs configured on the switch, use the vlan-show command.

CLI network-admin@Leaf1 > vlan-show format all layout vertical

switch:            pubdev01

id:                1

nvid:              a000030:1

scope:             local

name:              default-1

active:            yes

stats:             yes

vrg:               0:0

ports:             1-72,128,255

untagged-ports:    1-72,128,255

active-edge-ports: 31,45-46,66,128

active-edge-ports: 65,128-129

switch:            pubdev02

id:                1

nvid:              a000024:1

scope:             local

name:              default-1

active:            yes

stats:             yes

vrg:               0:0

ports:             1-72,128-129,255

untagged-ports:    1-72,128-129,255

 

To configure ports 17 and 18 to accept untagged packets and map them to VLAN 595, use the following command:

CLI network-admin@Leaf1 > vlan-port-add vlan-id 595 ports 17,18 untagged