Discussion:
[ovs-discuss] Is it possible to use the ovs-ofctl command to control the remote ovs?
Kris zhang
2012-07-13 10:06:50 UTC
Permalink
Hi guys,

I read the document about ovs-ofctl (
http://openvswitch.org/cgi-bin/ovsman.cgi?page=utilities%2Fovs-ofctl.8) :

Most of these commands take an argument that specifies the method for
connecting to an OpenFlow switch. The following connection methods are
supported:

*ssl:**ip*[*:**port*]

The specified SSL *port* (default: 6633) on the host at the given *ip*,
which must be expressed as an IP address (not a DNS name). The *
--private-key*, *--certificate*, and *--ca-cert* options are mandatory when
this form is used.

*tcp:**ip*[*:**port*]

The specified TCP *port* (default: 6633) on the host at the given *ip*,
which must be expressed as an IP address (not a DNS name).




I want to know if i can use ovs-ofctl to manage the remote ovs which in
another host?

For example:

ovs-ofctl tcp:192.168.1.2 add-flow br0 action=normal


Thanks in advanced,
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/discuss/attachments/20120713/5fa0ee72/attachment.htm>
Ben Pfaff
2012-07-13 14:30:05 UTC
Permalink
Post by Kris zhang
I want to know if i can use ovs-ofctl to manage the remote ovs which in
another host?
ovs-ofctl tcp:192.168.1.2 add-flow br0 action=normal
Yes.
Qiaobing Xie
2012-08-17 17:29:19 UTC
Permalink
I am getting connection error when I try to use ovs-ofctl to control a
remote ovs. I am running v1.7.0.

I have my ovs bridge 'lan0' created on a host 192.168.43.148, and I can
do 'ovs-ofctl show lan0' on the host locally without problem. To try
this remotely, I've restarted my ovsdb-server on that host with
"--remote=ptcp:6633" added to its options.

From a remote machine, now ovs-vsctl works:

%% ovs-vsctl --db=tcp:192.168.43.148:6633 show
a1d19b92-c343-4297-b0ab-072761a6b687
Bridge "lan0"
Controller "tcp:192.168.43.148"
fail_mode: secure
Port "lan0"
Interface "lan0"
type: internal
Port "lan0p1"
Interface "lan0p1"
Port "lan0p0"
Interface "lan0p0"

But from the same remote machine, ovs-ofctl does not work:

%% ovs-ofctl show tcp:192.168.43.148
ovs-ofctl: connecting to tcp:192.168.43.148 (Connection reset by peer)
%% ovs-ofctl show tcp:192.168.43.148:6633
ovs-ofctl: connecting to tcp:192.168.43.148:6633 (Connection reset by peer)

I also tried the syntax suggested in this thread, it prompted a usage error:

%% ovs-ofctl tcp:192.168.43.148 show lan0
ovs-ofctl: unknown command 'tcp:192.168.43.148'; use --help for help

What I did wrong here?

-Qiaobing
Post by Kris zhang
I want to know if i can use ovs-ofctl to manage the remote ovs which in
another host?
ovs-ofctl tcp:192.168.1.2 add-flow br0 action=normal
Yes.
_______________________________________________
discuss mailing list
discuss at openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss
Justin Pettit
2012-08-17 17:49:40 UTC
Permalink
Post by Qiaobing Xie
%% ovs-ofctl show tcp:192.168.43.148
ovs-ofctl: connecting to tcp:192.168.43.148 (Connection reset by peer)
%% ovs-ofctl show tcp:192.168.43.148:6633
ovs-ofctl: connecting to tcp:192.168.43.148:6633 (Connection reset by peer)
You need to tell ovs-vswitchd to listen for an OpenFlow connection on that bridge. Take a look at the "ovs-vsctl set-controller" command to do this.

--Justin
Qiaobing Xie
2012-08-17 17:58:07 UTC
Permalink
Yes, I just figured out this by myself.. The man pages are not clear
about this at all, e.g., an example in ovs-ofctl for remote setup will
go a long way..

And I had to set a port other than 6633 because that port is being used
for ovs-vswitchd to connect to the ovs db. In the man pages, the
suggested default ports for both ovsdb connection and ptcp controller
setting are 6633, that can't work.

Thanks,
-Qiaobing
Post by Justin Pettit
Post by Qiaobing Xie
%% ovs-ofctl show tcp:192.168.43.148
ovs-ofctl: connecting to tcp:192.168.43.148 (Connection reset by peer)
%% ovs-ofctl show tcp:192.168.43.148:6633
ovs-ofctl: connecting to tcp:192.168.43.148:6633 (Connection reset by peer)
You need to tell ovs-vswitchd to listen for an OpenFlow connection on that bridge. Take a look at the "ovs-vsctl set-controller" command to do this.
--Justin
Kris zhang
2012-08-20 08:21:36 UTC
Permalink
When you read the man page, you will find that the --db=ip:port is for
ovsdb-server, and if no --db arguments, it's for openflow, also the
ovs-vsctl is used for ovsdb-server, and ovs-ofctl is used for openflow.
please let me know if i am wrong.

Thanks,
Kris
Yes, I just figured out this by myself.. The man pages are not clear about
this at all, e.g., an example in ovs-ofctl for remote setup will go a long
way..
And I had to set a port other than 6633 because that port is being used
for ovs-vswitchd to connect to the ovs db. In the man pages, the suggested
default ports for both ovsdb connection and ptcp controller setting are
6633, that can't work.
Thanks,
-Qiaobing
Post by Justin Pettit
Post by Qiaobing Xie
%% ovs-ofctl show tcp:192.168.43.148
ovs-ofctl: connecting to tcp:192.168.43.148 (Connection reset by peer)
%% ovs-ofctl show tcp:192.168.43.148:6633
ovs-ofctl: connecting to tcp:192.168.43.148:6633 (Connection reset by peer)
You need to tell ovs-vswitchd to listen for an OpenFlow connection on
that bridge. Take a look at the "ovs-vsctl set-controller" command to do
this.
--Justin
______________________________**_________________
discuss mailing list
discuss at openvswitch.org
http://openvswitch.org/**mailman/listinfo/discuss<http://openvswitch.org/mailman/listinfo/discuss>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/discuss/attachments/20120820/d0794f83/attachment.htm>
Kris zhang
2012-08-20 09:26:06 UTC
Permalink
Hi Justin,

Could i use ovs-appctl fdb/show br0 on remote ovs?
I tried ovs-appctl --db=tcp:172.16.107.21:7777 fdb/show br0, but it didn't
work.

Thanks in advanced,
Kris
Post by Kris zhang
When you read the man page, you will find that the --db=ip:port is for
ovsdb-server, and if no --db arguments, it's for openflow, also the
ovs-vsctl is used for ovsdb-server, and ovs-ofctl is used for openflow.
please let me know if i am wrong.
Thanks,
Kris
Post by Qiaobing Xie
Yes, I just figured out this by myself.. The man pages are not clear
about this at all, e.g., an example in ovs-ofctl for remote setup will go a
long way..
And I had to set a port other than 6633 because that port is being used
for ovs-vswitchd to connect to the ovs db. In the man pages, the suggested
default ports for both ovsdb connection and ptcp controller setting are
6633, that can't work.
Thanks,
-Qiaobing
Post by Justin Pettit
Post by Qiaobing Xie
%% ovs-ofctl show tcp:192.168.43.148
ovs-ofctl: connecting to tcp:192.168.43.148 (Connection reset by peer)
%% ovs-ofctl show tcp:192.168.43.148:6633
ovs-ofctl: connecting to tcp:192.168.43.148:6633 (Connection reset by peer)
You need to tell ovs-vswitchd to listen for an OpenFlow connection on
that bridge. Take a look at the "ovs-vsctl set-controller" command to do
this.
--Justin
______________________________**_________________
discuss mailing list
discuss at openvswitch.org
http://openvswitch.org/**mailman/listinfo/discuss<http://openvswitch.org/mailman/listinfo/discuss>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/discuss/attachments/20120820/16eb8149/attachment.htm>
Justin Pettit
2012-08-21 01:51:58 UTC
Permalink
Sorry, but it's hard-coded to use unix domain sockets.

--Justin
Post by Kris zhang
Hi Justin,
Could i use ovs-appctl fdb/show br0 on remote ovs?
I tried ovs-appctl --db=tcp:172.16.107.21:7777 fdb/show br0, but it didn't work.
Thanks in advanced,
Kris
When you read the man page, you will find that the --db=ip:port is for ovsdb-server, and if no --db arguments, it's for openflow, also the ovs-vsctl is used for ovsdb-server, and ovs-ofctl is used for openflow.
please let me know if i am wrong.
Thanks,
Kris
Yes, I just figured out this by myself.. The man pages are not clear about this at all, e.g., an example in ovs-ofctl for remote setup will go a long way..
And I had to set a port other than 6633 because that port is being used for ovs-vswitchd to connect to the ovs db. In the man pages, the suggested default ports for both ovsdb connection and ptcp controller setting are 6633, that can't work.
Thanks,
-Qiaobing
%% ovs-ofctl show tcp:192.168.43.148
ovs-ofctl: connecting to tcp:192.168.43.148 (Connection reset by peer)
%% ovs-ofctl show tcp:192.168.43.148:6633
ovs-ofctl: connecting to tcp:192.168.43.148:6633 (Connection reset by peer)
You need to tell ovs-vswitchd to listen for an OpenFlow connection on that bridge. Take a look at the "ovs-vsctl set-controller" command to do this.
--Justin
_______________________________________________
discuss mailing list
discuss at openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss
Kris zhang
2012-08-21 01:59:28 UTC
Permalink
Thanks Justin, I see now
Post by Justin Pettit
Sorry, but it's hard-coded to use unix domain sockets.
--Justin
Post by Kris zhang
Hi Justin,
Could i use ovs-appctl fdb/show br0 on remote ovs?
I tried ovs-appctl --db=tcp:172.16.107.21:7777 fdb/show br0, but it
didn't work.
Post by Kris zhang
Thanks in advanced,
Kris
On Mon, Aug 20, 2012 at 4:21 PM, Kris zhang <zhang.kris at gmail.com>
When you read the man page, you will find that the --db=ip:port is for
ovsdb-server, and if no --db arguments, it's for openflow, also the
ovs-vsctl is used for ovsdb-server, and ovs-ofctl is used for openflow.
Post by Kris zhang
please let me know if i am wrong.
Thanks,
Kris
On Sat, Aug 18, 2012 at 1:58 AM, Qiaobing Xie <qiaobing.xie at gmail.com>
Yes, I just figured out this by myself.. The man pages are not clear
about this at all, e.g., an example in ovs-ofctl for remote setup will go a
long way..
Post by Kris zhang
And I had to set a port other than 6633 because that port is being used
for ovs-vswitchd to connect to the ovs db. In the man pages, the suggested
default ports for both ovsdb connection and ptcp controller setting are
6633, that can't work.
Post by Kris zhang
Thanks,
-Qiaobing
On Aug 17, 2012, at 10:29 AM, Qiaobing Xie <qiaobing.xie at gmail.com>
%% ovs-ofctl show tcp:192.168.43.148
ovs-ofctl: connecting to tcp:192.168.43.148 (Connection reset by peer)
%% ovs-ofctl show tcp:192.168.43.148:6633
ovs-ofctl: connecting to tcp:192.168.43.148:6633 (Connection reset by
peer)
Post by Kris zhang
You need to tell ovs-vswitchd to listen for an OpenFlow connection on
that bridge. Take a look at the "ovs-vsctl set-controller" command to do
this.
Post by Kris zhang
--Justin
_______________________________________________
discuss mailing list
discuss at openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/discuss/attachments/20120821/9dc62432/attachment.htm>
Loading...