<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<tt>Hi Remco,<br>
<br>
Perfect, thanks for the update. Anyhow, I already started the work
on the drouting and load-balancing module to allow you to set a
certain interface for interacting with each destination/gateway.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 11/08/2013 01:15 PM, Remco . wrote:
<blockquote
cite="mid:CAJy1ugyLSkz3B6UTGTKrjLg5gCe0LGk-Ks3HVVvyCftVREyCxw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Hi Bogdan,<br>
<br>
</div>
The proposed solution works. Instead of modifying IPaddr2 is
opted to go for IPsrcaddr (also included as resource agent
with corosync / linux HA stack). This agent ensures the
correct source IP address is used for the default route. For
the other subnet / interface, I removed the static IP
addresses for both nodes and only installed a floating IP
address. This can be enabled by setting <span class="">/proc/sys/<em>net</em>/<em>ipv4</em>/<em>conf</em>/<em>all</em>/<em>promote_secondaries
to 1.<br>
</em></span></div>
<div><span class="">This allows the kernel to choose the correct
IP address for binding opensips, and still have a default
route. mhomed=yes works like expected in this scenario. <br>
<br>
</span></div>
<div>
<span class="">Regards,<br>
</span></div>
<div><span class="">Remco.<br>
</span></div>
<span class=""><br>
</span>
<div>
<div><span class=""><em><br>
<br>
</em></span></div>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
On Mon, Nov 4, 2013 at 12:28 PM, Bogdan-Andrei Iancu <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff"> <tt>Hi Remco,<br>
<br>
OK, if your approach does not work, keep in mind you can
still use local_route to change the outbound socket for
the probing OPTIONs.<br>
<br>
Regards,<br>
</tt>
<div class="im">
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<br>
</div>
<div>
<div class="h5"> On 11/02/2013 02:50 PM, Remco . wrote:
<blockquote type="cite">
<div dir="ltr">
<div>Hi Bogdan,<br>
<br>
Thanks for your reply. The feature of setting
the probe interface for DR would be great. In
the meantime, I studied the exact behavior of
the IPaddr2 resource agent a bit more. It turns
out it uses iproute2 to bind the address. The
VIP is added as a secondary IP address to the
interface - no wonder the kernel picks the
primary. I will see if I can modify the resource
agent a bit so it will add the VIP as the
primary IP (swap the IP addresses round). That
way, the mhomed=yes option will work. I will
report back my findings.<br>
<br>
Thanks,<br>
<br>
</div>
Remco.<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Nov 1, 2013 at
12:27 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:bogdan@opensips.org"
target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:
0pt 0pt 0pt 0.8ex; border-left: 1px solid
rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff"> <tt>Hello
Remco,<br>
<br>
In mhomed, yes you let the kernel to pick
the source IP based on the routing table -
so this approach delegate the logic from
OpenSIPS to the kernel. And it is up to ho
well the network part is set.<br>
<br>
In the future I would like to add to the
DR module the possibility to set the
probing interface (as you have now in the
dispatcher module). For now, what you can
do is to use the local_route to catch the
DR pings and use force_send_socket() to
change the outgoing interface.<br>
<br>
Best regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<div>
<div> <br>
On 11/01/2013 10:39 AM, Remco . wrote: </div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>Hi all,<br>
<br>
</div>
I have a clustered OpenSIPS
setup (using corosync with a
virtual IP address). This has
been working great over the
last couple of years. I now
want to add an extra IP
address to the boxes, again
floating a VIP over these
interfaces. These interfaces
will be used to communicate
with PSTN gateways. I noticed
however upon enabling these
interfaces, the drouting
module starts to ping the
gateways using the wrong
source address, i.e<br>
<br>
</div>
1.1.1.1 = VIP on eth0<br>
</div>
2.2.2.2 = VIP on eth1<br>
<br>
</div>
OpenSIPS is configured to listen on
the the two VIPs with a listen
directive.<br>
<div><br>
According to the kernel's routing
table, it should use 2.2.2.2 but
it uses 1.1.1.1 which results in
failure. As I understood,
mhomed=yes should achieve just
this behavior by asking the kernel
for the appropriate source address
on sending out a packet. However,
when I enable the mhomed option,
OpenSIPS starts to complain about
not having a socket to send out
the packets. I assume this is
caused by the kernel returning the
real IP from the interfaces
(first) instead of the VIPs. <br>
<br>
</div>
<div>Just because of the dynamic
nature of the interface selection,
I won't be able to use
force_send_socket(). <br>
<br>
</div>
<div>I know this question has come
up on the list on several
occasions, but nothing recent and
I was still wondering if someone
has a workaround or solution for
this. I can imagine when using
OpenSIPS as a load-balancer with
two interfaces (in and out) you
might encounter this problem as
well if you try to add high
availability (in which you often
cannot avoid the Virtual IP
scenario).<br>
<br>
</div>
<div>Thanks,<br>
</div>
<div>Remco.<br>
</div>
</div>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</body>
</html>