<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue" -->

---
title: Fast FRR Container Configuration « ipSpace.net blog
description: A developer working on netlab replaced Ansible-based FRR container configuration with direct Linux scripts executed via docker exec, using shebang tricks to...
canonical: https://daily.dev/posts/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Fast FRR Container Configuration « ipSpace.net blog | daily.dev
og:description: A developer working on netlab replaced Ansible-based FRR container configuration with direct Linux scripts executed via docker exec, using shebang tricks to...
og:url: https://daily.dev/posts/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue
og:image: https://api.daily.dev/og/posts/VA2CR9juE.png
og:image:alt: Fast FRR Container Configuration « 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.

# Fast FRR Container Configuration « ipSpace.net blog

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

## Summary

A developer working on netlab replaced Ansible-based FRR container configuration with direct Linux scripts executed via docker exec, using shebang tricks to handle both bash and vtysh configuration files. The approach reduced configuration time for a ~200-node leaf/spine/superspine fabric from 4 minutes 50 seconds (Ansible) to just 10 seconds. Key challenges included race conditions between bash scripts and FRRouting daemons, and the need for a 1-second sleep after container startup to allow daemons to initialize. The new approach is available in the dev branch as netlab 26.02.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2026/02/netlab-frr-configuration>

## Questions this post answers

### How much faster is configuring FRR containers with Linux scripts compared to Ansible in netlab?

Configuring a ~200-node leaf/spine/superspine fabric with Linux scripts takes 10 seconds elapsed time versus 4 minutes 50 seconds with Ansible — roughly a 29x speedup. The Linux script approach uses docker exec to run configuration scripts directly, while Ansible's slower startup pace previously masked timing issues with FRRouting daemon initialization.

_Network engineers optimizing lab provisioning speed track netlab and containerlab developments on daily.dev._

### How can I use vtysh as a shebang interpreter to make FRRouting config files executable Linux scripts?

Adding #!/usr/bin/vtysh -f as the first line of a configuration file makes it an executable Linux script. When executed, the kernel invokes vtysh with -f as the first argument and the script filename as the second — exactly the invocation needed to apply FRRouting configuration. netlab 26.02 can automatically prepend this shebang to configuration files that lack one.

_Teams building FRR-based network labs find workflow tips like this through daily.dev._

### Why does FRRouting configuration fail immediately after containerlab starts FRR containers?

containerlab starts FRR containers and moves on without waiting for the FRRouting daemons to be ready. When configuration scripts run too quickly, daemons like BGP may not yet be accepting connections, causing vtysh to report it cannot communicate with them even if it succeeded moments earlier. A sleep 1 after container startup resolves the issue by giving daemons time to initialize.

_Developers debugging containerlab and FRR timing issues find relevant discussions on daily.dev._

---

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

[View this post on daily.dev](https://daily.dev/posts/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue)

```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":"Fast FRR Container Configuration « ipSpace.net blog","url":"https://daily.dev/posts/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue"},"datePublished":"2026-08-11T08:54:46.907Z","dateModified":"2026-08-11T09:20:53.664Z","description":"A developer working on netlab replaced Ansible-based FRR container configuration with direct Linux scripts executed via docker exec, using shebang tricks to...","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/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"docker,networking","timeRequired":"PT5M"}
{"@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":"Fast FRR Container Configuration « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/fast-frr-container-configuration-ipspace-net-blog-va2cr9jue#faq","mainEntity":[{"@type":"Question","name":"How much faster is configuring FRR containers with Linux scripts compared to Ansible in netlab?","acceptedAnswer":{"@type":"Answer","text":"Configuring a ~200-node leaf/spine/superspine fabric with Linux scripts takes 10 seconds elapsed time versus 4 minutes 50 seconds with Ansible — roughly a 29x speedup. The Linux script approach uses docker exec to run configuration scripts directly, while Ansible's slower startup pace previously masked timing issues with FRRouting daemon initialization. Network engineers optimizing lab provisioning speed track netlab and containerlab developments on daily.dev."}},{"@type":"Question","name":"How can I use vtysh as a shebang interpreter to make FRRouting config files executable Linux scripts?","acceptedAnswer":{"@type":"Answer","text":"Adding #!/usr/bin/vtysh -f as the first line of a configuration file makes it an executable Linux script. When executed, the kernel invokes vtysh with -f as the first argument and the script filename as the second — exactly the invocation needed to apply FRRouting configuration. netlab 26.02 can automatically prepend this shebang to configuration files that lack one. Teams building FRR-based network labs find workflow tips like this through daily.dev."}},{"@type":"Question","name":"Why does FRRouting configuration fail immediately after containerlab starts FRR containers?","acceptedAnswer":{"@type":"Answer","text":"containerlab starts FRR containers and moves on without waiting for the FRRouting daemons to be ready. When configuration scripts run too quickly, daemons like BGP may not yet be accepting connections, causing vtysh to report it cannot communicate with them even if it succeeded moments earlier. A sleep 1 after container startup resolves the issue by giving daemons time to initialize. Developers debugging containerlab and FRR timing issues find relevant discussions on daily.dev."}}]}
```

