<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>