CCNA Virtual Routing and Forwarding (VRF)

Jul 1, 2024

CCNA Virtual Routing and Forwarding (VRF) 💻

Overview

  • VRF: Virtual Routing and Forwarding
    • Divides one physical router into multiple virtual routers, similar to how VLANs (Virtual LANs) divide a switch into multiple virtual switches.
    • Each virtual router within a VRF has its routing table.
  • Purpose: Understanding VRF and its basic configurations (although VRF configuration isn't on the CCNA exam).
  • Lab: VRF isn't supported in Packet Tracer; use Cisco Modeling Labs (CML) or real Cisco devices.

Concepts and Capabilities

  • Default Routing Domain: Without VRF, traffic received on one router interface can be forwarded out of any other interface based on the routing table.
  • VRF Isolation: With VRF, traffic cannot be forwarded between interfaces in different VRFs.
    • Example: Traffic on R1’s G0/0 (VRF1) cannot be forwarded to G1/2 (VRF3).
  • Routing Tables: VRF allows creation of multiple routing tables (one per VRF).
  • Layer 3 Only: VRF applies to router interfaces, SVIs, and routed ports on multilayer switches, not Layer 2 interfaces.
  • VRF Leaking: Allows traffic to pass between VRFs, but it's a more advanced topic.

VRF vs. VRF-lite

  • VRF: Commonly used with MPLS (Multiprotocol Label Switching).
  • VRF-lite: VRF without MPLS, the focus of this lecture.
    • Usage: Service providers use VRF-lite to allow one device to carry traffic from multiple customers.
    • Benefits:
      • Traffic isolation: Each customer’s virtual router within a physical router is isolated from others.
      • Overlapping IP addresses: Customers can use the same IP subnets without conflict due to VRF.

Configuration Example

  1. Initial Setup Without VRF
    • Attempting to configure overlapping subnets without VRF results in errors.
    • Interface G0/2 on SPR1 cannot use 192.168.1.1/30 because it overlaps with G0/0’s subnet.
  2. Configuring VRF
    • Step 1: Create VRFs in global config mode: IP VRF CUSTOMER1 and IP VRF CUSTOMER2.
    • Step 2: Assign interfaces to VRFs. E.g., IP VRF FORWARDING CUSTOMER1 on G0/0.
    • Note: Reconfigure IP address after assigning an interface to a VRF as the IP is removed.
    • Verification: SHOW IP VRF and SHOW IP ROUTE VRF [VRF_NAME] to check VRF routing tables.
  3. Ping Tests
    • Pinging without specifying a VRF will fail as the global routing table has no routes.
    • Specify VRF in ping command: PING VRF CUSTOMER1 [IP_ADDRESS].

Key Points

  • Isolation: Hosts within the same VRF can communicate, while those in different VRFs cannot.
  • Usage: VRFs allow service providers to deliver multiple isolated networks to customers.
  • Configuration Steps: Simple - creating VRFs and assigning interfaces.
  • Further Study: For CCNP and beyond, deeper study into VRF is required.

Quiz Recap

  1. Question: Why doesn’t G0/0 have an IP address after ‘SHOW IP INTERFACE BRIEF’?
    • Answer: The IP address was removed by the IP VRF FORWARDING command.
  2. Question: Which device responds to PING 192.168.1.10 on R1?
    • Answer: No device, as pings without a specified VRF use the empty global routing table.
  3. Statements About VLANs and VRFs
    • Correct Answers: C, D, F

Conclusion

  • VRF provides the capability to split a router into multiple virtual routers, each with its own routing table, facilitating traffic isolation and overlapping IP addresses for service providers.
  • Understanding VRF is essential for higher-level network certifications like CCNP.