<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/netlab-router-on-a-stick-example-ipspace-net-blog-3zvzqirms" -->

---
title: netlab Router-on-a-Stick Example « ipSpace.net blog
description: A hands-on walkthrough of configuring a router-on-a-stick topology using netlab. The setup includes two layer-2 switches (S1, S2) and a router (ROS) connecting...
canonical: https://daily.dev/posts/netlab-router-on-a-stick-example-ipspace-net-blog-3zvzqirms
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: netlab Router-on-a-Stick Example « ipSpace.net blog | daily.dev
og:description: A hands-on walkthrough of configuring a router-on-a-stick topology using netlab. The setup includes two layer-2 switches (S1, S2) and a router (ROS) connecting...
og:url: https://daily.dev/posts/netlab-router-on-a-stick-example-ipspace-net-blog-3zvzqirms
og:image: https://api.daily.dev/og/posts/3zvzqirms.png
og:image:alt: netlab Router-on-a-Stick Example « 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 Router-on-a-Stick Example « ipSpace.net blog

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

## Summary

A hands-on walkthrough of configuring a router-on-a-stick topology using netlab. The setup includes two layer-2 switches (S1, S2) and a router (ROS) connecting red and blue VLANs via VLAN trunks. Key configuration steps include setting VLANs to bridge mode, assigning vlan.mode: route on the router node, and running netlab up. The post also shows the resulting Arista cEOS subinterface configuration with dot1q encapsulation, and explains how to swap device types using the -d flag.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2022/10/netlab-router-stick>

## Questions this post answers

### How do I configure a router-on-a-stick in netlab with VLAN trunks?

Set the VLANs to bridge mode using `mode: bridge`, then on the router node set `vlan.mode: route`. Connect the router to the switch via a VLAN trunk link listing both VLANs. Running `netlab up` generates the full device configuration, including dot1q subinterfaces on Arista cEOS with separate IP addresses per VLAN (e.g., 172.16.0.5/24 and 172.16.1.5/24).

_Network engineers building inter-VLAN routing labs track netlab patterns and topology examples on daily.dev._

### How do I change the device type when running netlab up?

Pass the `-d` flag followed by the device name to `netlab up`, for example `netlab up -d cumulus`. This overrides the default device type defined in the topology file, letting you test the same topology across different network operating systems without editing the topology YAML.

_Those evaluating NOS options for lab automation find device comparison discussions on daily.dev._

## Similar posts on daily.dev

- [EVPN with SR-MPLS Core « ipSpace.net blog](https://daily.dev/posts/evpn-with-sr-mpls-core-ipspace-net-blog-taobtibzc) · ipSpace.net Blog · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/netlab-router-on-a-stick-example-ipspace-net-blog-3zvzqirms)

```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 Router-on-a-Stick Example « ipSpace.net blog","url":"https://daily.dev/posts/netlab-router-on-a-stick-example-ipspace-net-blog-3zvzqirms","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/netlab-router-on-a-stick-example-ipspace-net-blog-3zvzqirms"},"datePublished":"2026-08-11T08:52:49.453Z","dateModified":"2026-08-11T09:06:00.000Z","description":"A hands-on walkthrough of configuring a router-on-a-stick topology using netlab. The setup includes two layer-2 switches (S1, S2) and a router (ROS) connecting...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","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-router-on-a-stick-example-ipspace-net-blog-3zvzqirms","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 Router-on-a-Stick Example « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/netlab-router-on-a-stick-example-ipspace-net-blog-3zvzqirms#faq","mainEntity":[{"@type":"Question","name":"How do I configure a router-on-a-stick in netlab with VLAN trunks?","acceptedAnswer":{"@type":"Answer","text":"Set the VLANs to bridge mode using `mode: bridge`, then on the router node set `vlan.mode: route`. Connect the router to the switch via a VLAN trunk link listing both VLANs. Running `netlab up` generates the full device configuration, including dot1q subinterfaces on Arista cEOS with separate IP addresses per VLAN (e.g., 172.16.0.5/24 and 172.16.1.5/24). Network engineers building inter-VLAN routing labs track netlab patterns and topology examples on daily.dev."}},{"@type":"Question","name":"How do I change the device type when running netlab up?","acceptedAnswer":{"@type":"Answer","text":"Pass the `-d` flag followed by the device name to `netlab up`, for example `netlab up -d cumulus`. This overrides the default device type defined in the topology file, letting you test the same topology across different network operating systems without editing the topology YAML. Those evaluating NOS options for lab automation find device comparison discussions on daily.dev."}}]}
```

