What happens if I have a switch configured with an accessport on vlan 20 and someone uses a static ip in a different subnet. vlan 20 has the subnet 192.168.20.0/24 in the router. Suppose the ip used is 192.168.30.10/24, which in the router is vlan 30. Now packets arrive at the router from ip 192.168.30.10 with a vlan tag of 20. What happens? Does the packet simply get dropped?
The router processes packets based on the destination address, not the source. So the router will still forward the packet based on the destination address, regardless of the source address.
If the destination address is in the router's forwarding table, it will forward the packet -- otherwise it will drop it.
The router strips off layer 2 information (like VLAN tags), so it won't have any bearing on the router's actions.
Of course any return traffic won't arrive at the right host, since it's on the wrong subnet.
The router would see nothing because the misconfigured machine would not be able to reach its gateway -- it will be arp'ing for a node that isn't there. The packets from 30.10 would never reach anything at 20.x because it isn't connected to that network.
(If someone set a static MAC entry for the gateway to the correct 20.x device, then the traffic would reach the vlan20 router. If the router is doing any sort of source verification, it would drop the alien packet, otherwise it would route like any other packet. Of course any replies would never come back to the misconfigured host.)