Multiple WAN IP's on one FreePBX

Ok, I’ve seen several posts revolving around this topic. Is it possible to have two Internet sources hooked up to one FreePBX onprem device with multiple NICs? I have floated the idea of doing this with a load balancer but some people have told me this can be done in linux so why not FreePBX? The idea is that if ISP 1 fails, then it will automatically route through ISP 2. I know this can be done via redundant trunk providers (route to IP2 if IP1 fails) but you still have to go into the Asterisks SIP settings and manually do a detect network settings. Looking for some advise on this type of setup or a point to some documentation that will clarify if this can be done or not. - Thanks.

To do this properly, you need an autonomous system number and to use something like border gateway protocol. If you do that, it is invisible to FreePBX, as the same IP address works on both ISPs. This service is only likely to be offered by ISPs servicing larger businesses.

The poor man’s approach is probably to address this through DNS, but the switchover time will be extended.

I disagree with @david55 and believe that an ASN will not help at all. Even if it works perfectly, it will take about 15 seconds for the route to flip. Even if calls don’t drop for a technical reason, that’s long enough that at least one party will decide that the line has gone dead and hang up. So, the performance level is: on failure, calls in progress are all dropped, but calling back immediately works.

That’s the same performance you get from what you diagrammed, without doing anything special!

You have a separate pjsip transport for each public IP address, each configured with its External IP Address. Detect Network Settings is irrelevant. You have separate trunks, each configured with its transport. At the ITSP, you configure your DIDs to route to both IP addresses (with priority, round-robin or load balance).

With a trunking provider such as https://carrierservices.sangoma.com/ , your toll-free numbers can have carrier redundancy as well (based on a previous post mentioning 300 phones and your account image implying a US presence).

Why you are not using additional device front of your FreePBX box ?
image

This device could be Router (FW) or Switch with Load Balance. Check below link.

The OP needs such a device anyway (for non-telephony internet usage), it can provide additional security for the PBX, and might save some money by not needing multiple static public IPs with each ISP. However, it needs very careful setup to get the same performance and reliability as the system he outlined.

I don’t see how load balancing or round robin copes with calls in progress. Also, whilst I don’t know how accurate the 15 seconds is for true multihoming, I’d expect a call being initiated during, or immediately after the failure, to take the full 32 seconds standard SIP timeout before it was retried on the other address.

This is complete overkill for this. This requires way more to be done than what is really needed. To get an ASN will require registration and justification of the ASN use. It will require a /24 of IPv4 space and /32 of IPv6 (the sizes they provide for this). In order to get said /24 there will be a wait period and more justification of the /24 use. No one is going to announce BGP for less than a /24 of IPv4 space and once they have their space they need to have both ISPs announce it and have peering with the OP.

So this ends up being a lot of work and costs for what? A single floating IP for PBX services? There are options to deal with this and not require a floating IP, ASN or purchasing a /24 of IPv4 space.

For fail over huh? Have you taken a look at setting up a dual wan router such as a CISCO RV345P?, before the PBX?

yes Looks Cisco Rv345P has that options Load balance between 2 WAN.

Shahin, that will be a problem.

@Stewart1 The client knows they will be dropping calls if the ISP drops. I have seen people doing this set up with a peplink load balancer in front of their boxes, and yes, they would still drop calls, but as you stated they were able to call right back immediately. One of the clients I am talking to is wanting to do this without the peplink. I believe that it can be done I just don’t know where to find documentation on how to do it. If there are other gateways or better devices that would service this type of setup better I’d like to know about them. Here is the main issue we are trying to avoid. This company has multiple ISP’s providing Internet to them. They actually have a dedicated ISP just for their phone system. They have had issues where that connection became intermittent. From what I’ve been told, the peplink will failover to the secondary IP and hold it there until a predetermined period of service has been restored. I don’t know exactly how that device works, but I do know someone actively using one and they say it does a good job. My question is, can this be done without the router/load balancer in front of FreePBX 17. If so, is there a guide somewhere that would show how to set this up?

Thank you for this referral. I will look at this device as well.