SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
With Vagrant and Ansible
Run Your Own
Networking Lab
Ondřej Caletka | 29 November 2022 | NLUUG 2022
Ondřej Caletka | NLUUG 2022 | 29 November 2022
RIPE NCC Learning & Development
• Former Training Services of the RIPE NCC
• Face-to-face trainings for LIRs
- Recently restarted after COVID-19
• Webinars for LIRs
- Live interactive sessions lasting 1-2 hours
• RIPE NCC Academy
- E-learning platform accessible to everyone
• RIPE NCC Certified Professionals
- Prove your skills and receive a digital badge
2
Ondřej Caletka | NLUUG 2022 | 29 November 2022
IPv6 Security E-learning Course
• A recent addition to IPv6 Security trainings and webinars
• Preparation for IPv6 Security Certified Professional exam
• First time with hands-on labs
3
hostA
ROUTER
hostB hostC
::1
eth0 eth0 eth0
Network Pre
fi
x:
2001:db8:f:1::/64
RA
::216:3e
ff
:feee:a ::216:3e
ff
:feee:b ::216:3e
ff
:feee:c
Ondřej Caletka | NLUUG 2022 | 29 November 2022
BGP Operations and Security
• Brand new e-learning course on the RIPE NCC Academy
• A sort-of realistic ISP network with many routers
4
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Delivering Lab Environment
• Should be universally scalable
• Should not cost us too much money
• Should allow enough time to play
with it
• Should be easy to use
• We decided to deliver a Virtual
Machine image
5
Image: Markus Meier, FSFE, CC-BY-SA 4.0
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Virtual Machine Challenges
• Different virtualisation technology on each platform
- The only common solution is Oracle VM VirtualBox, available on Windows, macOS
or Linux
- Still suboptimal compared to native solutions like Hyper-V or KVM
• No common keyboard layout or screen resolution
- Therefore, we deliver the VM headless with everything accessible over a web
interface
• Deploying a VM image is hard
- We try to make it easier by using Vagrant
6
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Running The Labs
• Install VirtualBox
• Install Vagrant
• Open terminal and type:
• Open web browser on
http://localhost:8080/
7
vagrant init ripencc/ipv6seclab
vagrant up
How It Works
Ondřej Caletka | NLUUG 2022 | 29 November 2022
How It Works
• Based on Ubuntu 20.04 LTS VM
• Containers managed by LXD
- Ubuntu for a Linux Host
- Alpine Linux with FRR as a virtual router (very small footprint)
• Consoles accessible from web browser using ttyd and tmux
• Static website and WebSocket proxy by NGINX
• Everything deployed using Ansible
• Public development in RIPE NCC's GitHub repository
9
https://github.com/RIPE-NCC/ipv6-security-lab/
https://github.com/RIPE-NCC/bgp-security-lab/
Ondřej Caletka | NLUUG 2022 | 29 November 2022
How to Get Terminal into a Web Browser
• At least three options:
- Gotty (Go)
- WeTTy (node.js)
- ttyd (C)
• They all act as a webserver with
WebSocket support
• Xterm.js runs in the browser
• For each WebSocket connection a
command is run
- the session is gone when you refresh/close
10
Ondřej Caletka | NLUUG 2022 | 29 November 2022
How to Not Lose the Session
• GNU Screen or tmux
• Allows multiple connections to
single terminal session
• Actually more complex than you think
• Getting scrollback to work is hard
• Tmux newer than 2.3 shortens
optimises long listings
• Workaround: rollback to tmux 2.3
11
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Putting Everything Together
• NGINX works as a reverse proxy in front of ttyd
• Port 80 is redirected from the host computer
• User opens their browser pointing to the redirected port
12
Vagrant and Ansible
Automating the most of it
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Vagrant Automates the Boring Parts
• A Virtual Machine image is downloaded and set up
- Network is set up
- SSH key authentication is configured
- A host folder is shared with the VM
• Ansible is installed into VM
• Ansible is run to install everything into the VM
• Everything is reproducible
- development is easy
14
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Ansible Playbooks Can Break
• Third party sources tend to break randomly
• Reachability of various websites varies around the world
• It is not safe to assume the playbook will keep working
• Therefore we create ready-made VM image
- Only one big file to download
- Faster deployment
- Everything frozen in time
- This is automated using a GitHub Action
15
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Vagrant Limitations
• Boxes (VM images) work only with particular hypervisor
- Supporting multiple hypervisors means duplicate work
• Only very basic networking support (no IPv6 in the VM)
- Manual modifications break Vagrant's automation
• No VirtualBox support for Apple Silicon
- This significantly impacts usability of Vagrant on new Apple devices
- Hopefully there will be some easy-to-use solution to automate running VMs
16
Demo Time
Everything will break now
Ondřej Caletka | NLUUG 2022 | 29 November 2022
Other Ready-made Solutions
• Containerlab
- Run network devices in Docker containers
- Automate creation/teardown of lab topologies
• ipSpace.net Virtual Networking Labs Tool
- A tool to prepare Vagrant and Ansible scripts to setup a networking lab
- Support for libvirt VMs, VirtualBox VMs and Containerlab
18
Probably not a good idea to run on a consumer-grade laptop though
Questions ?
Ondrej.Caletka@ripe.net
@ripencc
https://academy.ripe.net

Mais conteúdo relacionado

Semelhante a Run Your Own Networking Lab with Vagrant and Ansible

Using Minikube for Node.js development
Using Minikube for Node.js developmentUsing Minikube for Node.js development
Using Minikube for Node.js developmentTroy Connor
 
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open SourceEnhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open SourceNico Meisenzahl
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifeidotCloud
 
Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418inside-BigData.com
 
Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networksDeploying IPv6-mostly access networks
Deploying IPv6-mostly access networksRIPE NCC
 
Использование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийИспользование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийVitebsk Miniq
 
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...CodiLime
 
Docker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker, Inc.
 
CENGN - OpenStack MeetUp - March 2017
CENGN - OpenStack MeetUp - March 2017CENGN - OpenStack MeetUp - March 2017
CENGN - OpenStack MeetUp - March 2017Stacy Véronneau
 
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech Talk
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech TalkQuarkus: From developer joy to Kubernetes nirvana! | DevNation Tech Talk
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech TalkRed Hat Developers
 
Using Docker Platform to Provide Services
Using Docker Platform to Provide ServicesUsing Docker Platform to Provide Services
Using Docker Platform to Provide ServicesGLC Networks
 
Introducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 SupercomputerIntroducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 SupercomputerAkihiro Nomura
 
WebKit and GStreamer
WebKit and GStreamerWebKit and GStreamer
WebKit and GStreamercalvaris
 
WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)Igalia
 
Network architecture design for microservices on GCP
Network architecture design for microservices on GCPNetwork architecture design for microservices on GCP
Network architecture design for microservices on GCPRaphaël FRAYSSE
 
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersWSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersLakmal Warusawithana
 
Deploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersImesh Gunaratne
 
Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies Yandex
 
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Nico Meisenzahl
 
Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Patrick Chanezon
 

Semelhante a Run Your Own Networking Lab with Vagrant and Ansible (20)

Using Minikube for Node.js development
Using Minikube for Node.js developmentUsing Minikube for Node.js development
Using Minikube for Node.js development
 
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open SourceEnhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifei
 
Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418
 
Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networksDeploying IPv6-mostly access networks
Deploying IPv6-mostly access networks
 
Использование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийИспользование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложений
 
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
 
Docker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slides
 
CENGN - OpenStack MeetUp - March 2017
CENGN - OpenStack MeetUp - March 2017CENGN - OpenStack MeetUp - March 2017
CENGN - OpenStack MeetUp - March 2017
 
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech Talk
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech TalkQuarkus: From developer joy to Kubernetes nirvana! | DevNation Tech Talk
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech Talk
 
Using Docker Platform to Provide Services
Using Docker Platform to Provide ServicesUsing Docker Platform to Provide Services
Using Docker Platform to Provide Services
 
Introducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 SupercomputerIntroducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 Supercomputer
 
WebKit and GStreamer
WebKit and GStreamerWebKit and GStreamer
WebKit and GStreamer
 
WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)
 
Network architecture design for microservices on GCP
Network architecture design for microservices on GCPNetwork architecture design for microservices on GCP
Network architecture design for microservices on GCP
 
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersWSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
 
Deploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on Containers
 
Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies
 
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
 
Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017
 

Mais de RIPE NCC

Navigating IP Addresses: Insights from your Regional Internet Registry
Navigating IP Addresses: Insights from your Regional Internet RegistryNavigating IP Addresses: Insights from your Regional Internet Registry
Navigating IP Addresses: Insights from your Regional Internet RegistryRIPE NCC
 
Traces of Power: Internet Governance and Climate Action
Traces of Power: Internet Governance and Climate ActionTraces of Power: Internet Governance and Climate Action
Traces of Power: Internet Governance and Climate ActionRIPE NCC
 
Governing Environmental Sustainability in Tech
Governing Environmental Sustainability in TechGoverning Environmental Sustainability in Tech
Governing Environmental Sustainability in TechRIPE NCC
 
Gerardo-Viviers-RPKI-presentation-DKNOG14.pdf
Gerardo-Viviers-RPKI-presentation-DKNOG14.pdfGerardo-Viviers-RPKI-presentation-DKNOG14.pdf
Gerardo-Viviers-RPKI-presentation-DKNOG14.pdfRIPE NCC
 
LIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RIS
LIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RISLIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RIS
LIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RISRIPE NCC
 
Intro to RIPE and RIPE NCC: RIPE Atlas workshop
Intro to RIPE and RIPE NCC: RIPE Atlas workshopIntro to RIPE and RIPE NCC: RIPE Atlas workshop
Intro to RIPE and RIPE NCC: RIPE Atlas workshopRIPE NCC
 
IGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdf
IGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdfIGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdf
IGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdfRIPE NCC
 
Opportunities for Youth in IG - Alena Muravska RIPE NCC.pdf
Opportunities for Youth in IG - Alena Muravska RIPE NCC.pdfOpportunities for Youth in IG - Alena Muravska RIPE NCC.pdf
Opportunities for Youth in IG - Alena Muravska RIPE NCC.pdfRIPE NCC
 
RIPE NCC Internet Measurement Tools
RIPE NCC Internet Measurement ToolsRIPE NCC Internet Measurement Tools
RIPE NCC Internet Measurement ToolsRIPE NCC
 
IPv6 in Central Europe and the Baltics
IPv6 in Central Europe and the BalticsIPv6 in Central Europe and the Baltics
IPv6 in Central Europe and the BalticsRIPE NCC
 
RPKI For Routing Security
RPKI For Routing SecurityRPKI For Routing Security
RPKI For Routing SecurityRIPE NCC
 
SEEDIG 8 - Alena Muravska RIPE NCC.pdf
SEEDIG 8 - Alena Muravska RIPE NCC.pdfSEEDIG 8 - Alena Muravska RIPE NCC.pdf
SEEDIG 8 - Alena Muravska RIPE NCC.pdfRIPE NCC
 
Know Your Network: Why Every Network Operator Should Host RIPE Atlas
Know Your Network: Why Every Network Operator Should Host RIPE AtlasKnow Your Network: Why Every Network Operator Should Host RIPE Atlas
Know Your Network: Why Every Network Operator Should Host RIPE AtlasRIPE NCC
 
Minimising Impact When Incidents Occur With RIPE Atlas
Minimising Impact When Incidents Occur With RIPE AtlasMinimising Impact When Incidents Occur With RIPE Atlas
Minimising Impact When Incidents Occur With RIPE AtlasRIPE NCC
 
RIPE NCC Internet Measurement Services
RIPE NCC Internet Measurement ServicesRIPE NCC Internet Measurement Services
RIPE NCC Internet Measurement ServicesRIPE NCC
 
Spotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasSpotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasRIPE NCC
 
Spotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasSpotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasRIPE NCC
 
Spotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasSpotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasRIPE NCC
 
111 views of Swiss Internet Infrastructure
111 views of Swiss Internet Infrastructure111 views of Swiss Internet Infrastructure
111 views of Swiss Internet InfrastructureRIPE NCC
 
The RIPE NCC’s View of IPv6 in Sweden
The RIPE NCC’s View of IPv6 in SwedenThe RIPE NCC’s View of IPv6 in Sweden
The RIPE NCC’s View of IPv6 in SwedenRIPE NCC
 

Mais de RIPE NCC (20)

Navigating IP Addresses: Insights from your Regional Internet Registry
Navigating IP Addresses: Insights from your Regional Internet RegistryNavigating IP Addresses: Insights from your Regional Internet Registry
Navigating IP Addresses: Insights from your Regional Internet Registry
 
Traces of Power: Internet Governance and Climate Action
Traces of Power: Internet Governance and Climate ActionTraces of Power: Internet Governance and Climate Action
Traces of Power: Internet Governance and Climate Action
 
Governing Environmental Sustainability in Tech
Governing Environmental Sustainability in TechGoverning Environmental Sustainability in Tech
Governing Environmental Sustainability in Tech
 
Gerardo-Viviers-RPKI-presentation-DKNOG14.pdf
Gerardo-Viviers-RPKI-presentation-DKNOG14.pdfGerardo-Viviers-RPKI-presentation-DKNOG14.pdf
Gerardo-Viviers-RPKI-presentation-DKNOG14.pdf
 
LIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RIS
LIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RISLIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RIS
LIA HESTINA - Minimising impact before incidents occur with RIPE Atlas and RIS
 
Intro to RIPE and RIPE NCC: RIPE Atlas workshop
Intro to RIPE and RIPE NCC: RIPE Atlas workshopIntro to RIPE and RIPE NCC: RIPE Atlas workshop
Intro to RIPE and RIPE NCC: RIPE Atlas workshop
 
IGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdf
IGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdfIGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdf
IGF UA - Dialog with I_ organisations - Alena Muavska RIPE NCC.pdf
 
Opportunities for Youth in IG - Alena Muravska RIPE NCC.pdf
Opportunities for Youth in IG - Alena Muravska RIPE NCC.pdfOpportunities for Youth in IG - Alena Muravska RIPE NCC.pdf
Opportunities for Youth in IG - Alena Muravska RIPE NCC.pdf
 
RIPE NCC Internet Measurement Tools
RIPE NCC Internet Measurement ToolsRIPE NCC Internet Measurement Tools
RIPE NCC Internet Measurement Tools
 
IPv6 in Central Europe and the Baltics
IPv6 in Central Europe and the BalticsIPv6 in Central Europe and the Baltics
IPv6 in Central Europe and the Baltics
 
RPKI For Routing Security
RPKI For Routing SecurityRPKI For Routing Security
RPKI For Routing Security
 
SEEDIG 8 - Alena Muravska RIPE NCC.pdf
SEEDIG 8 - Alena Muravska RIPE NCC.pdfSEEDIG 8 - Alena Muravska RIPE NCC.pdf
SEEDIG 8 - Alena Muravska RIPE NCC.pdf
 
Know Your Network: Why Every Network Operator Should Host RIPE Atlas
Know Your Network: Why Every Network Operator Should Host RIPE AtlasKnow Your Network: Why Every Network Operator Should Host RIPE Atlas
Know Your Network: Why Every Network Operator Should Host RIPE Atlas
 
Minimising Impact When Incidents Occur With RIPE Atlas
Minimising Impact When Incidents Occur With RIPE AtlasMinimising Impact When Incidents Occur With RIPE Atlas
Minimising Impact When Incidents Occur With RIPE Atlas
 
RIPE NCC Internet Measurement Services
RIPE NCC Internet Measurement ServicesRIPE NCC Internet Measurement Services
RIPE NCC Internet Measurement Services
 
Spotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasSpotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE Atlas
 
Spotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasSpotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE Atlas
 
Spotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE AtlasSpotting Latency Issues with RIPE Atlas
Spotting Latency Issues with RIPE Atlas
 
111 views of Swiss Internet Infrastructure
111 views of Swiss Internet Infrastructure111 views of Swiss Internet Infrastructure
111 views of Swiss Internet Infrastructure
 
The RIPE NCC’s View of IPv6 in Sweden
The RIPE NCC’s View of IPv6 in SwedenThe RIPE NCC’s View of IPv6 in Sweden
The RIPE NCC’s View of IPv6 in Sweden
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Run Your Own Networking Lab with Vagrant and Ansible

  • 1. With Vagrant and Ansible Run Your Own Networking Lab Ondřej Caletka | 29 November 2022 | NLUUG 2022
  • 2. Ondřej Caletka | NLUUG 2022 | 29 November 2022 RIPE NCC Learning & Development • Former Training Services of the RIPE NCC • Face-to-face trainings for LIRs - Recently restarted after COVID-19 • Webinars for LIRs - Live interactive sessions lasting 1-2 hours • RIPE NCC Academy - E-learning platform accessible to everyone • RIPE NCC Certified Professionals - Prove your skills and receive a digital badge 2
  • 3. Ondřej Caletka | NLUUG 2022 | 29 November 2022 IPv6 Security E-learning Course • A recent addition to IPv6 Security trainings and webinars • Preparation for IPv6 Security Certified Professional exam • First time with hands-on labs 3 hostA ROUTER hostB hostC ::1 eth0 eth0 eth0 Network Pre fi x: 2001:db8:f:1::/64 RA ::216:3e ff :feee:a ::216:3e ff :feee:b ::216:3e ff :feee:c
  • 4. Ondřej Caletka | NLUUG 2022 | 29 November 2022 BGP Operations and Security • Brand new e-learning course on the RIPE NCC Academy • A sort-of realistic ISP network with many routers 4
  • 5. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Delivering Lab Environment • Should be universally scalable • Should not cost us too much money • Should allow enough time to play with it • Should be easy to use • We decided to deliver a Virtual Machine image 5 Image: Markus Meier, FSFE, CC-BY-SA 4.0
  • 6. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Virtual Machine Challenges • Different virtualisation technology on each platform - The only common solution is Oracle VM VirtualBox, available on Windows, macOS or Linux - Still suboptimal compared to native solutions like Hyper-V or KVM • No common keyboard layout or screen resolution - Therefore, we deliver the VM headless with everything accessible over a web interface • Deploying a VM image is hard - We try to make it easier by using Vagrant 6
  • 7. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Running The Labs • Install VirtualBox • Install Vagrant • Open terminal and type: • Open web browser on http://localhost:8080/ 7 vagrant init ripencc/ipv6seclab vagrant up
  • 9. Ondřej Caletka | NLUUG 2022 | 29 November 2022 How It Works • Based on Ubuntu 20.04 LTS VM • Containers managed by LXD - Ubuntu for a Linux Host - Alpine Linux with FRR as a virtual router (very small footprint) • Consoles accessible from web browser using ttyd and tmux • Static website and WebSocket proxy by NGINX • Everything deployed using Ansible • Public development in RIPE NCC's GitHub repository 9 https://github.com/RIPE-NCC/ipv6-security-lab/ https://github.com/RIPE-NCC/bgp-security-lab/
  • 10. Ondřej Caletka | NLUUG 2022 | 29 November 2022 How to Get Terminal into a Web Browser • At least three options: - Gotty (Go) - WeTTy (node.js) - ttyd (C) • They all act as a webserver with WebSocket support • Xterm.js runs in the browser • For each WebSocket connection a command is run - the session is gone when you refresh/close 10
  • 11. Ondřej Caletka | NLUUG 2022 | 29 November 2022 How to Not Lose the Session • GNU Screen or tmux • Allows multiple connections to single terminal session • Actually more complex than you think • Getting scrollback to work is hard • Tmux newer than 2.3 shortens optimises long listings • Workaround: rollback to tmux 2.3 11
  • 12. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Putting Everything Together • NGINX works as a reverse proxy in front of ttyd • Port 80 is redirected from the host computer • User opens their browser pointing to the redirected port 12
  • 14. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Vagrant Automates the Boring Parts • A Virtual Machine image is downloaded and set up - Network is set up - SSH key authentication is configured - A host folder is shared with the VM • Ansible is installed into VM • Ansible is run to install everything into the VM • Everything is reproducible - development is easy 14
  • 15. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Ansible Playbooks Can Break • Third party sources tend to break randomly • Reachability of various websites varies around the world • It is not safe to assume the playbook will keep working • Therefore we create ready-made VM image - Only one big file to download - Faster deployment - Everything frozen in time - This is automated using a GitHub Action 15
  • 16. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Vagrant Limitations • Boxes (VM images) work only with particular hypervisor - Supporting multiple hypervisors means duplicate work • Only very basic networking support (no IPv6 in the VM) - Manual modifications break Vagrant's automation • No VirtualBox support for Apple Silicon - This significantly impacts usability of Vagrant on new Apple devices - Hopefully there will be some easy-to-use solution to automate running VMs 16
  • 18. Ondřej Caletka | NLUUG 2022 | 29 November 2022 Other Ready-made Solutions • Containerlab - Run network devices in Docker containers - Automate creation/teardown of lab topologies • ipSpace.net Virtual Networking Labs Tool - A tool to prepare Vagrant and Ansible scripts to setup a networking lab - Support for libvirt VMs, VirtualBox VMs and Containerlab 18 Probably not a good idea to run on a consumer-grade laptop though