Home
Local Address (LOCLADDR)
This attribute only applies if Transport type (TRPTYPE) is TCP/IP. For all other transport types it is ignored.
This attribute specifies the local communications address for the channel. When a LOCLADDR value is specified, a channel that is stopped and then restarted continues to use the TCP/IP address specified in LOCLADDR. In recovery scenarios, this could be useful when the channel is communicating through a firewall, because it removes problems caused by the channel restarting with a different IP address, specified by the TCP/IP stack to which it is connected. We can also use this attribute to force a channel to use an IPV4 or an IPV6 stack on a dual stack system or use a dual mode stack on a single stack system.
This attribute is valid for channel types of:
- Sender
- Server
- Requester
- Client connection
- Cluster sender
- Cluster receiver
The value used is the optional IP address and optional port or port range to be used for outbound TCP/IP communications. The format is as follows:
LOCLADDR([ip-addr][(low-port[,high-port])])where "ip-addr" is specifed in IPV4 dotted decimal form (for example 9.20.9.30), IPV6 hexadecimal form (for example fe80:43e4:0204:acff:fe97:2c34:fde0:3485), or dotted alphanumeric form (for example MACH1.ABC.COM), and "low-port" and "high-port" are port numbers enclosed in parentheses. When two port values are specified, the channel binds to the address specified, using an available port within the range covered by the two port values. All values are optional.
The maximum length of the string is MQ_LOCAL_ADDRESS_LENGTH.
When a channel is started the values specified for connection name (CONNAME) and local address (LOCLADDR) determine which IP stack is used for communication. The IP stack used is determined as follows:
- If the system has only an IPV4 stack configured, the IPV4 stack will always be used. If a local address (LOCLADDR) or connection name (CONNAME) is specified as an IPV6 network address, an error is generated and the channel will fail to start.
- If the system has only an IPV6 stack configured, the IPV6 stack will always be used. If a local address (LOCLADDR) is specified as an IPV4 network address, an error is generated and the channel will fail to start. On platforms that support IPV6 mapped addressing, if a connection name (CONNAME) is specified as an IPV4 network address, the IPV4 address is mapped to an IPV6 address (for example "xxx.xxx.xxx.xxx" is mapped to "::ffff:xxx.xxx.xxx.xxx"). Note that the use of mapped addresses may require protocol translators. Avoid the use of mapped addresses where possible.
- If a local address (LOCLADDR) is specified as an IP address for a channel, the stack for that IP address is used. If the local address (LOCLADDR) is specified as a hostname that resolves to both IPV4 and IPV6 addresses, the connection name (CONNAME) is used to determine which of the stacks is used. If both the local address (LOCLADDR) and connection name (CONNAME) are specified as hostnames that resolve to both IPV4 and IPV6 addresses, the stack used is determined by the queue manager attribute IPADDRV.
- If the system has dual IPV4 and IPV6 stacks configured and a local address (LOCLADDR) is not specified for a channel, the connection name (CONNAME) specified for the channel determines which IP stack to use. If the connection name (CONNAME) is specified as a hostname that resolves to both IPV4 and IPV6 addresses, the stack used is determined by the queue manager attribute IPADDRV.
If the LOCLADDR port is in use, TCP/IP requires a time period to release the previously used port. If enough time is not left, and if only 1 LOCLADDR port is specified, the previously used port will not be available and so a random port will be chosen rather than the LOCLADDR port.
Parent topic:
Channel attributes in alphabetical order
ic11740_
Home