The problem I'm trying to solve is that we have scripted (quite possibly
erroneously) a controller that should have the IP 10.0.2.2 but the
controller keeps getting set to 127.0.0.1. If I do an ovs-vsctl show to
bring up the bridge interfaces for OVS/Mininet, the controller is set to
127.0.0.1. This behaviour is unexpected as we have written a script for it
to be 10.0.2.2 So for now, I  have to use the command ovs-vsctl
set-controller bridge tcp:10.0.2.2:6633. The controller is not connected
but the entry should be persistent in the OVSDB database if I'm right?

On Wed, Aug 7, 2013 at 6:50 PM, <w...@ateneo.edu> wrote:

> Can you check if the controller is running? Also the error says 127.0.0.1
> and not 10.0.2.2. Is that a typo?
>
> Sent on the move.
>   *From: *Dmita Levy
> *Sent: *Thursday, August 8, 2013 6:43 AM
> *To: *w...@ateneo.edu
> *Subject: *Re: [mininet-discuss] Problems Changing Controller in OpenFlow
> Tutorial
>
> Sorry, that's an error in typing. The controller port is indeed 6633 but
> we'd like it to be something along the lines of 10.x.x.x:6633 and not keep
> trying to use the loopback interface of 127.0.0.1:6633
>
> Thanks Always!
> Dmita
>
> On Wed, Aug 7, 2013 at 6:41 PM, <w...@ateneo.edu> wrote:
>
>> Check controller port. Is it 663 or 6633? Is it running?
>>
>>  Sent on the move.
>>   *From: *Dmita Levy
>> *Sent: *Thursday, August 8, 2013 3:21 AM
>> *To: *mininet-disc...@lists.stanford.edu
>> *Cc: *Omair Fatmi
>> *Subject: *[mininet-discuss] Problems Changing Controller in OpenFlow
>> Tutorial
>>
>> Hello,
>>
>> I am running the following script to create a custom topology in the
>> OpenFlow mininet environment. The script runs as it should but I get the
>> error message
>>
>> Unable to contact the remote controller at 127.0.0.1:663
>> Unable to contact the remote controller at 127.0.0.1:663
>> Unable to contact the remote controller at 127.0.0.1:663
>>
>> but the switches are created fine. Am I scripting this correctly?
>>
>> #!/usr/bin/python
>>
>> from mininet.net import Mininet
>> from mininet.node import OVSKernelSwitch, RemoteController
>> from mininet.cli import CLI
>> from mininet.log import setLogLevel
>>
>> def addHost(net, N):
>>     name= 'h%d' % N
>>     ip = '10.0.0.%d' % N
>>     mac = '00:00:00:00:00:%02d' % N
>>     return net.addHost(name, ip=ip, mac=mac)
>>
>>
>>
>> def MultiControllerNet(c1ip = '10.0.2.2', c2ip = '10.0.2.2', c3ip =
>> '10.0.2.2'):
>>     net = Mininet(controller=RemoteController, switch=OVSKernelSwitch,
>> autoSetMacs=True)
>>     print "Creating controllers"
>>     c1 = net.addController(name = 'Floodlight1', controller =
>> RemoteController, defaultIP=c1ip, port=6633)
>>     c2 = net.addController(name = 'Floodlight2', controller =
>> RemoteController, defaultIP=c2ip, port=6633)
>>     c3 = net.addController(name = 'Floodlight3', controller =
>> RemoteController, defaultIP=c3ip, port=6633)
>>
>>     print "*** Creating switches"
>>     s1 = net.addSwitch( 's1' )
>>     s2 = net.addSwitch( 's2' )
>>     s3 = net.addSwitch( 's3' )
>>     s4 = net.addSwitch( 's4' )
>>     s5 = net.addSwitch( 's5' )
>>     s6 = net.addSwitch( 's6' )
>>     s7 = net.addSwitch( 's7' )
>>     s8 = net.addSwitch( 's8' )
>>     s9 = net.addSwitch( 's9' )
>>     s10 = net.addSwitch( 's10' )
>>     s11 = net.addSwitch( 's11' )
>>     s12 = net.addSwitch( 's12' )
>>     s13 = net.addSwitch( 's13' )
>>     s14 = net.addSwitch( 's14' )
>>     s15 = net.addSwitch( 's15' )
>>     s16 = net.addSwitch( 's16' )
>>     s17 = net.addSwitch( 's17' )
>>     s18 = net.addSwitch( 's18' )
>>     s19 = net.addSwitch( 's19' )
>>     s20 = net.addSwitch( 's20' )
>>     s21 = net.addSwitch( 's21' )
>>     s22 = net.addSwitch( 's22' )
>>     s23 = net.addSwitch( 's23' )
>>     s24 = net.addSwitch( 's24' )
>>     s25 = net.addSwitch( 's25' )
>>     s26 = net.addSwitch( 's26' )
>>     s27 = net.addSwitch( 's27' )
>>     s28 = net.addSwitch( 's28' )
>>     s29 = net.addSwitch( 's29' )
>>     s30 = net.addSwitch( 's30' )
>>     s31 = net.addSwitch( 's31' )
>>     s32 = net.addSwitch( 's32' )
>>     s33 = net.addSwitch( 's33' )
>>     s34 = net.addSwitch( 's34' )
>>     s35 = net.addSwitch( 's35' )
>>     s36 = net.addSwitch( 's36' )
>>
>>     print "*** Creating hosts"
>>     hosts1 = [ addHost( net, n ) for n in 1, 2 ]
>>     hosts2 = [ addHost( net, n ) for n in 3, 4 ]
>>     hosts3 = [ addHost( net, n ) for n in 5, 6 ]
>>     hosts4 = [ addHost( net, n ) for n in 7, 8 ]
>>     hosts5 = [ addHost( net, n ) for n in 9, 10 ]
>>     hosts6 = [ addHost( net, n ) for n in 11, 12 ]
>>     hosts7 = [ addHost( net, n ) for n in 13, 14 ]
>>     hosts8 = [ addHost( net, n ) for n in 15, 16 ]
>>     hosts9 = [ addHost( net, n ) for n in 17, 18 ]
>>     hosts10 = [ addHost( net, n ) for n in 19, 20 ]
>>     hosts11 = [ addHost( net, n ) for n in 21, 22 ]
>>     hosts12 = [ addHost( net, n ) for n in 23, 24 ]
>>     hosts13 = [ addHost( net, n ) for n in 25, 26 ]
>>     hosts14 = [ addHost( net, n ) for n in 27, 28 ]
>>     hosts15 = [ addHost( net, n ) for n in 29, 30 ]
>>     hosts16 = [ addHost( net, n ) for n in 31, 32 ]
>>
>>     print "*** Creating links"
>>     for h in hosts1:
>>         s21.linkTo( h )
>>     for h in hosts2:
>>         s22.linkTo( h )
>>     for h in hosts3:
>>         s23.linkTo( h )
>>     for h in hosts4:
>>         s24.linkTo( h )
>>     for h in hosts5:
>>         s25.linkTo( h )
>>     for h in hosts6:
>>         s26.linkTo( h )
>>     for h in hosts7:
>>         s27.linkTo( h )
>>     for h in hosts8:
>>         s28.linkTo( h )
>>     for h in hosts9:
>>         s29.linkTo( h )
>>     for h in hosts10:
>>         s30.linkTo( h )
>>     for h in hosts11:
>>         s31.linkTo( h )
>>     for h in hosts12:
>>         s32.linkTo( h )
>>     for h in hosts13:
>>         s33.linkTo( h )
>>     for h in hosts14:
>>         s34.linkTo( h )
>>     for h in hosts15:
>>         s35.linkTo( h )
>>     for h in hosts16:
>>         s36.linkTo( h )
>>
>>     s1.linkTo( s4 )
>>     s2.linkTo( s3 )
>>     s1.linkTo( s3 )
>>     s2.linkTo( s4 )
>>     s1.linkTo( s17 )
>>     s1.linkTo( s18 )
>>     s2.linkTo( s19 )
>>     s2.linkTo( s20 )
>>
>>     s5.linkTo( s7 )
>>     s6.linkTo( s8 )
>>     s5.linkTo( s8 )
>>     s6.linkTo( s7 )
>>     s5.linkTo( s17 )
>>     s5.linkTo( s18 )
>>     s6.linkTo( s19 )
>>     s6.linkTo( s20 )
>>
>>     s9.linkTo( s11 )
>>     s10.linkTo( s12 )
>>     s9.linkTo( s12 )
>>     s10.linkTo( s11 )
>>     s9.linkTo( s17 )
>>     s9.linkTo( s18 )
>>     s10.linkTo( s19 )
>>     s10.linkTo( s20 )
>>
>>     s13.linkTo( s15 )
>>     s14.linkTo( s16 )
>>     s13.linkTo( s16 )
>>     s14.linkTo( s15 )
>>     s13.linkTo( s17 )
>>     s13.linkTo( s18 )
>>     s14.linkTo( s19 )
>>     s14.linkTo( s20 )
>>
>>     s3.linkTo( s21 )
>>     s3.linkTo( s22 )
>>     s4.linkTo( s23 )
>>     s4.linkTo( s24 )
>>     s7.linkTo( s25 )
>>     s7.linkTo( s26 )
>>     s8.linkTo( s27 )
>>     s8.linkTo( s28 )
>>     s11.linkTo( s29 )
>>     s11.linkTo( s30 )
>>     s12.linkTo( s31 )
>>     s12.linkTo( s32 )
>>     s15.linkTo( s33 )
>>     s15.linkTo( s34 )
>>     s16.linkTo( s35 )
>>     s16.linkTo( s36 )
>>     print "*** Building network"
>>     net.build()
>>     # In theory this doesn't do anything
>>     c1.start()
>>     c2.start()
>>     c3.start()
>>
>>     print "*** Starting Switches"
>>     s1.start([c1])
>>     s2.start([c1])
>>     s3.start([c3])
>>     s4.start([c2])
>>     s5.start([c1])
>>     s6.start([c1])
>>     s7.start([c3])
>>     s8.start([c2])
>>     s9.start([c1])
>>     s10.start([c1])
>>     s11.start([c3])
>>     s12.start([c2])
>>     s13.start([c1])
>>     s14.start([c1])
>>     s15.start([c3])
>>     s16.start([c2])
>>     s17.start([c1])
>>     s18.start([c1])
>>     s19.start([c3])
>>     s20.start([c2])
>>     s21.start([c1])
>>     s22.start([c1])
>>     s23.start([c3])
>>     s24.start([c2])
>>     s25.start([c1])
>>     s26.start([c1])
>>     s27.start([c3])
>>     s28.start([c2])
>>     s29.start([c1])
>>     s30.start([c1])
>>     s31.start([c3])
>>     s32.start([c2])
>>     s33.start([c1])
>>     s34.start([c1])
>>     s35.start([c3])
>>     s36.start([c2])
>>
>>     return net
>>
>> net = MultiControllerNet()
>> CLI(net)
>>
>>
>> _______________________________________________
>> mininet-discuss mailing list
>> mininet-disc...@lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/mininet-discuss
>>
>>
>
>
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to