{"id":13617641,"url":"https://github.com/vincentbernat/network-lab","last_synced_at":"2025-05-15T13:07:26.349Z","repository":{"id":43496360,"uuid":"1781865","full_name":"vincentbernat/network-lab","owner":"vincentbernat","description":"Networking lab using root-less VM","archived":false,"fork":false,"pushed_at":"2024-11-07T17:14:56.000Z","size":7550,"stargazers_count":577,"open_issues_count":1,"forks_count":119,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-04-15T02:11:19.779Z","etag":null,"topics":["lab","linux","network"],"latest_commit_sha":null,"homepage":"https://vincent.bernat.ch/en/blog/2012-network-lab-kvm","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vincentbernat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"vincentbernat","custom":"https://www.buymeacoffee.com/vincentbernat"}},"created_at":"2011-05-21T21:25:25.000Z","updated_at":"2025-03-31T10:00:28.000Z","dependencies_parsed_at":"2024-11-29T22:33:01.860Z","dependency_job_id":null,"html_url":"https://github.com/vincentbernat/network-lab","commit_stats":{"total_commits":1469,"total_committers":6,"mean_commits":"244.83333333333334","dds":"0.43703199455411845","last_synced_commit":"9d7e1e30f3264120d1fe0cba66ddd0c77dd07727"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fnetwork-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fnetwork-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fnetwork-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fnetwork-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vincentbernat","download_url":"https://codeload.github.com/vincentbernat/network-lab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346624,"owners_count":22055808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lab","linux","network"],"created_at":"2024-08-01T20:01:45.212Z","updated_at":"2025-05-15T13:07:21.338Z","avatar_url":"https://github.com/vincentbernat.png","language":"Shell","funding_links":["https://github.com/sponsors/vincentbernat","https://www.buymeacoffee.com/vincentbernat"],"categories":["Shell","network"],"sub_categories":[],"readme":"Various network related labs\n============================\n\nI use those labs to test various stuff. Most of them are tailored to\nmy need. The most recent ones are more likely to work than the older\nones.\n\nThey are expected to run without being root on top of an up-to-date\nDebian sid. Some of them are using User-Mode-Linux, some other are\nusing KVM.\n\n`lab-generic` should always contain the latest iteration of the lab\nand be used as a base for other labs.\n\nFor labs exposing some serial console, you can use `socat` to connect:\n\n```\nsocat $(tty),raw,echo=0 UNIX-CONNECT:/tmp/tmp.N3BTQ07qSG/vm-IOS1-serial2.pipe\n```\n\nPreviously, labs were self-contained. This was done to avoid any\nbreakage when introducing \"new features\". However, this didn't work as\nexpected and labs become broken because of external changes (kernel\nchanges, systemd changes, etc.). Therefore, new labs are now sourcing\nsome common files (in `common/`). This means that older labs may broke\ndue to more recent changes. In this case, get the latest commit for a\nlab (`git log --oneline -1 lab-generic` for example) and get a\ncheckout for it (`git checkout 22f22864632a`).\n\nThis lab doesn't work on Ubuntu because they are missing VDE support\nin QEMU. The easiest way is to use `schroot` to work on a Debian\nBookworm:\n\n```\n#!/bin/sh\nsudo debootstrap bookworm bookworm\ncat \u003c\u003cEOF | sudo tee /etc/schroot/chroot.d/lab\n[lab]\ntype=directory\ndescription=Network lab\ndirectory=$PWD/bookworm\nusers=$USER\nshell=$SHELL\nprofile=default\nEOF\nsudo schroot -c lab apt install --no-install-recommends \\\n    qemu-system-x86 sudo tmux busybox ssh vde2 python3 binutils \\\n    dosfstools mtools ansible jq linux-image-amd64 nginx rsyslog\n```\n\nYou may need to uncomment `/dev/shm` line in\n`/etc/schroot/default/fstab`. You also have to add yourself to `kvm`\ngroup (`sudo adduser $USER kvm`). Then, run:\n\n    schroot -c lab ./setup /boot/$(schroot -c lab ls /boot | grep vmlinuz | head -1)\n\nThe `./setup` script takes a Linux kernel as first argument. Have a\nlook at\n[eudyptula-boot](https://github.com/vincentbernat/eudyptula-boot/blob/master/minimal-configuration)'s\n`minimal-configuration` script to compile a kernel that should work\nwith the lab as well.\n\nLicense\n-------\n\nAll the labs are distributed under the ISC license:\n\n\u003e Permission to use, copy, modify, and/or distribute this software for any\n\u003e purpose with or without fee is hereby granted, provided that the above\n\u003e copyright notice and this permission notice appear in all copies.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n\u003e WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n\u003e MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n\u003e ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n\u003e WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n\u003e ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n\u003e OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\nOther tools\n-----------\n\nThere exist many other tools to run network labs that may not be as\nhacky as this one:\n\n - [CORE](http://www.nrl.navy.mil/itd/ncs/products/core). It uses\n   Linux network namespaces and provides a GUI tool. This is a very\n   good tool. Please, have a look at it. It doesn't use disk images\n   and the whole lab configuration fits into a single file that's easy\n   to share. Integration with Quagga or BIRD is very good.\n\n - [GNS3](http://www.gns3.com/). It uses virtual machines and\n   emulators to build the network. It also comes with a GUI tool. You\n   can emulate Cisco, Juniper, Arista and other brands network\n   equipments. However, it relies heavily on disk images for anything\n   else than Cisco devices and it makes it harder to share your work\n   on GitHub.\n\nYou will find a more comprehensive list (with tests) on [Brian Linkletter's blog](http://www.brianlinkletter.com/open-source-network-simulators/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentbernat%2Fnetwork-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincentbernat%2Fnetwork-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentbernat%2Fnetwork-lab/lists"}