<div dir="ltr"><div>If you want to run multiple switches, using Mininet is your best option. You don't need to use Docker images though, you can just reproduce what is done in the source routing tutorial exercise: <a href="https://github.com/p4lang/tutorials/blob/master/SIGCOMM_2015/source_routing/topo.py">https://github.com/p4lang/tutorials/blob/master/SIGCOMM_2015/source_routing/topo.py</a>. This exercise uses a 3-switch & 3-host Mininet topology (<a href="https://github.com/p4lang/tutorials/blob/master/SIGCOMM_2015/resources/images/source_routing_topology.png">https://github.com/p4lang/tutorials/blob/master/SIGCOMM_2015/resources/images/source_routing_topology.png</a>). You can still use scapy on the 3 hosts to inject individual packets. As a matter of fact, that is exactly how the source_routing exercise operates.<br></div>Of course you don't need to do that, you can always do your plumbing manually even though that would be shooting yourself in the foot. If you have a veth0-veth1 pair, you can connect veth0 to your first switch and veth1 to your second switch. Mininet has the advantage that it takes care of the plumbing for you, as well as start linux containers for the hosts which lets you do more interesting things than just send individual packets with scapy (e.g. you can run a tcp flow).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 3, 2016 at 12:24 PM, Swaroop Thool <span dir="ltr"><<a href="mailto:swaroopthool1991@outlook.com" target="_blank">swaroopthool1991@outlook.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><span style="font-size:12pt"><span dir="ltr">Hello John and All,
<div><br>

</div>
<div>Can you please elaborate? I never used it before.How Docker gonna 
help ? I dont want to use mininet now as I am using scapy. Moreover, I 
am able to run two different P4 program only after mentioning different 
thrift-port while starting each switch. So
how to connect this two switches via veth?</div>
<div><br>

</div>
<div>Thanks,</div>
<div>Swaroop</div></span></span><br><br><div><hr>Subject: Re: [P4-dev] How to connect two different P4 switch via veths<br>From: <a href="mailto:john@barefootnetworks.com" target="_blank">john@barefootnetworks.com</a><br>Date: Wed, 2 Mar 2016 11:00:52 -0800<br>CC: <a href="mailto:p4-dev@lists.p4.org" target="_blank">p4-dev@lists.p4.org</a><br>To: <a href="mailto:swaroopthool1991@outlook.com" target="_blank">swaroopthool1991@outlook.com</a><div><div class="h5"><br><br><div>See</div><div><br></div><div><a href="https://github.com/p4lang/p4factory#integration-with-mininet" target="_blank">https://github.com/p4lang/p4factory#integration-with-mininet</a></div><div><a href="https://github.com/p4lang/p4factory#integration-with-mininet-and-docker" target="_blank">https://github.com/p4lang/p4factory#integration-with-mininet-and-docker</a></div><div><br></div><div>John</div><div><br></div><div><br></div><div><blockquote><div>On Mar 2, 2016, at 10:51 AM, Swaroop Thool <<a href="mailto:swaroopthool1991@outlook.com" target="_blank">swaroopthool1991@outlook.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hello All,<div><br></div><div>I want to know, How to connect two veths(ports) of two different P4 switch?</div><div>I want to send data process by one P4 switch to another P4 switch which implements different P4 programs. As of now, we can send packets from veth1(port1) and ¬†sniff on veth6(port3) by scapy (from copy_to_cpu example).</div><div>How to connect same port 3 of veth6 of 1st P4 switch to some incoming port of 2nd P4 switch?</div><div><br></div><div>Moreover, as I cannot run two instances (programs)on same P4 switch. Do I need to make another copy or folder of that switch (/targets/simple_switch)? and how to connect to other?Please help</div><div><br></div><div><br></div><div>Thanks,</div><div>Swaroop Thool</div></div><span style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important">_______________________________________________</span><br style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important">P4-dev mailing list</span><br style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:P4-dev@lists.p4.org" style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">P4-dev@lists.p4.org</a><br style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org" style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org</a></div></blockquote></div><br></div></div></div>                                     </div></div>
<br>_______________________________________________<br>
P4-dev mailing list<br>
<a href="mailto:P4-dev@lists.p4.org">P4-dev@lists.p4.org</a><br>
<a href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org" rel="noreferrer" target="_blank">http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Antonin<br></div></div>
</div>