Search Mailing List Archives
[mininet-discuss] Remote Controller
rlantz at cs.stanford.edu
Fri Jan 18 13:40:50 PST 2013
On Jan 18, 2013, at 8:04 AM, "Castelli, Brian" <Brian.Castelli at spirent.com> wrote:
> Writing my first mininet python script to enable a remote controller. If I invoke mininet from the CLI it works fine:
>> sudo mn --controller=remote,ip=126.96.36.199
> But from this script, I get the error, "Unable to contact the remote controller at 127.0.0.1:6633":
> from mininet.net import Mininet
> from mininet.node import Controller, RemoteController, OVSKernelSwitch
> from mininet.topo import Topo, SingleSwitchTopo
> from mininet.cli import CLI
> from mininet.log import setLogLevel
> def createNetwork():
> "Create a network."
> myTopo = SingleSwitchTopo(2)
> net = Mininet( topo=myTopo, controller=lambda a: RemoteController(a, defaultIP='188.8.131.52'))
> print "*** Starting network"
> CLI( net )
> print "*** Stopping network"
> if __name__ == '__main__':
> setLogLevel( 'info' ) # for CLI output
> I have searched the Internet for example. I found several and tried every variation of this script that I found with the same result.
> If I replace the Mininet line with
> net = Mininet( topo=myTopo, controller=Controller)
> It works fine--but with a local controller...
> Am I missing something simple?
> E-mail confidentiality.
> This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution and / or the taking of any action based upon reliance on the contents of this transmission is strictly forbidden. If you have received this message in error please notify the sender by return e-mail and delete it from your system.
> Spirent Communications plc
> Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
> Tel No. +44 (0) 1293 767676
> Fax No. +44 (0) 1293 767677
> Registered in England Number 470893
> Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
> Or if within the US,
> Spirent Communications,
> 26750 Agoura Road, Calabasas, CA, 91302, USA.
> Tel No. 1-818-676- 2300
> mininet-discuss mailing list
> mininet-discuss at lists.stanford.edu
More information about the mininet-discuss