Monday, September 12, 2022
HomeNetworkingVRF Lite Topology with VLAN Trunks « ipSpace.web weblog

VRF Lite Topology with VLAN Trunks « ipSpace.web weblog


Within the final weblog publish within the VLANs and VRFs in netlab sequence, I described how we will mix VLANs and VRFs and create a VRF Lite resolution with stretched VLANs. Surprise how onerous would it not be to create a routed multi-hop VRF Lite topology? It’s trivial.

Routed VRF Lite lab topology

Let’s begin with the nodes. We gained’t want any additional attributes on particular person nodes, so we will outline them as a easy listing:

nodes: [r1, r2, r3, h1, h2, h3, h4 ]

Subsequent, we’ll outline two teams: Linux hosts and routers. We gained’t outline the gadget kind within the routers group so you should use no matter units you need so long as they help VLANs, VRFs and OSPF – the configuration modules we have to get the digital interfaces and routing protocols up and operating.

teams:
  routers:
    members: [ r1,r2,r3 ]
    module: [ vlan,vrf,ospf ]
  hosts:
    gadget: linux
    members: [ h1,h2,h3,h4 ]

Subsequent, we want two VRFs and two VLANs (one per VRF). The magic trick that makes VRF Lite work is mode: route in VLAN definition that adjustments VLANs from a stretched bridging thingy to an interface encapsulation thingy – a unique IP subnet is assigned to the VLAN occasion on each bodily hyperlink.

vrfs:
  crimson:
  blue:

vlans:
  crimson:
    mode: route
    vrf: crimson
  blue:
    mode: route
    vrf: blue

Talking of hyperlinks: right here’s the listing of hyperlinks. The hyperlinks between routers are VLAN trunks; the hyperlinks between hosts and routers are easy Ethernet interfaces in VRFs:

hyperlinks:
- r1:
  r2:
  vlan.trunk: [ red, blue ]
- r2:
  r3:
  vlan.trunk: [ red, blue ]  
- h1:
  r1:
    vrf: crimson
- h3:
  r1:
    vrf: blue
- h2:
  r3:
    vrf: crimson
- h4:
  r3:
    vrf: blue

That’s it. Execute netlab up -d your-device (after downloading the ultimate topology file) and also you’ll have a multi-VRF lab utilizing VLAN trunks.

Listed here are the related elements of Arista EOS configuration in case you’re questioning what we achieved with this straightforward lab topology file:

Routed VRF Lite configuration on R1

vlan 1000
   identify crimson
!
vlan 1001
   identify blue
!
vrf occasion blue
   rd 65000:2
!
vrf occasion crimson
   rd 65000:1
!
interface Ethernet1
   description r1 -> r2
   no switchport
!
interface Ethernet1.1
   description r1 -> [r2]
   encapsulation dot1q vlan 1001
   vrf blue
   ip handle 172.16.6.1/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet1.2
   description r1 -> [r2]
   encapsulation dot1q vlan 1000
   vrf crimson
   ip handle 172.16.7.1/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet2
   description r1 -> [h1] [stub]
   vrf crimson
   ip handle 172.16.2.1/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet3
   description r1 -> [h3] [stub]
   vrf blue
   ip handle 172.16.3.1/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Loopback0
   ip handle 10.0.0.1/32
!
ip routing
ip routing vrf blue
ip routing vrf crimson
!
router ospf 100 vrf crimson
   router-id 10.0.0.1
   passive-interface Ethernet2
!
router ospf 101 vrf blue
   router-id 10.0.0.1
   passive-interface Ethernet3

Right here’s the R2 configuration exhibiting how multi-hop VRF lite works with VLAN subinterfaces:

Routed VRF Lite configuration on R2

vlan 1000
   identify crimson
!
vlan 1001
   identify blue
!
vrf occasion blue
   rd 65000:2
!
vrf occasion crimson
   rd 65000:1
!
interface Ethernet1
   description r2 -> r1
   no switchport
!
interface Ethernet1.1
   description r2 -> [r1]
   encapsulation dot1q vlan 1001
   vrf blue
   ip handle 172.16.6.2/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet1.2
   description r2 -> [r1]
   encapsulation dot1q vlan 1000
   vrf crimson
   ip handle 172.16.7.2/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet2
   description r2 -> r3
   no switchport
!
interface Ethernet2.1
   description r2 -> [r3]
   encapsulation dot1q vlan 1001
   vrf blue
   ip handle 172.16.8.2/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet2.2
   description r2 -> [r3]
   encapsulation dot1q vlan 1000
   vrf crimson
   ip handle 172.16.9.2/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Loopback0
   ip handle 10.0.0.2/32
!
ip routing
ip routing vrf blue
ip routing vrf crimson
!
router ospf 100 vrf crimson
   router-id 10.0.0.2
!
router ospf 101 vrf blue
   router-id 10.0.0.2

Wish to run this lab by yourself, or strive it out with completely different units? No downside:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments