Re: [ovs-discuss] Flow problem
As I mentioned, I think you'll have better luck on a Floodlight mailing list, since we didn't produce that tool. If you can provide any information on the OVS side (relevant logs or output from "ovs-ofctl dump-flows"), we might be able to provide some guidance about what the tool is send to OVS. --Justin > On Mar 6, 2016, at 10:46 AM, Wilson Kwokwrote: > > Hello all, > > After I input the following one to block host2 80 port from host1, but still > no luck, please help. > > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", "name":"host1-host2", > "cookie":"0", "priority":"0", "eth_type":"0x0800", "ip_proto":"6", > "tp_dst":"80", "ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", > "active":"true", "actions":""}' > http://192.168.0.203:8080/wm/staticflowpusher/json > > 2016-03-06 14:42 GMT+08:00 Wilson Kwok : > No one answer, I have new flow, can someone help ? > > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", "name":"host1-host2", > "cookie":"0", "priority":"0", "eth_type":"0x0800", "ip_proto":"0x08", > "ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", "active":"true", > "actions":""}' http://192.168.0.203:8080/wm/staticflowpusher/json > > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", "name":"host2-host1", > "cookie":"0", "priority":"0", "eth_type":"0x0800", "ip_proto":"0x00", > "ipv4_src":"192.168.0.20", "ipv4_dst":"192.168.0.10", "active":"true", > "actions":""}' http://192.168.0.203:8080/wm/staticflowpusher/json > > 2016-03-05 1:11 GMT+08:00 Wilson Kwok : > Asking them, thanks > > 2016-03-05 0:49 GMT+08:00 Justin Pettit : > > > On Mar 3, 2016, at 8:48 AM, Wilson Kwok wrote: > > > > Hello all, > > > > I am newbie of Openflow, the following syntax want to block ping from host1 > > to host2, but this flow has issue when run, I think is eth_type or > > ip_proto has problem. > > > > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", > > "name":"host1-host2", "cookie":"0", "priority":"0", "eth_type":"0x800", > > "ip_proto":"0x01", ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", > > "active":"true", "actions":""}' > > http://192.168.0.203:8080/wm/staticflowpusher/json > > I don't know anything about Static Flow Pusher, but the fields look > reasonable. You'll probably have better luck on a Floodlight mailing list. > > --Justin > > > > > ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss
Re: [ovs-discuss] Flow problem
Hello all, After I input the following one to block host2 80 port from host1, but still no luck, please help. curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", "name":"host1-host2", "cookie":"0", "priority":"0", "eth_type":"0x0800", "ip_proto":"6", "tp_dst":"80", "ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", "active":"true", "actions":""}' http://192.168.0.203:8080/wm/staticflowpusher/json 2016-03-06 14:42 GMT+08:00 Wilson Kwok: > No one answer, I have new flow, can someone help ? > > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", > "name":"host1-host2", "cookie":"0", "priority":"0", "eth_type":"0x0800", > "ip_proto":"0x08", "ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", > "active":"true", "actions":""}' > http://192.168.0.203:8080/wm/staticflowpusher/json > > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", > "name":"host2-host1", "cookie":"0", "priority":"0", "eth_type":"0x0800", > "ip_proto":"0x00", "ipv4_src":"192.168.0.20", "ipv4_dst":"192.168.0.10", > "active":"true", "actions":""}' > http://192.168.0.203:8080/wm/staticflowpusher/json > > 2016-03-05 1:11 GMT+08:00 Wilson Kwok : > >> Asking them, thanks >> >> 2016-03-05 0:49 GMT+08:00 Justin Pettit : >> >>> >>> > On Mar 3, 2016, at 8:48 AM, Wilson Kwok wrote: >>> > >>> > Hello all, >>> > >>> > I am newbie of Openflow, the following syntax want to block ping from >>> host1 to host2, but this flow has issue when run, I think is eth_type or >>> ip_proto has problem. >>> > >>> > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", >>> "name":"host1-host2", "cookie":"0", "priority":"0", "eth_type":"0x800", >>> "ip_proto":"0x01", ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", >>> "active":"true", "actions":""}' >>> http://192.168.0.203:8080/wm/staticflowpusher/json >>> >>> I don't know anything about Static Flow Pusher, but the fields look >>> reasonable. You'll probably have better luck on a Floodlight mailing list. >>> >>> --Justin >>> >>> >>> >> > ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss
Re: [ovs-discuss] Flow problem
No one answer, I have new flow, can someone help ? curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", "name":"host1-host2", "cookie":"0", "priority":"0", "eth_type":"0x0800", "ip_proto":"0x08", "ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", "active":"true", "actions":""}' http://192.168.0.203:8080/wm/staticflowpusher/json curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", "name":"host2-host1", "cookie":"0", "priority":"0", "eth_type":"0x0800", "ip_proto":"0x00", "ipv4_src":"192.168.0.20", "ipv4_dst":"192.168.0.10", "active":"true", "actions":""}' http://192.168.0.203:8080/wm/staticflowpusher/json 2016-03-05 1:11 GMT+08:00 Wilson Kwok: > Asking them, thanks > > 2016-03-05 0:49 GMT+08:00 Justin Pettit : > >> >> > On Mar 3, 2016, at 8:48 AM, Wilson Kwok wrote: >> > >> > Hello all, >> > >> > I am newbie of Openflow, the following syntax want to block ping from >> host1 to host2, but this flow has issue when run, I think is eth_type or >> ip_proto has problem. >> > >> > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", >> "name":"host1-host2", "cookie":"0", "priority":"0", "eth_type":"0x800", >> "ip_proto":"0x01", ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", >> "active":"true", "actions":""}' >> http://192.168.0.203:8080/wm/staticflowpusher/json >> >> I don't know anything about Static Flow Pusher, but the fields look >> reasonable. You'll probably have better luck on a Floodlight mailing list. >> >> --Justin >> >> >> > ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss
[ovs-discuss] problem with ubuntu 14.04 boot integration
My setup: Ubuntu 14.04.4 LTS Kernel 3.13.0-32-generic X86_64 GNU/Linux I downloaded openvswitch 2.3.2 source and built it according to instructions here https://github.com/openvswitch/ovs/blob/master/INSTALL.md Ran the testsuite and the tests that ran were all ok, some were skipped. I need to have openvswitch started at bootup with interfaces specified in /etc/network/interfaces. The upstart init script was missing from my downloaded source. Instead it had a debian /etc/init.d/ script. I had to google for it and then copied it to /etc/init/openvswitch-switch.conf I applied the patches as instructed here https://github.com/jpfluger/examples/blob/master/ubuntu-14.04/openvswitch.md After patching I can start and stop openvswitch service using Sudo Service openvswitch-switch start|stop I added a bridge in /etc/network/interfaces auto ovs-lanbr0 allow-ovs ovs-lanbr0 iface ovs-lanbr0 inet manual ovs_type OVSBridge ovs_ports eth2 allow-ovs-lanbr0 eth2 iface eth2 inet manual ovs_bridge ovs-lanbr0 ovs_type OVSPort On restarting openvswitch I can see ovs-lanbr0 with ifconfig but ovs-vsctl show does not show any bridge On stopping openvswitch ovs-lanbr0 disappears from ifconfig. I expect ovs-lanbr0 to show up on ovs-vsctl show when openvswitch is running. Has anyone run into this problem ? Any help is appreciated. Thanks Mandeep ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss
Re: [ovs-discuss] Flow problem
Asking them, thanks 2016-03-05 0:49 GMT+08:00 Justin Pettit: > > > On Mar 3, 2016, at 8:48 AM, Wilson Kwok wrote: > > > > Hello all, > > > > I am newbie of Openflow, the following syntax want to block ping from > host1 to host2, but this flow has issue when run, I think is eth_type or > ip_proto has problem. > > > > curl -X POST -d '{"switch": "00:00:00:0c:29:6c:4a:8f", > "name":"host1-host2", "cookie":"0", "priority":"0", "eth_type":"0x800", > "ip_proto":"0x01", ipv4_src":"192.168.0.10", "ipv4_dst":"192.168.0.20", > "active":"true", "actions":""}' > http://192.168.0.203:8080/wm/staticflowpusher/json > > I don't know anything about Static Flow Pusher, but the fields look > reasonable. You'll probably have better luck on a Floodlight mailing list. > > --Justin > > > ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss
Re: [ovs-discuss] Open vSwitch Source code walkthrough
> > The link you provided says "page not found". If you have the PDF with you, > please do share. > > > https://www.usenix.org/system/files/conference/nsdi15/nsdi15-paper- > pfaff.pdf > https://www.usenix.org/sites/default/files/nsdi15_full_proceedings.pdf -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss
Re: [ovs-discuss] Open vSwitch Source code walkthrough
Hi David, Thanks a lot for that !! Yes I did see the architecture part about user space and kernel space. But, was trying to figure out how the switch will react when a packet arrives. Your explanation clarifies a bunch of my questions!! Based on what you said, I see that "ovs_dp_process_packet" has been called from "actions" and "vport" in datapath. MUCH better understanding now :) Thanks again. The link you provided says "page not found". If you have the PDF with you, please do share. Best Regards, Monica -Original Message- From: discuss [mailto:discuss-boun...@openvswitch.org] On Behalf Of dsa...@cs.technion.ac.il Sent: Sunday, March 06, 2016 11:40 AM To: discuss@openvswitch.org Subject: Re: [ovs-discuss] Open vSwitch Source code walkthrough Hi Monica, If you want to start understanding the source code of OVS by following how the switch receives packets, there are some things you need to take into account. -First, OVS (in Linux) relies on a kernel module for all the basic packet processing. This module is installed in the OS: this kernel space. OVS code is executed as a normal program, hence it is said it runs in user space. OVS code communicates with the kernel module via a messaging mechanism (upcalls and downcalls) but those 2 different pieces of code run separately. -In userspace there is a listener to communicate with the OpenFlow controller. Check the function handle_openflow, and see who calls it and what it does. -In the kernel module code (datapath folder) you have the code where a data packet is received and processed. Search for the function process_packet and also see who calls it and what it does. -When you follow and understand the code in the kernel, you will realize there are substantial differences from userspace, with respect to how the flow tables are managed and which actions are executed. This is because original flow tables are stored in userspace, according to what the controller dictates. However, in the kernel they are stored differently (e.g., there is only one flow table, not a pipeline, and the goto_table instruction is never executed in kernel) for efficiency reasons. To understand this better you can read this very useful paper: https://www.usenix.org/system/files/conference/nsdi15/nsdi15-paper-pfaff.pdf Good luck, David Sainz > Hello, > > I am trying to understand the source code of Open vSwitch for one of > my projects. But, not sure from where I should start and where to end. > Is it possible to give me some sort of guidance ? > > Thanks and Regards, > Monica Rajasekaran > ___ > discuss mailing list > discuss@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss > ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss
Re: [ovs-discuss] Open vSwitch Source code walkthrough
Hi Monica, If you want to start understanding the source code of OVS by following how the switch receives packets, there are some things you need to take into account. -First, OVS (in Linux) relies on a kernel module for all the basic packet processing. This module is installed in the OS: this kernel space. OVS code is executed as a normal program, hence it is said it runs in user space. OVS code communicates with the kernel module via a messaging mechanism (upcalls and downcalls) but those 2 different pieces of code run separately. -In userspace there is a listener to communicate with the OpenFlow controller. Check the function handle_openflow, and see who calls it and what it does. -In the kernel module code (datapath folder) you have the code where a data packet is received and processed. Search for the function process_packet and also see who calls it and what it does. -When you follow and understand the code in the kernel, you will realize there are substantial differences from userspace, with respect to how the flow tables are managed and which actions are executed. This is because original flow tables are stored in userspace, according to what the controller dictates. However, in the kernel they are stored differently (e.g., there is only one flow table, not a pipeline, and the goto_table instruction is never executed in kernel) for efficiency reasons. To understand this better you can read this very useful paper: https://www.usenix.org/system/files/conference/nsdi15/nsdi15-paper-pfaff.pdf Good luck, David Sainz > Hello, > > I am trying to understand the source code of Open vSwitch for one of my > projects. But, not sure from where I should start and where to end. Is it > possible to give me some sort of guidance ? > > Thanks and Regards, > Monica Rajasekaran > ___ > discuss mailing list > discuss@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss > ___ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss