On 09/02/12 15:49, Walter Gould wrote:
All,
I have FR vmps configured to query postgresql for a mac address and return the vlan that is assigned to it. That is working well. However, I would like to configure vmps to return a "fallback" or guest vlan for cases when a mac address is not in the database.
Can anyone give me some suggestions or config examples?
This depends entirely on how you are settings the VLAN for "known" users. If you can show the config you are using, I can be more specific, but basically you check for the "not found" state, or check for the "reply vlan not set" state. For example: vmps { ... sql if (notfound) { update reply { VMPS-... = ... } } ... } Possibly the most general thing is: vmps { ... sql ... if (!reply:VMPS-VLAN-Name) { update reply { VMPS-VLAN-Name = GUEST } } }