from emulation_lib.preprocessing.set_constant_value_for_column import SetConstantValueForColumn
from emulation_lib.linkcmd_backends.bdl_ import BDL_

emu = Emulation("example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)


nb1 = NetworkBlock("./blocks/simple_mobility_802.11G_AdHoc_constant")
nb1.setNodes([n0, n1])
nb1.addPreprocessingStep(SetConstantValueForColumn("", 3, 27000.0))  # empty prefix -> apply to all files

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(40)

for interval in [1000, 500, 250, 100, 50, 25]:
    nb1.selectInterval(interval)
    emu.setName(str(interval))
    emu.setOutputDirectory('./results/simple_mobility_802.11G_AdHoc_constant/' + emu.getName())
    emu.start()
Example #2
0
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.l_ import L_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(L_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

# http://dashif.org/wp-content/uploads/2015/04/DASH-AVC-264-Test-Vectors-v09-CommunityReview.pdf
nb1 = NetworkBlock("./blocks/flicflac")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('flicflac_loss')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
            # determine client-server groups
            random.seed(run*1000)
            serverNode = random.randint(0,11)
            client_gateways = []
            for c in range(0, NUM_CLIENTS):
                client_gateways.append(random.randint(0,11))
            client_startTimes = random.sample(range(0, int(EMULATION_DURATION / 2)), NUM_CLIENTS)
            print("client_start-times: " + str(client_startTimes))

            # general emulation settings
            emu = Emulation("./example.config.py", list(range(0,12 + NUM_CLIENTS)))
            emu.setName(os.path.basename(wifi_block) + "_" + app_type + "_" + str(run))
            emu.setLinkCmdBackend(BDL_())
            emu.setSecondsBetweenRuns(5)
            emu.setOutputDirectory('./results/onlyNdnDemoApps_experiment/' + emu.getName())
            emu.setDuration(EMULATION_DURATION) # seconds


            # ensure NFD-logfiles are cleaned up and wldrdaemons are shutdown
            for node in emu.getNodes():
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo rm /var/run/shm/nfd_packet_log/nfd_packet_log.csv")
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo killall wldrdaemon_udp")
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo killall tail")

            # set up network-blocks
            abileneNetwork = NetworkBlock("./blocks/abilene")
            abileneNetwork.setNodes(emu.getNodes()[0:12])
            abileneNetwork.selectInterval(1000) # without consequence as network-properties are static anyway (in this scenario)
            abileneNetwork.addPreprocessingStep(RepeatIntermedFileUntil(EMULATION_DURATION, False))
Example #4
0
emu = Emulation("./config_files/example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/TwoNode_80211a_adhoc")
nb1.setNodes([n0, n1])

emu.addNetworkBlocks([nb1])

udperf_app1 = UdperfApp(n0, n1, 0.0, 99, 9000, 6000, 6001)
udperf_app2 = UdperfApp(n1, n0, 0.0, 99, 9000, 6000, 6001)

n0.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched0.log_%RUN%")
n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched1.log_%RUN%")

emu.setDuration(102)

emu.addApplications([udperf_app1, udperf_app2])

emu.setName('simple_sequence')
emu.setNumberOfRuns(3)
emu.setSecondsBetweenRuns(15)

for intervalSize in [1000, 500, 250, 100]:
    emu.setName(intervalSize)
    emu.setOutputDirectory('./results/simple_sequence/' + emu.getName())
    nb1.selectInterval(intervalSize)
    emu.start()
Example #5
0
cmd_dists = [BD_(), BDL_(), netem_BDL_(), D_BL(), DL_B()]
emu = Emulation("../example.config.py", [0, 1])
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/original_sim_normal")
nb1.selectInterval(1000)
nb1.setNodes([n0, n1])
nb1.addPreprocessingStep(SetConstantValueForColumn(
    "", 3, 27000.0))  # empty prefix -> apply to all files

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 7500, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(1)

for dist in cmd_dists:
    emu.setLinkCmdBackend(dist)
    emu.setName(str(dist))
    emu.setOutputDirectory('./results/original_sim_normal_bwexp_dists/' +
                           emu.getName())
    emu.start()
Example #6
0
emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/simple_mobility_802.11G_AdHoc_constant")
nb1.setNodes([n0, n1])
nb1.addPreprocessingStep(SetConstantValueForColumn(
    "", 3, 27000.0))  # empty prefix -> apply to all files

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(40)

for interval in [1000, 500, 250, 100, 50, 25]:
    nb1.selectInterval(interval)
    emu.setName(str(interval))
    emu.setOutputDirectory(
        './results/simple_mobility_802.11G_AdHoc_constant/' + emu.getName())
    emu.start()
            # determine client-server groups
            random.seed(run*1000)
            serverNode = random.randint(0,11)
            client_gateways = []
            for c in range(0, NUM_CLIENTS):
                client_gateways.append(random.randint(0,11))
            client_startTimes = random.sample(range(0, int(EMULATION_DURATION / 2)), NUM_CLIENTS)
            print("client_start-times: " + str(client_startTimes))

            # general emulation settings
            emu = Emulation("./example.config.py", list(range(0,12 + NUM_CLIENTS)))
            emu.setName(os.path.basename(wifi_block) + "_" + app_type + "_" + str(run))
            emu.setLinkCmdBackend(BDL_())
            emu.setSecondsBetweenRuns(5)
            emu.setOutputDirectory('./results/testbed_scenario/' + emu.getName())
            emu.setDuration(EMULATION_DURATION) # seconds


            # ensure NFD-logfiles are cleaned up and wldrdaemons are shutdown
            for node in emu.getNodes():
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo rm /var/run/shm/nfd_packet_log/nfd_packet_log.csv")
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo killall wldrdaemon_udp")
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo killall tail")

            # set up network-blocks
            abileneNetwork = NetworkBlock("./blocks/abilene")
            abileneNetwork.setNodes(emu.getNodes()[0:12])
            abileneNetwork.selectInterval(1000) # without consequence as network-properties are static anyway (in this scenario)
            abileneNetwork.addPreprocessingStep(RepeatIntermedFileUntil(EMULATION_DURATION, False))