Sun GlassFish Communications Server 2.0 High Availability Administration Guide

Using the Multi-homing Feature With a Cluster

Multi-homing enables Communication Server clusters to be used in an environment that uses multiple Network Interface Cards (NICs). A multi-homed host has multiple network connections, of which the connections may or may not be the same network. Multi-homing provides the following benefits:

Traffic Separation Using Multi-homing

You can separate the internal traffic (resulting from the converged load balancer, replication and GMS) from the external traffic. Traffic separation enables you plan a network better and augment certain parts of the network, as required.

Consider a simple cluster, cluster1, with three instances, instance101, instance102, and instance103. Each instance runs on a different machine. In order to separate the traffic, the multi-homed machine should have at least two IP addresses belonging to different networks. The first IP as the external IP and the second one as internal IP. The objective is to expose the external IP to the User Agents, so that all the traffic from the User Agents would be through them. The internal IP is used only by the cluster instances for internal communication. The following procedure describes how to set up traffic separation.

ProcedureTo Set Up Traffic Separation

  1. Set the address attribute of SIP listeners and HTTP listeners to the external address of the mutli-homed machine.

    Use the following commands:

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.sip-listener.sip-listener1.address=\${EXTERNAL_LISTENER_ADDRESS}

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.http-service.http-listener.http-listener1.address=\${EXTERNAL_LISTENER_ADDRESS}

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.sip-listener.sip-listener2.address=\${EXTERNAL_LISTENER_ADDRESS}

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.http-listener.http-listener2.address=\${EXTERNAL_LISTENER_ADDRESS}

  2. Set the listener type of these listeners as external, so that they listen for traffic from User Agents and not for the converged load balancer proxying.

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.sip-listener.sip-listener1.type=external

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.http-service.http-listener.http-listener1.type=external

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.sip-listener.sip-listener2.type=external

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.http-listener.http-listener2.type=external

  3. Create the system properties EXTERNAL_LISTENER_ADDRESS and INTERNAL_LISTENER_ADDRESS.

    • asadmin create-system-properties --user admin --port 4848 --passwordfile password.txt --target cluster1 EXTERNAL_LISTENER_ADDRESS=0.0.0.0:INTERNAL_LISTENER_ADDRESS=0.0.0.0

    • asadmin create-system-properties --user admin --port 4848 --passwordfile password.txt --target server EXTERNAL_LISTENER_ADDRESS=0.0.0.0:INTERNAL_LISTENER_ADDRESS=0.0.0.0

  4. Create new listeners for listening to internal traffic.

    • asadmin create-sip-listener --user admin --port 4848 --passwordfile password.txt --target cluster1 --siplisteneraddress 0.0.0.0 --siplistenerport 25060 internal-sip-listener

    • asadmin create-http-listener --user admin --port 4848 --passwordfile password.txt --target cluster1 --listeneraddress 0.0.0.0 --defaultvs server --listenerport 28080 internal-http-listener

  5. Set the address attribute of these new listeners to the internal address.

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.sip-listener.internal-sip-listener.address=\${INTERNAL_LISTENER_ADDRESS}

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.http-service.http-listener.internal-http-listener.address=\${INTERNAL_LISTENER_ADDRESS}

  6. Set the type attribute of these new listeners to internal.

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.sip-service.sip-listener.internal-sip-listener.type=internal

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1–config.http-service.http-listener.internal-http-listener.type=internal

  7. Configure the IP address of the cluster instances.

    • asadmin create-system-properties --user admin --port 4848 --passwordfile password.txt --target instance101 EXTERNAL_LISTENER_ADDRESS=10.12.152.29:INTERNAL_LISTENER_ADDRESS=192.168.2.1

    • asadmin create-system-properties --user admin --port 4848 --passwordfile password.txt --target instance102 EXTERNAL_LISTENER_ADDRESS=10.12.152.39:INTERNAL_LISTENER_ADDRESS=192.168.2.3

    • asadmin create-system-properties --user admin --port 4848 --passwordfile password.txt --target instance103 EXTERNAL_LISTENER_ADDRESS=10.12.152.49:INTERNAL_LISTENER_ADDRESS=192.168.2.4

  8. Restart the node agent and the cluster.

  9. If you are using a hardware load balancer for spraying the SIP traffic to the individual instances, you need to set the external-sip-address and external-sip-port attributes to point to the hardware load balancer.

    If you are using only one hardware load balancer for all SIP listeners, set the attributes of the SIP container.

    • asadmin create-system-properties --user admin --port 4848 --passwordfile password.txt cluster1-config.sip-container.external-sip-address=yourlbaddress

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1-config.sip-container.external-sip-port=yourlbport

    If you are using multiple hardware load balancers, set the attributes of each of the SIP listeners:

    • asadmin create-system-properties --user admin --port 4848 --passwordfile password.txt cluster1-config.sip-service.sip-listener.sip-listener1.external-sip-address=yourlbaddress

    • asadmin set --user admin --port 4848 --passwordfile password.txt cluster1-config.sip-service.sip-listener.sip-listener1.external-sip-port=yourlbport