VLAN Variable for use with login page?

According to this: http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot#List_of_available_variables

The closest thing I can get is the interface-name, which returns the name of the bridge the user is connected to.

Is it possible to get a variable which outputs the VLAN that a user is connected to, if they are connected to one?

IE we have many VLANs all bridged together for the hotspot, but we need to know which vlan the user is coming off of, and we don’t want to have to set up dozens of separate hotspots, one for each VLAN.

That should be the solution, according to the manual you should get the name of the bridge port (which would be the VLAN interface), and not the bridge name:

interface-name - physical HotSpot interface name (in case of bridged interfaces, this will return the actual bridge port name)

Check with official support at support@mikrotik.com if that isn’t working, they may be able to help you out.

I’m emailing support…

However: according to the WIKI - interface-name - physical HotSpot interface name (in case of bridged interfaces, this will return the actual bridge port name)


So we have 10 VLAN interfaces.
All 10 VLAN interfaces are attached to a Bridge
The hotspot is set up on the Bridge

interface-name returns the name of the Bridge interface, not the name of the VLAN interface that the hotspot user is connected to.

Right. So the system isn’t behaving how the manual says it will - the manual says that the variable should return the name of the VLAN interface (which is the actual bridge port name), and not the name of the bridge interface.

So either the manual is wrong and they’ll fix the documentation (and you’re probably out of luck), or the system is wrong and they’ll fix it and you can use the variable to get the VLAN interface name.

Is there a definite answer to this question / problem.

Is interface-name returning bridge name or (as stated in documentation) bridge port name?

Is there any workaround for the same problem?

If anyone bumps into this problem - MikroTik support has a solution for it.

Just type:

/interface bridge settings set use-ip-firewall=yes

and variable $(interface-name) will carry actual bridge port name!