[P4-dev] Integrating virtualbox with P4 switches

LJ Wobker ljw at barefootnetworks.com
Sun Jul 19 14:25:11 EDT 2015


This should be possible using virtualbox’s “internal networking” mode.

See: https://www.virtualbox.org/manual/ch06.html

Consider a case where you create 4 virtual machines: A,B,C,D.  on vm-A
we’ll run our p4 switch and create three interfaces on that vm (call them
A1, A2, A3).  On each of the other vms, just assume we have a single
interface {interfaces B1, C1, D1}

Then you should be able to configure three internal networks, one will
connect A1-B1, one A2-C1, and one A3-D1.  Virtualbox should (I say should
because I haven’t actually tried this…) then make any frames that leave
interface A1 appear on B1, A2 onto C1, and so on.  The p4 switch on vm “A”
can be programmed to do whatever you want to the frames as they transit
your softswitch.

To be **really** pedantic about the whole thing, I think that the vbox
internal networking code is technically already bridging these frames, so
I’m not sure whether having any non-standard ethernet headers would break
this type of setup… but if you just want to get a multi-vm environment up
and running within vbox, I think this will get you started.

Depending on what you’re trying to accomplish, it **might** be easier/more
scalable to look at the mininet/docker environment that’s been contributed

>From the vbox documentation:  *Internal networks are created automatically
as needed, i.e. there is no central configuration. Every internal network
is identified simply by its name. Once there is more than one active
virtual network card with the same internal network ID, the VirtualBox
support driver will automatically "wire" the cards and act as a network
switch. *


*From:* P4-dev [mailto:p4-dev-bounces at p4.org] *On Behalf Of *Sergio
*Sent:* Friday, July 17, 2015 9:27 AM
*To:* p4-dev at p4.org
*Subject:* [P4-dev] Integrating virtualbox with P4 switches

Hello all.

Would it be possible to use a P4 switch to connect virtual machines running
for example on virtualbox?

Thanks in advance for the attention.


Sergio Gutiérrez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20150719/e7686dcd/attachment-0001.html>

More information about the P4-dev mailing list