<div dir="ltr"><div><div><div>controller manages datapath indexes for each connection,<br><br></div>controller recvs from s/w-1 using dpid=xyz<br>controller recvs from s/w-2 using dpid=pqr(anything but unique)<br><br></div>
so when ever controller recvs/send packet checks dpid from that controller decides from where packet came  or where to send..  <br><br><br></div><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Apr 23, 2014 at 2:16 AM, Rushit Parekh <span dir="ltr"><<a href="mailto:rparekh081052@gmail.com" target="_blank">rparekh081052@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>dpid=datapath index<br></div>controller manages datapath indexes<br><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Tue, Apr 22, 2014 at 11:20 AM, Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">This is really an OpenFlow question, and it's answered in the OpenFlow spec.  Sort of.<div>

<br></div><div>The short of it is that it's a unique identifier for a switch so that someone/something (e.g., an OpenFlow controller) can uniquely identify the switch.  It's 64 bits, so it's not an ethernet address, though the spec claims the lower 48 bits are *intended* to be the switch's ethernet address.  In my opinion, this statement has always been a bit confusing -- traditionally, a switch isn't an endpoint, so what addresses does a switch even really have?  The only answer that makes sense to me is that it's the ethernet address associated with the IP address used for the OpenFlow control channel.  But in implementations, this is not always the case because the OpenFlow control channel often may originate from one of several interfaces and it'll use whatever ethernet address goes with it.</div>

<div><br></div><div>In practice, its pretty arbitrary, and often user-configurable independent of any ethernet address.  My advice is to always just treat it as an opaque value which should be unique.  If a vendor happens to base it on some particular ethernet address, I'd treat that as an implementation detail for how they achieve uniqueness and not as there being any sort of real relationship between the two.</div>

<div><br></div><div>To give a different type of answer:  With Open vSwitch, it defaults to the ethernet address of the switch's "local" port with the top 16 bits zeroed (this ethernet address being generated at random when last I checked).  With Mininet, this generally gets overridden to match the number of the Mininet switch.</div>

<div><br></div><div>Hope that helps?</div><div><br></div><div>-- Murphy</div><div><div><div><br><div><div><div><div>On Apr 21, 2014, at 10:11 PM, Karthik Sharma <<a href="mailto:karthik.sharma@gmail.com" target="_blank">karthik.sharma@gmail.com</a>> wrote:</div>

<br></div></div><blockquote type="cite"><div><div><div dir="ltr"><div style="font-size:small"><font face="courier new, monospace">Hi,</font></div><div style="font-size:small"><font face="courier new, monospace"><br>


</font></div><div style="font-size:small"><font face="courier new, monospace">When you are creating switches for mininet topology you pass the dpid as given below.</font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">



<br></div><div style="font-size:small"><pre style="font-size:12px;margin-top:0px;margin-bottom:0px;line-height:18px"><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">



    <span>info</span><span>(</span> <span style="color:rgb(221,17,68)">'*** Add switches</span><span style="color:rgb(221,17,68)">\n</span><span style="color:rgb(221,17,68)">'</span><span>)</span></div>

<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">    <span>s1</span> <span style="font-weight:bold">=</span> <span>net</span><span style="font-weight:bold">.</span><span>addSwitch</span><span>(</span><span style="color:rgb(221,17,68)">'s1'</span><span>,</span> <span>cls</span><span style="font-weight:bold">=</span><span>OVSKernelSwitch</span><span>,</span> <span>dpid</span><span style="font-weight:bold">=</span><span style="color:rgb(221,17,68)">'0000000000000201'</span><span>)</span></div>



<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">    <span>s2</span> <span style="font-weight:bold">=</span> <span>net</span><span style="font-weight:bold">.</span><span>addSwitch</span><span>(</span><span style="color:rgb(221,17,68)">'s2'</span><span>,</span> <span>cls</span><span style="font-weight:bold">=</span><span>OVSKernelSwitch</span><span>,</span> <span>dpid</span><span style="font-weight:bold">=</span><span style="color:rgb(221,17,68)">'0000000000000202'</span><span>)</span></div>



<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">    <span>s3</span> <span style="font-weight:bold">=</span> <span>net</span><span style="font-weight:bold">.</span><span>addSwitch</span><span>(</span><span style="color:rgb(221,17,68)">'s3'</span><span>,</span> <span>cls</span><span style="font-weight:bold">=</span><span>OVSKernelSwitch</span><span>,</span> <span>dpid</span><span style="font-weight:bold">=</span><span style="color:rgb(221,17,68)">'0000000000000203'</span><span>)</span></div>



<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">    <span>s4</span> <span style="font-weight:bold">=</span> <span>net</span><span style="font-weight:bold">.</span><span>addSwitch</span><span>(</span><span style="color:rgb(221,17,68)">'s4'</span><span>,</span> <span>cls</span><span style="font-weight:bold">=</span><span>OVSKernelSwitch</span><span>,</span> <span>dpid</span><span style="font-weight:bold">=</span><span style="color:rgb(221,17,68)">'0000000000000204'</span><span>)</span></div>



<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">    <span>s5</span> <span style="font-weight:bold">=</span> <span>net</span><span style="font-weight:bold">.</span><span>addSwitch</span><span>(</span><span style="color:rgb(221,17,68)">'s5'</span><span>,</span> <span>cls</span><span style="font-weight:bold">=</span><span>OVSKernelSwitch</span><span>,</span> <span>dpid</span><span style="font-weight:bold">=</span><span style="color:rgb(221,17,68)">'0000000000000205'</span><span>)</span></div>



<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">    <span>s6</span> <span style="font-weight:bold">=</span> <span>net</span><span style="font-weight:bold">.</span><span>addSwitch</span><span>(</span><span style="color:rgb(221,17,68)">'s6'</span><span>,</span> <span>cls</span><span style="font-weight:bold">=</span><span>OVSKernelSwitch</span><span>,</span> <span>dpid</span><span style="font-weight:bold">=</span><span style="color:rgb(221,17,68)">'0000000000000206'</span><span>)</span></div>



<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px"><span style="font-family:'courier new',monospace"><br>

</span></div><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px"><span style="font-family:'courier new',monospace">My question is </span><br>



</div><div style="padding-left:10px;min-height:18px"><span style="font-family:'courier new',monospace"><br></span></div><div style="padding-left:10px;min-height:18px">

<span style="font-family:'courier new',monospace">What is dpid? How is it related to MAC addresses for each port of the Ethernet </span></div><div style="padding-left:10px;min-height:18px">

<span style="font-family:'courier new',monospace">switch.Suppose the switch has 12 ports (for e.g) each of the ports will have a </span></div><div style="padding-left:10px;min-height:18px">

<span style="font-family:'courier new',monospace">MAC address.(48 -bits long).How come a switch has a single data path identifier?</span></div><div style="padding-left:10px;min-height:18px">

<span style="font-family:'courier new',monospace">How is related to MAC address?</span></div><div style="padding-left:10px;min-height:18px"><span style="font-family:'courier new',monospace"><br>

</span></div><div style="padding-left:10px;min-height:18px"><font face="courier new, monospace">Regards,</font></div><div style="padding-left:10px;min-height:18px"><font face="courier new, monospace">Karthik.</font></div>



<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px"><span><br></span></div><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;padding-left:10px;min-height:18px">



<span><br></span></div></pre></div></div></div></div>
_______________________________________________<br>mininet-discuss mailing list<br><a href="mailto:mininet-discuss@lists.stanford.edu" target="_blank">mininet-discuss@lists.stanford.edu</a><br><a href="https://mailman.stanford.edu/mailman/listinfo/mininet-discuss" target="_blank">https://mailman.stanford.edu/mailman/listinfo/mininet-discuss</a><br>

</blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
mininet-discuss mailing list<br>
<a href="mailto:mininet-discuss@lists.stanford.edu" target="_blank">mininet-discuss@lists.stanford.edu</a><br>
<a href="https://mailman.stanford.edu/mailman/listinfo/mininet-discuss" target="_blank">https://mailman.stanford.edu/mailman/listinfo/mininet-discuss</a><br>
<br></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><br>With Regards,<br><br>Rushit Parekh<br><br>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><br>With Regards,<br><br>Rushit Parekh<br>9426317847<br>
</div>