Exemplo n.º 1
0
def FatTreeNet(args, bw=10, cpu=-1, queue=100, controller='DCController'):
    droptail = {'max_queue_size': args.queue}
    red = {'max_queue_size': args.queue,'enable_red':1,'enable_ecn': 0, \
    'red_burst':55,'red_prob':0.01,'red_avpkt':1000,\
         'red_min':30000, 'red_max':90000,'red_limit':400000}
    red_ecn = {'max_queue_size': args.queue, 'enable_ecn': args.enable_ecn, \
    'enable_red': args.enable_red,\
            'red_min': args.redmin, 'red_max': args.redmax, 'red_burst': args.burst, \
            'red_prob': args.prob, 'red_avpkt': 1000, 'red_limit': 400000}

    info('*** Creating the topology')
    topo = FatTreeTopo(args.K)
    host = custom(CPULimitedHost, cpu=cpu)
    if args.mdtcp or args.dctcp:
        link = custom(TCLink,
                      bw=args.bw,
                      delay=str(args.delay) + 'ms',
                      **red_ecn)
    else:
        link = custom(TCLink, bw=args.bw, delay=str(args.delay) + 'ms', **red)
    net = Mininet(topo,
                  host=host,
                  link=link,
                  switch=OVSKernelSwitch,
                  controller=RemoteController,
                  autoStaticArp=True)

    return net
Exemplo n.º 2
0
def FatTreeNet(args,
               k=4,
               bw=100,
               cpu=-1,
               queue=100,
               controller='DCController'):
    ''' Create a Fat-Tree network '''
    '''info("STARTING CONTROLLER")
    if args.ECMP:
        pox_c = Popen("./pox.py %s --topo=ft,4 --routing=ECMP"%controller, shell=True)
    elif args.dij:
        pox_c = Popen("./pox.py %s --topo=ft,4 --routing=dij"%controller, shell=True)
    else:
        info('**error** the routing scheme should be ecmp or dijkstra\n')'''

    info('*** Creating the topology')
    topo = FatTreeTopo(k)

    host = custom(CPULimitedHost, cpu=cpu)
    link = custom(TCLink, bw=bw, max_queue_size=queue)

    net = Mininet(topo,
                  host=host,
                  link=link,
                  switch=OVSKernelSwitch,
                  controller=RemoteController,
                  autoStaticArp=True)

    return net
Exemplo n.º 3
0
def FatTreeNet(k=4, bw=10, cpu=-1, queue=100,controller='HController'):
    ''' Create a Fat-Tree network '''

    pox_c = Popen("~/pox/pox.py %s --topo=ft,%s --routing=ECMP --bw=%s --ratio=%s log.level --WARNING"%(controller, k, args.bandwidth, args.ratio), shell=True)

    info('*** Creating the topology')
    topo = FatTreeTopo(k)

    host = custom(CPULimitedHost, cpu=cpu)
    link = custom(TCLink, bw=bw, max_queue_size=queue)
    
    net = Mininet(topo, host=host, link=link, switch=OVSKernelSwitch,
            controller=RemoteController)

    return net