VLAN switching is entirely a software thing, not a hardware thing.
Remember, Cisco is a SOFTWARE company primarily. They subcontract the
contruction of the appliances (or just buy smaller companies that build
hardware). Cisco writes routing and switching SOFTWARE.
I am unaware of any software for Linux that does inter-VLAN routing,
which would involve speaking/parsing VLAN Trunking Protocol (VTP) and
the ability to designate virtual interfaces WITHIN the VLAN trunk (ala
router-on-a-stick topologies).
You could use a VLAN-aware switch to break the trunk (if you're doing
trunking already) into separate LANs on separate ports, then plug each
port into a different interface on the Linux box. You would need as
many interfaces as you have VLANs.
While there are some routing appliances based on embedded BSD (and
possibly some embedded Linux devices, too), one must eventually admit
there are some things desktop and server Linux are just not meant to do.