I know that it is possible to tag a packet with a vlan ID based on its MAC address dynamically. For example, a packet comes into one of my switch port.
The switch detects that the source MAC address in that packet is xxx...xxx, then it checks its policy and puts the corresponding vlan ID, yyyy, into the packet.
The example above show how to assign a vlan ID to the packet based on its source MAC address. I think it is also possible to assign a vlan ID based on the IP address.
But, my question is: Can I assign vlan ID based on application?
For example, the switch do the job by detecting the IP and port number (port here means process port number in socket programming) in the incoming packet, then assign the vlan ID into the packet based on that?
Maybe the switch can identify an application by another combination instead of IP+process_port. How can switch do that if possible?
If assigning vlan ID based on application is possible, which kind of Cisco switch can do the job?