HP OpenVMS Systems Documentation

Content starts here

Compaq TCP/IP Services for OpenVMS
Guide to IPv6


Previous Contents


Appendix A
Supported IPv6 RFCs

The following are supported IPV6 Request for Comments (RFCs):

  • Internet Protocol Version 6 (IPv6) Specification, RFC 2460 (December 1998)
  • Internet Control Message Protocol (ICMPv6) for Internet Protocol Version 6 (IPv6), RFC 2463 (December 1998)
  • Neighbor Discovery for IP Version 6 (IPv6), RFC 2461 (December 1998)
  • IPv6 Stateless Address Autoconfiguration, RFC 2462 (December 1998)
  • Path MTU Discovery for IP Version 6, RFC 1981 (August 1996)
  • Transition Mechanisms for IPv6 Hosts and Routers, RFC 1933 (April 1996)
  • IP Version 6 Addressing Architecture, RFC 2373 (July 1998)
  • An IPv6 Aggregatable Global Unicast Address Format, RFC 2374 (July 1998)
  • IPv6 Testing Address Allocation, RFC 2471 (December 1998)
  • Transmission of IPv6 Packets over Ethernet Networks, RFC 2464 (December 1998)
  • Transmission of IPv6 Packets over FDDI Networks, RFC 2467 (December 1998)
  • Basic Socket Interface Extensions for IPv6, RFC 2553 (April 1999)
  • Advanced Sockets API for IPv6, RFC 2292 (February 1998)
  • DNS Extensions to Support IP version 6, RFC 1886 (December 1995)
  • Dynamic Updates in the Domain Name System (DNS UPDATE), RFC 2136 (April 1997)
  • RIPng, RFC 2080 (January 1997)


Appendix B
IPv6 Extensions to Management Commands and IPv6 Processes

B.1 IPv6 Extensions to Management Commands

The Compaq TCP/IP Services for OpenVMS Management Command Reference decribes the basic management commands, including the UNIX commands, you can use to manage the TCP/IP Services software. The Compaq TCP/IP Services for OpenVMS Tuning and Troubleshooting contains more detailed information on the UNIX management commands. The following sections describe only IPv6 extensions to those UNIX management commands.

To use UNIX management commands at the DCL prompt, execute the following command procedure (or put it into your LOGIN.COM so that it executes each time you log in):



$ @SYS$MANAGER:TCPIP$DEFINE_COMMANDS

Note

UNIX flags and OpenVMS interface names are case sensitive. When entering UNIX management commands at the DCL prompt, you must enclose uppercase UNIX flags and OpenVMS interface names in quotes to preserve the case of the input.

B.1.1 ifconfig Command

For the AF_INET6 address family, use the following syntax:


ifconfig interface_id address_family [[ip6prefix]
  address[/bitmask] [dest_address]] [parameters]

For the AF_INET6 address family, the address argument is either a host name or the 128-bit IPv6 address, as follows:



x:x:x:x:x:x:x:x

In this format, each x is the hexadecimal value of a 16-bit piece of the address.

The ip6prefix argument specifies that the interface identifier is to be appended to the address argument when configuring an address on the interface. The interface identifier uniquely identifies an interface on a subnet and is typically the interface's link-layer address. The following are the parameters for the ifconfig command.

Parameters [AF_INET6 only]:

  • ip6interfaceid id
    Overrides the default interface ID, which depends on the underlying link type (for example, Ethernet, FDDI), and specifies an inet6 interface ID for the interface. For example, if your system has the Ethernet hardware address 08-00-2b-2a-1e-d3, the following command generates the inet6 link-local address fe80::a00:2bff:fe2a:1ed3 for the interface:


    
    $ ifconfig "WE0" ipv6
    
    

    On the same system, the following command generates the inet6 interface ID abcd:1234 for the interface:


    
    $ ifconfig "WE0" ip6interfaceid ::abcd:1234 ipv6
    
    
  • ipv6
    Initializes IPv6-related data structures and assigns an IPv6 link-local address to the interface.
  • -ipv6
    Removes any IPv6 configuration associated with the interface, including all IPv6 addresses and IPv6 routes through the interface. This command is equivalent to the ifconfig interface inet6 delete command.
  • ip6dadtries value
    Specifies the number of consecutive neighbor solicitation messages that your system transmits as it performs duplicate address detection on a tentative address.
  • ip6hoplimit hops
    Sets the default number of hops to be included in transmitted unicast IP packets.
  • ip6mtu mtu_value
    Alters the maximum trasmission unit (MTU) for messages that your system transmits on the link.
  • ip6nonud
    Disables Neighbor Unreachability Detection (NUD) on the interface.
  • ip6reachabletime time
    Sets the time, in milliseconds, that your system considers a neighbor is reachable after your system receives a reachability confirmation message.
  • ip6retranstimer value
    Sets the time interval, in milliseconds, between neighbor solicitation messages to a neighbor.

B.1.2 iptunnel Command

The iptunnel command creates configured tunnels for sending and receiving IPv6 or IPv4 packets that are encapsulated as the payload of an IPv4 datagram.

The iptunnel command can perform the following three operations:

  • create
    Creates a tunnel interface, which you must subsequently configure by using the ifconfig command. The syntax of the create operation is as follows:


    
    iptunnel create [-I int-name] [v4-dest] [v4-src]
    
    

    Parameters
    • -I int-name
      Specifies the interface unit of the tunnel to be created. This is an optional parameter. The int-name parameter has the form iptx, where x is the interface unit number. By default, the interface name selected for the tunnel is iptx+1, or the value of the interface unit number of the last tunnel created plus 1.
    • v4-dest
      Specifies the remote endpoint to which a tunnel is to be created.
    • v4-src
      Sets the IPv4 source address in the encapsulating header. The tunnel is enabled (packets are sent and received on the tunnel) only if v4-src is a valid address on the system. This is an optional parameter.
  • delete
    Deletes a tunnel interface. You must disable the tunnel before you can delete it by executing the following command:


    
    $ ifconfig tunnel name down  delete abort
    
    
  • show
    Shows the tunnel attributes (name, tunnel endpoints, next hop for tunneled packets).

For related information, see RFC 2003, IP Encapsulation within IP, Perkins, C., October 1996.

B.1.3 netstat Command

The netstat command displays network-related data in various formats.

The parameters -f address_family limit reports to the specified address family. The address families that can be specified include the following:

  • inet---Specifies reports of the AF_INET family, if present in the kernel.
  • inet6---Specifies reports of the AF_INET6 family, if present in the kernel.

To display IPv6 routing entries, enter this command:



$ netstat -rnf inet6

To display active IPv6 connections, enter this command:



$ netstat -af inet6

B.1.4 traceroute Command

The traceroute command with the host argument prints the route that packets take to both IPv4 and IPv6 hosts.

The -G @addr1@addr2... parameters (IPv6 only) specify the source route for packets to travel. The route consists of one or more IPv6 node names or addresses. Use the ampersand character (&) to separate multiple addresses. You can specify up to 10 addresses.

The -V version parameter specifies the Internet Protocol (IP) version number to enable the resolver to return the correct address. Use the -V 4 option if you want to issue a traceroute command to a host name (not an IP address) that has both IPv4 and IPv6 addresses, and you want to trace the route to the IPv4 address.

Note

By default, traceroute tries to resolve destination host names as an IPv6 address. If that fails, it resolves the host name as an IPv4 address. You can override this behavior with the -V option.

B.2 IPv6 Processes

B.2.1 TCPIP$ND6HOST

The TCPIP$ND6HOST process receives and processes IPv6 Router Advertisement (RA) packets of the Neighbor Discovery Protocol. This enables a system to autoconfigure itself without manual intervention.

The TCPIP$ND6HOST process performs the following functions, based on the contents of IPv6 Router Advertisements it receives:

  • Router discovery---Learns the IPv6 address of default routers and installs default routes in the kernel routing table.
  • On-link prefix discovery---Learns IPv6 on-link prefixes (ranges of IPv6 addresses that are directly reachable on a given link).
  • Stateless address configuration---Automatically creates and deletes interface addresses.
  • Interface attribute configuration---Automatically configures datalink attributes, such as hop limit, reachable time, retransmit time, and link MTU.

Caution

Do not run the TCPIP$ND6HOST and TCPIP$IP6RTRD processes on the same host, since this may produce unpredictable results.

B.2.2 TCPIP$IP6RTRD Process

The TCPIP$IP6RTRD process sends IPv6 Router Advertisement (RA) packets of the Neighbor Discovery Protocol. These packets enable any listening host to autoconfigure itself without manual intervention. In addition, you can configure TCPIP$IP6RTRD to send and process RIPng messages.

At startup, the TCPIP$IP6RTRD process reads its configuration file for startup information.

Caution

Do not run the TCPIP$ND6HOST and TCPIP$IP6RTRD processes on the same host, since this may produce unpredictable results.

The TCPIP$IP6RTRD.CONF file contains configuration information that is read by the TCPIP$IP6RTRD process at initialization time. This file contains statements that control information sent in Router Advertisements and RIPng messages.

The TCPIP$IP6RTRD.CONF file consists of structured information for each interface in the following format:



       interface interface-name {
          # interface keyword-value pairs, one per line
          Prefix prefix/length {
              # prefix keyword-value pairs, one per line
          }
       }

Comments begin with the pound sign (#) and continue to the end of the line.

B.2.2.1 Interface Keyword Information

Table B-1 lists the interface keywords and range of accepted values described in RFC 2461.

Table B-1 RFC 2461 Interface Keywords and Values
Keyword Values Default
AdvSendAdvertisements YES/NO YES
MaxRtrAdvInterval 4--1800 seconds 600
MinRtrAdvInterval 3--(0.75 * MaxRtrAdvInterval) 200
AdvManagedFlag 0/1 0
AdvOtherConfigFlag 0/1 0
AdvLinkMTU Nonnegative integer 0
AdvReachableTime 0--3,600,000 milliseconds 0
AdvRetransTimer Nonnegative integer 0
AdvDefaultLifetime 0, or MaxRtrAdvInterval - 9000 seconds 1800

In addition, the following interface keywords are accepted:

  • AdvCurHopLimit
    The value to be placed in the Cur Hop Limit field in the Router Advertisement messages sent by the router. The value 0 means unspecified (by this router). Valid values are any nonnegative integer. The default is 0.
  • AdvSendLinkLayerAddress
    Sends the interface link-layer address option in outgoing router advertisements. Valid values are YES and NO. The default is YES.
  • ripng
    Enables (YES) or disables (NO) participation in RIPng on the interface. If enabled, RIPng updates are sent on the interface, and received RIPng updates are processed as defined in RFC 2080. You cannot specify YES for automatic tunnels (the tun0 interface). The default is YES (except for tun0).
  • SplitHorizon
    Enables (1) or disables (0) the Split Horizon algorithm as specified in RFC 2080. The default is 1.
  • PoisonReverse
    Enables (1) or disables (0) the Poisoned Reverse algorithm as specified in RFC 2080. The default is 1.

B.2.2.2 Address-Prefix Keyword Information

Each address prefix to be configured on the interface must be defined within a prefix block that begins with the keyword Prefix followed by the prefix and length (separated by a slash [/] and optionally followed by an additional address-prefix information block of keyword-value pairs).

Table B-2 lists address prefix keywords and values that are described in RFC 2461.

Table B-2 RFC 2461 Prefix Keywords
Prefix Keyword Values Default
AdvValidLifetime Integer 2592000 seconds
AdvPreferredLifetime Integer 604800 seconds
AdvOnLinkFlag 0/1 1
AdvAutonomousFlag 0/1 1

Table B-3 lists address prefix keywords and values that are described in RFC 2080.

Table B-3 RFC 2080 Prefix Keywords
Prefix Keyword Values Default
RouteMetric 1--16 (inclusive) 1
RouteTag Integer 0

In addition, you can specify the following address-prefix keywords:

  • ConfigureThisPrefix
    The TCPIP$IP6RTRD process will configure the advertised prefix on the interface if ConfigureThisPrefix is specified and set to 1, or if ConfigureThisPrefix is not specified and AdvAutonomousFlag is set to 1.
    The prefix is not autoconfigured in all other cases. Valid values are 0 and 1. The default value is the value of AdvAutonomousFlag.

For related information, see the following RFCs:

  • RFC 2461, Neighbor Discovery for IP version 6 (IPv6), Narten, T.; Nordmark, E., Simpson W. A., December 1998
  • RFC 2462, IPv6 Stateless Address Autoconfiguration, Thompson, S.; Narten, T., December 1998
  • RFC 2080, RIPng for IPv6, Malkin, G., Minnear, R., January 1997


Appendix C
Deprecated Library Functions

This appendix describes deprecated library functions that were provided in previous Early Adopter Kits (EAKs). Do not use these functions if you are developing new applications. If your existing applications use these functions, see Chapter 7 for changes you should make to your code.

The following table shows the deprecated functions and their replacements:

Deprecated Function Replacement Function
getipnodebyname getaddrinfo
getipnodebyaddr getnameinfo
freehostent freeaddrinfo

C.1 getipnodebyname Function

The getipnodebyname function has the following syntax:


#include <netdb.h>
struct hostent *getipnodebyname(
        const char *name,
        int addr_family,
        int flags,
        int *error_num );

Parameters:

  • name
    Specifies the official network node name, alias, or numeric node address (for example, an IPv4 dotted-decimal address or an IPv6 hexadecimal address).
  • addr_family
    Specifies the address family. This can be AF_INET for IPv4 addresses or AF_INET6 for IPv6 addresses.
  • flags
    Specifies the type of addresses for which to search and the types of addresses that are returned. Table C-1 describes how the processing is affected by the values of the af parameter and commonly used flag values.
  • error_num
    Specifies an error return code value if the function is not successful.

Description

The getipnodebyname() routine is an evolution of the gethostbyname() routine that enables name lookups in address families other than AF_INET.

The getipnodebyname() routine returns a pointer to a structure of type hostent . Its members specify data obtained from the local TCPIP$ETC:IPNODES.DAT file, TCPIP$HOSTS.DAT file or from one of the files distributed by DNS/BIND.

If multiple addresses are found, the h_addr_list field in the hostent structure contains the addresses.

The <netdb.h> header file defines the hostent structure.

If you are using DNS/BIND, the information is obtained from a name server as configured. When the name server is not running, the getipnodebyname() routine searches both the local TCPIP$ETC:IPNODES.DAT name file for IPv6 and IPv4 addresses and the hosts name file for IPv4 addresses, if the addresses not are found in the TCPIP$ETC:IPNODES.DAT file.

Table C-1 lists the flags parameters and how the processing is affected by the value of the af parameters.

Table C-1 Node Name to Address Processing
Flag Value af Value is AF_NET af Value is AF_INET6
0 Searches for A records.

If found, returns IPv4 addresses (h_length=4).

If not, returns a NULL pointer.

Provides backward compatibility for existing IPv4 applications.

Searches for AAAA records.

If found, returns IPv6 records (h_length=16).

If not, returns a NULL pointer.

AI_V4MAPPED Ignored. Searches for AAAA records.

If found, returns IPv6 records (h_length=16).

If not, searches for A records.

If A records are found, returns IPv4-mapped IPv6 addresses (h_length=16).

If no A records are found, returns a NULL pointer.

AI_ALL | AI_V4MAPPED Ignored. Searches for AAAA records.

If found, returns IPv6 addresses (h_length=16). Then searches for A records.

If A records are found, returns IPv4-mapped IPv6 addresses (h_length=16).

If no A records are found, returns a NULL pointer.

All flags can be used in any combination to achieve finer control of the translation process. The AI_ADDRCONFIG flag is typically used in combination with other flags to modify the search based on the source address or addresses configured on the system. Table C-2 describes how the AI_ADDRCONFIG flag works by itself.

Table C-2 AI_ADDRCONFIG Flag
Flag Value af Value is AF_NET af Value is AF_INET6
AI_ADDRCONFIG Searches for A records only if an IPv4 source address is configured on the system. Searches for AAAA records only if an IPv6 source address is configured on the system.

Searches for A records only if an IPv4 source address is configured on the system.

Most applications will use a combination of the AI_ADDRCONFIG and AI_V4MAPPED flags to control their search. To simplify this for the programmer, the AI_DEFAULT symbol, which is a logical OR of AI_ADDRCONFIG and AI_V4MAPPED, is defined. Table C-3 describes how AI_DEFAULT directs the search.

Table C-3 AI_DEFAULT Flag
Flag Value af Value is AF_NET af Value is AF_INET6
AI_DEFAULT Searches for A records only if an IPv4 source address is configured on the system.

If found, returns IPv4 addresses (h_length=4).

If not, returns a NULL pointer.

Searches for AAAA records only if an IPv6 source address is configured on the system.

If found, returns IPv6 records (h_length=16).

If not found and if an IPv4 address is configured on the system, searches for A records.

If A records are found, returns IPv4-mapped IPv6 addresses (h_length=16).

If no A records are found, returns a NULL pointer.

The hostent structure returned by the getipnodebyname function is dynamically allocated. You should free this structure and dynamic storage by using the freehostent function (see Section C.3).

Errors

If the getipnodebyname() routine call fails, error_num is set to one of the following values:

  • HOST_NOT_FOUND
    The name you have used is not an official node name or alias; another type of name server request may be successful.
  • NO_ADDRESS
    The server recognized the request and the name, but no address is available for the name. Another type of name server request may be successful.
  • NO_RECOVERY
    An unexpected server failure occurred. This is a nonrecoverable error.
  • TRY_AGAIN
    A transient error occurred, for example, the server did not respond. A retry at some later time may be successful.


Previous Next Contents