[ovs-discuss] Distinguish flows based on IP address and port numbers in OvS

Mathumitha S cerisierfilix at hotmail.com
Fri Jan 11 10:08:51 UTC 2013


No I did not get any replies related to this. He had earlier answered my query about ARP rules only. 

I think I made some mistake because it is working approximately now. But the rates I get is not the exact expected rates. For example, if I use 3 traffic flows whose rates are in the ratio of 1:2:5 and the max-rate is 100 Mbps. So the expected rates will be 12.5 Mbps, 25 Mbps and 62.5 Mbps respectively. If I do not generate the second traffic flow, it's rate i.e 25 Mbps will be shared in the proportion 1:5  between other two flows. So the expected rates are 16.67 Mbps and 83.33 Mbps. But I get rates 25.8 Mbps and 74.1 Mbps as output. That is approximately a 50% error in one of the values. How to get rid of this error in values? 

Can you please help me?

Thank you

> From: jesse at nicira.com
> Date: Thu, 10 Jan 2013 19:46:36 -0800
> Subject: Re: [ovs-discuss] Distinguish flows based on IP address and port numbers in OvS
> To: cerisierfilix at hotmail.com
> CC: discuss at openvswitch.org
> 
> I think Ben has already told you what you need to do here.
> 
> On Thu, Jan 10, 2013 at 7:29 PM, Mathumitha S <cerisierfilix at hotmail.com> wrote:
> >
> > Thank you. I am now able to transfer traffic between the different machines.
> > Now the problem is different.  I had posted that as a new question as I
> > didn't know about creating multiple threads. Sorry. I am asking the same
> > question here again. Can you please help me out?
> >
> > I use eth3 and eth4 i.e ports 1 and 3 as input port and eth5 (port 2) as
> > output port of OvS. I created 3 queues at eth5 using the following command:
> >
> > ovs-vsctl -- set port eth5 qos=@newqos -- --id=@newqos create qos
> > type=linux-htb other-config:max-rate=1000000000 queues=0=@q0,1=@q1,2=@q2 --
> > --id=@q0 create queue other-config:min-rate=1000000
> > other-config:max-rate=1000000 -- --id=@q1 create queue
> > other-config:min-rate=20000000 other-config:max-rate=20000000 -- --id=@q2
> > create queue other-config:min-rate=10000000 other-config:max-rate=10000000
> >
> > I used the following commands to define the flows:
> >
> > ovs-ofctl add-flow br0 "in_port=2,actions=flood"
> > ovs-ofctl add-flow br0 "in_port=1,priority=0,actions=enqueue:2:0"
> > ovs-ofctl add-flow br0 "in_port=3,priority=0,actions=enqueue:2:0"
> > ovs-ofctl add-flow br0
> > "in_port=3,dl_type=0x0800,nw_proto=6,tp_dst=6000,priority=7,actions=enqueue:2:2"
> > ovs-ofctl add-flow br0
> > "in_port=1,dl_type=0x0800,nw_proto=6,tp_dst=6005,priority=7,actions=enqueue:2:1"
> >
> > I use iperf at the machines to generate traffic and I got the expected rates
> > of 20 Mbps and 10 Mbps (approx) for the machines connected to ports 1 and 3
> > respectively.
> >
> > But if I change the max-rate values for the queues and set it equal to the
> > max-rate of the qos, I get rates as 100 Mbps for both the machines even if I
> > generate traffic at the same instant.
> >
> > The command used is
> > ovs-vsctl -- set port eth5 qos=@newqos -- --id=@newqos create qos
> > type=linux-htb other-config:max-rate=1000000000 queues=0=@q0,1=@q1,2=@q2 --
> > --id=@q0 create queue other-config:min-rate=1000000
> > other-config:max-rate=1000000 -- --id=@q1 create queue
> > other-config:min-rate=20000000 other-config:max-rate=100000000 -- --id=@q2
> > create queue other-config:min-rate=10000000 other-config:max-rate=100000000
> >
> >  If I generate traffic at the same time from both machines, then the
> > available bandwidth should be shared between the 2 queues in the ratio of
> > their respective weights, right? But then why am I not able to see the
> > bandwidth sharing? Please let me know where I am going wrong.
> >
> > If I queue 2 different flows from the same machine in different queues, then
> > I can see that the bandwidth is shared. But when I use traffic from 2
> > different machines connected to 2 different input ports, I am not able to
> > see the bandwidth sharing. Where am I  making a mistake?
> >
> > Thank you
> >
> > Regards,
> > Mathumitha
> >
> >> From: jesse at nicira.com
> >> Date: Thu, 10 Jan 2013 09:13:53 -0800
> >
> >> Subject: Re: [ovs-discuss] Distinguish flows based on IP address and port
> >> numbers in OvS
> >> To: cerisierfilix at hotmail.com
> >> CC: discuss at openvswitch.org
> >>
> >> You said this before:
> >>
> >> "If the following defines the flows, it works.
> >>
> >> ovs-ofctl add-flow br0 "in_port=1,priority=0,actions=output:2"
> >> ovs-ofctl add-flow br0 "in_port=2,priority=0,actions=output:1""
> >>
> >> Presumably you're missing port 1 in your new rules.
> >>
> >> On Wed, Jan 9, 2013 at 7:56 PM, Mathumitha S <cerisierfilix at hotmail.com>
> >> wrote:
> >> >
> >> > Hi,
> >> > Thank you. But if it does not have IP Ethertype, if I use the
> >> > commands
> >> >
> >> > ovs-ofctl add-flow br0 "in_port=2,priority=0,actions=output:1"
> >> > ovs-ofctl add-flow br0 "in_port=3,priority=0,actions=output:1"
> >> >
> >> > i.e without specifying the IP address, it should work, right? But that
> >> > too
> >> > is not working. Can you please help me to define the ARP rules?
> >> >
> >> > Thank you
> >> >
> >> >> From: jesse at nicira.com
> >> >> Date: Wed, 9 Jan 2013 07:51:59 -0800
> >> >> Subject: Re: [ovs-discuss] Distinguish flows based on IP address and
> >> >> port
> >> >> numbers in OvS
> >> >> To: cerisierfilix at hotmail.com
> >> >> CC: discuss at openvswitch.org
> >> >
> >> >>
> >> >> On Wed, Jan 9, 2013 at 1:30 AM, Mathumitha S
> >> >> <cerisierfilix at hotmail.com>
> >> >> wrote:
> >> >> > Hi,
> >> >> > I have OpenvSwitch installed in a computer that
> >> >> > has a quad port. eth3, eth4 and eth5 are connected to br0 with
> >> >> > respective
> >> >> > open flow port numbers as 3,2,1 and the respective IP addresses of
> >> >> > the
> >> >> > machines connected to the ports are 10.6.3.2, 10.6.1.2 and 10.6.2.2
> >> >> >
> >> >> > I use eth3 and eth4 i.e ports 2 and 3 as input port and eth5 (port 1)
> >> >> > as
> >> >> > output port of OvS. I created 2 queues at eth5 using the following
> >> >> > command:
> >> >> >
> >> >> > ovs-vsctl -- set port eth5 qos=@newqos -- --id=@newqos create qos
> >> >> > type=linux-htb other-config:max-rate=100000000 queues=0=@q0,1=@q1 --
> >> >> > --id=@q0 create queue other-config:min-rate=20000000
> >> >> > other-config:max-rate=100000000 -- --id=@q1 create queue
> >> >> > other-config:min-rate=1000000 other-config:max-rate=100000000
> >> >> >
> >> >> > I then added the following flows in the flow table:
> >> >> >
> >> >> > ovs-ofctl add-flow br0
> >> >> >
> >> >> >
> >> >> > "in_port=2,dl_type=0x0800,nw_proto=6,nw_src=10.6.1.2,nw_dst=10.6.2.2,tp_dst=6000,priority=7,actions=enqueue:1:0"
> >> >> > ovs-ofctl add-flow br0
> >> >> >
> >> >> >
> >> >> > "in_port=3,dl_type=0x0800,nw_proto=6,nw_src=10.6.3.2,nw_dst=10.6.2.2,tp_dst=6005,priority=7,actions=enqueue:1:1"
> >> >> > ovs-ofctl add-flow br0
> >> >> >
> >> >> >
> >> >> > "in_port=1,dl_type=0x0800,nw_proto=6,nw_dst=10.6.1.2,nw_src=10.6.2.2,tp_src=6000,priority=5,actions=output:2"
> >> >> > ovs-ofctl add-flow br0
> >> >> >
> >> >> >
> >> >> > "in_port=1,dl_type=0x0800,nw_proto=6,nw_dst=10.6.3.2,nw_src=10.6.2.2,tp_src=6005,priority=5,actions=output:3"
> >> >> > ovs-ofctl add-flow br0
> >> >> >
> >> >> > "in_port=2,dl_type=0x0800,nw_src=10.6.1.2,priority=0,actions=output:1"
> >> >> > ovs-ofctl add-flow br0
> >> >> >
> >> >> > "in_port=3,dl_type=0x0800,,nw_src=10.6.3.2,priority=0,actions=output:1"
> >> >> >
> >> >> > I use iperf to generate traffic from two machines connected to eth3
> >> >> > and
> >> >> > eth4. I use iperf server in machine connected to eth5 at port 6000
> >> >> > for
> >> >> > machine connected to eth4 and at port 6005 for machine connected to
> >> >> > eth3.
> >> >> > Hence, basically I am trying ti distinguish flows based on IP address
> >> >> > and
> >> >> > destination port number.
> >> >> >
> >> >> > But when I try to generate traffic and test the scenario, I get 'No
> >> >> > route to
> >> >> > host' error.
> >> >> >
> >> >> > I basically need to enqueue different flows from different input
> >> >> > ports
> >> >> > in
> >> >> > different queues at output port. So I only need routes for the TCP
> >> >> > packets,
> >> >> > ACK and ARP requests, right? I think I have included these in the
> >> >> > rules
> >> >> > I
> >> >> > gave above. Can you please tell me what I am missing? Where am I
> >> >> > going
> >> >> > wrong? Earlier, I was able to distinguish flows based on iperf port
> >> >> > numbers
> >> >> > when I used two iperf clients on the same machine i.e when I had just
> >> >> > one
> >> >> > input port and one output port.
> >> >>
> >> >> There are still no ARP rules. ARP does not have an IP EtherType.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20130111/0091d3b2/attachment.html>


More information about the discuss mailing list