[OpenSIPS-Users] alias network interface issue

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Feb 24 17:45:27 CET 2015


Hi Artem,

I guess you are using mhomed parameter - and the way it works is limited 
in certain cases by your network configurations.

Let's imagine the following setups:

* you have 4 interface, I1, I2, I3 . You can use any of them to route 
traffic to destination D (according to the routing table).

* OpenSIPS listens on I2 and I3.

* OpenSIPS wants to send something to D and you use mhomed. What mhomed 
does is to try to connect an un-binded socket to the destination D. The 
OS will automatically chose one of the existing interface as source of 
this connect - and as according to the routing rules, all interfaces can 
reach D, let's say the OS selects I1; OpenSIPS gets the OS selected src 
IP and checks it among its listeners -> I1 is not used by OpenSIPS, so 
the get_out_socket() function will fail.

The issue is with how the mhomed works - if there are multiple possible 
interfaces to reach a target, the OS can use any of them (according to 
routing table), but OpenSIPS may not listen on all of them. See the 
issues here?

What you can do is to (1) favor in your routing table the usage of the 
interfaces OpenSIPS is listening too (to avoid OS using I1 over I2), or 
(2) have OpenSIPS listening on all interfaces you have.

Best regards,

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

On 20.02.2015 13:47, Чалков Артём wrote:
> Hi all!
> I use opensips on vmachine with 4 network interfaces: 2 real interfaces (ip x.x.1.2 external and x.x.10.2 internal) and 2 alias interfaces (ip x.x.1.3 external and x.x.20.2 internal).
> Opensips configured to send local traffic from ip x.x.20.2, ip x.x.10.2 is a service interface:
>
> listen = udp:x.x.20.2:5060
> listen = udp:x.x.1.3:5060
> listen = udp:x.x.1.3:60000
> listen = tcp:x.x.20.2:5060
> listen = tcp:x.x.1.3:5060
> bin_listen = ip x.x.10.2:5061
>
> While some opensips modules trying to send some data to local network from x.x.20.2 (tm, drouting etc), opensips returns errors:
>
>   ERROR:tm:t_uac: no corresponding socket for af 2
>   ERROR:drouting:dr_prob_handler: unable to execute dialog
>   ERROR:core:get_out_socket: no socket found
>
> In routing script i seen same situation until i began use force_send_socket(x.x.20.2:5060) to manually route traffic through right interface. With this function data sends correctly.
>
> Can i do somesting to force correct socket for modules (like tm and drouting)?
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>




More information about the Users mailing list