def get_network_configuration():

    network_configuration = NetworkConfiguration("ryu",
                                                 "127.0.0.1",
                                                 6633,
                                                 "http://localhost:8080/",
                                                 "admin",
                                                 "admin",
                                                 "clique_enterprise",
                                                 {"num_switches": 5,
                                                  "per_switch_links": 2,
                                                  "num_hosts_per_switch": 1,
                                                  "switch_switch_link_latency_range": (1, 1),
                                                  "host_switch_link_latency_range": (1, 1)
                                                  },
                                                 conf_root="configurations/",
                                                 synthesis_name="SimpleMACSynthesis",
                                                 synthesis_params={},
                                                 # Can map multiple power
                                                 # simulator objects to same
                                                 # cyber node.
                                                 roles=[
                                                     # internal field bus
                                                     # network. clique topology
                                                     # structure created only
                                                     # for this
                                                     ("controller_node",
                                                      ["control;1"]),
                                                     ("pilot_buses_set_1",
                                                      ["2", "25", "29"]),
                                                     ("pilot_buses_set_2",
                                                      ["22", "23", "19"]),
                                                     ("pilot_buses_set_3", [
                                                      "20", "10", "6", "9"]),
                                                     ("generator",
                                                      ["30;1", "31;1", "32;1",
                                                       "33;1", "34;1", "35;1",
                                                       "36;1", "37;1", "38;1",
                                                       "39;1"]),

                                                     # part of enterprise
                                                     # network. Linear topology
                                                     # which is attached to the
                                                     # clique at one switch
                                                     ("enterprise-1",
                                                      ["vpn-gateway;1"]),
                                                     ("enterprise-2",
                                                      ["attacker;1"])

                                                 ],
                                                 project_name="timekeeper_integration",
                                                 power_simulator_ip="127.0.0.1"
                                                 )

    network_configuration.setup_network_graph(
        mininet_setup_gap=1, synthesis_setup_gap=1)

    return network_configuration
Exemplo n.º 2
0
def get_network_configuration(params):

    global project_name
    
    roles = generate_roles(params)
    network_configuration = NetworkConfiguration("ryu",
                                                 "127.0.0.1",
                                                 6633,
                                                 "http://localhost:8080/",
                                                 "admin",
                                                 "admin",
                                                 "linear",
                                                 params,
                                                 conf_root="configurations/",
                                                 synthesis_name="SimpleMACSynthesis",
                                                 synthesis_params={},
                                                 roles=roles,
                                                 project_name="tomacs_evaluation",
                                                 power_simulator_ip="127.0.0.1"
                                                 )

    network_configuration.setup_network_graph(mininet_setup_gap=1, synthesis_setup_gap=1)

    return network_configuration
Exemplo n.º 3
0
def get_network_configurations(link_latencies):

    network_configurations = []

    for link_latency in link_latencies:

        network_configuration = NetworkConfiguration("ryu",
                                                     "127.0.0.1",
                                                     6633,
                                                     "http://localhost:8080/",
                                                     "admin",
                                                     "admin",
                                                     "clique_enterprise",
                                                     {"num_switches": 5,
                                                      "per_switch_links": 3,
                                                      "num_hosts_per_switch": 1,
                                                      "switch_switch_link_latency_range": (link_latency, link_latency),
                                                      "host_switch_link_latency_range": (link_latency, link_latency)
                                                      },
                                                     conf_root="configurations/",
                                                     synthesis_name="SimpleMACSynthesis",
                                                     synthesis_params={},
                                                     # Can map multiple power simulator objects to same cyber node.
                                                     roles=[
                                                         # internal field bus network. clique topology structure created only for this
                                                         ("controller_node",["control;1"]),
                                                         ("pilot_buses_set_1",["2","25","29"]),
                                                         ("pilot_buses_set_2",["22","23","19"]),
                                                         ("pilot_buses_set_3",["20","10","6", "9"]),
                                                         ("generator",["30;1","31;1","32;1","33;1","34;1","35;1","36;1","37;1","38;1","39;1"]),

                                                         # part of enterprise network. Linear topology which is attached to the clique at one switch
                                                         ("enterprise-1",["vpn-gateway;1"]),
                                                         ("enterprise-2",["attacker;1"])

                                                     ],
                                                     project_name="evaluation",
                                                     power_simulator_ip="127.0.0.1",
                                                     link_latency=link_latency
                                                     )

        network_configurations.append(network_configuration)

    return network_configurations