<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)">I am working on it as of now. I did use a macport table to store.Below debug() shows that, (a obvious error in my code), that the port number for input and outport are same, hence my ARP gets dropped. as inport == outport. </div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)">Will keep the group posted as soon i understand where I am going wrong.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)"><u>log.debug("%i --> %s" event.dpid,parsedpkt)</u></div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)"><br></div><div class="gmail_default"><p style="font-family:Helvetica;font-size:12px;color:rgb(153,51,0);margin:0px">my swtch output:</p>
<p style="margin:0px"><font color="#000000" size="1" face="courier new, monospace">DEBUG:openflow.of_01:Listening on <a href="http://0.0.0.0:6633">0.0.0.0:6633</a></font></p>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font color="#000000" size="1" face="courier new, monospace">INFO:openflow.of_01:[00-00-00-00-00-01 3] connected<br>
</font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:connected to switch with dpid 1<br></font><font color="#000000" size="1" face="courier new, monospace">INFO:openflow.of_01:[00-00-00-00-00-04 1] connected<br>
</font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:connected to switch with dpid 4<br></font><font color="#000000" size="1" face="courier new, monospace">INFO:openflow.of_01:[00-00-00-00-00-03 4] connected<br>
</font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:connected to switch with dpid 3<br></font><font color="#000000" size="1" face="courier new, monospace">INFO:openflow.of_01:[00-00-00-00-00-02 2] connected<br>
</font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:connected to switch with dpid 2<br></font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:1 --> [00:00:00:00:00:01>ff:ff:ff:ff:ff:ff ARP]<br>
</font><font color="#000000" size="1" face="courier new, monospace">{EthAddr('00:00:00:00:00:01'): 1}<br></font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:2 --> [00:00:00:00:00:01>ff:ff:ff:ff:ff:ff ARP]<br>
</font><font color="#000000" size="1" face="courier new, monospace">{EthAddr('00:00:00:00:00:01'): 2}<br></font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:3 --> [00:00:00:00:00:01>ff:ff:ff:ff:ff:ff ARP]<br>
</font><font color="#000000" size="1" face="courier new, monospace">{EthAddr('00:00:00:00:00:01'): 2}<br></font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:4 --> [00:00:00:00:00:01>ff:ff:ff:ff:ff:ff ARP]<br>
</font><font color="#000000" size="1" face="courier new, monospace">{EthAddr('00:00:00:00:00:01'): 2}<br></font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:3 --> [00:00:00:00:00:03>00:00:00:00:00:01 ARP]<br>
</font><font color="#000000" size="1" face="courier new, monospace">{EthAddr('00:00:00:00:00:03'): 1, EthAddr('00:00:00:00:00:01'): 2}<br></font><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:2 --> [00:00:00:00:00:03>00:00:00:00:00:01 ARP]<br>
</font><font color="#000000" size="1" face="courier new, monospace">{EthAddr('00:00:00:00:00:03'): 3, EthAddr('00:00:00:00:00:01'): 2}<br></font><b><font color="#000000" size="1" face="courier new, monospace">DEBUG:l2_switching_v5:1 --> [00:00:00:00:00:03>00:00:00:00:00:01 ARP]<br>
</font></b><b><font size="1" face="courier new, monospace"><font color="#000000">{EthAddr('00:00:00:00:00:03'): </font><span style="background-color:rgb(255,255,255)"><font color="#ff0000">2</font></span><font color="#000000">, EthAddr('00:00:00:00:00:01'): </font></font><font size="1" face="courier new, monospace" color="#cc0000">2</font><font color="#000000" size="1" face="courier new, monospace">}<br>
</font></b><b><font color="#000000" size="1" face="courier new, monospace">dropping</font></b></blockquote>
<p style="font-family:Helvetica;font-size:12px;color:rgb(153,51,0);margin:0px;min-height:14px"><b><br></b></p>
<p style="font-family:Helvetica;font-size:12px;color:rgb(153,51,0);margin:0px;min-height:14px">expected:</p><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font size="1" face="courier new, monospace"><font color="#000000"><br></font><b><font color="#000000">DEBUG:forwarding.l2_learning:1-->[00:00:00:00:00:01>00:00:00:00:00:03 IP]<br></font></b><b><font color="#000000">{EthAddr('00:00:00:00:00:03'): 2, EthAddr('00:00:00:00:00:01'): 1}</font></b></font></blockquote>
</div></div><div class="gmail_extra"><br clear="all"><div>Cheers!<br>Durga<br><br></div>
<br><br><div class="gmail_quote">On Fri, Nov 8, 2013 at 1:29 PM, 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">You'll see that the table is held in an instance variable (self.macToPort). self in this case is an instance of LearningSwitch. And the key here is that there's an instance of LearningSwitch for each switch that connects (created by a ConnectionUp handler).<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>-- Murphy</div></font></span><div><div class="h5"><div><br><div><div>On Nov 7, 2013, at 4:32 AM, durga <<a href="mailto:c.vijaya.durga@gmail.com" target="_blank">c.vijaya.durga@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)">While, I am reading docs to work on vlans , I was as well experimenting on using multiple switches.Without creating any complex topology, i stuck to linear topology by running the below in mininet</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)"><div class="gmail_default">
sudo mn --topo linear ,4 --mac --switch ovsk --controller remote</div><div><br></div><div>which creates 5 links(h1<-->s1, h2<-->s2,s1<-->c0,s2<-->c0,s1<-->s2) </div><div>When I run the sample l2_learning switch module, h1 pings h2 successfully.</div>
<div>But how does the code differentiate between 2 ports if host 1 is connected to port 1 of sw1( thus event.port ==1) and h2 is connected to port1 of sw2(port == 1), then port == event.port condition might fail right? (though it doesnot).</div>
<div><br></div><div><div> else:</div><div> port = self.macToPort[packet.dst]</div><div> if port == event.port: # 5</div><div> # 5a</div><div> log.warning("Same port for packet from %s -> %s on %s.%s. Drop."</div>
<div> % (packet.src, packet.dst, dpid_to_str(event.dpid), port))</div><div> drop(10)</div><div> return</div><div> # 6</div></div><div><br></div><div><br></div><div>the program I wrote, is failing at this very condition.</div>
<div><br></div></div><div>Cheers!<br>Durga<br><br></div>
</div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>