Yes! Or you can change the parameters, to send more packets at less time: LLDP_SEND_PERIOD = .10 TIMEOUT_CHECK_PERIOD = 5. LINK_TIMEOUT = 10.
But, how said the Ali, you can overload the network/controller. Hope that helps too. ---- Carlos Macapuna www.macapuna.com.br On Sun, Nov 14, 2010 at 8:27 PM, Ali Reza Sharafat <ali.shara...@gmail.com>wrote: > Well, there are two things to consider: > 1. If by "scanning the network simultaneously" you mean doing a > broadcast at every switch, then you will be a bit handicapped. That's > because when you do a broadcast, you have to send the same packet out > of every port and so your packet cannot carry the "originating port" > data with it. > 2. Now, if you want to just send all packets at once from all > switches, then you are risking both a flood on the network and/or > overloading the switches' cpu. > > Hope that helps. > > On Sun, Nov 14, 2010 at 2:14 PM, Alec Story <av...@cornell.edu> wrote: > > But you know (from the lldp packet) where the packet originated, and you > > know from the dpid and inport argument to your packet handler where the > > packet ended up, so, as far as I can tell, you can differentiate between > > multiple packets just fine. > > > > On Sun, Nov 14, 2010 at 4:57 PM, Macapuna, Carlos A. B. > > <carlosmacap...@gmail.com> wrote: > >> > >> Because do you have only one controller and the controller have that > send > >> and receive the LLDP packets for all (ports) OpenFlow switches. Do you > can > >> to implement Python threads or multiple controller. But do you will have > >> many LLDP packets for treat at the some time. Was that? > >> > >> Greetings, > >> > >> ---- > >> Carlos Macapuna > >> www.macapuna.com.br > >> > >> > >> > >> > >> On Sun, Nov 14, 2010 at 7:03 PM, Alec Story <av...@cornell.edu> wrote: > >>> > >>> I'm trying to understand discovery.py's use of lldp scanning. I'm > >>> relatively new to python, but it looks like it only sends one lldp > packet on > >>> the network at a time (lines 315-350), but I can't figure out why this > would > >>> be. Since the lldp packets have no rule for forwarding, they should > only > >>> travel over one network edge, and have no chance of being received by > some > >>> switch other than the one on the other end of that pipe - why only send > one > >>> out at a time, rather than scanning the whole network simultaneously? > >>> > >>> The code in question, for convenience: > >>>> > >>>> def start_lldp_timer_thread(self): > >>>> > >>>> > >>>> > #---------------------------------------------------------------------- > >>>> # Generator which iterates over a set of dp's and sends an > LLDP > >>>> packet > >>>> # out of each port. > >>>> > >>>> > #---------------------------------------------------------------------- > >>>> > >>>> def send_lldp (packets): > >>>> for dp in packets: > >>>> # if they've left, ignore > >>>> if not dp in self.dps: > >>>> continue > >>>> try: > >>>> for port in packets[dp]: > >>>> #print 'Sending packet out of > >>>> ',longlong_to_octstr(dp), ' port ',str(port) > >>>> self.send_openflow_packet(dp, > >>>> packets[dp][port].tostring(), port) > >>>> yield dp > >>>> except Exception, e: > >>>> # catch exception while yielding > >>>> lg.error('Caught exception while yielding'+str(e)) > >>>> > >>>> def build_lldp_generator(): > >>>> > >>>> def g(): > >>>> try: > >>>> g.sendfunc.next() > >>>> except StopIteration, e: > >>>> g.sendfunc = > >>>> send_lldp(copy.deepcopy(self.lldp_packets)) > >>>> except Exception, e: > >>>> lg.error('Caught exception from generator > '+str(e)) > >>>> g.sendfunc = > >>>> send_lldp(copy.deepcopy(self.lldp_packets)) > >>>> self.post_callback(self.lldp_send_period, g) > >>>> g.sendfunc = send_lldp(copy.deepcopy(self.lldp_packets)) > >>>> return g > >>>> > >>>> self.post_callback(self.lldp_send_period, > >>>> build_lldp_generator()) > >>>> self.post_callback(TIMEOUT_CHECK_PERIOD, lambda : > >>>> discovery.timeout_links(self) > >>> > >>> -- > >>> Alec Story > >>> Cornell University > >>> Biological Sciences, Computer Science 2012 > >>> > >>> _______________________________________________ > >>> nox-dev mailing list > >>> nox-dev@noxrepo.org > >>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > >>> > >> > > > > > > > > -- > > Alec Story > > Cornell University > > Biological Sciences, Computer Science 2012 > > > > _______________________________________________ > > nox-dev mailing list > > nox-dev@noxrepo.org > > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > > > >
_______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org