diff --git a/mininet.py b/mininet.py index cc484d4389e5cef162d74ab415ba73299f28e7cf..814708461c799774d6d20bae71e5931959612433 100755 --- a/mininet.py +++ b/mininet.py @@ -400,11 +400,9 @@ def nameGen( prefix ): # For the user datapath, we create an explicit control network. # Note: Instead of routing, we could bridge or use "in-band" control -def configRoutedControlNetwork( controller, switches, - ipGen=ipGen, ipStart=( 10, 123, 0, 1 ) ): +def configureRoutedControlNetwork( controller, switches, ips): """Configure a routed control network on controller and switches, for use with the user datapath.""" - ips = ipGen( ipStart ) cip = ips.next() print controller.name, '<->', for switch in switches: @@ -468,9 +466,11 @@ def __init__( self, exit( 1 ) # Create network, but don't start things up yet! self.prepareNet() - def configureControlNetwork( self ): + def configureControlNetwork( self, + ipGen=ipGen, ipStart = (10, 0, 123, 1 ) ): + ips = apply( ipGen, ipStart ) configureRoutedControlNetwork( self.controllers[ 0 ], - self.switches) + self.switches, ips = ips) def configHosts( self ): configHosts( self.hosts, self.hostIps ) def prepareNet( self ):