Configuring an application server to use a single network interface

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 application server 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 application server to use two of the three adapters.

About this task

When an application server 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.

When an application server 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 application server 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, you must have a separate configuration profile for each interface.

Avoid trouble Avoid trouble:
  • If you want a specific application server to use a single network interface, perform the following steps for that application server.
  • 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.
gotcha

Procedure

  1. Update the com.ibm.CORBA.LocalHost and com.ibm.ws.orb.transport.useMultiHome Object Request Broker (ORB) custom properties.
    1. In the administrative console, navigate to the indicated panel. Click Servers > Server Types > WebSphere application servers > server_name > Container Settings > Container services > ORB Service. Then in the Additional Properties section, click Custom properties .
    2. 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.

    3. 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.
  2. Update the Java virtual machine (JVM) com.ibm.websphere.network.useMultiHome custom property for discovery and SOAP connections.
    1. In the administrative console, navigate to the indicated page. Click Servers > Server Types > WebSphere application servers > server_name > Java process management > Process definition > Java virtual machine > Custom properties .
    2. 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.
  3. Update the host name for TCP/IP connections.
    1. In the administrative console, navigate to the indicated page. Click Servers > Server Types > WebSphere application servers > server_name , and then under Communications click Ports.
    2. 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).
  4. Change the Initial State setting for each of the Version 5 JMS servers to Stopped .
    1. In the administrative console, click Servers > Server Types > Version 5 JMS servers.
    2. Click one of the listed JMS servers, and change the value specified for the Initial State field to Stopped.
    3. Repeat the previous step until the Initial State setting for all of the listed JMS servers is Stopped.
  5. Change the Initial State setting for each of the listener ports to Stopped .
    1. In the administrative console, click Servers > Server Types > WebSphere application servers > server_name .
    2. Under Communications, click Messaging > Message Listener Service > Listener Ports.
    3. Click one of the listed listener ports and change the value specified for the Initial State field to Stopped.
    4. Repeat the previous step until the Initial State setting for all of the listed listener ports is Stopped.
  6. Save your changes.
    1. In the administrative console, click System administration > Save Changes to Master Repository.
    2. Click Save.
  7. Stop and restart the application server.

Results

You have configured an installation of WebSphere® Application Server to communicate on one, and only one network interface on a machine that has more than one network interface.

Example

This example creates two application servers, each using a different network interface, on a machine that has at least two network interfaces:

  1. Use the Profile Management tool to create an application server profile.
  2. Use the Profile Management tool to create a second application server profile, specifying a host name that is different than the host name used for the previously created application server.
  3. Start the application server that is configured to the first network interface. Follow the preceding steps to prepare this server to communicate on the network interface that you specified when you configured this application server.
  4. Start the second application server. Follow the preceding steps to prepare this server to communicate only on the network interface you specified when you configured this second application server.
  5. Stop both of the application servers that you created in this example.
  6. Restart both of these application servers.

You have two separate nodes running on two different network interfaces.

What to do next

If you are using a stand-alone Java client or server to communicate with WebSphere Application Server, 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_name

host_name is the TCP/IP address or hostname of the network interface for the ORB to use.

Avoid trouble Avoid trouble: Do not set host_name to localhost, a loop back address, such as 127.0.0.1, or an * (asterisk). gotcha
Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 5:16:49 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-base-iseries&topic=trun_multiplenic
File name: trun_multiplenic.html