Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[openflow-discuss] Error encountered on issuing dpctl to dump-flows

Eric Chou eric.chou99 at gmail.com
Sun Apr 28 20:20:06 PDT 2013


Thanks Bob! Your reply in #1 pointed me to read up on the difference between ovs-ofctl vs. ovs-dpctl. I think I get the difference after reading more about both. One quick question, what is the difference between dpctl vs. ovs-dpctl / ovs-ofctl? I guess one was a historical tool and the other two were separated out as the cleaner way to separate what the switch installs vs. what OpenFlow sees? Is that a fair statement? 

If I play with the ova-ofctl more and feel I can accurately update the tutorial I will find some time to do it. :)

Eric


On Apr 28, 2013, at 2:37 PM, Bob Lantz <rlantz at cs.stanford.edu> wrote:

> 1. For OVS, you can (should?) just use ovs-ofctl:
> 
> 	# ovs-ofctl show s1
> 
> We should probably update the OpenFlow tutorial (anyone can, actually.)
> 
> 2. You should also be able to pass listenPort into the Mininet constructor
> 
> 	net = Mininet( ... , listenPort=6634)
> 
> 3. You should also be able to pass parameters into the switch constructor:
> 
> 	s1 = net.addSwitch( 's1', listenPort=6634 ... )
> 
> 4. You should also be able to use
> 
> 	sudo mn --listenport=6634
> 
> 
> On Apr 28, 2013, at 11:13 AM, Eric Chou <eric.chou99 at gmail.com> wrote:
> 
>> Hi Navina, you can probably add that in your controller code, but it is probably worth pointing out that OVS provides the feature to passively listens for dpctl messages while actively registers to OF controllers. By default this is turned off, you can see that from ~/mininet/mininet/node.py __init__ function with listenPort=None. So you simply need to enable it when you create your custom topology. For my project, I created a custom topology and added them as: 
>> 
>>     s1 = net.addSwitch('s1')
>>     s1.listenPort = 6634
>>     s2 = net.addSwitch('s2')
>>     s2.listenPort = 6635
>>     s3 = net.addSwitch('s3')
>>     s3.listenPort = 6636
>> 
>> Full code here: 
>> https://github.com/ericchou-python/PyTapDEMON/blob/master/MininetTopology/PyTapDEMON_topo.py
>> 
>> Then dpctl works: 
>> mininet at mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6634
>> stats_reply (xid=0x4cbd6894): flags=none type=1(flow)
>> mininet at mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6635
>> stats_reply (xid=0xbe6b6a1b): flags=none type=1(flow)
>> mininet at mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6636
>> stats_reply (xid=0x158a3b4a): flags=none type=1(flow)
>> mininet at mininet-vm:~/pox$
>> 
>> If I comment out, say s3 port 6636:
>> mininet at mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6636
>> dpctl: failed to send packet to switch: Connection refused
>> mininet at mininet-vm:~/pox$
>> 
>> Hope it helps. 
>> 
>> Eric
>> 
>> 
>> On Apr 27, 2013, at 1:34 PM, Navina Ramesh <rnavina at acis.ufl.edu> wrote:
>> 
>>> Hi,
>>> 
>>> I have just started writing controllers using Openflow. I am using Mininet 2.0.0 to create a network with 2 OVS Switches. I wrote a controller that behaves like a learning switch, similar to what is shown in l2_learning.py.
>>> I was trying to view the flows I installed by issuing the dpctl command to the switch in my terminal as:
>>> 
>>> mininet at mininet-vm:~/pox$ dpctl show tcp:127.0.0.1:6633
>>> dpctl: talking to tcp:127.0.0.1:6633: unexpected end of file
>>> 
>>> I am running mininet and controller in the same virtual image and hence, 127.0.0.1.
>>> 
>>> I am getting the following error on my controller(pox) terminal:
>>> 
>>> ERROR:openflow.of_01:[Con 5/None]: Exception while handling OpenFlow message:
>>> [Con 5/None] ofp_features_request
>>> [Con 5/None]   header: 
>>> [Con 5/None]     version: 1
>>> [Con 5/None]     type:    5 (OFPT_FEATURES_REQUEST)
>>> [Con 5/None]     length:  8
>>> [Con 5/None]     xid:     862702809
>>> Traceback (most recent call last):
>>>  File "/home/mininet/pox/pox/openflow/of_01.py", line 622, in read
>>>    h(self, msg)
>>> TypeError: 'NoneType' object is not callable
>>> 
>>> I am not able to figure out why this error is caused. Should I be handling anything in my controller code?
>>> 
>>> Any pointers will be helpful.
>>> 
>>> Thanks!
>>> Navina
>>> _______________________________________________
>>> openflow-discuss mailing list
>>> openflow-discuss at lists.stanford.edu
>>> https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
>> 
>> _______________________________________________
>> openflow-discuss mailing list
>> openflow-discuss at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/openflow-discuss/attachments/20130428/b4aca99b/attachment-0001.html>


More information about the openflow-discuss mailing list