The following error is observed while configuring or editing an existing configuration of voice VLAN under [edit switch-options] hierarchy:
error: vlan: '1Vlan': Must be a valid VLAN name or Vlan tag
The following error is observed when configuring voice vlan under [edit switch-options voip] hierarchy:
{master:0}[edit switch-options voip]
root@switch# set interface ge-0/0/10 vlan 1Vlan
error: vlan: '1Vlan': Must be a valid VLAN name or VLAN tag
Vlan is configured and committed on device and works normally:
{master:0}[edit]
root@switch# show vlans 1Vlan
description "Voice vlan";
vlan-id 10;
The root cause is the name of the VLAN when you call it under [edit switch-options] hierarchy; you can create your VLANs and name them as you prefer on ELS switches (refer to the Related Links section for a complete list of ELS platforms), but when you call the VLAN under VOIP, the system expects VLAN tag or VLANn name. If the VLAN name starts with a number, the system looks at it as a VLAN tag. For example, if it is 1Vlan, the system is recognizing you are trying to call a VLAN with the tag 1Vlan because it starts with a number. However, since there is no vlan tag configured as 1Vlan, it reports the error.
By design, the system looks for VLAN names that start with a letter (no matter if it includes numbers right after or any other type of combinations) and VLAN tags with numbers. ELS platforms will allow you to configure VLAN names as you prefer.
To clear this error, name of the VLAN must be corrected based on the following rules:
- Must be a string of length at least 2 beginning with a letter and consisting of letters, numbers, periods, dashes, and underscores
For example, changing the name of the VLAN created from 1Vlan to Vlan1, the commit will pass this time:
{master:0}[edit]
root@switch# show vlans
1Vlan {
description "Voice vlan";
vlan-id 10;
}
{master:0}[edit]
root@switch# edit vlans
{master:0}[edit vlans]
root@switch# replace pattern 1Vlan with Vlan1
{master:0}[edit vlans]
root@switch# show
Vlan1
{
description "Voice vlan";
vlan-id 10;
}
{master:0}[edit vlans]
root@switch# commit
configuration check succeeds
commit complete
{master:0}[edit vlans]
root@switch# top edit switch-options voip
{master:0}[edit switch-options voip]
root@switch# set interface ge-0/0/10 vlan Vlan1
{master:0}[edit switch-options voip]
root@switch#
commit <-- commit passes since it recognizes you were calling a name of a vlan instead of a vlan tag
configuration check succeeds
commit complete
If you do NOT want to change the VLAN name, instead of calling it by the vlan name, you can use the VLAN tag under [edit switch-options] hierarchy, which is actually a number. Then there will be no confusion with the system:
{master:0}[edit switch-options voip]
root@switch# set interface ge-0/0/10 vlan 10
{master:0}[edit switch-options voip]
root@switch# commit
configuration check succeeds
commit complete