How does vlan assignment work with preserve-vlan or vlan-mobility knob enabled?
When the preserve-vlan or vlan mobility knob is enabled, the below logic is used for the vlan assignment.
1. Controller will check if the client has an association record. If there is an association record present for the client with valid association id (AID) then the controller does the vlan assignment from previous association record.
2. If there is no valid association record for the client then controller will check bridge table entry (show datapath bridge table) in the controller. If the bridge table entry is present with the vlan exists in any bss-id whose virtual-ap was configured with the same vlan, then controller will assign that vlan to the client. And if this vlan exists in another virtual-ap that has different ssid then controller will ignore that vlan for the client and clear the bridge table entry.
3. Otherwise, controller will do vlan assignment based on hash based or even distribution mechanism.