Mininet Python API Reference Manual
Public Member Functions | Public Attributes | List of all members
mininet.link.Link Class Reference

A basic link is just a veth pair. More...

Inheritance diagram for mininet.link.Link:
mininet.link.OVSLink mininet.link.TCLink mininet.link.TCULink

Public Member Functions

def __init__ (self, node1, node2, port1=None, port2=None, intfName1=None, intfName2=None, addr1=None, addr2=None, intf=Intf, cls1=None, cls2=None, params1=None, params2=None, fast=True, **params)
 Create veth link to another node, making two new interfaces. More...
 
def intfName (self, node, n)
 Construct a canonical interface name node-ethN for interface n.
 
def makeIntfPair (cls, intfname1, intfname2, addr1=None, addr2=None, node1=None, node2=None, deleteIntfs=True)
 Create pair of interfaces. More...
 
def delete (self)
 Delete this link.
 
def stop (self)
 Override to stop and clean up link as needed.
 
def status (self)
 Return link status as a string.
 
def __str__ (self)
 

Public Attributes

 fast
 
 intf2
 
 intf1
 

Detailed Description

A basic link is just a veth pair.

Other types of links could be tunnels, link emulators, etc..

Constructor & Destructor Documentation

◆ __init__()

def mininet.link.Link.__init__ (   self,
  node1,
  node2,
  port1 = None,
  port2 = None,
  intfName1 = None,
  intfName2 = None,
  addr1 = None,
  addr2 = None,
  intf = Intf,
  cls1 = None,
  cls2 = None,
  params1 = None,
  params2 = None,
  fast = True,
**  params 
)

Create veth link to another node, making two new interfaces.

Parameters
node1first node
node2second node
port1node1 port number (optional)
port2node2 port number (optional)
intfdefault interface class/constructor cls1,
cls2optional interface-specific constructors
intfName1node1 interface name (optional)
intfName2node2 interface name (optional)
params1parameters for interface 1 (optional)
params2parameters for interface 2 (optional) **
paramsadditional parameters for both interfaces

Member Function Documentation

◆ makeIntfPair()

def mininet.link.Link.makeIntfPair (   cls,
  intfname1,
  intfname2,
  addr1 = None,
  addr2 = None,
  node1 = None,
  node2 = None,
  deleteIntfs = True 
)

Create pair of interfaces.

Parameters
intfname1name for interface 1
intfname2name for interface 2
addr1MAC address for interface 1 (optional)
addr2MAC address for interface 2 (optional)
node1home node for interface 1 (optional)
node2home node for interface 2 (optional) (override this method [and possibly delete()] to change link type)

The documentation for this class was generated from the following file: