[P4-dev] Problem with OpenflowEnabledP4Switch

Tanja Ulmen tanja.ulmen at rwth-aachen.de
Wed Dec 14 08:52:25 EST 2016


Hi,

I have a mininet topology with three OpenflowEnabledP4Switches that is 
build like this:

    def myNetwork():
         behavioral_model = os.path.join(sys.path[0],
    '../targets/control_target/behavioral-model')
         net = Mininet( topo= None, host= P4Host, build=False, switch =
    OpenflowEnabledP4Switch)

         info( '*** Adding controller\n' )
         c0=net.addController(name='c0', controller=RemoteController,
    ip='127.0.0.1', port=6653)

         info( '*** Add switches\n')
         sw1 = net.addSwitch('sw1', sw_path = behavioral_model,
    dpid="01", thrift_port = 22223, pcap_dump = True)
         sw2 = net.addSwitch('sw2', sw_path = behavioral_model,
    dpid="02", thrift_port = 22224, pcap_dump = True)
         sw3 = net.addSwitch('sw3', sw_path = behavioral_model,
    dpid="03", thrift_port = 22225, pcap_dump = True)

         info( '*** Add hosts\n')
         sens1 = net.addHost('sens1', cls=P4Host, ip='10.0.1.10/24',
    mac='00:00:00:10:01:10')

         info( '*** Add links\n')
         net.addLink(sens1, sw2)
         net.addLink(sw1, sw2)
         net.addLink(sw1, sw3)

         info( '*** Starting network\n')
         net.build()

         info( '*** Starting switches\n')
         net.get('sw1').start([c0])
         net.get('sw2').start([c0])
         net.get('sw3').start([c0])
    ...


The class OpenflowEnabledP4Switch is similar to the one of the 
openflow_l2.py in p4factory/mininet/. The switches are connected to a 
Ryu controller. Sw2 and Sw3 have tables to forward the data to Sw1 and 
Sw1 sends the data to the Ryu controller with an openflow_miss. All data 
that is sent from Sw1 to the controller is received by the controller, 
but my problem is that it is received three times. By analyzing the 
packets with wireshark, it seems that the controller receives one 
duplicate of this message from every switch. In the log files of the 
switches only Sw1 is sending the packet once to the controller.

When I use the Ryu Topology Viewer only one switch is visible instead of 
three. When I use the same topology but with normal switches (not P4) 
then all three switches are visible. So maybe the three switches are not 
really separated?

Do you have any ideas why the other switches also send messages to the 
controller without telling them to do so? I hope it's possible to 
understand my problem.

Best regards,
Tanja


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20161214/d1d50a50/attachment-0002.html>


More information about the P4-dev mailing list