ipmininet.overlay module

class ipmininet.overlay.NetworkCapture(nodes: List[NodeDescription] = (), interfaces: List[IntfDescription] = (), base_filename: str = 'capture', extra_arguments: str = '')

Bases: ipmininet.overlay.Overlay

This overlays capture traffic on multiple interfaces before starting the daemons and stores the result

Parameters:
  • nodes – The routers and hosts that needs to capture traffic on every of their interfaces
  • interfaces – The interfaces on which traffic should be captured
  • base_filename – The base name of the network capture. One file by router or interface will be created of the form “{base_filename}_{router/interface}.pcapng” in the working directory of the node on which each capture is made.
  • extra_arguments – The string encoding any additional argument for the tcpdump call
apply(topo: IPTopo)

Apply the Overlay properties to the given topology

check_consistency(topo: IPTopo) → bool

Check that this overlay is consistent

start(node: Optional[IPNode] = None, intf: Optional[IPIntf] = None) → subprocess.Popen
stop(node: Optional[IPNode] = None, intf: Optional[IPIntf] = None)
class ipmininet.overlay.Overlay(nodes: Sequence[str] = (), links: Sequence[str] = (), nprops: Optional[Dict[KT, VT]] = None, lprops: Optional[Dict[KT, VT]] = None)

Bases: object

This overlay simply defines groups of nodes and links, and properties that are common to all of them. It then registers these properties to the element when apply() is called.

Elements are referenced in the same way than for the IPTopo: node -> node name link -> (node1 name, node2 name).

Parameters:
  • nodes – The nodes in this overlay
  • links – the links in this overlay
  • nprops – the properties shared by all nodes in this overlay
  • lprops – the properties shared by all links in this overlay

Add one or more link to this overlay

add_node(*node)

Add one or more nodes to this overlay

apply(topo: IPTopo)

Apply the Overlay properties to the given topology

check_consistency(topo: IPTopo) → bool

Check that this overlay is consistent

Return the properties for the given link

node_property(n: str) → Dict[KT, VT]

Return the properties for the given node

Set the property of a given link

set_node_property(n: str, key, val)

Set the property of a given node

class ipmininet.overlay.Subnet(nodes=(), links=(), subnets=())

Bases: ipmininet.overlay.Overlay

This overlay simply defines groups of routers and hosts that share a common set of subnets. These routers and hosts have to be on the same LAN.

Parameters:
  • nodes – The routers and hosts that needs an address on their common LAN.
  • links – The links that has to be in the LAN. This parameter is useful to identify LANs if there is more than one common LAN between the nodes. Routers and Hosts of the links will have an address assigned.
  • subnets – For each subnet, an address will be added to the interface of the nodes in their common LAN.
apply(topo)

Apply the Overlay properties to the given topology

check_consistency(topo)

Check that this overlay is consistent