You can specify one or more network interface cards (NICs) through which a DB2® member can acquire exclusive access to a specific port to service remote clients or drivers. You can specify a particular NIC by its IP address or by the host name that maps to that address in the nicbinding.cfg file.
Because fully qualified host names are derived from the host names or IP addresses that you specify for the NICs, ensure that the remote client or driver can use the specified values to uniquely identify the correct NICs. The remote client or driver must be able to resolve the fully qualified host names through the DNS or the /etc/hosts file.
A value from the nicbinding.cfg file can be returned by a member to the remote client or driver either as the specified IP address or as a fully qualified host name (regardless of whether an IP address or host name is specified), depending on the DB2 server configuration. By mapping the returned value to the correct location for the member, the remote client or driver can access the database.
When a DB2 member starts, it attempts to acquire exclusive access to a specific port on one or more NICs on the host where it resides. If a DB2 member is successful in gaining exclusive access to a specific port on all NICs on the host, any other DB2 instance on the same host must be configured to use a different port to service remote clients or drivers. Starting in Version 10.5 Fix Pack 5, you can specify one or more NICs through which a DB2 member can acquire exclusive access to a specific port, thereby avoiding contention for the same port number. You can enable this feature for a subset of DB2 members or all members in the instance.
You can specify a particular NIC by its IP address or by the host name that maps to that address in the nicbinding.cfg file, which you can find in the ~/sqllib/cfg directory (or the ~/sqllib_shared/cfg directory in DB2 pureScale® environments). To specify multiple NICs, use a multihomed host name that maps to the IP addresses for those NICs. A multihomed host is a host whose host name maps (through the DNS) to multiple NIC IP addresses.
If the specified port on a specified NIC is already owned by another DB2 instance, or the specified host name or IP address does not represent any valid NIC on the host, the pairing is considered invalid, and SQL5043N is returned when the DB2 member starts.
Restrictions
0 9.1.2.1
1 9.1.2.2
2 host1.newyork.mycompany.com
If a particular member has
no entry in the file, that member is bound to all NICs on the host
where it resides. In the following example, the configuration file
defines bindings for three members (0, 1, and 3) in a four-member DB2 instance:0 host1
1 host2.chicago.mycompany.com
3 9.1.2.4
Member 2 is not specified in the file, so it
is bound to all NICs on the host where it resides.0 9.2.3.2 -> static IP address of the NIC
0 9.2.3.9 -> virtual IP address (VIP) associated with another NIC on the same system
0 host3 -> network interface host name mapped to the VIP
0 host67m1
3 host68m1
6 host77e3
You can use the static IP address 9.2.5.6 in
place of host77e3 for member 6.0 9.2.3.3
1 host68e2
2 host77e1
You can use the static IP address 9.2.4.3 in
place of host68e2 for member 1, and the static IP address 9.2.5.2
in place of host77e1 for member 2.db2
"select MEMBER,
substr(NETWORK_INTERFACE_BOUND,1,16)
as NETWORK_INTERFACE_ID
from table(MON_GET_INSTANCE(-2))"
MEMBER NETWORK_INTERFACE_ID
------ --------------------
1 host67e1
0 9.2.3.3
2 record(s) selected.
You can also use operating system
commands to monitor NIC binding and port use. For more information,
see Who's using my port? (AIX®, Linux, Windows example).