Jeremy’s IT Lab lecture video:

Day 54 (3) - VRF


Commands


VRF Info

Virtual Routing & Forwarding (VRF) is used to divide a single router into multiple virtual routers.
Similar to how VLANs are used to divide a single switch (LAN) into multiple virtual switches (VLANs)

  • VRF works by allowing a router to build multiple separate routing tables.
    • Interfaces (Layer 3 only) and routes are configured to be in a specific VRF (VRF instance).
    • Only router interfaces, SVIs, and routed ports on multilayer switches can be configured in a VRF.
  • Traffic in one VRF cannot be forwarded out of an interface in another VRF.
    • However, VRF Leaking can be configured to allow traffic to pass between VRF’s
  • VRF is commonly used by service providers to allow one device to carry traffic from multiple customers.
    • Each customer’s traffic is isolated from the others.
    • Customer IP addresses can overlap without issues.

VRF is commonly used in MPLS, but for the CCNA, the kind of VRF we’re talking about is VRF-lite. (which VRF without MPLS)


VRF Configuration

  • show ip vrf
    • Shows all configured VRFs on the router.
  • show ip route vrf VRF-NAME
    • Shows the IP routing table for a specific VRF. (VRF routing tables do not show up in the normal show ip route command.)
  • ip vrf VRF-NAME
    • Creates a new VRF on the router.
  • ip vrf forwarding VRF-NAME
    • Applies the specified VRF onto the current interface.
  • ping vrf VRF-NAME IP-ADDRESS
    • Pings an IP address in the specified VRF.