Configure an application server, a node, or a cell to use a single network interface
Application servers, by default, are configured to use all of the network interfaces available for them to use. We can change this configuration such an application server only uses a specific network interface. However, we cannot configure it to use a subgroup of interfaces. For example, if we have three ethernet adapters, we cannot configure an application server to use two of the three adapters.
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.
(Windows) 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 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 we have more than one network interface and we want to use each one separately, we must 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 application server running on it. Two application servers bound to two separate network interfaces on the same machine cannot be in the same node because they have different TCP/IP addresses.
In a multi-homed environment you may need to separate inbound http and/or https traffic by forcing it to use a network adapter other than the one bound to the hostname used during installation. This separation can be accomplished by specifying the hostname or IP address be bound to a different network adapter for the defaulthost and defaulthost_secure ports on each application server that is to be redirected. This modification configures the application server so that it only accepts http and/or https traffic received over the specified adapter. Also, the deployment manager uses this hostname as the transport when generating the plugin for that application server. There are no known limitations to this modification provided only the defaulthost and defaulthost_secure ports are modified in this fashion.
- To have a specific application server to use a single network interface, perform the following steps for that application server.
- To have an entire node to use a single network interface, perform the following steps for our node agent and all the application servers in that node.
- To have an entire cell to use a single network interface, perform the following steps for the deployment manager, node agent, and all the application servers in the node.
- When completing 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. When we have an * (asterisk) as a host name for the Distribution and Consistency Services (DCS) address and also have multiple Network Identification Cards (NICs), the DCS port can bind to multiple IP addresses.
- (Windows) When the client ORB makes a TCP connection to a server, there are two possible scenarios:
- The local socket side is bound to the single address, specified on either the ORB_LISTENER_ADDRESS property in the serverindex.xml file, or the com.ibm.CORBA.LocalHost custom property.
- The local socket side is not bound to a particular address.
These two scenarios occur because the Micosoft Windows networking stack does not forward packets across different scope zones. The loopback and public interfaces are in different scope zones.
The first scenario fails with a SocketException if the client is running on icrosoft Windows7 or Microsoft Windows 2008 R2, and the com.ibm.ws.orb.transport.useMultiHome custom property on the client is set to false, because either:
- The client ORB_LISTENER_ADDRESS host value, in the serverindex.xml file, or the com.ibm.CORBA.LocalHost custom property has an internal address of either localhost or 127.0.0.1, and the server has an external IP address or host name, such as 147.10.32.117).
- Or the client has an external address and server has an internal address.
Tasks
- Update the com.ibm.CORBA.LocalHost and com.ibm.ws.orb.transport.useMultiHome Object Request Broker (ORB) custom properties.
- In the administrative console, navigate to the indicated panel.
- For an application server, click...
Servers > Server Types > WebSphere application servers > server > Container Settings > Container services > ORB Service. Then in the Additional Properties section, click Custom properties.
- For a deployment manager, click...
System Administration > Deployment manager. In the Additional Properties section, click ORB Service. Then, under Additional properties on the ORB Service panel, click Custom properties.
- For a node agent, click...
System Administration > Node agents > node_agent . In the Additional Properties section, click ORB Service. Then, under Additional properties on the ORB Service panel, 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 daemon_protocol_iiop_listenIPAddress WebSphere variable to indicate the IP addresses to which we want the location service daemon to bind.
- In the administrative console, click Environment > WebSphere variables.
- Select the DAEMON_protocol_iiop_listenIPAddress variable and specify * to specify bind all, or specify a specific IP address in the Value field. If the DAEMON_protocol_iiop_listenIPAddress variable is not in the list of already defined variables, click New, and then enter DAEMON_protocol_iiop_listenIPAddress in the Name field and specify the appropriate value in the Value field.
- Update the JVM com.ibm.websphere.network.useMultiHome custom property for discovery and SOAP connections.
- In the administrative console, navigate to the indicated page.
- For an application server, click...
Servers > Server Types > WebSphere application servers > server > Java process management > Process definition > Java virtual machine > Custom properties.
- For a deployment manager, click...
System Administration > Deployment manager > Java process management > Process definition > Java virtual machine > Custom properties.
- For a node agent, click...
System Administration > Node agent > node_ agent > Java process management > Process definition > Java virtual machine > Custom properties.
(ZOS)
- For an application server, click...
Servers > Server Types > WebSphere application servers > server > Java process management > Process definition > process_type > Java virtual machine > Custom properties.
- For a deployment manager, click...
System Administration > Deployment manager > Java process management > Process definition > process_type > Java virtual machine > Custom properties.
- For a node agent, click...
System Administration > Node agents > node_ agent > Java process management > Process definition > Control > 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 administrative console, navigate to the indicated page.
- For an application server, click...
Servers > Server Types > WebSphere application servers > server, and then, in the Additional Properties section, click Ports.
- For a deployment manager, click...
System Administration > Deployment manager, and then, in the Additional Properties section, click Ports.
- For a node agent, click...
System Administration > Node agents > node_ agent, and then, in the Additional Properties section, 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 we finish, none of the entries listed in the Host column should contain an * (asterisk).
- Change the Initial State setting for each of the Version 5 JMS servers to Stopped .
- In the administrative console, click...
Servers > Server Types > v5 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.
- Save changes.
- In the administrative console, click...
System administration > Save Changes to Master Repository.
- Select Synchronize changes with nodes> Save.
- Stop and restart all the affected servers, node agents, and the deployment manager.
We 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 application server and federate it into the desired cell.
- Use the Profile Management tool to create an application server profile, specifying a host name that is different than the host name used for the previously created application server. Federate this application server into the desired cell.
- Start the node agent and application server configured to the first network interface. Follow the preceding steps for the node agent and application server to prepare this node to communicate on the network interface we specified when we configured this application server.
- Start the second node agent and application server. Follow the preceding steps for the node agent and application server to prepare this node to communicate only on the network interface specified when we configured the second application server.
- Stop all of the node agents and application servers that we created in this example.
- Restart all of these node agents and application servers.
We have two separate nodes running on two different network interfaces.
What to do next
If we are using a stand-alone Java client or server to communicate with WAS, and we are using the WAS Software Development Kit (SDK), add the following properties to your Java command to enable the ORB for the 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)..