Virtual Routing and Forwarding (VRF) allows multiple instances of independent routing tables to co-exist within the same router simultaneously. VRFs only apply to L3 interfaces. Dell Enterprise SONiC supports a management VRF instance, a default VRF instance, and one or more nondefault (tenant) VRF instances.
Three VRFs are used in the example switch configuration files provided for this deployment: management, default, and one tenant VRF.
The management VRF is created with the command ip vrf mgmt in SONiC and is always named mgmt. This VRF separates the OOB management routing table used by the Management 0 interface from the in-band routing tables. For example, you can have the default route 0.0.0.0/0 in both the management VRF route table and the default VRF route table, with each having a different gateway address. The routes will not conflict because the VRF dictates which route table is used. For this reason, using the management VRF is a best practice.
The default VRF is named default in SONiC. Interfaces that are not placed in another VRF are automatically in the default VRF. The loopback interfaces used for router IDs and for VTEP addresses remain in the default VRF in the leaf-spine fabric.
In SONiC, nondefault (or tenant) VRF names must start with Vrf and can contain up to 15 alphanumeric characters. In this example, the VxRail and NSX L3 VLANs are placed in a tenant VRF named Vrf1. Using a tenant VRF is a best practice because it enables symmetric integrated bridging and routing (IRB) with VXLAN. In symmetric IRB, both the ingress and egress VTEPs route packets to their final destination. The alternative is asymmetric IRB, which does not handle routing as efficiently as symmetric IRB.
One VRF virtual network interface (VNI) mapping VLAN is configured on the SONiC switches for each optional tenant VRF on the switch. In the example switch configuration files, VLAN 2001 is used for the tenant VRF named Vrf1. Only the switches use the VNI mapping VLAN. It is not configured on the VxRail nodes.