PBR or policy based routing

very well explained here.