[ovs-discuss] Starting up Inband controller

2018-03-01 Thread Soliman Awad Alshra´a Abdullah TU Ilmenau
Hello everyone,


I am trying to build my topology with In-band controller, So I started running 
some available script

 On the one hand, I have no problem when I use these instructions on

 
http://tocai.dia.uniroma3.it/compunet-wiki/index.php/In-band_control_with_Open_vSwitch

(sudo mn --topo linear,5 --switch ovsk,inband=True, 
--controller=remote,ip=10.0.0.3)

 when I check the disable-in-band="true" by
( sudo ovs-vsctl --columns=other_config list bridge | grep "disable-in-band")

I get nothing as it is expected, and I can run the topology well.  (pingall)


On the other hand, when I use the other topologies in (for example)

 https://techandtrains.com/2013/10/05/in-band-controller-with-mininet-p art-2/
or
https://github.com/hmd1st/mn_test/blob/master/inband_delay_link.py

I check the disable-in-band="true"
I get  -->   other_config: {datapath-id="0001", 
disable-in-band="true"}

OVS switches does not seem to try to connect to Ryu's host and I can't do ping 
betwwen all hosts.
my ovs is 2.0.2 which support Of 1.0 as default  so I uses  simple_switch.py as 
a controller as well sa I upgraded my ovs and tried to use the suitable 
controller( simple_switch_13.py ),  but nothing happens.
>
I know my problem might be simple, but I have no idea why I cannot start up the 
controller well.

please, Could you guide me to my problem !

 Thanks in advance.
A.Soliman

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


Re: [ovs-discuss] Starting up Inband controller

2018-03-01 Thread Ben Pfaff
On Thu, Mar 01, 2018 at 02:16:39PM +, Soliman Awad Alshra´a Abdullah TU 
Ilmenau wrote:
> Hello everyone,
> 
> 
> I am trying to build my topology with In-band controller, So I started 
> running some available script
> 
>  On the one hand, I have no problem when I use these instructions on
> 
>  
> http://tocai.dia.uniroma3.it/compunet-wiki/index.php/In-band_control_with_Open_vSwitch
> 
> (sudo mn --topo linear,5 --switch ovsk,inband=True, 
> --controller=remote,ip=10.0.0.3)
> 
>  when I check the disable-in-band="true" by
> ( sudo ovs-vsctl --columns=other_config list bridge | grep "disable-in-band")
> 
> I get nothing as it is expected, and I can run the topology well.  (pingall)
> 
> 
> On the other hand, when I use the other topologies in (for example)
> 
>  https://techandtrains.com/2013/10/05/in-band-controller-with-mininet-p art-2/
> or
> https://github.com/hmd1st/mn_test/blob/master/inband_delay_link.py
> 
> I check the disable-in-band="true"
> I get  -->   other_config: {datapath-id="0001", 
> disable-in-band="true"}
> 
> OVS switches does not seem to try to connect to Ryu's host and I can't do 
> ping betwwen all hosts.
> my ovs is 2.0.2 which support Of 1.0 as default  so I uses  simple_switch.py 
> as a controller as well sa I upgraded my ovs and tried to use the suitable 
> controller( simple_switch_13.py ),  but nothing happens.
> >
> I know my problem might be simple, but I have no idea why I cannot start up 
> the controller well.
> 
> please, Could you guide me to my problem !

Well, in general, you can't expect an in-band controller to work if you
disable in-band controllers.

But OVS 2.0 is over 4 years old and you can't really expect us to
support it anyway.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] ARP request in openvswitch

2018-03-01 Thread Myra Sh
Hello,

Is there any configuration for openvswitch to tells that how to send an ARP
request?

In some cases, when openvswitch is not a neighbor of another openvswitch,
instead of sending the request to the controller, broadcast ARP request and
it is not correct. (in wireless networks)

Do you know how I can configure openvswitch for this kind of ARP requests?

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


Re: [ovs-discuss] ovs route refresh problem

2018-03-01 Thread Ben Pfaff
On Fri, Feb 23, 2018 at 03:30:59AM +, Yinpeijun wrote:
> 
> >>On Sun, Feb 11, 2018 at 07:27:34AM +, Yinpeijun wrote:
> >> Hi all
> >> Recently , I run a test two VM commulication with 
> >> vxlan and ovs+dpdk networking(ovs2.7.2). when I add 200 virtual device 
> >> on the physical service  of the commulicate vm then check the ping result, 
> >>  there  is  loss packet statistics. Then I use vlan and ovs+dpdk 
> >> networking, do the same thing , there is no loss packets statistics.
> >> I read the source code and add some log to confirm the 
> >> problem,  the final problem I think is unreasonable routing refresh,  
> >> in route_table_rest function delete all items before readding, so in the 
> >> middle of the interval  ovs_router_lookup  can not find the route then 
> >> cause packet drop.  So I think the implementation need to optimize, Any 
> >> advice on how to optimize it?
> 
> >I don't fully understand your use case.  However, if you're not using DPDK, 
> >then OVS isn't doing routing in userspace so this is probably not the 
> >problem.
> 
> Thank you for your replay, the test case just for reproduce the problem. The 
> actual  scene is to create or migrate virtual machines in openstack env. 
> Correspondence will be created linux bridge
> and other virtual device.
> 
> There is also have problem in netdev dataptah without dpdk.  vxlan tunnel 
> need route in userspace and ovs maintain the route table as follow:
> ovs-appctl ovs/route/show
> Route Table:
> Cached: x.xx.1.10/32 dev eth0 SRC x.xx.1.10
> Cached: 10.0.0.10/32 dev brcps SRC 10.0.0.10
> Cached: 127.0.0.1/32 dev lo SRC 127.0.0.1
> 
> So when I create virtual device trigger ovs refresh the route then affect the 
> already existing virtual machine communication.

This is the same datapath, really, it's just that most people use it
with DPDK, and so the solution would be the same.

I think that the problem you're talking about can be fixed by holding
the mutex in route_table_reset() across the entire update, instead of
just for each individual operation on the routing table.  Does that make
sense?
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] ARP request in openvswitch

2018-03-01 Thread Ben Pfaff
On Thu, Mar 01, 2018 at 12:27:07PM -0500, Myra Sh wrote:
> Is there any configuration for openvswitch to tells that how to send an ARP
> request?
> 
> In some cases, when openvswitch is not a neighbor of another openvswitch,
> instead of sending the request to the controller, broadcast ARP request and
> it is not correct. (in wireless networks)
> 
> Do you know how I can configure openvswitch for this kind of ARP requests?

Open vSwitch doesn't do ARP requests of its own, normally.  It only
switches them.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OpenVswitch

2018-03-01 Thread Scott Lowe

> On Feb 28, 2018, at 9:00 PM, Chris Boley  wrote:
> 
> I've been tinkering with OVS on Ubuntu 16.04 with the libvirt hypervisor.
> I've gotten the XML based networks defined in the hypervisor and I've gotten 
> the host to understand it's interfacing with OVS.
> 
> So I'm hitting some sticking points that are starting to make me feel well.. 
> "thick".
> I built the bridge.
> 
> "sudo ovs-vsctl add-br vbridge0"
> 
> I set up an external bond port on the bridge.
> ovs-vsctl add-bond vbridge0 vbond0 eth0 eth1 lacp=active 
> other_config:lacp_time=fast trunks=2,3*#*#I'm kind of confused about the 
> trunks=2,3 part Do I really need that to pass the tagged frames to the Cisco 
> Switch?


The "trunks=2,3" will limit the interface to *only* trunking VLANs 2 and 3. If 
you want to trunk all VLANs, then leave that part off. You may also have to 
mess around with vlan_mode if you need interoperability with the native 
(untagged) VLAN.


> That's brings up the bond "vbond0 tied to my vswitch0
> 
> My config in my cisco switch is a standard 2 port etherchannel.
> with the good ole:
> switchport trunk encapsulation dot1q
> switchport mode trunk
> 
> Switch#sh mac ad
> Switch#sh mac address-table | i Po1
>25254.0071.b1b6DYNAMIC Po1   << here's my VM
>10004.23d7.bd0cDYNAMIC Po1
>10004.23d7.bd0dDYNAMIC Po1
> 
> 
> 
> I have my libvirt network defined, when I do an "ovs-vsctl show" it looks 
> like this:
> cboley@VMHOST:~$ sudo ovs-vsctl show
> 126a4b57-4837-42a9-95d6-d818b35e95bd
>Bridge "vbridge0"
>Port "vbond0"
>trunks: [2, 3]
>Interface "eth1"
>Interface "eth2"
>Port "vbridge0"
>Interface "vbridge0"
>type: internal
>Port "vnet0"
>tag: 2
>Interface "vnet0"
>ovs_version: "2.5.2"
> 
> 
> 
> What I'm "thick" about is the fact that unless I run the following commands 
> my bridge just won't work.
> manually at the CLI of the VM host I must run.
> ifconfig vbridge0 up
> modprobe 8021q<<< I know why that's happening and it's an easy fix.. just 
> stick it in the interfaces file.
> vconfig add vbridge0 2
> vconfig add vbridge0 3


Hmm...I don't recall ever running into this scenario, so I'm not really sure 
why you're having to add the VLANs to vbridge0. In all the times I've used OVS 
with Libvirt and VLANs, this wasn't necessary (unless I was adding a VLAN 
interface to an OVS bridge instead of using OVS' native VLAN functionality, but 
that's a different story).


> After I do that my VM's have conectivity.
> 
> So after all that said, I know my vbridge0 doesn't come up without help.. I'm 
> not an expert, I'm just muttling through info.
> I've been using a lot of helpful info from blog.scottlowe.org BTW. His info 
> really saved my tail with libvirt.


Glad my content was useful. :-)


> Should I assume it's to just create the bridge and the bond in the interfaces 
> file manually like this instead?
> OR can I create the vbridge0 under and OVS command and make it come up 
> automatically with OVS commands that I'm missing?
> 
> auto lo
> iface lo inet loopback
> post-up modprobe 8021q
> 
> auto eth0
> iface eth0 inet dhcp
> 
> 
> auto eth1
> iface eth1 inet manual
>   bond-master vbond0
> 
> 
> auto eth2
> iface eth2 inet manual
>   bond-master vbond0


You *do* want to be sure that all physical interfaces attached to an OVS bridge 
are coming up automatically. I don't recall ever having to bring the OVS bridge 
up by adding configuration stanzas to the networking configuration files.


> auto vbond0
> allow-vnetbr0 vbond0
> iface vbond0 inet manual
> bond-mode 4
> bond-miimon 100
> bond-downdelay 200
> bond-updelay 200
> bond-lacp-rate 1
> bond-slaves none
> ovs_bridge vnetbr0
> ovs_type OVSPort
> pre-up ifconfig $IFACE up
> post-down ifconfig $IFACE down
> address 0.0.0.0
> 
> 
> auto vnetbr0
> allow-ovs vnetbr0
> iface vnetbr0 inet manual
> bridge_ports eth1 eth2
> pre-up ifconfig $IFACE up
> pre-up vconfig add vnetbr0 2
> pre-up vconfig add vnetbr0 3
> post-up ifconfig eth1 mtu 1520
> post-up ifconfig eth1 promisc
> post-up ethtool -G eth1 rx 4096
> post-up ethtool -K eth1 rx off tx off sg off tso off ufo off gso off gro 
> off lro off rxvlan off txvlan off ntuple off rxhash off
> post-up ethtool -N eth1 rx-flow-hash udp4 sdfn
> post-up ethtool -N eth1 rx-flow-hash udp6 sdfn
> post-up ethtool -C eth1 rx-usecs 1 rx-frames 0
> post-up ethtool -C eth1 adaptive-rx off
> post-up ifconfig eth2 mtu 1520
> post-up ifconfig eth2 promisc
> post-up ethtool -G eth2 rx 4096
> post-up ethtool -K eth2 rx off tx off sg off tso off ufo off gso off gro 
> off lro off rxvlan off txvlan off ntuple off rxhash off
> post-up ethtool -N eth2 rx-flow-hash udp4 sdfn
> pos

Re: [ovs-discuss] OpenVswitch

2018-03-01 Thread Grant Taylor via discuss

On 02/28/2018 09:00 PM, Chris Boley wrote:

I've been tinkering with OVS on Ubuntu 16.04 with the libvirt hypervisor.


Tinkering ~> learning is always a good thing.

I've gotten the XML based networks defined in the hypervisor and I've 
gotten the host to understand it's interfacing with OVS.


:-)

So I'm hitting some sticking points that are starting to make me feel 
well.. "thick".


That's a weekly, if not daily, occurrence for me.


I built the bridge.

"sudo ovs-vsctl add-br vbridge0"

I set up an external bond port on the bridge.
ovs-vsctl add-bond vbridge0 vbond0 eth0 eth1 lacp=active 
other_config:lacp_time=fast trunks=2,3    *#*#I'm kind of confused about 
the trunks=2,3 part Do I really need that to pass the tagged frames to 
the Cisco Switch?


See Scott's reply.


That's brings up the bond "vbond0 tied to my vswitch0


Does it actually bring the vbond0 interface up?  Or just create it?


My config in my cisco switch is a standard 2 port etherchannel.
with the good ole:
switchport trunk encapsulation dot1q
switchport mode trunk

Switch#sh mac ad
Switch#sh mac address-table | i Po1
    2    5254.0071.b1b6    DYNAMIC     Po1   << here's my VM
    1    0004.23d7.bd0c    DYNAMIC     Po1
    1    0004.23d7.bd0d    DYNAMIC     Po1

I have my libvirt network defined, when I do an "ovs-vsctl show" it 
looks like this:

cboley@VMHOST:~$ sudo ovs-vsctl show
126a4b57-4837-42a9-95d6-d818b35e95bd
    Bridge "vbridge0"
    Port "vbond0"
    trunks: [2, 3]
    Interface "eth1"
    Interface "eth2"
    Port "vbridge0"
    Interface "vbridge0"
    type: internal
    Port "vnet0"
    tag: 2
    Interface "vnet0"
    ovs_version: "2.5.2"


That all seems reasonable enough.

What I'm "thick" about is the fact that unless I run the following 
commands my bridge just won't work.

manually at the CLI of the VM host I must run.
ifconfig vbridge0 up


I'd expect that you would need to bring the vbridge0 interface up. 
Hence my question above.


modprobe 8021q    <<< I know why that's happening and it's an easy fix.. 
just stick it in the interfaces file.

vconfig add vbridge0 2
vconfig add vbridge0 3


Won't this create two additional VLAN sub-interfaces?  vbridge0.2 and 
vbridge0.3


Are  you actually using those interfaces?  Or are you by chance defining 
them and not actually using them?


I sort of feel like bringing the vbridge0 interface up is the crux.

Also, doesn't OVS handle 802.1q VLAN tagging internally?  Won't that 
work without the 802.1q module loaded in the kernel?



After I do that my VM's have conectivity.


ACK

So after all that said, I know my vbridge0 doesn't come up without 
help.. I'm not an expert, I'm just muttling through info.


Muddling and tinkering are good things.  Just learn the why along the way.

I've been using a lot of helpful info from blog.scottlowe.org 
 BTW. His info really saved my tail with libvirt.


Yep, I've learned a LOT from Scott's blog, and I have good interactions 
with him on Twitter.


Should I assume it's to just create the bridge and the bond in the 
interfaces file manually like this instead?


I'm used to OVS creating network interfaces that the OS then works with. 
 This includes bringing the interfaces up ("ifconfig $interface up" or 
"ip link set dev $interface up") and assigning IP addresses to them.


OVS has always remembered the existence of the interface and reproduced 
that upon reboot.


OR can I create the vbridge0 under and OVS command and make it come up 
automatically with OVS commands that I'm missing?


I'm not aware of a way to have OVS bring an interface up.  I've always 
done that with the OS native tools.  -  Perhaps that's just my ignorance.


Though, given that the interface was up when OVS shuts down, and OVS 
remembers the state, I'm inclined to think that OVS can't actually set 
the interfaces up.


BTW.. I'm not reinvening anything and can't take credit for this idea. 
Some really smart person (not me ;D ) posted this:

https://zcentric.com/2014/07/07/openvswitch-kvm-libvirt-ubuntu-vlans-the-right-way/


$ReadingList++


Any guidance on how I can or should proceed would be greatly appreciated!
Thanks in advance...


I don't know if it will help or not, but that's my take on things.



--
Grant. . . .
unix || die



smime.p7s
Description: S/MIME Cryptographic Signature
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVN load balancing on same subnet failing

2018-03-01 Thread Guru Shetty
On 27 February 2018 at 03:13, Anil Venkata  wrote:

> For example, I have a 10.1.0.0/24 network and a load balancer is added to
> it with 10.1.0.10 as VIP and 10.1.0.2(MAC 50:54:00:00:00:01), 10.1.0.3(MAC
> 50:54:00:00:00:02) as members.
> ovn-nbctl  create load_balancer vips:10.1.0.10="10.1.0.2,10.1.0.3"
>

We currently need the VIP to be in a different subnet. You should connect
switch it to a dummy logical router (or connect it to a external router).
Since a VIP is in a different subnet, it sends an ARP for logical router IP
and then things will work.


>
>  When I try to send a request from client within the subnet(i.e 10.1.0.33)
> its not reaching any load balancer members.
> I noticed ARP not resolved for VIP 10.1.0.10.
>
> I tried to resolve this in two ways
> 1) Adding a new ARP reply ovs flow for VIP 10.1.0.10 with router port's
> MAC. When client tries to connect VIP, it will use router's MAC. Now router
> gets the packet after load balancing, and will forward the packet to
> appropriate member.
>
> 2) Second approach,
>a) Using a new MAC(example, 50:54:00:00:00:ab) for VIP 10.1.0.10, and
> adding a new ARP reply flow with this MAC.
>b) As we are not using router, when load balancing changes destination
> ip, VIP MAC has to be replaced with corresponding member's MAC i.e
>   sudo ovs-ofctl add-flow br-int "table=24,ip,priority=150,dl_
> dst=50:54:00:00:00:ab,nw_dst=10.1.0.2,action=mod_dl_dst:50:
> 54:00:00:00:01,load:0x1->NXM_NX_REG15[],resubmit(,32)"
> sudo ovs-ofctl add-flow br-int "table=24,ip,priority=150,dl_
> dst=50:54:00:00:00:ab,nw_dst=10.1.0.3,action=mod_dl_dst:50:
> 54:00:00:00:02,load:0x2->NXM_NX_REG15[],resubmit(,32)"
>
> Which approach will be better or is there any alternate solution?
>
> Thanks
> Anil
>
>
> ___
> 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] OpenVswitch

2018-03-01 Thread Chris Boley
Scott, Grant. Sincerely, thanks for all your guidance.
I'm more of an network engineering guy with an inquisitive character and a
love for FOSS.
This one .. I have to tell you both has me stumped. Actually it's working.
Here's a couple of reasons why I'm stumped.
Kindly follow along.

OVS setup is minimal:
sudo ovs-vsctl add-br vbridge0
ovs-vsctl add-bond vbridge0 vbond0 eth0 eth1 lacp=active
other_config:lacp_time=fast

## I omitted the trunks=2,3Scott your explanation made me feel it's
synonymous with (switchport trunk allowed vlan 2,3) -- Unnecessary for my
usage here.

>From my VM Host:
foobar@VMHOST:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
post-up modprobe 8021q   This is the fix BTW for whatever
reason 
===
If you want to put your LibVirt Guest VM on an OVS interface similiar to
plugging into an edge port on a cisco switch in vlan 2 (switchport mode
access [Enter]  switchport access vlan 2 [Enter] )
You really must have to make the kernel pre load the 8021q module
beforehand, otherwise the OVS I'm guessing doesn't have the tools to handle
the job? (It's only a swag...I'm probably wrong. don't shoot ;D )

I can reproduce libvirt guest working on my setup again and again reboot
after reboot by only doing one thing to fix it. ( modprobe 8021q)
Just fyi on the software particulars of my platform just in case there's
questions:

foobar@VMHOST:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 16.04.3 LTS
Release:16.04
Codename:   xenial
foobar@VMHOST:~$ uname -a
Linux VMHOST 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Could it be because of systemd related issues???

Anyways. back to the head scratching
=
#bond port info
auto eth1
iface eth1 inet manual
post-up ifconfig $IFACE up
post-up ifconfig $IFACE mtu 1520
post-up ifconfig $IFACE promisc
post-up ethtool -G $IFACE rx 4096
post-up ethtool -K $IFACE rx off tx off sg off tso off ufo off gso off gro
off lro off rxvlan off txvlan off ntuple off rxhash off
post-up ethtool -N $IFACE rx-flow-hash udp4 sdfn
post-up ethtool -N $IFACE rx-flow-hash udp6 sdfn
post-up ethtool -C $IFACE rx-usecs 1 rx-frames 0
post-up ethtool -C $IFACE adaptive-rx off
pre-down ifconfig $IFACE down

#Bond port info
auto eth2
iface eth2 inet manual
post-up ifconfig $IFACE up
post-up ifconfig $IFACE mtu 1520
post-up ifconfig $IFACE promisc
post-up ethtool -G $IFACE rx 4096
post-up ethtool -K $IFACE rx off tx off sg off tso off ufo off gso off gro
off lro off rxvlan off txvlan off ntuple off rxhash off
post-up ethtool -N $IFACE rx-flow-hash udp4 sdfn
post-up ethtool -N $IFACE rx-flow-hash udp6 sdfn
post-up ethtool -C $IFACE rx-usecs 1 rx-frames 0
post-up ethtool -C $IFACE adaptive-rx off
pre-down ifconfig $IFACE down

===
Showing the OPENVSWITCH Prior to starting VM.
foobar@VMHOST:~$ sudo ovs-vsctl show
[sudo] password for foobar:
126a4b57-4837-42a9-95d6-d818b35e95bd
   Bridge "vbridge0"
   Port "vbridge0"
   Interface "vbridge0"
   type: internal
   Port "vbond0"
   Interface "eth2"
   Interface "eth1"
   ovs_version: "2.5.2"
=
Now let's look at the vbridge0:
foobar@VMHOST:~$ sudo ovs-vsctl list interface vbridge0
_uuid   : 714594e9-101b-4854-a474-bf6125244df2
admin_state : down<<< According to OVS.. this bridge is down
--- I can tell you that the vbond0 is up however... Is it germain to the
situation? IDK?
bfd : {}
bfd_status  : {}
cfm_fault   : []
cfm_fault_status: []
cfm_flap_count  : []
cfm_health  : []
cfm_mpid: []
cfm_remote_mpids: []
cfm_remote_opstate  : []
duplex  : []
error   : []
external_ids: {}
ifindex : 6
ingress_policing_burst: 0
ingress_policing_rate: 0
lacp_current: []
link_resets : 0
link_speed  : []
link_state  : down
lldp: {}
mac : []
mac_in_use  : "00:04:23:d7:bd:0c"
mtu : 1500
name: "vbridge0"
ofport  : 65534
ofport_request  : []
options : {}
other_config: {}
statistics  : {collisions=0, rx_bytes=0, rx_crc_err=0,
rx_dropped=229, rx_errors=0, rx_frame_err=0, rx_over_err=0, rx_packets=0,
tx_bytes=0, tx_dropped=0, tx_errors=0, tx_packets=0}
status  : {driver_name=openvswitch}
type: internal
==

Re: [ovs-discuss] OVN load balancing on same subnet failing

2018-03-01 Thread Anil Venkata
On Fri, Mar 2, 2018 at 7:23 AM, Guru Shetty  wrote:

>
>
> On 27 February 2018 at 03:13, Anil Venkata  wrote:
>
>> For example, I have a 10.1.0.0/24 network and a load balancer is added
>> to it with 10.1.0.10 as VIP and 10.1.0.2(MAC 50:54:00:00:00:01),
>> 10.1.0.3(MAC 50:54:00:00:00:02) as members.
>> ovn-nbctl  create load_balancer vips:10.1.0.10="10.1.0.2,10.1.0.3"
>>
>
> We currently need the VIP to be in a different subnet. You should connect
> switch it to a dummy logical router (or connect it to a external router).
> Since a VIP is in a different subnet, it sends an ARP for logical router IP
> and then things will work.
>
>

Thanks Guru. Any reason for introducing this constraint(i.e VIP to be in a
different subnet)? Can we address this limitation?


>>  When I try to send a request from client within the subnet(i.e
>> 10.1.0.33) its not reaching any load balancer members.
>> I noticed ARP not resolved for VIP 10.1.0.10.
>>
>> I tried to resolve this in two ways
>> 1) Adding a new ARP reply ovs flow for VIP 10.1.0.10 with router port's
>> MAC. When client tries to connect VIP, it will use router's MAC. Now router
>> gets the packet after load balancing, and will forward the packet to
>> appropriate member.
>>
>> 2) Second approach,
>>a) Using a new MAC(example, 50:54:00:00:00:ab) for VIP 10.1.0.10, and
>> adding a new ARP reply flow with this MAC.
>>b) As we are not using router, when load balancing changes destination
>> ip, VIP MAC has to be replaced with corresponding member's MAC i.e
>>   sudo ovs-ofctl add-flow br-int "table=24,ip,priority=150,dl_d
>> st=50:54:00:00:00:ab,nw_dst=10.1.0.2,action=mod_dl_dst:50:54
>> :00:00:00:01,load:0x1->NXM_NX_REG15[],resubmit(,32)"
>> sudo ovs-ofctl add-flow br-int "table=24,ip,priority=150,dl_d
>> st=50:54:00:00:00:ab,nw_dst=10.1.0.3,action=mod_dl_dst:50:54
>> :00:00:00:02,load:0x2->NXM_NX_REG15[],resubmit(,32)"
>>
>> Which approach will be better or is there any alternate solution?
>>
>> Thanks
>> Anil
>>
>>
>> ___
>> 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