Is it possible to use sub interfaces on a ASR router to represent different Vlans and have each vlan mapped to a separate VRF instance?

not sure of the code, but something like this,

interface gig 1/0
no ip address
interface gig 1/0.1
encapsulation dot1q 10
ip vrf forwarding TESTING
ip address /24
no shut

interface gig 1/0.2
encapsulation dot1q 20
ip vrf forwarding ENGINEERING
ip address /24
no shut

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In general, yes it is possible.

Note that each VRF is, essentially, its own routing table, and so its own virtual router.
Garry GlendownConsulting and Network/Security SpecialistCommented:
Any interface, VLAN, Subinterfaces, interfaces derived from templates (i.e. DSLAM etc.), Tunnels will work ...  I assume you know the rest of the required stuff, like

vrf  definition ENGINEERING
   rd 65530:123
   route-target export 65530:123
   route-target import 65530:123
ip route vrf ENGINEERING

etc. ... for larger deployment in your backbone, a route reflector will be helpful in distributing the routes for the network ... also, ensure your MTU is set large enough on transfer interfaces in case you want to use the VRFs not only on that one router, as the MPLS requires slightly larger frames due to the added label ... which in turn means you should have  something like

   ip mtu 1500
   mpls mtu 1500

in the interfaces, otherwise either one will be set to the interface MTU underneath, which may screw with your network (e.g. OSPF/BGP might not come up due to MTU mismatch)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.