2017-10-28 77 views
1

我正在关注openflow tutorial的openflow教程。我正在使用mininet和ryu控制器和openvswitch 2.8.0版。当我尝试使用命令:ovs-ofctl do not work - 连接拒绝

须藤OVS-ofctl秀S1

它给出如下错误:

ASD @ ASD:〜/柳/柳/ MPLS $ sudo的OVS-ofctl秀S1

OVS-ofctl:/var/run/openvswitch/s1.mgmt:未能打开插座(连接被拒绝)

因为我使用sudo,我认为不应该有关于打开套接字连接权限的任何问题。不知道是什么导致这个错误。 帮助表示赞赏。

+0

此错误通常意味着Open vSwitch未运行。你可以检查你有一个'ovs-vswitchd'进程在运行吗? – pchaigno

+0

是的。这是openvswitch安装的问题 – Ashwin

+0

好!我将我的评论作为未来任何人考虑这个问题的答案。 – pchaigno

回答

0

错误消息是说ovs-vswitchd未打开预期为/var/run/openvswitch/s1.mgmt的Unix套接字。这通常意味着ovs-vswitchd(Open vSwitch的守护进程)未运行。

您可以检查通过运行:

$ ps aux | grep ovs-vswitchd 
root  77289 0.0 0.0 25632 4916 ?  Ss 16:05 0:00 ovsdb-server --remote=punix:/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --log-file=/var/log/openvswitch/ovs-vswitchd.log -vsyslog:info -vfile:info --pidfile --detach 
root  77295 100 0.2 2608140 45820 ?  Ssl 16:05 3:13 ovs-vswitchd unix:/var/run/openvswitch/db.sock --pidfile --detach --log-file=/var/log/openvswitch/ovs-vswitchd.log -vfile:info 
paul  77447 0.0 0.0 14228 968 pts/2 S+ 16:08 0:00 grep --color=auto ovs-vswitchd 

第一个过程,ovsdb-server,答案OVSDB查询。第二个进程ovs-vswitchd响应OpenFlow查询并处理数据包。