Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[mininet-discuss] TCLink support on mininet cluster

Sriramkumar Vh sriram at watchy.in
Fri Jul 8 13:14:28 PDT 2016


I am able to successfully run cluster for a single switch topology. However
when I define the link as TCLink it fails with he following error.

---------------
*** Checking servers
192.168.0.123
*** Placing nodes
h1:localhost h2:192.168.0.123 s1:localhost
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding switches:
s1
*** Adding links:
(h1, s1) Traceback (most recent call last):
  File "/home/mininet/srix/simpleperf_ex.py", line 57, in <module>
    perfTest( )
  File "/home/mininet/srix/simpleperf_ex.py", line 46, in perfTest
    autoStaticArp=True )
  File "build/bdist.linux-x86_64/egg/mininet/examples/cluster.py", line
684, in __init__
  File "build/bdist.linux-x86_64/egg/mininet/net.py", line 172, in __init__
  File "build/bdist.linux-x86_64/egg/mininet/net.py", line 444, in build
  File "build/bdist.linux-x86_64/egg/mininet/examples/cluster.py", line
775, in buildFromTopo
  File "build/bdist.linux-x86_64/egg/mininet/net.py", line 431, in
buildFromTopo
  File "build/bdist.linux-x86_64/egg/mininet/net.py", line 366, in addLink
  File "build/bdist.linux-x86_64/egg/mininet/link.py", line 535, in __init__
  File "build/bdist.linux-x86_64/egg/mininet/link.py", line 425, in __init__
  File "build/bdist.linux-x86_64/egg/mininet/link.py", line 469, in
makeIntfPair
  File "build/bdist.linux-x86_64/egg/mininet/util.py", line 194, in
makeIntfPair
Exception: Error creating interface pair (h2-eth0,s1-eth2): RTNETLINK
answers: No such process

Connection to 192.168.0.115 closed.
------------------------------------------------------------------

The script I ran after setting upt he cluster between two nodes
192.168.0.115 & 192.168.0.123 is below. I want to use TCLink in
Clusters.how to go about it?

-------------------------------------------------------------------
#!/usr/bin/python

from __future__ import print_function

from mininet.topo import Topo
from mininet.net import Mininet
from mininet.node import CPULimitedHost
from mininet.link import TCLink, Link
from mininet.util import dumpNodeConnections
from mininet.log import setLogLevel
from mininet.examples.cluster import MininetCluster, SwitchBinPlacer,
RoundRobinPlacer
from sys import argv

class SingleSwitchTopo(Topo):
    "Single switch connected to n hosts."
    def __init__(self, n=2,  **opts):
        Topo.__init__(self, **opts)
        switch = self.addSwitch('s1')
        for h in range(n):
            host = self.addHost('h%s' % (h + 1))
            self.addLink(host, switch)

def perfTest( ):
    "Create network and run simple performance test"
    servers = [ 'localhost', '192.168.0.123' ]
    topo = SingleSwitchTopo( n=2 )
    # net = Mininet( topo=topo,
    #                link=TCLink,
    #                autoStaticArp=True )
    net = MininetCluster( topo=topo,servers=servers,
                      placement=RoundRobinPlacer,
                   link=TCLink,  # if this line is commented then it works
without error
                   autoStaticArp=True )
    net.start()
    print( "Dumping host connections" )
    dumpNodeConnections(net.hosts)

    net.stop()

if __name__ == '__main__':
    setLogLevel( 'info' )
    # Prevent test_simpleperf from failing due to packet loss
    perfTest( )
-------------------------------------------------------------------------------


-Srix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20160709/90484e52/attachment.html>


More information about the mininet-discuss mailing list