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] Link Bandwidth

habib allah khosravi habiballah_khosravi at
Fri Apr 11 12:04:12 PDT 2014

Hi. I want to set the link bandwidth in my topology code but I get the following error:

TypeError: __init__() got an unexpected keyword argument 'bw'

Can someone tell me how I can set the link bandwidth?

Here is the code for the topology:

from mininet.topo import Topo
from import TCLink

class TEST( Topo ):
    "Simple topology example."

    def __init__( self ):
        "Create custom topo."

        # Initialize topology
        Topo.__init__( self )

        # Add hosts
        h1 = self.addHost( 'h1' )
        h2 = self.addHost( 'h2' )
        h3 = self.addHost( 'h3' )
        h4 = self.addHost( 'h4' )

    # Add switches
        s1 = self.addSwitch( 's1' )
        s2 = self.addSwitch( 's2' )
        s3 = self.addSwitch( 's3' )
        s4 = self.addSwitch( 's4' )
        s5 = self.addSwitch( 's5' )
        s6 = self.addSwitch( 's6' )
        s7 = self.addSwitch( 's7' )

        # Add links
        self.addLink( h1, s1 ,bw=10)
        self.addLink( h2, s1 ,bw=10)
        self.addLink( s1, s2 ,bw=10)
        self.addLink( s1, s3 ,bw=10)
        self.addLink( s2, s4 ,bw=10)
        self.addLink( s2, s5 ,bw=10)
        self.addLink( s3, s4 ,bw=10)
        self.addLink( s3, s6 ,bw=10)
        self.addLink( s4, s7 ,bw=10)
        self.addLink( s5, s7 ,bw=10)
        self.addLink( s6, s7 ,bw=10)
        self.addLink( s7, h3 ,bw=10)
        self.addLink( s7, h4 ,bw=10)

topos = { 'test': ( lambda: TEST() ) }



Habib Allah Khosravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the mininet-discuss mailing list