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.cho...@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@mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6634 > stats_reply (xid=0x4cbd6894): flags=none type=1(flow) > mininet@mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6635 > stats_reply (xid=0xbe6b6a1b): flags=none type=1(flow) > mininet@mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6636 > stats_reply (xid=0x158a3b4a): flags=none type=1(flow) > mininet@mininet-vm:~/pox$ > > If I comment out, say s3 port 6636: > mininet@mininet-vm:~/pox$ dpctl dump-flows tcp:127.0.0.1:6636 > dpctl: failed to send packet to switch: Connection refused > mininet@mininet-vm:~/pox$ > > Hope it helps. > > Eric > > > On Apr 27, 2013, at 1:34 PM, Navina Ramesh <rnav...@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@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@lists.stanford.edu >> https://mailman.stanford.edu/mailman/listinfo/openflow-discuss > > _______________________________________________ > openflow-discuss mailing list > openflow-discuss@lists.stanford.edu > https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
_______________________________________________ openflow-discuss mailing list openflow-discuss@lists.stanford.edu https://mailman.stanford.edu/mailman/listinfo/openflow-discuss