Deploy High Availability SBCs

On the Google Cloud platform, you must create a load balancer to deploy the SBC in HA mode.

Limitations

On Google Cloud platform, a load balancer can only serve media traffic to the nic0 interface. When deploying a VM in HA mode, make sure to set the first interface as s0p0. One consequence of this limitation is that secondary media interfaces (s0p1, s1p0, s1p1) can only be used for internal trafic.

Reserve Public IPs

Reserve two static IP addresses to use for the load balancer: an access-side IP address and a core-side IP address.

  1. From the navigation menu, click VPC network and then IP addresses.
  2. From the top menu, click RESERVE EXTERNAL STATIC ADDRESS.
  3. Enter a name for this reserved static IP address.

    For example, access-ext-ip.

  4. Select whether to reserve an IPv4 or IPv6 address.
  5. Set the Region to the region you decided to use.
  6. Leave Attached to set to None.
  7. Click RESERVE.

Repeat these steps to reserve a public IP address for the core side.

Reserve Static Internal IPs

In HA environments, each media interface needs a static IP address.

  1. From the navigation menu, click VPC network and then VPC networks.
  2. Select one of the media interfaces you previously created.
  3. Click the STATIC INTERNAL IP ADDRESSES tab and then RESERVE STATIC ADDRESS.
  4. Enter a name for the internal static IP.

    For example, s0p0-staticip.

  5. Under Static IP address, select Let me choose and enter the IP address.
  6. Set Purpose to Shared.
  7. Click RESERVE.

Repeat this process for each media interface.

Create a Health Check

To minimize the disruption due to a failover, create a health check that automatically switches from the active SBC to the standby SBC.

  1. From the navigation menu, click Compute Engine and then Health checks.
  2. From the top bar, select CREATE HEALTH CHECK.
  3. Enter a name for this health check.
  4. Under Scope, select Regional.
  5. Select a port, such as 8888, on which to conduct health checks.
  6. Under Health criteria, set both Check interval and Timeout to 1 second.
  7. Click CREATE.

Create Instance Group

After you create an instance group, you can bring up two SBC instances at the same time.

  1. From the navigation menu, click Compute Engine and then Instance templates.
  2. Select your previously created instance template and click CREATE INSTANCE GROUP.
  3. In the left column, confirm New managed instance group (stateless) is highlighted.
  4. Create a name for this instance group.
  5. Under Location, select the region and zone.
  6. Under Autoscaling, set Autoscaling mode to Off.
  7. Set the Minimum number of instances field to 2.
  8. Click CREATE.

Create an External Load Balancer

Set up an external load balancer for the nic0 / s0p0 interface.

If the Network services panel does not appear in the navigation menu, expand the MORE PRODUCTS menu and scroll down to the networking section.

  1. From the navigation menu, click Network services and then Load balancing.
  2. Click CREATE LOAD BALANCER.
  3. Under UDP Load Balancing, click START CONFIGURATION.
  4. Select the following options:
    • From Internet to my VMs
    • Backend Service
  5. Click CONTINUE.
  6. Enter a name for this load balancer.
  7. Under Backend configuration:
    1. Set the Instance group to your previously created instance group.
    2. Set the Health check to your previously created health check.
    3. Click DONE.
  8. Under Frontend configuration:
    1. Define a name for this configuration.
    2. Under IP address, select the previously reserved public IP address.
    3. Under Ports, select All.
    4. Click DONE.
  9. Click CREATE.

Create an Internal Load Balancer

Set up an internal load balancer to route private IP traffic on nic1, nic2, etc. interfaces.

If the Network services panel does not appear in the navigation menu, expand the MORE PRODUCTS menu and scroll down to the networking section.

  1. From the navigation menu, click Network services and then Load balancing.
  2. Click CREATE LOAD BALANCER.
  3. Under UDP Load Balancing, click START CONFIGURATION.
  4. Select Only between my VMs.
  5. Click CONTINUE.
  6. Enter a name for this load balancer.
  7. Set the region to the same region you previously decided to use.
  8. Set the Network to your s0p0 network.
  9. Under Backend configuration:
    1. Set the Instance group to your previously created instance group.
    2. Set the Health check to your previously created health check.
    3. Click DONE.
  10. Under Frontend configuration:
    1. Define a name for this configuration.
    2. Under Subnetwork, select the previously created subnet for this network.
    3. Under Internal IP, select Shared and set the IP address to your previously created reserved static IP.
    4. Under Ports, select All.
    5. Click DONE.
  11. Click CREATE.

Repeat this process for each media interface.

Create Firewall Rules for Health Checks

Create a firewall rule to allow traffic from the load balancer to the SBCs. When you create a firewall rule, you specify what kinds of traffic the firewall should match (such as incoming TCP traffic on port 22 from 10.2.2.0/24) and whether the traffic is allowed or denied.

  1. From the navigation menu, click VPC network and then Firewall.
  2. From the top menu, click CREATE FIREWALL RULE.
  3. Enter a name for this firewall rule.
  4. Set the VPC network to the s0p0 network.
  5. Set the Direction of traffic to ingress.
  6. Set the Action on match to allow.
  7. Set the Targets field to All instances in the network.
  8. Enter the source ranges that the firewall rule will match.

    This is the external IP address of the load balancer.

  9. Select the protocols and ports that the firewall rule will match.

    For example, if you previously set the health port to 8888, set the firewall rule to match traffic on port 8888.

  10. Click CREATE.
After the two HA SBCs has been created, use the interface-mapping command to map virtual interfaces to the SBC's management and media interfaces. Make sure to map nic0 to s0p0.