Binding SIP to multiple, but not all, IP addresses

mudslide
Posts: 48
Member Since:
2006-08-24

Anyone know if it is possible and, if so, what the syntax is, to bind SIP to multiple but not all IP addresses?

in sip.conf [like iax.conf] the service gets bound to IP addresses with the line

bindaddr=x.x.x.x

If you put 0.0.0.0, it will bind to all addresses. In a HA Cluster, on the active node, if you have a box address of 192.168.1.101 and a floating address of 192.168.1.102, then if you use

bindaddr=0.0.0.0

you will find that phones on the 192.168.1.x subnet will not register on the floating address, which of course defeats the point of HA clustering. What happens is that the registration packets go to the floating address 192.168.1.102 but the response packets appear to come from 192.168.1.101 [same NIC but the packet contains the base address attached to the NIC], so the registration fails. The SIP and IAX stacks seem to be quite lame. You can solve this by changing the sip.conf and iax.conf bindings to

bindaddr = 192.168.1.102 ; the floating address.

This works just fine. Problem solved.

However, if you have 2 NICs, you can have two floating IP addresses, one on each. But how can you bind SIP & IAX to 2 NICs? Having tried

bindaddr = x.x.x.x , y.y.y.y

and

bindaddr =x.x.x.x
bindaddr =y.y.y.y

I have concluded that it cannot be done. Anyone know otherwise?



mudslide
Posts: 48
Member Since:
2006-08-24
anyone?

anyone?



dalybrian
Posts: 26
Member Since:
2006-06-05
I pretty much have the same

I pretty much have the same setup as mudslide. I have HA & DRDB between two Trixbox servers with two NIC. One of the NIC has private IP's for the DRDB & the other NIC has public IP's for HA. I'm having the same issue with phones registering due to the response from the server coming from the server IP vs the HA IP.

I applied the bindaddr=X.X.X.X & it seemed to have worked but about a day later i ran into a ARP issue where the floating ip seemed to be on the second server however the HA & DRDB resources were still on the primary server causing all SIP registration to fail. I had to manually fail over to the secondary server then fail back to the primary for the registration to come back.

As mudslide asked is there a way to bind to lets say bindaddr=0.0.0.0 ; & the floating ip?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.