<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj" -->

---
title: Using VLAN and VRF Links in netlab Topologies «...
description: netlab release 1.5.1 introduced VRF links and VLAN access links, allowing topology authors to define intra-VRF and VLAN-specific links directly inside VRF and...
canonical: https://daily.dev/posts/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Using VLAN and VRF Links in netlab Topologies « ipSpace.net blog | daily.dev
og:description: netlab release 1.5.1 introduced VRF links and VLAN access links, allowing topology authors to define intra-VRF and VLAN-specific links directly inside VRF and...
og:url: https://daily.dev/posts/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj
og:image: https://api.daily.dev/og/posts/Ujvzrwkhj.png
og:image:alt: Using VLAN and VRF Links in netlab Topologies « 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.

# Using VLAN and VRF Links in netlab Topologies « ipSpace.net blog

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

## Summary

netlab release 1.5.1 introduced VRF links and VLAN access links, allowing topology authors to define intra-VRF and VLAN-specific links directly inside VRF and VLAN definition blocks rather than in the global links list. This eliminates repetitive vrf and vlan.access attributes on individual links, making lab topology files significantly more concise. The post walks through before-and-after YAML examples for both VRF-lite and VXLAN bridging topologies, and notes that upgrading is done via pip3 install --upgrade networklab.

## Full article

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

## Questions this post answers

### How do I define VRF links in a netlab topology without repeating the vrf attribute on every link?

In netlab 1.5.1 and later, you can list links directly inside a VRF's definition block using its links attribute. For example, placing links: [ rtr-h1, rtr-h2 ] under the red VRF definition automatically assigns the vrf: red attribute to those links and appends them to the global links list, removing the need to set vrf on each link individually.

_Network engineers building multi-VRF labs track netlab syntax changes like this on daily.dev._

### How do VLAN access links work in netlab 1.5.1 topology files?

VLAN access links are defined inside a VLAN's links attribute in the global vlans block. Each link listed there is automatically given the vlan.access attribute set to that VLAN's name and appended to the global links list. This lets you replace repeated vlan.access entries on individual links with a single concise links list per VLAN definition.

_Keeping lab topologies clean as netlab evolves is easier when you follow netlab releases on daily.dev._

### How do I upgrade netlab to the latest version?

Run pip3 install --upgrade networklab to upgrade netlab. The VRF links and VLAN access links features described here were introduced in netlab release 1.5.1.

_Developers managing network lab tooling catch upgrade notes like this on daily.dev._

---

[View this post on daily.dev](https://daily.dev/posts/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj)

```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":"Using VLAN and VRF Links in netlab Topologies « ipSpace.net blog","url":"https://daily.dev/posts/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj"},"datePublished":"2026-08-11T08:55:10.519Z","dateModified":"2026-08-11T09:22:22.974Z","description":"netlab release 1.5.1 introduced VRF links and VLAN access links, allowing topology authors to define intra-VRF and VLAN-specific links directly inside VRF and...","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/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","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":"Using VLAN and VRF Links in netlab Topologies « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/using-vlan-and-vrf-links-in-netlab-topologies-ipspace-net-blog-ujvzrwkhj#faq","mainEntity":[{"@type":"Question","name":"How do I define VRF links in a netlab topology without repeating the vrf attribute on every link?","acceptedAnswer":{"@type":"Answer","text":"In netlab 1.5.1 and later, you can list links directly inside a VRF's definition block using its links attribute. For example, placing links: [ rtr-h1, rtr-h2 ] under the red VRF definition automatically assigns the vrf: red attribute to those links and appends them to the global links list, removing the need to set vrf on each link individually. Network engineers building multi-VRF labs track netlab syntax changes like this on daily.dev."}},{"@type":"Question","name":"How do VLAN access links work in netlab 1.5.1 topology files?","acceptedAnswer":{"@type":"Answer","text":"VLAN access links are defined inside a VLAN's links attribute in the global vlans block. Each link listed there is automatically given the vlan.access attribute set to that VLAN's name and appended to the global links list. This lets you replace repeated vlan.access entries on individual links with a single concise links list per VLAN definition. Keeping lab topologies clean as netlab evolves is easier when you follow netlab releases on daily.dev."}},{"@type":"Question","name":"How do I upgrade netlab to the latest version?","acceptedAnswer":{"@type":"Answer","text":"Run pip3 install --upgrade networklab to upgrade netlab. The VRF links and VLAN access links features described here were introduced in netlab release 1.5.1. Developers managing network lab tooling catch upgrade notes like this on daily.dev."}}]}
```

