[pox-dev] Small improvement in spanning_tree module

Alex Silva alexjbs at gmail.com
Sun Feb 24 15:10:47 PST 2013


A good (altough small) improvement on spanning tree module would be
blocking flood on all switch ports as soon as it connects.

The module, after calculating the tree,  already unblocks ports that
belongs the tree or are connected to hosts.

My sugestion is to put the code below somewhere in the _reset function
which handles "ConnectionUp" events.

def _reset (event):

  # Configure all switch ports to NO_FLOOD

  for p in event.connection.ports.itervalues():
    if p.port_no < of.OFPP_MAX:
      pm = of.ofp_port_mod( port_no=p.port_no,
                               hw_addr=p.hw_addr,
                               config = of.OFPPC_NO_FLOOD,
                               mask = of.OFPPC_NO_FLOOD )


Best Regards,
Alex Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/private.cgi/pox-dev-noxrepo.org/attachments/20130224/0400143b/attachment.htm>


More information about the pox-dev mailing list