[pox-dev] working with multiple switches
Murphy McCauley
murphy.mccauley at gmail.com
Thu Nov 7 18:29:19 PST 2013
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).
-- Murphy
On Nov 7, 2013, at 4:32 AM, durga <c.vijaya.durga at gmail.com> wrote:
> 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
>
> sudo mn --topo linear ,4 --mac --switch ovsk --controller remote
>
> which creates 5 links(h1<-->s1, h2<-->s2,s1<-->c0,s2<-->c0,s1<-->s2)
> When I run the sample l2_learning switch module, h1 pings h2 successfully.
> 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).
>
> else:
> port = self.macToPort[packet.dst]
> if port == event.port: # 5
> # 5a
> log.warning("Same port for packet from %s -> %s on %s.%s. Drop."
> % (packet.src, packet.dst, dpid_to_str(event.dpid), port))
> drop(10)
> return
> # 6
>
>
> the program I wrote, is failing at this very condition.
>
> Cheers!
> Durga
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20131107/ef762ffb/attachment-0002.htm>
More information about the pox-dev
mailing list