How to Easily Configure TCP/IP on Your AIX System


Contents

About this document
    Related documentation
Prerequisites
Procedure
Further configuration
Gateways
Useful TCP/IP references

About this document

This document describes how to configure TCP/IP on your AIX system. With AIX, you can configure your TCP/IP network with a single command, mktcpip. On other systems, setting up TCP/IP might involve creating and editing multiple files, executing a number of commands, setting various variables, locating values for persistence after reboot, and starting several daemons. The mktcpip command completes all the necessary TCP/IP configuration tasks for a typical system. The process is even easier when you use the System Management Interface Tool (SMIT) to prompt you for all necessary parameters to configure your network.

After you gather the prerequisite information, you can run the mktcpip command three ways: by using SMIT, the command line, or the Web-based System Manager.

Related documentation

AIX and related product documentation is also available:
http://www.rs6000.ibm.com/resource/aix_resource/Pubs/index.html


Prerequisites

Gather your network configuration information:


Procedure

Configuring TCP/IP is easiest when you use SMIT. On the command line, enter the following fast path:

        smitty mktcpip

A dialog box requests which type of interface you plan to use. Then, SMIT builds a screen that lists each required value. After you fill in the fields with the network information that you have collected, the tool runs the mktcpip command in the background and makes the network available. Your task is finished.

If you prefer the command line approach, you can specify all the necessary parameters in a single instruction, as shown in the following example:

        mktcpip -h server1 -a 10.47.1.3 -m 255.255.0.0 -i en0 \
        -n 9.3.240.2 -d itsc.austin.ibm.com -g 9.3.240.1 -s -C 0 -A no

If you prefer a more graphical interface, you can use the Web-based System Manager tool to complete this task. This tool uses icons, windows, and wizards to guide you through the configuration. To start this interface, enter the following on the command line:

        wsm

No matter which method you choose, online help is available to assist you. For example, to access online help within SMIT, use the F1 key.

If you want to further configure your network, for example, if you want to select more than one interface type, SMIT has an easy interface for that, too. On the command line, enter:

smitty configtcp

Further configuration

Customizing your TCP/IP configuration beyond the minimal configuration is easily done through SMIT, the command line, or the Web-based System Manager. SMIT menus guide you through such tasks as:

Naming conventions for your network devices and interfaces

When you install AIX, it automatically detects each adapter card and installs the corresponding interface software. AIX uses the following naming convention for network devices and interfaces:

Device Type                                                            Device Name                Interface Name

Asynchronous Transfer Mode (ATM)                         atm#                               at#

Ethernet (IEEE 802.3)                                                ent#                                et#

Ethernet (Standard, Version 2)                                    ent#                                en#

Fiber Distributed Data Interface (FDDI)                     fddi#                                fi#

Loopback                                                                  N/A                                 lo#

Token-ring                                                                 tok#                                 tr#

Name services

If you use name services, you can provide the minimal information needed through the mktcpip command. Typically, the /etc/resolv.conf file stores your domain name and name server IP address. The mktcpip command creates or updates the /etc/resolv.conf file for you. By default, the resolver routines on hosts running TCP/IP use the following lookup sequence:

  1. Domain Name Server (DNS)
  2. Network Information Service (NIS or NIS+), if active
  3. Local /etc/hosts file

But you can override the default lookup by editing the /etc/netsvc.conf file. (See the AIX Files Reference for details.) Also, you can set the NSORDER environment variable to override the host settings in the /etc/netsvc.conf file.


Gateways

A machine can communicate to the network through a gateway. A gateway contains the addressing and routing information for each host on its network, and can use routing daemons to broadcast routing information to, and receive routing information from, other gateways. TCP/IP routes information to the appropriate computer on the network using address information carried in a packet or stream of information.

AIX version 5.0 allows a host to discover if one of its gateways is down (called dead gateway detection) and, if so, choose a backup gateway, if one has been configured. Dead gateway detection can be passive (the default) or active.

In either mode, the host chooses the alternate gateway with the lowest associated cost value. You determine the cost value, using any criteria you wish, when configuring TCP/IP. The value can be any number from 0 (the default) to 2147482647.

Flags for the mktcpip command

The mktcpip command can do much more than minimal TCP/IP configuration. The following table defines all the flags available for the mktcpip command.

-A yes/no
Active dead gateway detection (AIX Version 5.0 and later), if set to no (the default), dead gateway detection remains in passive mode.

-a Address
Sets the Internet address of the host. Specify the address in dotted decimal notation. Each network interface on the host should have a unique Internet address. The following is the standard format for setting the Internet address:
127.10.31.2
-C number
Specifies the cost of using the selected interface type. This value affects which alternate gateway is chosen when dead gateway detection (AIX Version 5.0 and later) determines the current gateway is down. The value can be any number from 0 (the default) to 2147482647.

-c Subchannel
Specifies the subchannel address for a System/370 channel adapter.

-D Destination
Sets the destination address for a static route. Specify the address in dotted decimal notation. The following is the standard format for setting the destination address for a static route:
192.9.52.1
-d Domain
Specifies the domain name of the name server the host should use for name resolution, if any. The domain name should be in the following format:
subdomain.subdomain.rootdomain
-g Gateway
Sets the gateway address for a static route. Specify the address in dotted decimal notation. The following is the standard format for setting the gateway address for a static route:
192.9.52.0
-h Hostname
Sets the name of the host. If using a domain naming system, the domain and any subdomains must be specified. The following is the standard format for setting the host name:
hostname

The following is the standard format for setting the host name in a domain naming system:

hostname.subdomain.subdomain.rootdomain
-i Interface
Specifies a particular network interface, for example:
tr0
-m SubnetMask
Specifies the mask that the gateway should use in determining the appropriate subnetwork for routing. The subnet mask is a set of 4 bytes, as in the Internet address. The subnet mask consists of high bits (1s) corresponding to the bit positions of the network and subnetwork address, and low bits (0s) corresponding to the bit positions of the host address.

-n NameserverAddress
Specifies the Internet address of the name server that the host uses for name resolution, if applicable. The address should be entered in dotted decimal notation, for example:
127.1.0.1
-r RingSpeed
Specifies the ring speed for a token-ring adapter. Valid values for the RingSpeed variable are either 4- or 16-Mbps.

-S Interface
Retrieves information for System Management Interface Tool (SMIT) display.
-s
Starts the TCP/IP daemons.

-t CableType
Specifies cable size for Standard Ethernet or IEEE 802.3 Ethernet networks. Valid values for the CableType variable are dix for thick cable, bnc for thin cable, or N/A for Not Applicable. The -t CableType flag should be used only for Standard Ethernet (en) and IEEE 802.3 Ethernet (et) interfaces.

TCP/IP subsystems

The mktcpip command runs a shell script called rc.tcpip to start the TCP/IP daemons for your configuration. The script contains start stanzas for the following daemons:

autoconf6, ndpd-host
Internet Protocol version 6 (IPv6)
dhcpcd, dhcprd, dhrcpsd
Dynamic Host Control Protocol (DHCP) daemons
inetd
Internet daemon that starts related services such as telnet and ftp
lpd
Print server daemon
mrouted
Multicast routing daemon
named
Domain name server in a domain network
portmap
Port lookup facility used for remote procedure calls (RPCs)
routed or gated
Dynamic routing (both daemons cannot run simultaneously)
rwhod
Remote uptime and users daemon
sendmail
Mail transfer agent
snmpd, dpid2
Simple network management protocol (SNMP) daemons
syslog
Log server for standard UNIX error logs
timed, xntpd
Time synchronization daemons

By default, the script starts the syslogd, portmap, inetd, lpd, and sendmail daemons and puts their entries into the /etc/inittab file so the subsystems begin automatically after every reboot. To automatically start any of the other listed daemons, simply uncomment their corresponding lines in the rc.tcpip file. You can add start stanzas for other daemons, too.


Useful TCP/IP references

Configuration, status, and troubleshooting commands

lsdev -Cc adapter and lsdev -Cc if
List system adapters and IP interfaces
netstat -in
Show status of IP interfaces with numeric addresses
netstat -rn
Show status of TCP/IP routes with numeric addresses
arp -a
Display local ARP cache
no -a and no -o
Display/set kernel variable values, such as ipforwarding
ifconfig and route
Display status and configure temporarily
mkdev (chdev, rmdev, etc.) and SMIT
Configure permanently
lsattr -El
Display ODM database attributes for the specified interface or adapter
nslookup
Troubleshoot DNS
host
Resolve host name to IP address and vice versa
hostname
Display current local host name

System files

/etc/hosts
Local hosts table
/etc/rc.*
Scripts for TCP/IP, NFS, and so forth
/etc/resolv.conf
Name resolver
/etc/netsvc.conf
Name resolution order
/usr/sample/tcpip/named.*
Sample files that can be copied and edited
/etc/named.*
DNS resolution files
/etc/hosts.equiv, /etc/rhosts, and /etc/hosts.lpd
Remote user access files


[ Doc Ref: 98199831211382     Publish Date: Apr. 06, 2001     4FAX Ref: 1042 ]