Candela Technologies Logo
Network Testing and Emulation Solutions

Understanding VRF Devices

Goal: Understand and inspect private VRF routing tables.

VRF devices are a Linux kernel networking driver that allows private routing tables for individual ports in the system. The examples below show how to find these routes. Requires version 5.3.9
 
  1. VRF Driver

    LANforge has been using the Virtual Routing and Forwarding driver since around 2018. This allows private routing tables for each LANforge managed interface. VRF provides specific networking benefits to LANforge:
      1. Virtual stations gain authentic routing as delivered from the AP's DHCP service.   IP sockets bound to that station will not send DNS requests out the host's default gateway, for instance.  This helps accurately test captive portal and HS2.0 web requests that should never know about the management network.
      1. Multiple identically numbered networks can be modeled in parallel.   Emulating a peer-to-peer VPN tunnel between two STA devices   that both are on 10.0.0.0/24 networks separated by a WAN.
  2. Disabling VRF

    This does make it more difficult to monitor the routes per port.
  3. If this feature is undesirable, you can use the following command to disable VRF:
    1. $ touch /home/lanforge/LF_NO_USE_VRF
    2. $ sudo reboot
  4. Finding VRF private routes

    To find the routes, you want to use these commands for any particular vrf device:
    1. Look for the station's master device:
      ip a show wlan3
      wlan3:  mtu 1500 qdisc noqueue master _vrf6 state DOWN mode DEFAULT group default qlen 1000
      link/ether 00:0e:8e:44:07:a1 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 256 maxmtu 2304
    2. When you know the master device you can display that specific routing table:
      1. A routing table with a gateway:
        ip route show vrf _vrf10
        default via 10.40.0.1 dev br0
        10.40.0.0/20 dev br0 scope link src 10.40.0.21
      2. With no default gateway:
        $ ip route show vrf _vrf15
        unreachable default

Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA
www.candelatech.com | sales@candelatech.com | +1.360.380.1618
Facebook | LinkedIn | Blog