OpenWrt Virtual Testbed?

Someone knows about a virtual test-bed for OpenWrt? I want to test some routing tests with babel and ipv6. Additionally, it would be great if I could simulate a wireless channel (long distance links).

I thought maybe I would use valgrind with tc and different namespaces? Is that a good idea? Someone a better idea or code I could re-use?

I wonder if GNS3 would be able to run an OpenWrt image..

A x86_64 build in a VM environment?

Edit: GNS3 supports QEMU and Dynamips, so I'd assume that the QEMU Malta (Mips) target would work.


I tried the docker image openwrtorg/rootfs in GNS3. It seems to work, but don't forget to add /etc/config (or maybe /etc) to the directories that are saved by GNS3.


I've not used GNS3 in a long, long time. I remember being able to run Cisco cIOS images on it though. It's a great sandbox. Wonder if a How-To on setting up a testbed like that would be worth someone doing.. peer @mikma :laughing: :blush: :+1:

1 Like

Thanks @Grommish and @mikma. It looks like people would prefer gns3. I have no idea of it, but if I get it running, I think I will upload my project somewhere. :slight_smile:

Do I have to add for each GNS3 OpenWrt-Router Instance a new virtualbox VM?

If you use the openwrt appliance template that's included in gns3 then it will use one vm for each instance I assume.

But gns3 slso supports docker instances. If you use a Linux host then you don't need any vm at all. On other systems you need one vm to run docker. The openwrtorg/rootfs image can be used as a router directly, but you may want to use it as a base for your own Dockerfile if you need more packages.

@vgaetera You mean using libvirt to start VMs and then use netem simulate traffic on the virtual interfaces?

@mikma Wow, just imported one docker instance and it directly works! :slight_smile: I want to compile own images with special kernel falgs and so on. That is why I need something I can import myself. But this docker stuff seems awesome!!! :smiley:

Edit: Works means, I was able to start telnet session via gns3... xD

1 Like

@mikma That docker stuff is awesome!!! :smiley: That directly works with latest


Docker containers use the kernel running on the host. It doesn't use a Kernel from OpenWrt.


Even better, than I do not have any issues since my host kernel already ships with the needed modules (I believe). :smiley:

Could u describe the limitations of using docker with gns3?
I don't have full control over my network stack, or?

root@d6c348965795:/proc/sys/net/ipv6/conf/all# echo "1" > seg6_enabled 
/bin/ash: can't create seg6_enabled: Read-only file system

If I do the same in GNS3 it works. But I have no ip-full right now installed, to test if it will work.

You should probably use full virtualization, because it's problematic to achieve the proper level of isolation required for testing of kernel specific features with just OS-level virtualization.
Container-based virtualization is not for testing OS, but for deploying/testing applications/software.

1 Like

Containers can be isolated from the docker host with user namespaces. Is that enough? (It's used by default in for example lxd, but not in docker.)

I have now a running virtualbox setup, too.
You can just create a virtuablox x86 system and do this "linked vm".
Further do the settings

  • Start VM in headless mode
  • Allow GNS3 to juse any configured VirtualBox adapter
  • Telnet Console

I have to read more documentation about user namespaces and stuff like this.

Thank you!

There is no way of simulate a wireless link in gns3, or?

what exactly do you need to simulate?

you can do latencies/loss via netem... and there is this - scroll down to add some shaping but with 2.5 stuff like batman... things are difficult... vm pci passthrough... a few cheap devices are alot easier...


I would like to build a wireless network like we have in our Wireless Community (Freifunk Berlin). I want to test new IPv6 features and their impact on our wireless links.

There is also, but I think it does not give me a full featured OpenWrt node.

I saw that I can add to a link

  • Frequency Drop Rate
  • Packet Loss Rate
  • Delay/Jitter
  • And BPF Filter

Not sure, if I can maybe measure a link stats and just use them as simulation input for gns3. But I think even other simulation tools have issues with virtual vs real-world deployments.

1 Like

Okay GNS3 is not working? Basic ICMP is working. :wink:
I tried to build an iperf connection and it can't connect.