Ejemplo n.º 1
0
def launch_controller():
    CFG.read(C1_cfg)
    db = TopologyDB(db='/tmp/db.topo')
    manager = SouthboundManager(optimizer=OSPFSimple())

    prefix = db.subnet('r2', 'sw1')
    prefix_m = prefix.split('/')[0] + '/25'
    manager.simple_path_requirement(prefix_m, [db.routerid(r) for r in (R1, R3, R2)])
    import ipdb; ipdb.set_trace()

    try:
        manager.run()
    except KeyboardInterrupt:
        manager.stop()
Ejemplo n.º 2
0
def launch_network():
    net = IPNet(topo=SIGTopo(),
                debug=_lib.DEBUG_FLAG,
                intf=custom(TCIntf, bw=BW))
    TopologyDB(net=net).save(DB_path)
    net.start()
    FibbingCLI(net)
    net.stop()
Ejemplo n.º 3
0
def launch_controller():
    CFG.read(C1_cfg)
    db = TopologyDB(db=DB_path)
    manager = SouthboundManager(optimizer=OSPFSimple())
    manager.simple_path_requirement(db.subnet(R3, D1), [db.routerid(r)
                                                        for r in (R1, R2, R3)])
    manager.simple_path_requirement(db.subnet(R3, D2), [db.routerid(r)
                                                        for r in (R1, R4, R3)])
    try:
        manager.run()
    except KeyboardInterrupt:
        manager.stop()
Ejemplo n.º 4
0
def launch_network():

    #topo = TestTopo()
    topo = FatTree(k = 2, extraSwitch=True)
    intf = custom(TCIntf)

    #creates nodes and links
    net = IPNet(topo=topo,
                debug=_lib.DEBUG_FLAG,
                intf=intf, switch=LinuxBridge)

    #just stores the topology in a json object, it does not take into account mulipaths between nodes
    TopologyDB(net=net).save(DB_path)
    
    #start processes(quagga) and maps again the ips
    net.start()


    FibbingCLI(net)
    net.stop()