i have a router 2821 directly connected to a layer 2 switch 2950 . i have 10.24.15.1/24 as gateway for my machines and is configured on router interface fa 0/0 .
Now i have to create VRF in the router and i don't have spare interface on the router.
i am planning to configure sub - interface on fa 0/0 like fa 0/0.1 for 10.24.15.1 /24 and fa 0/0.2 for 10.24.16.1/2
ip vrf AB
route-target export 470X:57
route-target import 470X:57
int fa 0/0.1
ip address 10.24.15.1 255.255.255.0
int fa 0/0.2
ip vrf forwarding AB
ip address 10.24.16.1 255.255.255.0
router is directly connected to layer 2 switch .
10.24.15.1/24 users have gateway defined as 10.24.15.1
10.24.16.1/24 users have gateway defined as 10.24.16.1
i want only 10.24.16.1/24 subnet users should go through this vrf .
will this config and scenario work ??
if not , plz provide the sample config.