See inline. On Jan 12, 2015, at 1:04 AM, TALAL AL-HARBI <tal...@hotmail.com> wrote:
> I added a print statement to spanning tree code: > > # Now modify ports as needed > try: > change_count = 0 > for sw, ports in tree.iteritems(): > con = core.openflow.getConnection(sw) > if con is None: continue # Must have disconnected > if con.connect_time is None: continue # Not fully connected > > if _hold_down: > if con.connect_time > enable_time: > # Too young -- we should hold down changes. > if force_dpid is not None and sw == force_dpid: > # .. but we'll allow it anyway > pass > else: > continue > > tree_ports = [p[1] for p in ports] > for p in con.ports.itervalues(): > print "Ports", p > <----------------------- Here > if p.port_no < of.OFPP_MAX: > flood = p.port_no in tree_ports > print "Flood", flood You're printing out the value here and seeing that it's False... > if not flood: > if core.openflow_discovery.is_edge_port(sw, p.port_no): > flood = True .. but it's being changed to True right here if the port doesn't connect two switches, which is exactly the case you're talking about. > if _prev[sw][p.port_no] is flood: > #print sw,p.port_no,"skip","(",flood,")" > continue # Skip > change_count += 1 > _prev[sw][p.port_no] = flood > #print sw,p.port_no,flood > #TODO: Check results > > Subject: Re: [pox-dev] Spanning Tree Algorithm > From: murphy.mccau...@gmail.com > Date: Mon, 12 Jan 2015 00:55:34 -0800 > CC: pox-dev@lists.noxrepo.org > To: tal...@hotmail.com > > I don't have enough information to understand or evaluate the information > you've given about port status. Where does it come from? Are you querying > the switch, or is it from one of the datastructures in spanning_tree.py, or > something else? When are you printing it? > > And what options are you using to run discovery and spanning_tree? > > -- Murphy > > On Jan 12, 2015, at 12:47 AM, TALAL AL-HARBI <tal...@hotmail.com> wrote: > > Dear Murphy > > After the connection is established, ports status set to false expect those > who are between switches and no correcting a loop even ports where hosts > attached to. > > I have printed ports status with basic topology: > > Ports s1-eth1:1 ------> where host1 attached to > Flood False > Ports s1-eth2:2 -------> Link between S1 & S2 > Flood True > Ports s1:65534 > Ports s2-eth1:1 ------> where host2 attached to > Flood False > Ports s2-eth2:2 > Flood True > Ports s2:65534 > > In this case, why once s1 gets arp request, broadcast it out of port1? > > Best,,, > Talal > Subject: Re: [pox-dev] Spanning Tree Algorithm > From: murphy.mccau...@gmail.com > Date: Fri, 9 Jan 2015 19:28:22 -0800 > CC: amer7...@hotmail.com; pox-dev@lists.noxrepo.org > To: tal...@hotmail.com > > I believe you're mistaken and the ports to which hosts are attached have > flood enabled. What makes you think this isn't the case? > > -- Murphy > > On Jan 9, 2015, at 7:21 PM, TALAL AL-HARBI <tal...@hotmail.com> wrote: > > If you print out ports status, you would see they are false. > > Sent from my iPhone > > On Jan 9, 2015, at 9:46 PM, Amer <amer7...@hotmail.com> wrote: > > Dear Talal > > The ports that are connected to hosts are not creating loops, thus it will > not be disabled. > > Best regards, > Amer > > Sent from my iPhone > > On ٠٩/٠١/٢٠١٥, at ١٠:٠٥ ص, TALAL AL-HARBI <tal...@hotmail.com> wrote: > > Hello There,,, > > I'm a bit confused about spanning tree algorithm. After detecting all links, > it disables the one creating the loop. However, ports where hosts attached to > are still False(Means no flood?). Pings were successful, how ? > Thank you!!! > > Cheers,,, > Talal