Let's assume we have a switch connected to 2 hosts through 2 VLANs. And the switch is connected to a router (1) which handles VRF.
Let's assume Router 1 and Router 2 implement two VRF: VRF_Red and VRF_blue. The red computer sends a ping packet for instace to Router 2. How does the router 1 select the VRF table in this case ? Based on IP source address?
Also through 1 physical interface (with dot1q VLAN) between the switch and the router, can the router receive and assign packets from the switch to the corresponding VRF then forward it accordingly?
Usually speaking, in case static routing to router 1 is considered, only 1 default gateway is enough or since there are 2 VRFs 2 default gateway is required? Would the default gateway of the computer red and computer blue be the same? The answer is no so I understand.
Thank you in advance.
EDITED the image and the bold text.