<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/netlab-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm" -->

---
title: netlab: How do I Specify VLAN Interface Parameters «...
description: netlab automatically creates VLAN interfaces (SVI/BVI) for IRB VLANs on lab devices. To set parameters on these interfaces — such as OSPF cost — you must...
canonical: https://daily.dev/posts/netlab-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: netlab: How do I Specify VLAN Interface Parameters « ipSpace.net blog | daily.dev
og:description: netlab automatically creates VLAN interfaces (SVI/BVI) for IRB VLANs on lab devices. To set parameters on these interfaces — such as OSPF cost — you must...
og:url: https://daily.dev/posts/netlab-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm
og:image: https://api.daily.dev/og/posts/L28HmpYLm.png
og:image:alt: netlab: How do I Specify VLAN Interface Parameters « 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: How do I Specify VLAN Interface Parameters « ipSpace.net blog

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

## Summary

netlab automatically creates VLAN interfaces (SVI/BVI) for IRB VLANs on lab devices. To set parameters on these interfaces — such as OSPF cost — you must define them in the node's vlans dictionary rather than on the access interface directly. A global default can be set in the top-level vlans block, and per-node overrides go in the node's vlans block. Setting attributes on the first access interface is discouraged as that behavior may be removed. Known bugs around gateway.vrrp and static IP addressing in the vlans dictionary are being actively fixed.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2024/10/netlab-vlan-interface-parameters>

## Questions this post answers

### How do I set OSPF cost on a VLAN interface in netlab for a specific node?

Set the OSPF cost in the node's vlans dictionary. Define a global default under the top-level vlans block (e.g., ospf.cost: 10) and override it per node by adding the same key under the node's vlans entry (e.g., ospf.cost: 20 under nodes.sw1.vlans.red). This applies the per-node value to that node's VLAN interface while keeping the global default on all others.

_Engineers tuning netlab lab topologies track fixes and patterns like this on daily.dev._

### Can I set VLAN interface attributes on the first access link in netlab instead of the vlans dictionary?

No — while it may appear to work, setting VLAN interface attributes on the first access interface is explicitly discouraged. That behavior is considered a bug and will be removed the next time the related code is touched. The supported method is to define all VLAN interface parameters in the node's vlans dictionary.

_Keeping up with netlab's evolving behavior is easier when the relevant discussions surface on daily.dev._

---

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

[View this post on daily.dev](https://daily.dev/posts/netlab-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm)

```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: How do I Specify VLAN Interface Parameters « ipSpace.net blog","url":"https://daily.dev/posts/netlab-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/netlab-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm"},"datePublished":"2026-08-11T08:52:00.436Z","dateModified":"2026-08-11T08:54:18.448Z","description":"netlab automatically creates VLAN interfaces (SVI/BVI) for IRB VLANs on lab devices. To set parameters on these interfaces — such as OSPF cost — you must...","image":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","thumbnailUrl":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","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-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"networking","timeRequired":"PT2M"}
{"@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: How do I Specify VLAN Interface Parameters « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/netlab-how-do-i-specify-vlan-interface-parameters-ipspace-net-blog-l28hmpylm#faq","mainEntity":[{"@type":"Question","name":"How do I set OSPF cost on a VLAN interface in netlab for a specific node?","acceptedAnswer":{"@type":"Answer","text":"Set the OSPF cost in the node's vlans dictionary. Define a global default under the top-level vlans block (e.g., ospf.cost: 10) and override it per node by adding the same key under the node's vlans entry (e.g., ospf.cost: 20 under nodes.sw1.vlans.red). This applies the per-node value to that node's VLAN interface while keeping the global default on all others. Engineers tuning netlab lab topologies track fixes and patterns like this on daily.dev."}},{"@type":"Question","name":"Can I set VLAN interface attributes on the first access link in netlab instead of the vlans dictionary?","acceptedAnswer":{"@type":"Answer","text":"No — while it may appear to work, setting VLAN interface attributes on the first access interface is explicitly discouraged. That behavior is considered a bug and will be removed the next time the related code is touched. The supported method is to define all VLAN interface parameters in the node's vlans dictionary. Keeping up with netlab's evolving behavior is easier when the relevant discussions surface on daily.dev."}}]}
```

