[ovs-discuss] Fwd: Send some information from openvswitch to floodlight controller

2017-10-12 Thread Tanmay Jain
Hello,

Is there any way to generate a packet and add some information to it by
writing a script at openvswitch and send it to floodlight controller. And
after receiving that packet at controller how to use that information.
Please help..

Thanks and regards
Tanmay Jain
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS bridge on boot in Debian

2017-10-12 Thread Omar Ramadan
A related question: What is the best way to configure a set of controllers? Can 
I specify a set of controllers for my bridge to use in a similar fashion in 
networking?


From: ovs-discuss-boun...@openvswitch.org  
on behalf of Omar Ramadan 
Sent: Thursday, October 12, 2017 4:47:10 PM
To: Guru Shetty
Cc: ovs-discuss@openvswitch.org
Subject: [Potential Spoof] Re: [ovs-discuss] OVS bridge on boot in Debian


Looks like I was missing the kernel module. Added "openvswitch-datapath-dkms" 
and it works now.


Thanks!


From: ovs-discuss-boun...@openvswitch.org  
on behalf of Omar Ramadan 
Sent: Thursday, October 12, 2017 4:31:24 PM
To: Guru Shetty
Cc: ovs-discuss@openvswitch.org
Subject: [Potential Spoof] Re: [ovs-discuss] OVS bridge on boot in Debian


Hi Guru, Ben,


Thanks for the responses. I originally did a "make install" though I realized 
there may be some packaging postinst scripts that may need to be run for it to 
work. I built and installed openvswitch-common and openvswitch-switch.


"ifup --allow=ovs br0" still fails to find br0 but I've made progress 
nonetheless in the networking journal

vagrant@magma-dev:/etc/network$ sudo journalctl -u networking
Oct 12 23:27:29 magma-dev ovs-vsctl[2127]: ovs|1|vsctl|INFO|Called as 
ovs-vsctl --timeout=5 -- --may-exist add-port br0 eth0 --
Oct 12 23:27:29 magma-dev networking[1875]: ovs-vsctl: Error detected while 
setting up 'eth0'.  See ovs-vswitchd log for details.
Oct 12 23:27:29 magma-dev networking[1875]: ovs-vsctl: The default log 
directory is "/var/log/openvswitch".
Oct 12 23:27:29 magma-dev ovs-vsctl[2202]: ovs|1|vsctl|INFO|Called as 
ovs-vsctl --timeout=5 -- --may-exist add-port br0 eth0 --

vagrant@magma-dev:/var/log/openvswitch$ sudo less ovs-vswitchd.log
2017-10-12T23:27:31.123Z|00112|ofproto|ERR|failed to open datapath br0: No such 
file or directory
2017-10-12T23:27:31.123Z|00113|bridge|ERR|failed to create bridge br0: No such 
file or directory

What could be missing?

Best,
Omar



From: Guru Shetty 
Sent: Thursday, October 12, 2017 10:50:38 AM
To: Omar Ramadan
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVS bridge on boot in Debian



On 12 October 2017 at 10:29, Omar Ramadan 
> wrote:

Hi list,


I am using OVS 2.7.90 with Debian 8.7 and want to configure the switch to be 
loaded on system initialization. I have installed the service 
"openvswitch-switch" and added the following in /etc/network/interfaces

How did you install OVS 2.7.90? By 'make install' or via debian packages?



allow-ovs br0

iface br0 inet dhcp

ovs_type OVSBridge

ovs_ports eth0


allow-br0 eth0

iface eth0 inet manual

ovs_bridge br0

ovs_type OVSPort

I am still unable to load br0 with ifup.


vagrant@magma-dev:/etc/network/interfaces.d$ sudo ifup br0
Lets try with:
ifup --allow=ovs br0



Cannot find device "br0"

Bind socket to interface: No such device


exiting.

Failed to bring up br0.

How do these interfaces get set up? Is there anyway to debug this? I've built 
this package from source, so I want to make sure I am not missing dependencies. 
Also should I be adding any additional systemctl units or should adding 
"openvswitch-switch" be enough?

Best,
Omar

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS bridge on boot in Debian

2017-10-12 Thread Omar Ramadan
Looks like I was missing the kernel module. Added "openvswitch-datapath-dkms" 
and it works now.


Thanks!


From: ovs-discuss-boun...@openvswitch.org  
on behalf of Omar Ramadan 
Sent: Thursday, October 12, 2017 4:31:24 PM
To: Guru Shetty
Cc: ovs-discuss@openvswitch.org
Subject: [Potential Spoof] Re: [ovs-discuss] OVS bridge on boot in Debian


Hi Guru, Ben,


Thanks for the responses. I originally did a "make install" though I realized 
there may be some packaging postinst scripts that may need to be run for it to 
work. I built and installed openvswitch-common and openvswitch-switch.


"ifup --allow=ovs br0" still fails to find br0 but I've made progress 
nonetheless in the networking journal

vagrant@magma-dev:/etc/network$ sudo journalctl -u networking
Oct 12 23:27:29 magma-dev ovs-vsctl[2127]: ovs|1|vsctl|INFO|Called as 
ovs-vsctl --timeout=5 -- --may-exist add-port br0 eth0 --
Oct 12 23:27:29 magma-dev networking[1875]: ovs-vsctl: Error detected while 
setting up 'eth0'.  See ovs-vswitchd log for details.
Oct 12 23:27:29 magma-dev networking[1875]: ovs-vsctl: The default log 
directory is "/var/log/openvswitch".
Oct 12 23:27:29 magma-dev ovs-vsctl[2202]: ovs|1|vsctl|INFO|Called as 
ovs-vsctl --timeout=5 -- --may-exist add-port br0 eth0 --

vagrant@magma-dev:/var/log/openvswitch$ sudo less ovs-vswitchd.log
2017-10-12T23:27:31.123Z|00112|ofproto|ERR|failed to open datapath br0: No such 
file or directory
2017-10-12T23:27:31.123Z|00113|bridge|ERR|failed to create bridge br0: No such 
file or directory

What could be missing?

Best,
Omar



From: Guru Shetty 
Sent: Thursday, October 12, 2017 10:50:38 AM
To: Omar Ramadan
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVS bridge on boot in Debian



On 12 October 2017 at 10:29, Omar Ramadan 
> wrote:

Hi list,


I am using OVS 2.7.90 with Debian 8.7 and want to configure the switch to be 
loaded on system initialization. I have installed the service 
"openvswitch-switch" and added the following in /etc/network/interfaces

How did you install OVS 2.7.90? By 'make install' or via debian packages?



allow-ovs br0

iface br0 inet dhcp

ovs_type OVSBridge

ovs_ports eth0


allow-br0 eth0

iface eth0 inet manual

ovs_bridge br0

ovs_type OVSPort

I am still unable to load br0 with ifup.


vagrant@magma-dev:/etc/network/interfaces.d$ sudo ifup br0
Lets try with:
ifup --allow=ovs br0



Cannot find device "br0"

Bind socket to interface: No such device


exiting.

Failed to bring up br0.

How do these interfaces get set up? Is there anyway to debug this? I've built 
this package from source, so I want to make sure I am not missing dependencies. 
Also should I be adding any additional systemctl units or should adding 
"openvswitch-switch" be enough?

Best,
Omar

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS bridge on boot in Debian

2017-10-12 Thread Omar Ramadan
Hi Guru, Ben,


Thanks for the responses. I originally did a "make install" though I realized 
there may be some packaging postinst scripts that may need to be run for it to 
work. I built and installed openvswitch-common and openvswitch-switch.


"ifup --allow=ovs br0" still fails to find br0 but I've made progress 
nonetheless in the networking journal

vagrant@magma-dev:/etc/network$ sudo journalctl -u networking
Oct 12 23:27:29 magma-dev ovs-vsctl[2127]: ovs|1|vsctl|INFO|Called as 
ovs-vsctl --timeout=5 -- --may-exist add-port br0 eth0 --
Oct 12 23:27:29 magma-dev networking[1875]: ovs-vsctl: Error detected while 
setting up 'eth0'.  See ovs-vswitchd log for details.
Oct 12 23:27:29 magma-dev networking[1875]: ovs-vsctl: The default log 
directory is "/var/log/openvswitch".
Oct 12 23:27:29 magma-dev ovs-vsctl[2202]: ovs|1|vsctl|INFO|Called as 
ovs-vsctl --timeout=5 -- --may-exist add-port br0 eth0 --

vagrant@magma-dev:/var/log/openvswitch$ sudo less ovs-vswitchd.log
2017-10-12T23:27:31.123Z|00112|ofproto|ERR|failed to open datapath br0: No such 
file or directory
2017-10-12T23:27:31.123Z|00113|bridge|ERR|failed to create bridge br0: No such 
file or directory

What could be missing?

Best,
Omar



From: Guru Shetty 
Sent: Thursday, October 12, 2017 10:50:38 AM
To: Omar Ramadan
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVS bridge on boot in Debian



On 12 October 2017 at 10:29, Omar Ramadan 
> wrote:

Hi list,


I am using OVS 2.7.90 with Debian 8.7 and want to configure the switch to be 
loaded on system initialization. I have installed the service 
"openvswitch-switch" and added the following in /etc/network/interfaces

How did you install OVS 2.7.90? By 'make install' or via debian packages?



allow-ovs br0

iface br0 inet dhcp

ovs_type OVSBridge

ovs_ports eth0


allow-br0 eth0

iface eth0 inet manual

ovs_bridge br0

ovs_type OVSPort

I am still unable to load br0 with ifup.


vagrant@magma-dev:/etc/network/interfaces.d$ sudo ifup br0
Lets try with:
ifup --allow=ovs br0



Cannot find device "br0"

Bind socket to interface: No such device


exiting.

Failed to bring up br0.

How do these interfaces get set up? Is there anyway to debug this? I've built 
this package from source, so I want to make sure I am not missing dependencies. 
Also should I be adding any additional systemctl units or should adding 
"openvswitch-switch" be enough?

Best,
Omar

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS bridge on boot in Debian

2017-10-12 Thread Guru Shetty
On 12 October 2017 at 10:29, Omar Ramadan  wrote:

> Hi list,
>
>
> I am using OVS 2.7.90 with Debian 8.7 and want to configure the switch to
> be loaded on system initialization. I have installed the service
> "openvswitch-switch" and added the following in /etc/network/interfaces
>

How did you install OVS 2.7.90? By 'make install' or via debian packages?


>
> allow-ovs br0
>
> iface br0 inet dhcp
>
> ovs_type OVSBridge
>
> ovs_ports eth0
>
>
> allow-br0 eth0
>
> iface eth0 inet manual
>
> ovs_bridge br0
>
> ovs_type OVSPort
>
>
> I am still unable to load br0 with ifup.
>
>
> vagrant@magma-dev:/etc/network/interfaces.d$ sudo ifup br0
>
> Lets try with:
ifup --allow=ovs br0



> Cannot find device "br0"
>
> Bind socket to interface: No such device
>
>
> exiting.
>
> Failed to bring up br0.
>
>
> How do these interfaces get set up? Is there anyway to debug this? I've
> built this package from source, so I want to make sure I am not missing
> dependencies. Also should I be adding any additional systemctl units or
> should adding "openvswitch-switch" be enough?
>
>
> Best,
> Omar
>
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Does it work if netdev datapath connect system datapath through patch ports

2017-10-12 Thread Ben Pfaff
On Thu, Oct 12, 2017 at 05:22:14PM +0800, Hui Xiang wrote:
>Seems it works with the same datapath type during the discussion in [1]
> by finally done a flow of leaving two kernel netdev port communicate
> together.
> 
>But in my case I have a setup with two bridges has different datapath
> type, netdev and system, need to be connected, port_A(in netdev datapath)
> is in running in the userspace, port_D(in system datapath), will the flow
> be port_A  port_D directly and packets go through userspace to
> kernelspace and so on in the reverse direction,
>  does patch port can make it work?

No, that doesn't work.  (I should document that.)
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] (no subject)

2017-10-12 Thread BALL SUN
we have created two dpdk interface on a KVM guest, and we add both
dpdk interface on the same OVS bridge, when we add the second dpdk
interface, below error spawn out repeatedly. any idea?

- RBK

Oct 12 18:03:11 localhostovs-vswitchd[2250]:
ovs|00385|ovs_rcu|WARN|blocked 2001 ms waiting for pmd20 to quiesce
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01123|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01124|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01125|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01126|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01127|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01128|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01129|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01130|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01131|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01132|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01133|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
Oct 12 18:03:12 localhostovs-vswitchd[2250]:
ovs|01134|dpdk(pmd20)|ERR|PMD: virtio_xmit_pkts() tx: No free tx
descriptors to transmit
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Does it work if netdev datapath connect system datapath through patch ports

2017-10-12 Thread Hui Xiang
Hi folks,

   Seems it works with the same datapath type during the discussion in [1]
by finally done a flow of leaving two kernel netdev port communicate
together.

   But in my case I have a setup with two bridges has different datapath
type, netdev and system, need to be connected, port_A(in netdev datapath)
is in running in the userspace, port_D(in system datapath), will the flow
be port_A  port_D directly and packets go through userspace to
kernelspace and so on in the reverse direction,
 does patch port can make it work?

The topology is
*port_A --- br1(netdev) --- port_B (patch)  port_C (patch) ---
br2(system) --- port_D*



*[1]
https://mail.openvswitch.org/pipermail/ovs-dev/2015-September/303675.html
*

*Thanks much for your help.*
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OpenFlow rules with GRE tunnel

2017-10-12 Thread Vikrant Aggarwal
May be following commands can help to figure out the issues, as this is a
mininet setup not sure whether all will be applicable or not.

- Port number along with port name

# ovs-ofctl dump-ports-desc 

- Try commands like ovs-trace [1] to understand where it's getting dropped.

- It will be good to see the full output of dump-flows.

# ovs-ofctl dump-flows 

[1] http://docs.openvswitch.org/en/latest/topics/tracing/

Thanks & Regards,
Vikrant Aggarwal



On Tue, Oct 10, 2017 at 8:05 AM, Georges Mondji 
wrote:

>
> Hi,
>
> I am facing a problem that is the following:
>
> I have 2 hosts that I connect via gre tunnel.
>
> On host 1:
>
> I use mininet to connect 4 hosts to openvswitch bridge s1:
>
> mininet> dump
> 
> 
> 
> 
>  lo:127.0.0.1,s1-eth1:None,s1-eth2:None,s1-eth3:None,s1-eth4:None
> pid=2235>
> 
>
>
> # ovs-vsctl show
> 9eb8e438-e489-411f-bdde-b6075026d199
> Bridge "s1"
> Controller "ptcp:6634"
> Controller "tcp:127.0.0.1:6633"
> is_connected: true
> fail_mode: secure
> Port "s1-eth2"
> Interface "s1-eth2"
> Port "s1-eth1"
> Interface "s1-eth1"
> Port "s1-eth4"
> Interface "s1-eth4"
> Port "s1-eth3"
> Interface "s1-eth3"
> Port "gre0"
> Interface "gre0"
> type: gre
> options: {remote_ip="192.168.56.109"}
> Port "s1"
> Interface "s1"
> type: internal
>
> # ovs-ofctl show s1
> OFPT_FEATURES_REPLY (xid=0x2): dpid:0001
> n_tables:254, n_buffers:256
> capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
> actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src
> mod_dl_d
> st mod_nw_src mod_nw_dst mod_nw_tos
> mod_tp_src mod_tp_dst
>  1(s1-eth1): addr:62:fd:09:5e:bc:99
>  config: 0
>  state:  0
>  current:10GB-FD COPPER
>  speed: 1 Mbps now, 0 Mbps max
>  2(s1-eth2): addr:92:b4:7a:77:58:e8
>  config: 0
>  state:  0
>  current:10GB-FD COPPER
>  speed: 1 Mbps now, 0 Mbps max
>  3(s1-eth3): addr:62:e8:08:fc:ef:d6
>  config: 0
>  state:  0
>  current:10GB-FD COPPER
>  speed: 1 Mbps now, 0 Mbps max
>  4(s1-eth4): addr:ea:8f:c6:f6:37:43
>  config: 0
>  state:  0
>  current:10GB-FD COPPER
>  speed: 1 Mbps now, 0 Mbps max
>  10(gre0): addr:86:f6:b8:e3:72:4e
>  config: 0
>  state:  0
>  speed: 0 Mbps now, 0 Mbps max
>  LOCAL(s1): addr:22:0c:37:f1:9a:42
>  config: PORT_DOWN
>  state:  LINK_DOWN
>  speed: 0 Mbps now, 0 Mbps max
> OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
>
>
> ==> on host2
>
> I have connect a docker container (with ip 10.0.0.1 ) directly to
> openvswitch brideg s1 on port 1
>
> # ovs-vsctl show
> e793ccff-6257-4865-a75b-0f0e87150fdc
> Bridge "s1"
> Port "s1"
> Interface "s1"
> type: internal
> Port "gre0"
> Interface "gre0"
> type: gre
> options: {remote_ip="192.168.56.101"}
>
> #ovs-ofctl show s1
> OFPT_FEATURES_REPLY (xid=0x2): dpid:0edef8ab794e
> n_tables:254, n_buffers:0
> capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
> actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src
> mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
>  1(8cfb87deac6b4_l): addr:92:4c:79:47:a9:68
>  config: 0
>  state:  0
>  current:10GB-FD COPPER
>  speed: 1 Mbps now, 0 Mbps max
>  10(gre0): addr:e2:9c:97:ac:e4:ff
>  config: 0
>  state:  0
>  speed: 0 Mbps now, 0 Mbps max
>  LOCAL(s1): addr:0e:de:f8:ab:79:4e
>  config: PORT_DOWN
>  state:  LINK_DOWN
>  speed: 0 Mbps now, 0 Mbps max
> OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
>
>
>
> At this point:
>
> pingall work
>
> mininet> pingall
> *** Ping: testing ping reachability
> h1 -> h2 h3 h4
> h2 -> h1 h3 h4
> h3 -> h1 h2 h4
> h4 -> h1 h2 h3
> *** Results: 0% dropped (12/12 received)
>
> And h1, .., h4 can ping individually the container (10.0.0.11) on host 2
>
>
> When I add rules below on the switch:
>
>  hosts h1, .., h4 can ping the container on host2
> mininet> h1 ping -c 4 10.0.0.11
> PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data.
> 64 bytes from 10.0.0.11: icmp_req=1 ttl=64 time=8.05 ms
> 64 bytes from 10.0.0.11: icmp_req=2 ttl=64 time=0.546 ms
> 64 bytes from 10.0.0.11: icmp_req=3 ttl=64 time=0.402 ms
> 64 bytes from 10.0.0.11: icmp_req=4 ttl=64 time=0.369 ms
>
> --- 10.0.0.11 ping statistics ---
> 4 packets transmitted, 4 received, 0% packet loss, time 3011ms
> rtt min/avg/max/mdev = 0.369/2.342/8.051/3.296 ms
>
>
> but h1 cannot ping h2 or h3 or h4 so pingall failed
>
> mininet> pingall
> *** Ping: testing ping