Use it to keep networks apart on shared hardware, and whenever "the router cannot reach it" might mean the command looked in the wrong table.
VRF Operational Reference
A VRF is a separate routing table inside a router. Each interface belongs to one VRF, and traffic arriving on it is routed using only that VRF's table — one router behaves like several.
1. show ip vrf interfaces — which VRF is the interface in?
2. Does the interface still have its address?
3. show ip route vrf <name> <address> — a route in that VRF?
4. ping vrf <name> <address> — with the VRF named.
5. Static route or service not working → was it configured with the VRF?
interface assigned to the VRF and readdressed → routes (static or protocol) configured in that VRF → route present in the VRF's table → tests run with the VRF named → reachable inside the VRF
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show vrfVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification Verify boundary
show vrf
show ip vrf interfaces
show ip route vrf CUSTOMER-A
show ip cef vrf CUSTOMER-A 10.20.0.0/24
ping vrf CUSTOMER-A 10.20.0.1 source GigabitEthernet0/1
show vrf lists the VRFs with their address families and interfaces. The interface view shows which VRF each interface is in. The routing and CEF commands show the table of one VRF. The ping tests reachability inside it.
First establish which VRF the interface in question belongs to; then run every further command with that VRF named.
Known-good: the interface is in the intended VRF and still has its address, the VRF's table has a route to the destination, and a ping inside the VRF succeeds.
Step 2 Failure boundaries & design notes Narrow the fault
- Ping fails from the router although the route "is there". The command was run without
vrf, so the global table was used. - An interface lost its IP address. It was assigned to a VRF after the address was configured.
- A static route has no effect. It was entered without
vrf <name>and went into the global table. - NTP, syslog, TACACS+ or SNMP do not work over the management port. The service is not told to use the management VRF.
- Two VRFs cannot reach each other. No route leaking is configured — or only in one direction.
- A routing neighbour does not form. The routing process runs in the global table while the interface is in a VRF.
show ip routeappears empty. The routes are in a VRF; the global table has none.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Every command acts on the global table unless the VRF is named: show ip route vrf, ping vrf, ip route vrf. Putting an interface into a VRF removes its IP address. Management services — NTP, syslog, TACACS+ — must be told to use the management VRF.
show vrf— VRFs, address families and interfaces.show ip vrf interfaces— which VRF each interface is in.show ip route vrf <name>— that VRF's table.show ip cef vrf <name> <prefix>— its forwarding entry.ping vrf <name> <address> source <interface>— reachability inside it.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
A VRF (virtual routing and forwarding instance) is a separate routing table inside a router. Each interface belongs to one VRF, and traffic arriving on it is routed using only that VRF's table. One router can thus behave like several independent routers.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
VRFs keep networks apart on shared hardware: customers, a guest network, or the management network. The same isolation is what makes them awkward in daily work. Every command — ping, show, a static route, an NTP server — acts on the global table unless told otherwise, so "the router cannot reach it" very often means "the command looked in the wrong table".
ReferenceHow it works1 section · depth on demand
Operational flow & dependencies
vrf definition CUSTOMER-A
address-family ipv4
!
interface GigabitEthernet0/1
vrf forwarding CUSTOMER-A
ip address 10.1.0.1 255.255.255.0
What a VRF separates. Each VRF has its own routing table, its own forwarding table and its own ARP entries. Two VRFs can use the same IP networks without conflict. Interfaces not placed in a VRF belong to the global table.
Assigning an interface with vrf forwarding removes any IP address already on it; the address has to be entered again afterwards. On a remote session through that very interface, this cuts the connection.
Everything is per VRF. Routing is configured separately for each one:
ip route vrf CUSTOMER-A 0.0.0.0 0.0.0.0 10.1.0.254
router ospf 10 vrf CUSTOMER-A
and operational commands need the VRF named:
show ip route vrf CUSTOMER-A
ping vrf CUSTOMER-A 10.1.0.254
Between routers. In the simple form, often called VRF-lite, each VRF needs its own link or subinterface to the next router, which has matching VRFs. In MPLS VPNs, VRFs are carried between sites by BGP, identified by route distinguishers and route targets.
Between VRFs. By default nothing passes. Routes can be leaked deliberately — with static routes that point into another table, or by importing and exporting route targets through BGP. Leaking must be arranged in both directions for traffic to flow.
The management VRF. Many platforms put the management port in its own VRF (often Mgmt-vrf). Services that should use it must say so: ntp server vrf Mgmt-vrf …, logging host … vrf Mgmt-vrf, ip tftp source-interface, and likewise for TACACS+, RADIUS and SNMP.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
VRFs in operation
A VRF is a separate routing and forwarding table on one router. Each interface belongs to exactly one VRF, and lookups happen only in that table. RFC 4364 introduced VRFs for BGP/MPLS VPNs, where each provider edge router keeps one VRF per attached customer. Two concepts make that work:
- Route distinguishers: make overlapping customer prefixes unique as 12-byte VPN-IPv4 routes.
- Route targets: extended communities that decide which VRFs import which routes. They allow full-mesh, hub-and-spoke and other topologies.
Commands with and without VRF context
| Task | Global table | VRF |
|---|---|---|
| Show routes | show ip route | show ip route vrf GUEST |
| Show CEF | show ip cef <ip> | show ip cef vrf GUEST <ip> |
| Ping | ping 10.150.0.27 | ping vrf GUEST 10.150.0.27 |
| Traceroute | traceroute <ip> | traceroute vrf GUEST <ip> |
| ARP | show ip arp | show ip arp vrf GUEST |
| OSPF | router ospf 1 | router ospf 10 vrf GUEST |
| BGP | address-family ipv4 | address-family ipv4 vrf GUEST |
Connecting VRFs
| Method | Use |
|---|---|
| Route leaking with route targets | Shared services (DNS, DHCP) imported into several VRFs |
| A firewall between VRFs | Inter-VRF traffic with inspection |
| Static routes pointing into another VRF | Small, specific exceptions |
| VRF-aware NAT | Overlapping address spaces reaching shared services |
Management VRF
Many devices put the management port in its own VRF (Mgmt-vrf or Mgmt-intf). Services like NTP, syslog, SNMP, TFTP and SSH then need the vrf keyword, or they try to use the global table.
R1# show vrf
Name Default RD Protocols Interfaces
GUEST 65010:150 ipv4 Vl150
Mgmt-vrf <not set> ipv4,ipv6 Gi0
R1# show ip route vrf GUEST 0.0.0.0
R1# show bgp vpnv4 unicast vrf GUEST summary
R1(config)# ntp server vrf Mgmt-vrf 10.99.0.10
R1(config)# logging host 10.99.0.20 vrf Mgmt-vrf
R1(config)# ip ssh source-interface GigabitEthernet0
Typical VRF faults
| Symptom | Cause |
|---|---|
| Ping fails, but the route exists | You pinged without vrf |
| Services can't reach their servers | Configured without the management VRF |
| Routes missing in a VRF | Route-target import and export mismatch |
| Interface lost its IP address | vrf forwarding applied after the address |
Documented example, not captured output.
Quick reference
A VRF (Virtual Routing and Forwarding) instance is a separate routing table and forwarding context on one router. Interfaces assigned to a VRF only route with other interfaces in the same VRF, so overlapping addresses and isolated customers or segments can share hardware.
vrf definition GUEST
address-family ipv4
interface Gi0/2
vrf forwarding GUEST
ip address 192.168.50.1 255.255.255.0
ip route vrf GUEST 0.0.0.0 0.0.0.0 203.0.113.1
Documented example, not captured output.
| Operation | VRF-aware form |
|---|---|
| Show routes | show ip route vrf GUEST |
| Ping | ping vrf GUEST 8.8.8.8 |
| ARP | show ip arp vrf GUEST |
Assigning an interface to a VRF removes its IP address — reconfigure it afterwards. Route leaking between VRFs needs explicit configuration.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → VRF Operational Reference. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
VRF Fast Check
Separate RIB/FIB context checks
1. Identify the VRF.
2. Confirm interface is bound to it.
3. Check route in that VRF, not global.
4. Test with VRF/source context.
5. Verify next-hop neighbor.
6. Check route leaking/import/export if crossing VRFs.
Cisco: show vrf, show ip route vrf <vrf>.