I’m building a classroom that has 8 identical environments consisting of two virtual machines each (each environment has exact same IP network), obviously I need vlans to separate them. In order for everything to work I need to be able to tag packets with certain VLANs based on port through which ip packet is received (to enable remote connectivity).
If the VLANs will have the same IP environment will you also be placing the same IP number on multiple VLAN interfaces on the RouterBoard? If so, look at VRF:
You can place each of the VLAN interfaces into a discrete VRF table and then use mangle to set the routing mark on traffic inbound from to certain ports so that the traffic ends up heading for the correct version of the DST IP number.