Specifying connection information

IBM® Connect:Direct® accepts both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6) versions of the Internet Protocol as well as host names. You can enter IP addresses/host names and ports in several ways, depending on the field you are specifying:

  • Address or host name only
  • Port number only
  • Address/host name with a port number
  • Multiple address/host name and port combinations

When specifying IP addresses/host names and ports for IBM Connect:Direct, use the following guidelines.

IP Addresses

IBM Connect:Direct accepts both IPv4 and IPv6 addresses. Wherever an IP address is specified in IBM Connect:Direct, you can use either IPv4 or an IPv6 addresses.

IPv4 Addresses

IPv4 supports 232 addresses written as 4 groups of dot-separated 3 decimal numbers (0 through 9), for example, 10.23.107.5.

IPv6 Addresses

IPv6 supports 2128 addresses written as 8 groups of colon-separated 4 hexadecimal digits, for example, 1001:0dc8:0:0:0:ff10:143e:57ab. The following guidelines apply to IPv6 addresses:

  • If a four-digit group contains zeros (0000), the zeros may be omitted and replaced with two colons (::), for example:
    2001:0db8:85a3:0000:1319:8a2e:0370:1337
    can be shortened as
    2001:0db8:85a3::1319:8a2e:0370:1337
  • Any number of successive 0000 groups may be replaced with two colons (::), but only one set of double colons (::) can be used in an address, for example:
    001:0db8:0000:0000:0000:0000:1319:58ab
    Can be shortened as:
    2001:0db8:0000:0000::1319:58ab
  • Leading zeros in a four-zero group can be left out (0000 can be shortened to 0), for example:
    2001:0db8:0000:0000:0000:0000:1319:58ab
    Can be shortened as:
    2001:0db8:0:0:0:0:1319:58ab
  • You can write a sequence of 4 bytes that occur at the end of an IPv6 address in decimal format using dots as separators, for example:
    ::ffff:102:304
    Can be written as:
    ::ffff:1.2.3.4

    This notation is useful for compatibility addresses.

Host Names

When you specify a host name, rather than an IP address, IBM Connect:Direct gets the IP address from the operating system. The first IP address returned by the operating system is used regardless of whether it is in IPv4 or IPv6 format.

A host name (net, host, gateway, or domain name) is a text string of up to 24 characters comprised of the alphabet (A–Z), digits (0–9), minus sign (-), and period (.), for example, msdallas-dt.

The following guidelines also apply:

  • No blank or space characters are permitted as part of the name.
  • Periods are allowed only when they are used to delimit components of domain-style names.
  • Host names are not case sensitive.
  • The first and last character must be a letter or digit.
  • Single-character names or nicknames are not allowed.

Port Numbers

Port numbers can be appended to the end of IP/host addresses when they are preceded by a semi-colon (;), for example, 10.23.107.5;1364. This convention is specific to IBM Connect:Direct and is not an industry standard.

A port number must be in the range of 0 through 65535. Port numbers lower than 1024 are designated as reserved and should not be used. The following examples show port numbers appended to IP/host addresses using these conventions:

10.23.107.5;1364
fe00:0:0:2014::7;1364
msdallas-dt;1364

Multiple Addresses, Host Names, and Ports

You can specify multiple IPv4 and IPv6 addresses and host names by separating them with a comma (,). A space can be added after the comma for readability, for example:

10.23.107.5, fe00:0:0:2014::7, msdallas-dt

You can also specify a port number for each address or host name. The port is separated from its corresponding address/host name with a semi-colon (;), and each address/host name and port combination is separated by a comma (,). A space may be added after the comma for readability. The following example shows multiple address/host name and port combinations:

10.23.107.5;1364, fe00:0:0:2014::7;1364, msdallas-dt;1364

Multiple address/host names (and combinations with port numbers) are limited to 1024 characters.

About Using Masks for IP Address Ranges

When you specify a value for the tcp.src.ports parameter in the initialization parameters file, you can use masks to specify the upper boundary of a range of IP addresses that will use a specific port, multiple ports, or a range of ports. IBM Connect:Direct supports masks for both IPv4 and IPv6 addresses as shown in the following sample entry from the initparms.cfg file:

tcp.src.ports=(199.2.4.*, 1000), (fd00:0:0:2015:*::*, 2000-3000), (199.2.4.0/
255.255.255.0, 4000-5000), (fd00:0:0:2015::0/48, 6000, 7000)

These sample addresses specify the following information:

(199.2.4.*, 1000)—Any IPv4 address that falls in the range from 199.2.4.0 through 199.2.4.255 will use only port 1000.

(fd00:0:0:2015:*::*, 2000-3000)—Any IPv6 address that falls in the range from fd00:0:0:2015:0:0:0:0 through fd00:0:0:2015:ffff:ffff:ffff:ffff will use a port in the range of 2000 through 3000.

(199.2.4.0/255.255.255.0, 4000-5000)—Any IPv4 address that falls in the range from 199.2.4.0 through 199.2.255.255 will use a port in the range of 4000 through 5000.

(fd00:0:0:2015::0/48, 6000, 7000)—Any IPv6 address that falls in the range from fd00:0:0:2015:0:0:0:0 through fd00:0:0:ffff:ffff:ffff:ffff:ffff will use port 6000 or port 7000.

As shown in the sample entry above, the wildcard character (*) is supported to define an IP address pattern. You can specify up to 255 unique IP address patterns or up to 1024 characters in length, each with its own list of valid source ports. If the wildcard character is used, the optional mask is not valid.