Configure TCP/IP on Your AIX System
Summary:
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
Configuring
TCP/IP is easiest when you use SMIT. On the command line, type the following fast
path:
smitty mktcpip
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, type the following on the
command line:
Wsm
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, type:
smitty configtcp
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#
|
The
# sign
represents the number of the device or interface you intend to use.
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.
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 passive mode, a host looks for an
alternate gateway when normal TCP or ARP requests notice the gateway is not
responding. Passive mode provides a ″best
effort″
service and requires very little overhead,
but there may be a lag of several minutes before a dead gateway is noticed.
·
In active mode, the host periodically
pings the gateways. If a gateway fails to
respond to several consecutive pings, the
host chooses an alternate gateway. Active mode incurs added overhead, but
maintains high availability for your network.
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.
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.
Configuration, Status, and
Troubleshooting Commands
|
|
lsdev -Cc adapter and
|
List system adapters and IP interfaces
|
lsdev -Cc if
|
|
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,
|
Remote user access files
|
/etc/rhosts, and /etc/hosts.lpd
|
No comments:
Post a Comment