AIX 5L Configuring TCP/IP (Unit 02): Configuring TCP/IP

Unit Objectives
———————–
Configure TCP/IP
Test and review TCP/IP configuration with selected AIX and TCP/IP commands
Start and stop TCP/IP services
Login to a remote system
Transfer files to/from a remote system

TCP/IP Software Support
————————————-
Base operating system must be installed
box.net is the network package which will install
– Asynchronous Terminal Emulator (bos.net.ate)
– PPP (box.net.ppp)
– CacheFS (bos.net.nfs.cachefs)
– IP Security (bos.net.ipsec.rte)
– NCS (bos.net.ncs)
– NFS Client (bos.net.nfs.client)
– NFS Development Toolkit (bos.net.nfs.adt)
– NFS Server (bos.net.nfs.server)
– NIS Client (bos.net.nis.client)
– NIS Server (bos.net.nis.server)
– TCP/IP Application Toolkit (bos.net.tcp.adt)
– TCP/IP Client Support (bos.net.tcp.client)
– TCP/IP Server (bos.net.tcp.server)
– TCP/IP SMIT (bos.net.tcp.smit)
– UNIX to UNIX copy program (bos.net.uucp)

TCP/IP Customization Steps
——————————————
Define/configure adapters
Define/configure network interfaces
Set the hostid and hostname
Define name resolution information
Define routing information
Enable server services (daemons)

Configuring Adapters
——————————-
Most adpaters will be automatically detected and defined during system startup. (Run cfgmgr to find new devices)

Manually Configure if necessary using the SMIT “Devices” menu, “Communications” submenu for:

Ethernet – (check connector)
TokenRing – (check speed)
3270 Connection
Serial Optical Link
5085/86/88 Attachment
Etherchannel
VLAN

Network Interfaces
—————————-
Each network adapter has an associated network interface
Adapter Interface
Prefix Prefix Description
———— ———— ———————————————-
ent en Ethernet
et IEEE 802.3
tok tr Token-Ring
sx25a xs X.25
tty sl Serial Line Internet Protocol (SLIP)
tty pp Point-to-Point Protocol (PPP)
ops so Serial Optical
atm at Asynchronous Transfer Mode
fddi fi FDDI
— lo Loopback
css css SP Switch
vi Virtual IP Address

Ehternet Network Interface
—————————————
1. Standard Ethernet Version 2 (en0)
DA SA TYPE DATA

2. IEEE 802.3 (et0)
DA SA LENGTH DATA

SA = Source Address
DA = Destination Address
TYPE = TCP/IP, DECnet, XNS

Defining and Configuring Network Interfaces
—————————————————————-
AIX – ODM Database, Kernel Services
Most interfaces will already be defined during automatic system configuration
Use SMIT “Minimum Configuration and Startup” dialog to configure the first interface
Use SMIT “Network Interfaces” menu “Further Configuration” to change interfaces or add additional interfaces
To manually configure interfaces, use ifconfig

ifconfig en0…… (temporary config only in memory)
/etc/rc.net (script that runs at bootup time)

Note: You can code the commands manually in the /etc/rc.net script or you can put it in the ODM database and let AIX issue the commands automatically. But don’t mix the methods because the /etc/rc.net may override the ODM settings. Instead of using the chdev commands with all of the options, use the SMIT command to configure as described above.

Miniumum Configuration and Startup
——————————————————
# smit mktcpip
Updates the /etc/hosts file with the hostname and ip address
# hostname – gives you the hostname of the system (don’t change the host name)

ifconfig Command
—————————-
# ifconfig en0 inet 9.19.98.1 netmask 255.255.255.0 up
A B C D E
A: Interface => en, et, tr, xs, sl, lo, op, ca
B: address family => inet, xns
C: address => IP address for adapter or hostname
D: parameter + value – metric number, mtu value, network mask
E: state parameters – alias, allcast, -allcast, arp, -arp, delete, detach, down, hwloop, -hwloop, debug, -debug, up

delete – removes it from the kernel
detach – close interface between en0 to ent0 (deletes configuration attributes)
down – makes it unavailable but keeps configuration data

ifconfig en0 (displays the current configuration of en0)

Host Name
——————
Used by some applications to identify or authenticate your system
– Hostname set when TCP/IP is configured using SMIT by running the hostname command

To display the hostname:
# hostname
aixserv

To change the hostname until next system reboot:
# hostname sys1
# hostname
sys1

Use SMIT for permanent change

/etc/hosts (Name resolution)
——————————————
# Internet Address Hostname #Comments
127.0.0.1 loopback localhost
192.9.200.1 host1 timeserver

loopback – primary translation
localhost – alias translation

Note: Can change manually using vi or through SMIT screens.

Starting Daemons
—————————
The /etc/rc.tcpip file run at system startup can start the following TCP/IP daemons:
startsrc -s inetd
stopsrc -s inetd

syslogd – Logs error messages
portmap – Port lookup facility
inetd – Super daemon
named – Domain nameserver
lpd – Print server
routed or gated – Dynamic routing
sendmail – Mail
timed, xntpd – Time daemons
rwhod – Remote uptime and users
snmpd, dpid2 – SNMP daemons
dhcpcd, dhcprd, dhcpsd – DHCP daemons
autoconf6, ndpd-host – IPv6 daemons
mrouted – Multicast routing

/etc/inetd.conf
———————–
The inet daemon is used to launch other daemons.
Must have a telnet daemon running for each telnet user session.

The inetd daemon listens for requests coming in for services and launches the deamon
When changes are made to the /etc/inetd.conf file you can get the inetd daemon to reread the file using:
stopsrc, startsrc or
refresh -s inetd

TCP/IP Startup Flow
——————————
1. system powered on
2. cfgmgr – ODM /etc/objrepos/Config_Rules, /etc/rc.net, (ifconfig, hostname, route)
3. /etc/inittab
4. run-tine Init – rctcpip:/etc/rc.tcpip (selected daemons started, syslogd, lpd, routed or gated, sendmail, portmap, inetd)
5. system ready or login

netstat Command
—————————
# netstat -i (Shows network status – symbolic) (-in = numeric not symbolic)
Two lines for each device
– Hardware Address
– IP Address

ping Command
————————
Indicates if a remote host can be reached
# ping 128.2.3.1 -c 3 (3 echo requests)

ping own adapter, network, gateway etc

host Command
———————-
Resolves a host name into an Internet address or vice versa
# host sys3
# host 128.2.3.4

arp Command
———————
Display and modify address resolution
# arp sys2 – displays the hardware address for the machine

telnet Command
————————-
Provides login to a remote host
# telnet sys2

ftp Command
———————
Uses File Transfer Protocol (FTP)
Transfers files between:
-local host
– remote host
Interactive
– Uses subcommands
Has macro definition and auto login support

ftp sys2
put file1 (default ascii conversion of file, not good for binary files – first change to binary mode using the binary command in ftp)
get file2
close
quit
? – ftp help

Unit Summary
———————
1. Only one SMIT screen is required to configure TCP/IP – Minimum Configuration and Startup
2. Several files are used by TCP/IP – /etc/rc.net,
/etc/rc.tcpip, /etc/services, /etc/inetd.conf, /etc/hosts
3. ifconfig, hostname, ping, netstat, arp, host are commands used in configuring or testing TCP/IP
4. TCP/IP services can be controlled using the System Resource Manager commands
5. telnet can be used to login to a remote system
6. ftp can be used to transfer files to/from a remote system

Lab Exercises
———————-
# whoami
root
Look at Adapters
# smitty
Devices, Communications, Ethernet Adapter, Information, Show
ent0

Change configuration of the adapter
# smitty tcpip

View the network status
netstat -i (displays the hostname)
netstat -in (displays the ip address)

smitty hosts (change the /etc/hosts file entries)
. ./.profile (re-runs the .profile)

smitty tcpip (

ping SAPSbx

Check name resolution
host SAPSbx
host 128.2.3.61

Change the prompt in the .profile file
su – tcp1 (change to the tcp1 user) or
vi /home/tcp1/.profile

vi .profile
export PS1=”$(hostname) > ”
. ./.profile (re-run the .profile

Refer the to actual exercise for all of the steps.

Leave a Reply

Your email address will not be published. Required fields are marked *

*