# P4 Easily Deployable Testing Solution for IPv6

**URL:** <https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589>\
**Category:** Getting Started with P4\
**Created:** [January 6, 2023, 8:21am UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589 "2023-01-06T08:21:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThePuriProdigy](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@ThePuriProdigy](https://forum.p4.org/u/ThePuriProdigy)\
**Post date:** [January 6, 2023, 8:21am UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/1 "2023-01-06T08:21:40Z")

</div>

I’ve been using: [GitHub - p4lang/tutorials: P4 language tutorials](https://github.com/p4lang/tutorials) as a source for examples and tutorials to learn/practice writing P4 code and testing it in a virtual network through Mininet. The GitHub tutorials contained in that repository for ipv4 were incredibly helpful ( also Andy’s help 😄 ) and it was super beneficial to have a virtual environment that I could just quickly spin up to test my P4 code by just doing ./make run.

However, I just found out that Mininet doesn’t support ipv6 and so when I tried to test my ipv6 p4 code, it was not working. I’m pretty new to a lot of these tools and so I was wondering if there was a testing environment/virtual network like Mininet on a VM that I can download and easily use to simplify the testing process. I read something about there being Mininet add ons for ipv6 but am not sure how P4 would interface with those. Any guidance regarding if such a VM/toolset exists already or advice how to proceed will be greatly helpful. Thank you again!

---

<div class="post-metadata">

**Author:** ![DavideS](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/davides/32/120_2.png) [@DavideS](https://forum.p4.org/u/DavideS)\
**Post date:** [January 6, 2023, 1:25pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/2 "2023-01-06T13:25:58Z")

</div>

Hi @ThePuriProdigy,

you can use tcpreplay and/or scapy python module, in both case you can inject the traffic on a physical or virtual interface

---

<div class="post-metadata">

**Author:** ![ThePuriProdigy](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@ThePuriProdigy](https://forum.p4.org/u/ThePuriProdigy)\
**Post date:** [January 6, 2023, 5:34pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/3 "2023-01-06T17:34:51Z")

</div>

How would I load the p4 code and create a virtual switch then? Would I still use Mininet?

---

<div class="post-metadata">

**Author:** ![DavideS](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/davides/32/120_2.png) [@DavideS](https://forum.p4.org/u/DavideS)\
**Post date:** [January 6, 2023, 5:53pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/4 "2023-01-06T17:53:00Z")

</div>

You can use mininet if you need a network, otherwise you can use a single istance of a bmv2 switch [GitHub - p4lang/behavioral-model: The reference P4 software switch](https://github.com/p4lang/behavioral-model)

---

<div class="post-metadata">

**Author:** ![ThePuriProdigy](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@ThePuriProdigy](https://forum.p4.org/u/ThePuriProdigy)\
**Post date:** [January 6, 2023, 8:13pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/5 "2023-01-06T20:13:11Z")

</div>

I might be misunderstanding something but I was under the assumption/knowledge that Mininet only supports ipv4 not ipv6 - or does it?

---

<div class="post-metadata">

**Author:** ![byllyfish](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@byllyfish](https://forum.p4.org/u/byllyfish)\
**Post date:** [January 6, 2023, 8:22pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/6 "2023-01-06T20:22:23Z")

</div>

I use podman/docker to run Mininet in a container. You can pick between bmv2 or stratum. Then, I use port forwarding to access the P4Runtime ports of the switches, and load the compiled P4 program that way.

There are some scripts (net/run.sh) here: [finsy/examples at main · byllyfish/finsy · GitHub](https://github.com/byllyfish/finsy/tree/main/examples)

Mininet supports IPv6 but you have to write your own custom “topo” python file to add the hosts.

-Bill

---

<div class="post-metadata">

**Author:** ![ThePuriProdigy](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@ThePuriProdigy](https://forum.p4.org/u/ThePuriProdigy)\
**Post date:** [January 7, 2023, 1:20am UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/7 "2023-01-07T01:20:38Z")

</div>

How did you deal with the podman noout issue? It’s complaining about unknown flag --noout (I have the latest version of podman)

---

<div class="post-metadata">

**Author:** ![byllyfish](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@byllyfish](https://forum.p4.org/u/byllyfish)\
**Post date:** [January 7, 2023, 2:11am UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/8 "2023-01-07T02:11:54Z")

</div>

I use podman 4.3.1 on MacOS installed via HomeBrew. 4.3.1 is the latest release. The --noout flag stops podman from printing the image/container ID when starting; it limits the verbosity of the output for cosmetic reasons. Please check your `podman --version`.

UPDATE: The ngsdn and simple examples have `--noout` issues using podman 3.4.4 on ubuntu 22.04. I will fix. Thanks.

---

<div class="post-metadata">

**Author:** ![DavideS](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/davides/32/120_2.png) [@DavideS](https://forum.p4.org/u/DavideS)\
**Post date:** [January 7, 2023, 8:57pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/9 "2023-01-07T20:57:16Z")

</div>

@ThePuriProdigy I believe that you can send any kind of traffice within a mininet network. By default you can easilly send arp, ipv4 and udp/tcp traffic, because mininett have iperf and ping embedded in his shell. But if you have a “traffic generator” you can send custom traffic on a interface.

---

<div class="post-metadata">

**Author:** ![ThePuriProdigy](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@ThePuriProdigy](https://forum.p4.org/u/ThePuriProdigy)\
**Post date:** [January 7, 2023, 9:28pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/10 "2023-01-07T21:28:40Z")

</div>

@byllyfish I’m now getting **Error: short-name “opennetworking/mn-stratum” did not resolve to an alias and no unqualified-search registries are defined in “/etc/containers/registries.conf”**

I’ve tried podman docker pulling the container but it results in the same issue. Am I missing a step?

---

<div class="post-metadata">

**Author:** ![byllyfish](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@byllyfish](https://forum.p4.org/u/byllyfish)\
**Post date:** [January 7, 2023, 11:58pm UTC](https://forum.p4.org/t/p4-easily-deployable-testing-solution-for-ipv6/589/11 "2023-01-07T23:58:31Z")

</div>

The scripts don’t use the fully qualified names. The fully-qualified name is “[docker.io/opennetworking/mn-stratum](http://docker.io/opennetworking/mn-stratum)”. I will fix that. My system works because I have the following uncommented line in my /etc/containers/registries.conf file:

unqualified-search-registries = [“[docker.io](http://docker.io)”]

If you have further questions, you may create a Github issue at [Issues · byllyfish/finsy · GitHub](https://github.com/byllyfish/finsy/issues)
