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] Fwd: custom network problem

Selin Yılmaz selinyilmaz.metu2012 at
Sat Apr 12 02:18:06 PDT 2014

I have sent this email a few days ago but did not receive any replies. That
is why I am resending. I have a problem with the number of switches that I
can add to the system. I saw that there are many people working with
switches more than 248. Can anyone help me? Why cannot I have more than 248

I am using the Ubuntu 12.04 64-bit operating system with a computer of 64GB
memory and I am trying to generate a network with multiple controllers. I
am using Floodlight controller as the remote controller and running it with
-Xms512m -Xmx512m in order not to have memory issues. I am trying to
generate a network with as many switches as I can. However, while doing
some tests, I noticed that more than 248 switches cannot be added to the

For this reason, I reduced my code to have only one controller and 300
switches but again it resulted with 248 switches and 248 hosts. As 248 is
not a number that made sense for me, I decided to skip some IP addresses
and MAC addresses. I thought that they may be the reason for this
situation. I could not solve why there is this limitation with the number
switches. I also included my reduced python code below.

My code does not crash and mininet shows that the last 52 switches are also
generated; however, when I try to ping to one them, I get unreachable
output. Also in the web interface of Floodlight, I can only see that there
are 248 switches. The code does not crash but the last 52 switches are not

Can anyone help me? Why cannot I have more than 248 switches in my system?

Thanks in advance.




from import Mininet
from mininet.node import RemoteController,Controller, OVSSwitch
from mininet.cli import CLI
from mininet.log import setLogLevel

def multiControllerNet():
    "Create a network from semi-scratch with multiple controllers."

    net = Mininet( controller=RemoteController, switch=OVSSwitch,
build=False )

    print "*** Creating (reference) controllers"
    c1 = RemoteController( 'c1', ip='', port=6633 )

    ''' Ilkinin bir fazlasi '''
    firstOne = 301

    lastOne = firstOne

    s = [0 for i in range(lastOne)]

    hosts = [0 for i in range(lastOne)]

    print "*** Creating switches"
    for x in range(1, firstOne):
if x < 240:
s[x] = net.addSwitch( 's%d' % x, dpid='00000000000000%02x' % x)
s[x] = net.addSwitch( 's%d' % x, dpid='00000000000001%02x' % (x-239))

    print "*** Creating hosts"
    for x in range(1, firstOne):
if x < 240:
hosts[x] = [ net.addHost( 'h%d' % x, ip='10.0.0.%d' % x ) ]
hosts[x] = [ net.addHost( 'h%d' % x, ip='10.0.1.%d' % (x-239) ) ]

    print "*** Creating links"
    for x in range(1, firstOne):
for h in hosts[x]:
net.addLink( s[x], h )

    for x in range(1, lastOne-1):
net.addLink( s[x], s[x+1] )

    print "*** Starting network"

    for x in range(1, firstOne):
    s[x].start( [c1] )

    print "*** Testing network"

    print "*** Running CLI"
    CLI( net )

    print "*** Stopping network"

if __name__ == '__main__':
    setLogLevel( 'info' )  # for CLI output
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the mininet-discuss mailing list