Configure multiple network interface support
Application servers, by default, are configured to use all of the network interfaces that are available for them to use. You can change this configuration such that an appserver only uses a specific network interface. However, you cannot configure it to use a subgroup of interfaces. For example, if you have three ethernet adapters, you cannot configure an appserver to use two of the three adapters.
Overview
When an appserver is configured to use all network interfaces, if it opens a socket on port 9901 on a machine with two TCP/IP addresses, it opens port 9901 on both IP addresses.
On a Microsoft Windows operating system, the netstat output displays *.9901 in the Local Address field, indicating that port 9901 is bound to all network interfaces in the system.
When an appserver is configured to use a specific network interface, it only communicates on that one network interface. For example, on a Windows operating system, if an appserver opens a socket on port 7842 on an ethernet adapter with an address of 192.168.1.150, the netstat output displays 192.168.1.150.7842 in the Local Address field, indicating that port 7842 is only bound to 192.168.1.150.
If you have more than one network interface and you want to use each one separately, have a separate configuration profile for each interface. When network interfaces are used separately, a separate node agent is required for each network interface that has an appserver running on it. Two appservers bound to two separate network interfaces on the same machine cannot be in the same node because they have different TCP/IP addresses.
- If you want a specific appserver to use a single network interface, perform the following steps for that appserver.
- If you want an entire node to use a single network interface, perform the following steps for your node agent and all the appservers in that node.
- If you want an entire cell to use a single network interface, perform the following steps for the deployment manager, node agent, and all the appservers in the node.
- When performing the following steps, do not specify localhost, a loop back address, such as 127.0.0.1, or an * (asterisk) for the TCP/IP addresses.
Procedure
- Update the com.ibm.CORBA.LocalHost and com.ibm.ws.orb.transport.useMultiHome Object Request Broker (ORB) custom properties.
- In the console, navigate to the indicated page.
- For an appserver, click Servers > Application Servers > server. Then, under Container Settings, click Container services > ORB Service and, under Additional properties, click Custom Properties.
- For a deployment manager, click System administration > Deployment manager, and under Additional Properties, click ORB Service. Then, under Additional properties, click Custom Properties.
- For a node agent, click System administration >Node agent > nodeagent , and under Additional Properties, click ORB Service. Then, under Additional properties, click Custom Properties.
- Select the com.ibm.CORBA.LocalHost custom property and specify an IP address or hostname in the Value field. Do not set this property to either localhost or *.
If the com.ibm.CORBA.LocalHost property is not in the list of already defined custom properties, click New and then enter com.ibm.CORBA.LocalHost in the Name field and specify an IP address or hostname in the Value field.
- Select the com.ibm.ws.orb.transport.useMultiHome custom property and specify false in the Value field. If the com.ibm.ws.orb.transport.useMultiHome property is not in the list of already defined custom properties, click New and then enter com.ibm.ws.orb.transport.useMultiHome in the Name field and specify false in the Value field.
- Update the JVM com.ibm.websphere.network.useMultiHome custom property for discovery and SOAP connections.
- In the console, navigate to the indicated page.
- For an appserver, click Servers > Application Servers > server > Java and Process Management > Process Definition > > Java Virtual Machine > Custom Properties.
- For a deployment manager, click System administration > Deployment manager > Java and Process Management > Process definition > Java Virtual Machine > Custom Properties.
- For a node agent, click System administration >Node agent > nodeagent > Java and Process Management > Process definition > Java Virtual Machine > Custom Properties.
- Select the com.ibm.websphere.network.useMultiHome custom property and specify false in the Value field. If the com.ibm.websphere.network.useMultiHome property is not in the list of already defined custom properties, click New and then enter com.ibm.websphere.network.useMultiHome in the Name field and specify false in the Value field.
- Update the host name for TCP/IP connections.
- In the console, navigate to the indicated page.
- For an appserver, click Servers > Application Servers > server, and then, under Communications, click Ports.
- For a deployment manager, click System administration > Deployment manager, and then under Additional Properties, click Ports.
- For a node agent, click System administration >Node agent > nodeagent , and then, under Additional Properties, click Ports.
- Update the Host field for each of the listed ports to the value specified for the com.ibm.CORBA.LocalHost ORB custom property in the first step. When you finish, none of the entries listed in the Host column should contain an * (asterisk).
- Change the Initial State setting for each of the JMS servers to Stopped .
- In the console, click Servers > JMS Servers.
- Click one of the listed JMS servers and change the value specified for the Initial State field to Stopped.
- Repeat the previous step until the Initial State setting for all of the listed JMS servers is Stopped.
- Change the Initial State setting for each of the listener ports to Stopped .
- In the console, click Servers > Application servers > server.
- Under Communications, click Messaging > Message Listener Service > Listener Ports
- Click one of the listed listener ports and change the value specified for the Initial State field to Stopped.
- Repeat the previous step until the Initial State setting for all of the listed listener ports is Stopped.
- Save your changes.
- In the console, click System administration > Save Changes to Master Repository.
- Select Synchronize changes with nodes, and then click Save.
- Stop and restart all the affected servers, node agents, and the deployment manager.
Results
You have configured an installation of WAS to communicate on one, and only one network interface on a machine that has more than one network interface.
Example
This example creates two nodes, each using a separate network interface, on a machine that has at least two network interfaces:
- Use the Profile Management tool to create an appserver and federate it into the desired cell.
- Use the Profile Management tool to create an appserver profile, specifying a host name that is different than the host name used for the previously created appserver. Federate this appserver into the desired cell.
- Start the node agent and appserver that are configured to the first network interface. Follow the preceding steps for the node agent and appserver to prepare this node to communicate on the network interface you specified when you configured this appserver.
- Start the second node agent and appserver. Follow the preceding steps for the node agent and appserver to prepare this node to communicate only on the network interface specified when you configured the second appserver.
- Stop all of the node agents and appservers that you created in this example.
- Restart all of these node agents and appservers.
You have two separate nodes running on two different network interfaces.
What to do next
If you are using a standalone Java client or server to communicate with WAS, and you are using the WebSphere Application Server Software Development Kit (SDK), add the following properties to your Java command to enable the ORB for your application to communicate with a specific network interface.-Dcom.ibm.ws.orb.transport.useMultiHome=false -Dcom.ibm.CORBA.LocalHost=host_namehost_name is the TCP/IP address or hostname of the network interface for the ORB to use.
Do not set host_name to localhost, a loop back address, such as 127.0.0.1, or an * (asterisk).