[ovs-discuss] Monitor Switch to Controller Traffic

Ben Pfaff blp at ovn.org
Tue Mar 24 05:32:55 UTC 2020


On Mon, Mar 23, 2020 at 08:40:55PM -0700, Brian Perry wrote:
> Environment 1 Results:
> When running Wireshark on the loopback interface and the br0 interface I
> was unable to find any OpenFlow messages when using flow table commands
> like:
> ovs-ofctl dump-flows br0
> 
> Looking through various documentation eventually lead me to a website that
> states that the ovs-ofctl command is using a Unix domain socket to
> communicate with the switch (
> https://github.com/mininet/openflow-tutorial/wiki/Learn-Development-Tools#accessing-remote-ovs-instances-or-the-stanford-reference-switch)
> . And I also found out that Wireshark can't capture Unix domain socket
> traffic because it isn't a network interface (
> https://www.wireshark.org/lists/ethereal-users/200202/msg00259.html).
> 
> Is it possible to have the ovs-ofctl commands go through an interface so I
> can see the OpenFlow messages on Wireshark?

Sure, just specify an appropriate address.  For example, set up the
switch to listen on an IP address ("ovs-vsctl set-controller br0 ptcp:")
then use ovs-ofctl to connect to that ("ovs-ofctl dump-flows
tcp:$MY_IP").

> Environment 2 Results:
> When running Wireshark on the loopback interface and the br0 interface I
> saw the OpenFlow messages being sent to and from the loopback address
> 127.0.0.1. While I initially thought the messages would be addressed from
> br0 (192.168.56.3) to the controller (127.0.0.1). After thinking about it
> some more, I understand why the switch br0 and the controller are both
> addressed 127.0.0.1. Because the switch and controller are two processes
> that are on the same Host OS communicating with each other.
> 
> But I was wondering if it is possible to configure the switch so that the
> OpenFlow message packets address br0 as 192.168.56.3 and the controller as
> 127.0.0.1?

Sure, just specify those addresses instead of 127.0.0.1.


More information about the discuss mailing list