我有这种拓扑结构 #!的/ usr / bin中/ Python的
from mininet.net import Mininet
from mininet.node import Controller, RemoteController, OVSController
from mininet.node import CPULimitedHost, Host, Node
from mininet.node import OVSKernelSwitch, UserSwitch
from mininet.node import IVSSwitch
from mininet.cli import CLI
from mininet.link import TCLink
from mininet.log import setLogLevel, info
from mininet.link import Intf
from subprocess import call
def myNetwork():
net = Mininet( topo=None, build=False, link=TCLink,
controller=RemoteController)
linkopts = dict(bw=100, delay='1us', loss=0)
info( '*** Adding controller\n' )
controller1=net.addController(name='controller1',
controller=RemoteController, protocol='tcp', port=6633)
controller2=net.addController( name='controller2',
controller=RemoteController, protocol='tcp', port=6644)
info( '*** Add switches\n')
switch1 = net.addSwitch('switch1', cls=OVSKernelSwitch)
switch2 = net.addSwitch('switch2', cls=OVSKernelSwitch)
net.addLink(switch1, switch2, **linkopts)
controller1.start( )
switch1.start([controller1])
controller2.start( )
switch2.start([controller2])
#switch1.cmd ('ovs-vsctl set Bridge switch1 protocols=OpenFlow10')
#switch2.cmd ('ovs-vsctl set Bridge switch2 protocols=OpenFlow10')
server1 = net.addHost('server1', cls=Node, ip='10.0.0.1')
net.addLink(switch1, server1, **linkopts)
server2 = net.addHost('server2', cls=Node, ip='10.0.0.2')
net.addLink(switch2, server2, **linkopts)
service = net.addHost('service', cls=Node, ip='10.0.0.3')
net.addLink(switch2, service, **linkopts)
info( '*** Add hosts\n')
for h in range(0,32):
client = net.addHost('client%s' % (h + 1))
net.addLink(client, switch1, **linkopts)
for h in range(32,64):
client = net.addHost('client%s' % (h + 1))
net.addLink(client, switch2, **linkopts)
info( '*** Starting network\n')
net.build()
net.start()
CLI(net)
net.stop()
if __name__ == '__main__':
setLogLevel( 'info' )
myNetwork()
我希望从两个实例的pox控制器运行ip_loadbalancer应用程序来运行两个控制器。当我们运行它时,它会给出这个错误列表。
ERROR:core:Exception while handling OpenFlowNexus!PacketIn...
Traceback (most recent call last):
File "/home/eman/pox/pox/lib/revent/revent.py", line 231, in
raiseEventNoErrors
return self.raiseEvent(event, *args, **kw)
File "/home/eman/pox/pox/lib/revent/revent.py", line 278, in
raiseEvent
rv = event._invoke(handler, *args, **kw)
File "/home/eman/pox/pox/lib/revent/revent.py", line 156, in _invoke
return handler(self, *args, **kw)
File "/home/eman/pox/pox/proto/arp_responder.py", line 189, in
_handle_PacketIn
if _arp_table[a.protosrc] != a.hwsrc:
File "/home/eman/pox/pox/proto/arp_responder.py", line 78, in __ne__
return not self.__eq__(other)
File "/home/eman/pox/pox/proto/arp_responder.py", line 76, in __eq__
return self.mac == other
File "/home/eman/pox/pox/lib/addresses.py", line 214, in __cmp__
return -other.__cmp__(self)
TypeError: bool.__cmp__(x,y) requires y to be a 'bool', not a
'EthAddr'
我该怎么做才能消除此错误?