# Tofino virtual switches in Docker with open-p4studio, plus a Python library to configure them over BFRT gRPC

**URL:** <https://forum.p4.org/t/tofino-virtual-switches-in-docker-with-open-p4studio-plus-a-python-library-to-configure-them-over-bfrt-grpc/1500>\
**Category:** P4 Dev\
**Created:** [October 24, 2026, 2:34pm UTC](https://forum.p4.org/t/tofino-virtual-switches-in-docker-with-open-p4studio-plus-a-python-library-to-configure-them-over-bfrt-grpc/1500 "2026-10-24T14:34:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgaflip](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@mgaflip](https://forum.p4.org/u/mgaflip)\
**Post date:** [October 24, 2026, 2:34pm UTC](https://forum.p4.org/t/tofino-virtual-switches-in-docker-with-open-p4studio-plus-a-python-library-to-configure-them-over-bfrt-grpc/1500/1 "2026-10-24T14:34:37Z")

</div>

Hi all,

At the [RSTI group](https://blogs.upm.es/rsti/) (Universidad Politécnica de Madrid) we have released on GitHub two open-source tools for Tofino: virtual switches to work without hardware, and a library to configure both virtual and hardware switches.

**[vswitch-op4s](https://github.com/mgaflip/vswitch-op4s)** runs tofino-model + bf\_switchd from [open-p4studio](https://github.com/p4lang/open-p4studio) in Docker containers. A prebuilt image is available, so there is nothing to compile. You can run several switches, load your own P4 programs and connect them to each other and to hosts.

bash

```bash
git clone https://github.com/mgaflip/vswitch-op4s.git && cd vswitch-op4s
./start-vswitch-op4s-container.sh

```

**[p4-bfrt-manager](https://github.com/mgaflip/p4-bfrt-manager)** is an easy-to-use Python library over BF Runtime gRPC for Tofino switches, hardware or virtual: table entries as plain JSON, IPs and MACs as strings, ports and multicast in one line.

tofino-model is a functional simulator, so the virtual switches are meant for testing P4 programs and control planes, not performance. Feedback is very welcome!
