Esempio n. 1
0
#from sim.basics import Hub as switch
from learning_switch import LearningSwitch as switch
#from rip_router import RIPRouter as switch
#from ls_router import LSRouter as switch
import sim.core
import scenarios

time.sleep(1)  # Wait a sec for log client to maybe connect

#import scenarios.compatibility_test as scenario
import scenarios.linear as scenario

#import scenarios.candy as scenario
#import scenarios.convergence as scenario
scenario.create(switch_type=switch)

# Import some stuff to use from the interpreter
import sim.basics as basics
import sim.api as api
import sim.topo as topo

import logging
# There are two loggers: one that has output from the simulator, and one
# that has output from you (simlog and userlog respectively).  These are
# Python logger objects, and you can configure them as you see fit.  See
# http://docs.python.org/library/logging.html for info.
api.simlog.setLevel(logging.DEBUG)
api.userlog.setLevel(logging.DEBUG)

print """EE-122 Network Simulator
Esempio n. 2
0
# which displays logs itself.
# _DISABLE_CONSOLE_LOG = True


#from hub import Hub as switch
from dv_router import DVRouter as switch

import sim.core
import scenarios

time.sleep(1) # Wait a sec for log client to maybe connect

import scenarios.linear as scenario
#import scenarios.candy as scenario
#import scenarios.candy_crush as scenario
scenario.create(switch_type = switch)

# Import some stuff to use from the interpreter
import sim.basics as basics
import sim.api as api
import sim.topo as topo

import logging
# There are two loggers: one that has output from the simulator, and one
# that has output from you (simlog and userlog respectively).  These are
# Python logger objects, and you can configure them as you see fit.  See
# http://docs.python.org/library/logging.html for info.
api.simlog.setLevel(logging.DEBUG)
api.userlog.setLevel(logging.DEBUG)

print """CS-168 Network Simulator
Esempio n. 3
0
#_DISABLE_CONSOLE_LOG = True

#from sim.basics import Hub as switch
#from learning_switch import LearningSwitch as switch
from hub import Hub as switch
#from rip_router import RIPRouter as switch
#from learning_switch import LearningSwitch as switch
from rip_router import RIPRouter as switch
import sim.core
import scenarios

time.sleep(1) # Wait a sec for log client to maybe connect

#import scenarios.compatibility_test as scenario
import scenarios.linear as scenario
scenario.create(switch_type = switch, n=3)

# Import some stuff to use from the interpreter
import sim.basics as basics
import sim.api as api
import sim.topo as topo

import logging
# There are two loggers: one that has output from the simulator, and one
# that has output from you (simlog and userlog respectively).  These are
# Python logger objects, and you can configure them as you see fit.  See
# http://docs.python.org/library/logging.html for info.
api.simlog.setLevel(logging.DEBUG)
api.userlog.setLevel(logging.DEBUG)

print """EE-122 Network Simulator