[OpenSIPS-Users] OpenSIPS mhomed=yes and shared IP address using corosync

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Nov 1 12:27:49 CET 2013

Hello Remco,

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.

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.

Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer

On 11/01/2013 10:39 AM, Remco . wrote:
> Hi all,
> 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
> = VIP on eth0
> = VIP on eth1
> OpenSIPS is configured to listen on the the two VIPs with a listen
> directive.
> According to the kernel's routing table, it should use but it
> uses 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.
> Just because of the dynamic nature of the interface selection, I won't
> be able to use force_send_socket().
> 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).
> Thanks,
> Remco.
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131101/cc09c29b/attachment.htm>

More information about the Users mailing list