Beispiel #1
0
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating switch: {self.switch_name}')
     switch = dv.Switch(self.switch_name, self.ports_count,
                        net_sim.signal_time)
     net_sim.add_device(switch)
Beispiel #2
0
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating hub: {self.hub_name}')
     hub = dv.Hub(self.hub_name, self.ports_count)
     net_sim.add_device(hub)
Beispiel #3
0
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating host: {self.host_name}')
     host = dv.Host(self.host_name, net_sim.signal_time)
     net_sim.add_device(host)
Beispiel #4
0
 def execute(self, net_sim: sim.NetSimulation):
     net_sim.ping_to(self.host_name, self.ip)
Beispiel #5
0
 def execute(self, net_sim: sim.NetSimulation):
     net_sim.route(self.device_name, self.action, self.route)
Beispiel #6
0
 def execute(self, net_sim: sim.NetSimulation):
     net_sim.send_frame(self.host_name, self.mac, self.data)
Beispiel #7
0
 def execute(self, net_sim: sim.NetSimulation):
     net_sim.send_ip_package(self.host_name, self.ip, self.data)
Beispiel #8
0
 def execute(self, net_sim: sim.NetSimulation):
     net_sim.assign_ip_addres(self.device_name, self.ip, self.mask,
                              self.interface)
Beispiel #9
0
 def execute(self, net_sim: sim.NetSimulation):
     net_sim.assign_mac_addres(self.host_name, self.address, self.interface)
Beispiel #10
0
 def execute(self, net_sim: sim.NetSimulation):
     net_sim.disconnect(self.port_name)
Beispiel #11
0
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Connecting: {self.port1} - {self.port2}')
     net_sim.connect(self.port1, self.port2)
Beispiel #12
0
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating router: {self.router_name}')
     router = dv.Router(self.router_name, self.ports_count,
                        net_sim.signal_time)
     net_sim.add_device(router)