<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7" -->

---
title: netlab: VRF Instantiation on Lab Devices « ipSpace.net blog
description: netlab minimizes VRF configuration on lab devices by applying a simple rule: a VRF is only instantiated on a device if that device has at least one interface...
canonical: https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: netlab: VRF Instantiation on Lab Devices « ipSpace.net blog | daily.dev
og:description: netlab minimizes VRF configuration on lab devices by applying a simple rule: a VRF is only instantiated on a device if that device has at least one interface...
og:url: https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7
og:image: https://api.daily.dev/og/posts/ZppirzyJ7.png
og:image:alt: netlab: VRF Instantiation on Lab Devices « ipSpace.net blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# netlab: VRF Instantiation on Lab Devices « ipSpace.net blog

**[ipSpace.net Blog](https://daily.dev/sources/ipspace)** · 4 min read · 0 upvotes · 0 comments

## Summary

netlab minimizes VRF configuration on lab devices by applying a simple rule: a VRF is only instantiated on a device if that device has at least one interface in that VRF. The post walks through several scenarios — basic PE router setups, inter-VRF route leaking, loopback-only VRFs, and group-based VRF assignment — showing how to correctly trigger VRF instantiation. Key insight: setting the global vrf.loopback parameter alone is insufficient; the VRF must also be referenced in the node or group definition to give netlab a reason to configure it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2024/05/netlab-vrf-instantiation>

## Questions this post answers

### When does netlab configure a VRF on a lab device?

netlab configures a VRF on a lab device only if that device has at least one interface in that VRF. For loopback-only VRFs, setting the global vrf.loopback parameter alone is not enough — the VRF must also be explicitly referenced in the node or group definition to trigger loopback interface creation and give netlab a reason to instantiate the VRF.

_Network engineers building complex lab topologies track netlab behaviour like this on daily.dev._

### How do I create a loopback-only VRF in netlab without adding external hosts?

Set vrf.loopback: True globally and reference the VRF in each node's definition (e.g., vrfs.red: under each node) or via a group with vrfs.red: set. This combination triggers loopback interface creation inside the VRF, satisfying netlab's rule that a VRF must have at least one interface to be instantiated and configured on a device.

_Those building MPLS VPN labs with netlab find related patterns and gotchas discussed on daily.dev._

---

Tags: [#networking](https://daily.dev/tags/networking), [#bgp](https://daily.dev/tags/bgp)

[View this post on daily.dev](https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"netlab: VRF Instantiation on Lab Devices « ipSpace.net blog","url":"https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7"},"datePublished":"2026-08-11T08:55:46.789Z","dateModified":"2026-08-11T09:26:32.253Z","description":"netlab minimizes VRF configuration on lab devices by applying a simple rule: a VRF is only instantiated on a device if that device has at least one interface...","image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","thumbnailUrl":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","isAccessibleForFree":true,"articleSection":"ipSpace.net Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ipSpace.net Blog","logo":"https://media.daily.dev/image/upload/s--xS7E82MT--/f_auto,q_auto/v1786438303/logos/ipspace?_a=BAMAMicg0","url":"https://daily.dev/sources/ipspace"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"networking,bgp","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ipSpace.net Blog","item":"https://daily.dev/sources/ipspace"},{"@type":"ListItem","position":3,"name":"netlab: VRF Instantiation on Lab Devices « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/netlab-vrf-instantiation-on-lab-devices-ipspace-net-blog-zppirzyj7#faq","mainEntity":[{"@type":"Question","name":"When does netlab configure a VRF on a lab device?","acceptedAnswer":{"@type":"Answer","text":"netlab configures a VRF on a lab device only if that device has at least one interface in that VRF. For loopback-only VRFs, setting the global vrf.loopback parameter alone is not enough — the VRF must also be explicitly referenced in the node or group definition to trigger loopback interface creation and give netlab a reason to instantiate the VRF. Network engineers building complex lab topologies track netlab behaviour like this on daily.dev."}},{"@type":"Question","name":"How do I create a loopback-only VRF in netlab without adding external hosts?","acceptedAnswer":{"@type":"Answer","text":"Set vrf.loopback: True globally and reference the VRF in each node's definition (e.g., vrfs.red: under each node) or via a group with vrfs.red: set. This combination triggers loopback interface creation inside the VRF, satisfying netlab's rule that a VRF must have at least one interface to be instantiated and configured on a device. Those building MPLS VPN labs with netlab find related patterns and gotchas discussed on daily.dev."}}]}
```

