A router normally has one routing table. With VRF (virtual routing and forwarding) it gets several, each with its own interfaces and routes. A packet stays in the VRF of the interface it comes in on. This way two customers can both use 10.0.0.0/24 and still run over the same router without seeing each other.
Use
Where
For
Provider
separating customer networks (in large networks together with MPLS)
Data centre
separating tenants
Company
separating the management network from the production networks
Setting up
Router(config)# vrf definition CUSTOMER-A
Router(config)# interface eth2
Router(config-if)# vrf forwarding CUSTOMER-A
Router(config-if)# ip address 10.0.0.1/24
Router(config)# ip route vrf CUSTOMER-A 0.0.0.0/0 10.9.0.2
Router# show ip route vrf CUSTOMER-A
Router# ping vrf CUSTOMER-A 10.0.0.10
First vrf forwarding, then the address: only inside the VRF may the same network appear a second time. In leyoNET, OSPF, RIP, BGP, NAT and automatic routing only apply to the global table.
How to do it in leyoNET
The same text as in the app’s help (F1 key).
VRF
VRF (virtual routing and forwarding) gives a router several separate routing tables. Typical at a provider: customer A and customer B both use 10.0.0.0/24, run through the same router and still never see each other.
Every port (also subinterface, VLAN interface, loopback) belongs to the global table or to a VRF.
A packet stays in the VRF of the port it arrives on. Replies of the router (ping) go back into the same VRF.
Each VRF has its directly connected networks and its own static routes. OSPF, RIP, BGP, NAT and automatic routing only work in the global table.
In the form: tab VRF. Command line:
vrf definition CUSTOMER-A
on the interface vrf forwarding CUSTOMER-A
ip route vrf CUSTOMER-A 0.0.0.0/0 10.1.1.2
show vrf, show ip route vrf CUSTOMER-A, ping vrf CUSTOMER-A 10.9.0.10
See an example
VRF: two customers, same addresses
A provider router separates two customers with VRFs. Both use 10.0.0.0/24 and 10.9.0.0/24 and still never see each other.
Both PCs open http://10.9.0.10/, the same address. Customer A gets the page of its server, customer B its own. Filter «http».
How routing worksDefault gateway, routing table, longest prefix and administrative distance – and when to route statically, automatically or dynamically.
VXLANExtending VLANs across a routed network: Ethernet frames in UDP 4789, VNI instead of VLAN number, VTEPs on layer 3 switches.