Giter Club home page Giter Club logo

network-lab's Introduction

Various network related labs

I use those labs to test various stuff. Most of them are tailored to my need. The most recent ones are more likely to work than the older ones.

They are expected to run without being root on top of an up-to-date Debian sid. Some of them are using User-Mode-Linux, some other are using KVM.

lab-generic should always contain the latest iteration of the lab and be used as a base for other labs.

Previously, labs were self-contained. This was done to avoid any breakage when introducing "new features". However, this didn't work as expected and labs become broken because of external changes (kernel changes, systemd changes, etc.). Therefore, new labs are now sourcing some common files (in common/). This means that older labs may broke due to more recent changes. In this case, get the latest commit for a lab (git log --oneline -1 lab-generic for example) and get a checkout for it (git checkout 22f22864632a).

This lab doesn't work on Ubuntu because they are missing VDE support in QEMU. The easiest way is to use schroot to work on a Debian Buster:

#!/bin/sh
sudo debootstrap buster buster
cat <<EOF | sudo tee /etc/schroot/chroot.d/lab
[lab]
type=directory
description=Network lab
directory=$PWD/buster
users=$USER
shell=$SHELL
EOF
sudo schroot -c lab apt install \
    qemu-system-x86 sudo tmux busybox ssh vde2 python3 binutils \
    dosfstools mtools ansible

You may need to uncomment /dev/shm line in /etc/schroot/default/fstab. Then, run schroot -c lab ./setup.

License

All the labs are distributed under the ISC license:

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Other tools

There exist many other tools to run network labs that may not be as hacky as this one:

  • CORE. It uses Linux network namespaces and provides a GUI tool. This is a very good tool. Please, have a look at it. It doesn't use disk images and the whole lab configuration fits into a single file that's easy to share. Integration with Quagga or BIRD is very good.

  • GNS3. It uses virtual machines and emulators to build the network. It also comes with a GUI tool. You can emulate Cisco, Juniper, Arista and other brands network equipments. However, it relies heavily on disk images for anything else than Cisco devices and it makes it harder to share your work on GitHub.

You will find a more comprehensive list (with tests) on Brian Linkletter's blog.

network-lab's People

Contributors

vincentbernat avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.