Set the priority for dynamic or egress VLAN assignment 7.4.2
Starting in FortiOS 7.4.2 with FortiSwitchOS 7.4.2, you can change how a managed FortiSwitch unit searches for VLANs with names (specified in the set description command) that match the Tunnel-Private-Group-Id or Egress-VLAN-Name attribute.
Before FortiOS 7.4.2 and FortiSwitchOS 7.4.2, if there was more than one VLAN with the same name (specified in the set description command), the managed FortiSwitch unit selected the VLAN with the lowest VLAN ID that matched the Tunnel-Private-Group-Id or Egress-VLAN-Name attribute.
In the following example, the Tunnel-Private-Group-Id attribute is set to testVLAN, and three VLANs have the same name of testVLAN. The managed FortiSwitch unit matches the Tunnel-Private-Group-Id attribute with the VLAN with the lowest ID, VLAN 4.
|
VLAN ID |
VLAN name |
|---|---|
|
4 |
|
|
5 |
|
|
6 |
|
In FortiOS 7.4.2 with FortiSwitchOS 7.4.2, you can assign a priority to each VLAN. If there is more than one VLAN with the same name (specified in the set description command), the managed FortiSwitch unit selects the VLAN with the lowest assignment-priority value (which is the highest priority) of the VLANs with names that match the RADIUS Tunnel-Private-Group-Id or Egress-VLAN-Name attribute. The assignment-priority value can be 1-255. By default, the assignment-priority is 128. The lowest assignment-priority value gets the highest priority.
In the following example, the Tunnel-Private-Group-Id attribute is set to localVLAN, and four VLANs have the same name of localVLAN. The managed FortiSwitch unit matches the Tunnel-Private-Group-Id attribute with the VLAN with the lowest priority, VLAN 5.
|
VLAN ID |
VLAN name |
VLAN priority |
|---|---|---|
|
4 |
|
50 |
|
5 |
|
25 |
|
6 |
|
75 |
|
7 |
|
100 |
To set the priority on the managed FortiSwitch unit for matching VLAN names:
config switch-controller managed-switch
edit <FortiSwitch_serial_number>
config vlan
edit <VLAN_name>
set assignment-priority <1-255>
next
end
next
end
For example:
config switch-controller managed-switch
edit "S524DF4K15000024"
config vlan
edit vlan5
set assignment-priority 200
next
end
next
end