[P4-dev] Routing in P4Switch
antonin at barefootnetworks.com
Mon Mar 7 20:19:21 EST 2016
I am not sure I understand your question, but I'll try to answer any way.
It all depends on how much "virtualization" you need. P4Switch does not
provide any virtualization, so this is fine so long as your application
does not require any. That is the case for the source routing example that
you mention. But I could also write a standalone L2 application that does
learning: it would run on its own, without any Linux kernel support and
P4Switch would be fine for this.
When you run switch.p4 with switchlink, it is a different story. The
application uses netlink to communicate with the Linux kernel. Each switch
instance therefore needs its own linux network namespace. Do you really
need P4DockerSwitch for this? Not really, this is actually a total
overkill. After all we just need different network namespaces, and they are
not that difficult to create... However, let's say that you now want to run
Quagga. Well now you need to run multiple instances of Quagga, each in its
own network namespace. So you may need to virtualize your file system
too... Using a separate docker instance for each switch gives us all the
virtualization we need and is pretty easy to do, which is why we are using
docker (it also easy for us to distribute working docker images).
So to answer your original question: is there a way to run a routing
algorithm in P4Switch? Yes, you can write an application yourself. But if
you want to rely on the Linux kernel and netlink notifications (like
switchlink), you need some virtualization and Docker is the answer we chose.
On Fri, Mar 4, 2016 at 2:53 PM, MD I. Islam <mislam4 at kent.edu> wrote:
> Is there a way to run a routing algorithm in P4Switch (not P4DockerSwitch)
> in Mininet? I guess we will always need a control plane (Quagga). So, is
> P4Switch good for source routing only? Looking forward to your suggestions.
> P4-dev mailing list
> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev