z/OS Communications Server: IPv6 Network and Application Design Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Support for scope information

z/OS Communications Server: IPv6 Network and Application Design Guide
SC27-3663-00

Scope information defines an outbound routing interface. Scope information can be an interface name that you configure or an interface index value that z/OS® assigns. The z/OS resolver supports the inclusion of scope information about host names or IPv6 addresses that are resolved using getaddrinfo; this support can also return scope information about host names that are resolved from IPv6 link-local addresses that are input using getnameinfo. Applications such as Ping, Traceroute, FTP, and others, use the z/OS resolver getaddrinfo and getnameinfo processing for resolving host name information and can use this scope information support when appropriate. Within z/OS, scope information is applicable only to IPv6 link-local addresses.

Restriction: Scope information that is specified for other IPv6 addresses, or for host names that resolve to other types of addresses, is ignored. Scope information that is appended to an IPv4 address is treated as an error.

This resolver capability can be useful in situations where locally attached devices (for instance, a router) are not yet fully configured and can be reached only using the link-local IPv6 address that is associated with the interface that connects this host to the device. It can also be useful if locally attached devices are malfunctioning or cannot be reached through normal routing mechanisms; diagnostic efforts are directed over a specific interface to the malfunctioning device. Finally, in installations that use static routing, scope information can be useful with applications such as FTP and Traceroute for identifying the correct interface to be used when a local IPv6 address is specified as the target address. For a list of z/OS applications that support use of scope information, see Application support of scope information specified on host name or IP address.

For details and restrictions about the z/OS resolver support for scope information about getaddrinfo and getnameinfo, see Name and address resolution functions.

For details about the interaction of scope information and advanced IPv6 socket options for specifying the outgoing interface, see Options for specifying the outgoing interface.

Considerations for choosing interface name or interface index

The interface index for an interface is assigned by the stack during interface definition processing; the value remains constant until either the interface is deleted from the stack or the stack is stopped. The same interface can be assigned a different interface index value when the stack is reactivated. Because of this, a constant value for the interface index for a given interface should not be assumed.

In a CINET environment, the interface index includes a stack identifier (known as the transport driver index). The transport driver index makes the interface index for an interface unique across the entire CINET environment, but reduces the predictability of the interface index value for an interface. Applications or users that provide scope information about host names should specify an interface name, instead of an interface index, for more predictable processing. This includes cases in which host names or IPv6 addresses are specified in a configuration file (such as the userid.RHOSTS.DATA) that is used to match against command input host names or IPv6 addresses, or against remote partner host names or IPv6 addresses. Host names or IPv6 addresses in this situation should also use the interface name, not the interface index, as the scope information that is coded on the host name or IPv6 address for matching purposes, because the z/OS resolver returns interface names by default on getnameinfo calls that involve scope information.

Syntax for specifying scope information

Scope information is specified as part of host name information, in the form host_identifier%scope_information.

The following guidelines apply when specifying scope information:
  • The host_identifier value is the host name or IPv6 link-local address of the host. Because scope information applies only to IPv6 link-local addresses, and IPv6 link-local addresses are not guaranteed to be unique, DNS host names are not typically created for IPv6 link-local addresses. Scope information is typically used as an appendage to a specified IPv6 address but not to an actual host name.
  • The percent (%) character is a delimiter between the host identifier portion and the scope portion of the input character string.
  • The scope_information value is the interface name or interface index used to identify the local outbound routing interface that is used with the host_identifier. This value should be an interface name; the name has a maximum length of 16 characters in the z/OS environment. If an interface index is used instead of an interface name, it must be in decimal format, and it must include the transport driver index value when operating in a CINET environment. See the SIOCGIFNAMEINDEX ioctl function call information in z/OS UNIX System Services Programming: Assembler Callable Services Reference for information about interface index in a CINET environment.
The following examples show how to specify scope information:
  • When the scope information is an interface name, specify:
    • ping fe80::9:47:100:112%interfacename
  • When the scope information is an interface index, specify:
    • ping fe80::9:47:100:112%65541

    The decimal value, 65541, represents the hexadecimal interface index value '00010005'x. The first halfword of the value (the transport driver index value) indicates which stack under CINET the interface belongs to. The second halfword contains the interface index value assigned by that stack to represent this interface.

The combined length of the host_identifier value and the scope_information cannot exceed 255 characters. This restriction applies to both values that are specified as input and values that are received or displayed as output. If host names are used for IPv6 link-local addresses, assign host names such that the 255 character limitation, with scope information appended, is maintained. The getaddrinfo invocations fail for host names longer than 255 characters, and the getnameinfo invocations return truncated host name information if the resolved name (and scope) exceeds the 255 character maximum.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014