[OpenSIPS-Users] Multi homed setup

Bogdan-Andrei Iancu bogdan at opensips.org
Mon May 30 15:34:36 CEST 2016


Hello Nash,

This is a limitation of how mhomed works - basically opensips asks the 
OS to provide a suitable source interface to reach a certain 
destination. But OS will consider all the network interface, not only 
the ones configured in OpenSIPS. So, the OS may select and return an 
interface not used by OpenSIPS.

What you can do:
1) make 1.1.1.1 default interface, to favor it in the OS selection
2) disable mhomed and use manual selection of the interface via 
force_send_socket()[1] or $fs[2]

For each GW, dr_gateway, you can store in attributes string some info 
about the interface to be used to reach that GW.

[1] http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc16
[2] http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc43

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 30.05.2016 11:33, John Nash wrote:
> On my linux box we have multiple public IP addressess
> 1.1.1.1
> 2.2.2.2
> 3.3.3.3
>
> I am listening on two of them as
> udp:1.1.1.1:5060 <http://1.1.1.1:5060>
> udp:2.2.2.2:5060 <http://2.2.2.2:5060>
>
> I have mhomed=1 in my config. I am also using drouting module. What I 
> expect is when an Invite comes to 1.1.1.1:5060 <http://1.1.1.1:5060> . 
> drouting should send outgoing invite using 1.1.1.1 as source IP but it 
> tries to send using 3.3.3.3 (Which is default interface)
>
> Is this the expected behavior of mhomed ?..should I manually try to 
> control this?
>
>
> _______________________________________________
> 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/20160530/9f6dc7fd/attachment.htm>


More information about the Users mailing list