setLogLevel('info') ndn = Minindn(parser=getParser()) args = ndn.args ndn.start() nfds = AppManager(ndn, ndn.net.hosts, Nfd) nlsrs = AppManager(ndn, [], Nlsr) i = 1 info('Starting NLSR on nodes\n') for host in ndn.net.hosts: nlsrs.startOnNode(host, security=args.security, sync=args.sync, faceType=args.faceType, nFaces=args.faces, routingType=args.routingType) # Wait 1/2 minute between starting NLSRs # Wait 1 hour before starting last NLSR if i == len(ndn.net.hosts) - 1: info('Sleeping 1 hour before starting last NLSR\n') time.sleep(3600) else: time.sleep(30) i += 1 Experiment.checkConvergence(ndn, ndn.net.hosts, args.ctime, quit=True) ndn.stop()
h1 = topo.addHost('h1') h2 = topo.addHost('h2') topo.addLink(h1, h2, delay='10ms') ndn = Minindn(parser=getParser(), topo=topo) args = ndn.args ndn.start() nfds = AppManager(ndn, ndn.net.hosts, Nfd) nlsrs = AppManager(ndn, [], Nlsr) host1 = ndn.net.hosts[0] nlsrs.startOnNode(host1, security=args.security, faceType=args.faceType, nFaces=args.faces, routingType=args.routingType) expectedTotalCount = 500 for i in range(0, expectedTotalCount): host1.cmd( 'nlsrc advertise /long/name/to/exceed/max/packet/size/host1/{}'. format(i)) time.sleep(60) host2 = ndn.net.hosts[1] nlsrs.startOnNode(host2, security=args.security, faceType=args.faceType,