While thinking how an ISP may configure its internal network, I was wondering if it was possible to delegate a router's masquerade to a switch.
Details:
Let's assume there is a 48 port Gbps switch that has 48 vlans. The router is connected to the uplink of this switch. Assuming vlan1 is sending data to vlan2. With a naive routing, the packets from vlan1 would go to the switch, uplink to the router, the router would masquerade with its public IP address and then realize that the destination is on vlan2 and send it back to the switch to send to vlan2.
Ideally, the router should be able to push down a route for just this TCP stream to the switch and let the switch handle the traffic locally. Does that exist? If it does, what is the name of that technology and maybe some names of proprietary technology name? What are the security concerns with this? Could it be done for UDP considering the stateless nature of UDP?