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?
Garry GlendownConnect With a Mentor Consulting 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)
pergrConnect With a Mentor Commented:
In general, yes it is possible.

Note that each VRF is, essentially, its own routing table, and so its own virtual router.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.