ipmininet.ipswitch module

This modules defines the IPSwitch class allowing to better support STP and to create hubs

class ipmininet.ipswitch.IPSwitch(name: str, stp=True, hub=False, prio: Optional[int] = None, cwd='/tmp', **kwargs)

Bases: mininet.nodelib.LinuxBridge

Linux Bridge (with optional spanning tree) extended to include the hubs

Parameters:
  • name – the name of the node
  • stp – whether to use spanning tree protocol
  • hub – whether this switch behaves as a hub (this disable stp)
  • prio – optional explicit bridge priority for STP
  • cwd – The base directory for temporary files such as configs
start(_controllers)

Start Linux bridge

stop(deleteIntfs=True)

Stop Linux bridge deleteIntfs: delete interfaces? (True)