Network PDF
Network PDF
Network PDF
Network management
IBM
Note
Before using this information and the product it supports, read the information in “Notices” on page
707.
This edition applies to AIX Version 7.3 and to all subsequent releases and modifications until otherwise indicated in new
editions.
© Copyright International Business Machines Corporation 2021.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
Contents
Network management........................................................................................... 1
What's new................................................................................................................................................... 1
Network and communication concepts.......................................................................................................1
Physical networks ..................................................................................................................................3
Network systems.................................................................................................................................... 3
Emulators................................................................................................................................................5
Common network commands................................................................................................................ 6
Mail management.........................................................................................................................................7
Mail user-agent programs...................................................................................................................... 8
Mail functions....................................................................................................................................... 10
Mail management tasks....................................................................................................................... 43
Mail aliases........................................................................................................................................... 44
Mail queue............................................................................................................................................ 46
Mail logging...........................................................................................................................................50
The sendmail Mail Filter API................................................................................................................ 53
Debug flags for sendmail..................................................................................................................... 96
Internet Message Access Protocol and Post Office Protocol..............................................................97
Mail management commands ...........................................................................................................101
Mail files and directories.................................................................................................................... 101
IMAP and POP commands................................................................................................................. 102
Transmission Control Protocol/Internet Protocol ..................................................................................102
TCP/IP terminology............................................................................................................................ 103
Planning your TCP/IP network .......................................................................................................... 104
Installation of TCP/IP.........................................................................................................................105
Configuration of TCP/IP......................................................................................................................105
Authentication and the secure rcmds............................................................................................... 107
TCP/IP customization.........................................................................................................................109
Methods for communicating with other systems and users............................................................. 111
File transfers...................................................................................................................................... 115
Printing files to a remote system....................................................................................................... 119
Printing files from a remote system...................................................................................................121
Displaying status information............................................................................................................ 121
TCP/IP protocols................................................................................................................................ 122
TCP/IP local area network adapter cards..........................................................................................159
TCP/IP network interfaces................................................................................................................. 162
TCP/IP addressing..............................................................................................................................168
TCP/IP name resolution..................................................................................................................... 173
Planning and configuring for LDAP name resolution (IBM SecureWay Directory schema)............. 185
Planning and configuring NIS_LDAP name resolution (RFC 2307 schema).....................................187
TCP/IP address and parameter assignment - Dynamic Host Configuration Protocol......................188
Dynamic Host Configuration Protocol version 6 ...............................................................................274
Preboot Execution Environment Proxy DHCP daemon .................................................................... 297
Boot Image Negotiation Layer daemon.............................................................................................334
TCP/IP daemons.................................................................................................................................368
TCP/IP routing.................................................................................................................................... 371
iii
Mobile IPv6........................................................................................................................................ 380
Virtual IP address...............................................................................................................................383
EtherChannel, IEEE 802.3ad Link Aggregation, Teaming.................................................................385
Internet Protocol over InfiniBand (IPoIB).........................................................................................406
iSCSI software initiator and software target..................................................................................... 409
Stream Control Transmission Protocol..............................................................................................415
Path MTU discovery............................................................................................................................420
TCP/IP Quality of Service................................................................................................................... 420
TCP/IP troubleshooting......................................................................................................................431
TCP/IP commands..............................................................................................................................440
File transfer commands..................................................................................................................... 443
Remote login commands................................................................................................................... 443
Status commands.............................................................................................................................. 443
Remote communication command................................................................................................... 443
Print commands................................................................................................................................. 443
TCP/IP daemons.................................................................................................................................444
Device methods..................................................................................................................................445
Request for comments.......................................................................................................................445
Basic Networking Utilities ...................................................................................................................... 445
How BNU works..................................................................................................................................446
BNU file and directory structure........................................................................................................ 446
Configuring BNU................................................................................................................................. 448
BNU maintenance.............................................................................................................................. 461
BNU path names................................................................................................................................ 464
BNU daemons.................................................................................................................................... 465
BNU security.......................................................................................................................................466
Communication between local and remote systems........................................................................468
File exchanges between local and remote systems......................................................................... 470
Command and file exchange status reports......................................................................................472
Command exchanges between local and remote systems...............................................................472
BNU troubleshooting..........................................................................................................................477
SNMP for network management............................................................................................................. 482
SNMPv3.............................................................................................................................................. 483
SNMPv1.............................................................................................................................................. 500
Network File System................................................................................................................................519
NFS services....................................................................................................................................... 520
NFS Access Control Lists support......................................................................................................521
Cache File System support................................................................................................................ 522
NFS mapped file support................................................................................................................... 523
NFS proxy serving.............................................................................................................................. 523
Types of NFS mounts......................................................................................................................... 524
NFS exporting and mounting............................................................................................................. 524
/etc/exports file..................................................................................................................................526
/etc/xtab file....................................................................................................................................... 527
/etc/nfs/hostkey file...........................................................................................................................527
/etc/nfs/local_domain file..................................................................................................................527
/etc/nfs/realm.map file...................................................................................................................... 527
/etc/nfs/princmap file........................................................................................................................ 527
/etc/nfs/security_default file............................................................................................................. 527
Remote Procedure Call Protocol........................................................................................................528
eXternal Data Representation Protocol.............................................................................................528
portmap daemon................................................................................................................................528
NFS applications and control.............................................................................................................528
NFS version 4 support........................................................................................................................531
NFS server grace period.....................................................................................................................531
NFS DIO and CIO support.................................................................................................................. 532
NFS replication and global namespace............................................................................................. 533
NFS server-client delegation............................................................................................................. 539
iv
STNFS short-term network file systems............................................................................................540
Checklist for configuring NFS.............................................................................................................541
Start the NFS daemons at system startup........................................................................................ 541
Configuring an NFS server..................................................................................................................541
Configuring an NFS client...................................................................................................................542
Identity mapping................................................................................................................................543
Exporting an NFS file system............................................................................................................. 543
Setting up a network for RPCSEC-GSS.............................................................................................. 544
Unexporting an NFS file system.........................................................................................................547
Changing an exported file system......................................................................................................547
Root user access to an exported file system.....................................................................................548
Mounting an NFS file system explicitly..............................................................................................548
Automount subsystem....................................................................................................................... 549
Establishing predefined NFS mounts................................................................................................ 551
Unmounting an explicitly or automatically mounted file system..................................................... 556
Removing predefined NFS mounts.................................................................................................... 556
PC-NFS............................................................................................................................................... 556
LDAP automount maps...................................................................................................................... 558
WebNFS.............................................................................................................................................. 559
Network lock manager....................................................................................................................... 559
NFS security....................................................................................................................................... 562
NFS troubleshooting.......................................................................................................................... 562
NFS files..............................................................................................................................................571
NFS commands.................................................................................................................................. 572
NFS daemons..................................................................................................................................... 572
NFS subroutines.................................................................................................................................574
SMB protocol........................................................................................................................................... 574
Server Message Block (SMB) file system.......................................................................................... 574
Server Message Block (SMB) client file system ................................................................................577
Asynchronous communications.............................................................................................................. 582
Non-POSIX line speeds......................................................................................................................583
Asynchronous adapters..................................................................................................................... 583
Asynchronous communications options........................................................................................... 584
Product selection considerations...................................................................................................... 585
Topology considerations.................................................................................................................... 588
Serial communication........................................................................................................................ 588
TTY terminal device........................................................................................................................... 594
Modems ............................................................................................................................................. 605
stty-cxma terminal options................................................................................................................625
Asynchronous Point-to-Point Protocol subsystem........................................................................... 628
Serial Line Internet Protocol..............................................................................................................631
Asynchronous Terminal Emulation....................................................................................................644
Dynamic screen utility........................................................................................................................658
Serial over Ethernet device driver......................................................................................................664
Generic data link control environment....................................................................................................668
GDLC criteria.......................................................................................................................................669
GDLC interface....................................................................................................................................669
GDLC data link controls......................................................................................................................670
GDLC interface ioctl entry point operations...................................................................................... 670
GDLC special kernel services............................................................................................................. 672
DLC device driver management......................................................................................................... 673
Communications and networks adapters reference.............................................................................. 675
PCI adapters.......................................................................................................................................675
Asynchronous adapters..................................................................................................................... 676
uDAPL (user-level Direct Access Programming Library)........................................................................ 699
uDAPL APIs supported in AIX............................................................................................................700
Vendor-specific attributes for uDAPL................................................................................................ 701
PCIe2 10 GbE RoCE Adapter support..................................................................................................... 701
v
AIX NIC + OFED RDMA.......................................................................................................................702
AIX RoCE............................................................................................................................................ 704
PCIe3 40 GbE RoCE adapter support..................................................................................................... 705
Notices..............................................................................................................707
Privacy policy considerations.................................................................................................................. 708
Trademarks.............................................................................................................................................. 709
Index................................................................................................................ 711
vi
About this document
This document provides application programmers with complete information about enabling applications
for globalization for the AIX® operating system. It also provides system administrators with complete
information about enabling networked environments for globalization for the AIX operating system.
Programmers and system administrators can use this document to gain knowledge of globalization
guidelines and principles. Topics include locales, code sets, input methods, subroutines, converters,
character mapping, culture-specific information, and the message facility.
Highlighting
The following highlighting conventions are used in this document:
Item Description
Bold Identifies commands, subroutines, keywords, files, structures, directories, and other
items whose names are predefined by the system. Also identifies graphical objects
such as buttons, labels, and icons that the user selects.
Italics Identifies parameters whose actual names or values are to be supplied by the user.
Identifies examples of specific data values, examples of text similar to what you
Monospace
might see displayed, examples of portions of program code similar to what you
might write as a programmer, messages from the system, or information you should
actually type.
Case-sensitivity in AIX
Everything in the AIX operating system is case-sensitive, which means that it distinguishes between
uppercase and lowercase letters. For example, you can use the ls command to list files. If you type LS,
the system responds that the command is not found. Likewise, FILEA, FiLea, and filea are three
distinct file names, even if they reside in the same directory. To avoid causing undesirable actions to be
performed, always ensure that you use the correct case.
ISO 9000
ISO 9000 registered quality systems were used in the development and manufacturing of this product.
December 2021
The following information is a summary of updates made to this topic collection:
• Updated information about enhancements in SMB protocol 3.0.2 in the SMB client file system topic.
Network-independent
Ensures that the data is presented to
Data Layer 6: Presentation
the applications consistently
Media-dependent
Provides reliable delivery of data across
Frames Layer 2: Data Link
the physical layer
comma14
Bits Layer 1: Physical Describes the physical media of the network
Note: While the OSI Reference Model is useful for discussing networking concepts, many networking
protocols don’t closely follow the OSI model. For example, in Transmission Control Protocol/Internet
Protocol (TCP/IP), the Application and Presentation layer functions are combined, as are the Session and
Transport layers and the Data Link and Physical layers.
Networks allow several user and application communication functions, for example:
Send electronic mail (email)
You can send a message to another user. The two users can be on the same system, different systems
in different buildings, or even in different countries. The underlying layers of software, hardware, and
the physical network, allow a user to generate, send, receive, and process messages, letters, memos,
invitations, and data files. These communications can be to or from any other user who resides on the
physical network.
Emulate another terminal or log in to another computer
Through a communications network, a computer can emulate, or mimic, another and access
information as if it were a different type of computer or terminal. Remote login capabilities provide
users with an interactive command-line interface to log in to a remote system and access the same
programs and files as if they were using the machine locally.
Transfer data
You can transfer data from one system to another. Files, directories, and entire file systems can be
migrated from one machine to another across a network, enabling remote backup of data, as well
as assuring redundancy if the machine fails. Password protection is usually provided as part of the
protocol. Often a file transfer protocol includes functions for display and control so that users with
read/write access can display, define, or delete files and directories.
Physical networks
The physical network consists of the cables (coaxial cable, twisted pair, fiber optic, and telephone lines)
that connect the different hardware residing on the network, the adapter used on computers connected to
the network (hosts), and any concentrators, repeaters, routers, or bridges used in the network.
Physical networks vary both in size and in the type of hardware used. The two common kinds of
networks are local area networks (LANs) and wide area networks (WANs). A LAN is a network where
communications are limited to a moderately sized geographic area of 1 km to 10 km (1 to 6 miles), such
as a single office building, warehouse, or campus. A WAN is a network providing data communications
capability throughout geographic areas larger than those serviced by LANs, such as across a country
or across continents. An intermediate class of networks exists also, called metropolitan area networks
(MANs). This guide does not generally distinguish MANs; they are grouped with WANs.
LANs commonly use Standard Ethernet, IEEE 802.3 Ethernet, or token-ring hardware for the physical
network, while WANs and asynchronous networks use communications networks provided by common
carrier companies. Operation of the physical network in both cases is usually controlled by networking
standards from organizations such as the Electronics Industry Association (EIA) or the International
Telecommunication Union (ITU).
Network systems
All network communications involve the use of hardware and software. The network communication
support is determined by the hardware and the software necessary to run that hardware and interface
with the network.
Hardware consists of the physical equipment that is connected to the physical network. Software consists
of the programs and device drivers that are associated with the operation of a particular system. The
system hardware consists of adapter or other devices that provide a path or interface between the system
Network management 3
software and the physical network. An adapter requires an I/O card slot in the system. An adapter
prepares all inbound and outbound data; performs address searches; provides drivers, receivers, and
surge protection; supports different interfaces; and in general relieves the system processor of many
communications tasks.
The following terms are used throughout the network management information:
Protocols
Protocols are sets of semantics and syntactical rules that define how information is delivered, how it is
enclosed to reach its destination safely, and what path it follows. Protocols also coordinate the flow of
messages and their acknowledgments.
Addresses
A network domain is an administrative grouping of multiple computer networks or hosts within the
same infrastructure. Domains put the data processing resources in a network under a common
control.
For example, the structure of the internet illustrates how domains define the Internet Protocol (IP)
address. The internet is an extensive network that is made up of many different smaller networks.
To facilitate routing and addressing, internet addresses are hierarchically structured in domains, with
broad categories at the top such as com for commercial users, edu for educational users, and gov
for government users. Within the com domain are many smaller domains corresponding to individual
businesses; for example, ibm. Within the ibm.com domain are even smaller domains corresponding
to the internet addresses for various locations, such as austin.ibm.com or raleigh.ibm.com. At this
level, you can identify names of hosts. A host, in this context, is any computer that is connected to
the network. Within austin.ibm.com, there might be hosts with the names hamlet and lear, which are
addressed hamlet.austin.ibm.com and lear.austin.ibm.com.
Gateways and bridges
A wide variety of networks reside on the internet that often uses different hardware and runs different
software. Gateways and bridges enable these different networks to communicate with each other.
A bridge is a functional unit that connects two LANs that possibly use the same logical link control
(LLC) procedure, such as Ethernet, but different medium access control (MAC) procedures. A gateway
has a broader range than a bridge. It operates above the link layer and, when required, converts the
interface and protocol used by one network into those used by another distinct network. Gateways
allow data transfers across the various networks that constitute the internet.
Data routing
Using domain names for addressing and gateways for translation greatly facilitates the routing of the
data that is being transferred. Routing is the assignment of a path by which a message reaches its
destination. The domain name effectively defines the message destination. In a large network like the
internet, information is routed from one communications network to the next until that information
reaches its destination. Each communications network checks the domain name and based on the
domains with which that network is familiar, routes the information on to the next logical stop. In this
way, each communications network that receives the data contributes to the routing process.
Local and remote nodes
A physical network is used by the hosts that reside on that network. Each host is a node on
the network. A node is an addressable location in a communications network that provides host-
processing services. The intercommunication of these various nodes is defined as local or remote.
Local pertains to a device, file, or system accessed directly from your system, without the use of a
communications line. Remote pertains to a device, file, or system accessed by your system over a
communications line. Local files reside on your system, while remote files reside on a file server or
at another node with which you communicate by using a physical network, for example, Ethernet,
token-ring, or phone lines.
Client and Server
A server is a computer that contains data or provides facilities to be accessed by other computers on
the network. A client is a computer that requests services or data from a server. Common server types
are file servers, which store files; name servers, which store names and addresses; and application
servers, which store programs and applications; print servers, which schedule and direct print jobs to
their destination.
Emulators
An emulator is a software application that allows your system to function as if you were using a different
terminal or printer. A terminal emulator connects to a host system to access data or applications. Some
terminal emulators provide a facility to transfer files to and from the host. Others provide an application
programming interface (API) to allow program-to-program communication and automation of host tasks.
A printer emulator allows the host either to print files on a local printer or store them in printable form to
be printed or edited later.
Item Description
telnet Allows a user to log in to a remote host by implementing the TELNET
protocol. It is different from the rlogin command in that it is a trusted
command. A trusted command is one that meets all security levels configured
on your computer. Systems that require extra security should allow only trusted
commands. Standards for trusted commands, processes, and programs are set
and maintained by the U.S. Department of Defense.
tn Performs the same function as the telnet command.
rlogin Allows a user to log in to a remote host. It is different from the telnet command
in that it is a nontrusted command and can be disabled if your system needs
extra security.
For more information about TCP/IP, see “Transmission Control Protocol/Internet Protocol ” on page 102.
Note: The bterm command emulates terminals in bidirectional (bidi) mode.
Item Description
ct Enables a user on a remote terminal, such as a 3161, to communicate with another
terminal over a telephone line. The user on the remote terminal can then log in and work
on the other terminal.
The ct command is similar to the cu command but not as flexible. For example, you
cannot issue commands on the local system while connected to a remote system through
the ct command. However, you can instruct the ct command to continue dialing until the
connection is established or to specify more than one telephone number at a time.
Network management 5
Item Description
tip Connects your terminal to a remote terminal and enables you to work on the remote
terminal as if logged in directly.
You can use the tip command to transfer files to and from the remote system. You can
use scripting to record the conversations you have with the tip command.
Note: You must have a login on the remote system to use the tip command.
For more information about BNU, see “Basic Networking Utilities ” on page 445.
# host system_name
If your system has the proper information, a display similar to the following
is returned:
You can then send a message to the system. The address 192.9.200.4 is
used by the system to route the mail. If your system does not have the
information, a display similar to the following is returned:
# finger system_name
finger brown@<system_name>
or
finger brown
Several applications are available to allow your system to emulate other types of terminals.
Mail management
The mail facility provides a method for exchanging electronic mail (e-mail) with users on the same system
or on multiple systems connected by a network. The mail system, the standard mail user interface, the
Internet Message Access Protocol (IMAP), and the Post Office Protocol (POP) are described here.
The mail system is an internetwork mail delivery facility that consists of a user interface, a message
routing program, and a message delivery program (or mailer). The mail system relays messages from one
user to another on the same host, between hosts, and across network boundaries. It also performs a
limited amount of message-header editing to put the message into a format that is appropriate for the
receiving host.
A mail user interface enables users to create and send messages to, and receive messages from, other
users. The mail system provides two user interfaces, mail and mhmail. The mail command is the
standard mail user interface available on all UNIX systems. The mhmail command is the Message
Handler (MH) user interface, an enhanced mail user interface designed for experienced users.
A message routing program routes messages to their destinations. The mail system message routing
program is the sendmail program, which is part of the Base Operating System (BOS) and is installed
with BOS. The sendmail program is a daemon that uses information in the /etc/mail/sendmail.cf
or /etc/mail/submit.cf configuration file, and the /etc/mail/aliases file to perform the
necessary routing.
Depending on the type of route to the destination, the sendmail command uses different mailers to
deliver messages.
Network management 7
Figure 2. Mailers used by the sendmail command
This illustration is a type of top-down organizational chart with Mail and MH at the top. Branching from
them are bellmail, BNU and SMTP. Underneath the previous level are local mailbox, UUCP link, and
TCP/IP link respectively. Beneath UUCP link is remote mailbox and under TCP/IP link is remote mailbox.
As the figure illustrates:
• To deliver local mail, the sendmail program routes messages to the bellmail program. The
bellmail program delivers all local mail by appending messages to the user's system mailbox, which
is in the /var/spool/mail directory.
• To deliver mail over a UNIX-to-UNIX Copy Program (UUCP) link, the sendmail program routes
messages using Basic Network Utilities (BNU).
• To deliver mail routed through Transmission Control Protocol/Internet Protocol (TCP/IP), the
sendmail command establishes a TCP/IP connection to the remote system then uses Simple Mail
Transfer Protocol (SMTP) to transfer the message to the remote system.
Item Description
system message Informs users the system has been updated. A system message is similar to
a broadcast message but is sent on the local network only.
secret mail Used to send classified information. A secret mail message is encrypted.
The recipient must enter a password to read it.
vacation message Informs users you are on vacation. When your system receives mail in your
absence, it sends a message back to the origin. The message states you are
on vacation. Any mail you receive while on vacation can also be forwarded.
Item Description
ali Lists mail aliases and their addresses.
anno Annotates messages.
ap Parses and reformats addresses.
burst Explodes digests into messages.
comp Starts an editor for creating or modifying a message.
dist Redistributes a message to additional addresses.
dp Parses and reformats dates.
folder Selects and lists folders and messages.
folders Lists all folders and messages in the mail directory.
forw Forwards messages.
inc Incorporates new mail into a folder.
mark Creates, modifies, and displays message sequences.
mhl Produces a formatted listing of messages.
mhmail Sends or receives mail.
mhpath Prints full path names of messages and folders.
msgchk Checks for messages.
msh Creates a mail handler (mh) shell.
next Shows the next message.
packf Compresses the contents of a folder into a file.
pick Selects messages by content and creates and modifies sequences.
Network management 9
Item Description
prev Shows the previous message.
refile Moves files between folders.
repl Replies to a message.
rmf Removes folders and the messages they contain.
rmm Removes messages from active status.
scan Produces a one-line-per-message scannable listing.
send Sends a message.
show Shows messages.
sortm Sorts messages.
vmh Starts a visual interface for use with mh commands.
whatnow Starts a prompting interface for draft disposition.
whom Manipulates mh addresses.
bellmail command
The bellmail command is the original AT&T UNIX mail command, which handles mail for users on the
same system and also for users on remote systems that can be accessed by means of Basic Network
Utilities (BNU), sometimes known as the UNIX-to-UNIX Copy Program (UUCP).
These programs support only networks of systems connected by dialup or leased point-to-point
communication lines. The command opens a shell whose subcommands allow you to:
• Take data from standard input (typed in or redirected from an existing file), add one or more addresses
(supplied as arguments to the command itself) and a timestamp, then append a copy to each
addressee's system mailbox file (/var/spool/mail/UserID).
• Read mail items from your system mailbox file.
• Append mail items to your personal mailbox file ($HOME/mbox) or to a specified file.
• Send mail using BNU to a user on another system.
• Automatically redirect all mail from your system mailbox to one on another system by adding a .forward
statement to the beginning of your system mailbox file.
However, you must have some skill as a UNIX user before you can make full use of this mail handler. For
more information, refer to the bellmail command.
Mail functions
The features of the mail program are introduced here.
The mail program enables you to receive, create, and send mail to users on a local or remote system.
Mail storage
Mail is stored in different ways, depending on the specific situation.
When mail is sent to your address, it is stored in a system directory that is specifically for mail. This
system directory contains a file for every user on the local system. This directory holds your mail until you
do something with it.
/var/spool/mail/karen
Mail folders
Folders enable you to save messages in an organized fashion. Using the mail program, you can put a
message into a folder from the system mailbox, a personal mailbox, or another folder.
Each folder is a text file. Each folder is placed in the directory you specify in your .mailrc file with
the set folder option. You must create this directory before using folders to store messages. When the
directory exists, the mail program creates the folders in that directory as needed. If you do not specify a
directory in your .mailrc file, folders are created in the current directory. See “Organizing mail” on page
17.
Note: Several programs are available to send and receive mail, including Message Handler
(MH) and the bellmail program. Which program you use depends on what is installed and
configured on your system. For information on your system configuration, contact your system
administrator.
Network management 11
Mailbox startup
Use the mail command to read and remove messages from your system mailbox.
Do not use the system mailbox to store messages. Store messages in your personal mailbox and in mail
folders.
If there is no mail in your system mailbox, the system responds with a message:
If there is mail in your mailbox, the system displays a listing of the messages in your system mailbox:
The current message is always prefixed with a greater-than symbol (>). Each one-line entry displays the
following fields:
Item Description
status Indicates the class of the message.
number Identifies the piece of mail to the mail program.
sender Identifies the address of the person who sent the mail.
date Specifies the date the message was received.
size Defines the number of lines and characters contained in the message (this includes the
header).
subject Identifies the subject of the message, if it has one.
Ite Description
m
N A new message.
P A message that will be preserved in your system mailbox.
U An unread message. This is a message that was listed in the mailbox the last time you used the
mail program, but the contents were not examined.
* A message that was saved or written to a file or folder.
A message without a status indicator is a message that has been read but has not been deleted or saved.
If there is no mail in your personal mailbox, the system responds with a message similar to the
following:
"/u/george/mbox": 0 messages
or
mail -f +dept
If there is no mail in your mail folder, the system responds with a message similar to the following:
Ranges of messages
Use the h subcommand to view a message contained within a list of messages that you determine so that
you do not have to browse through all your messages.
At your mailbox prompt, you can use the h subcommand in the ways shown in the following examples:
Item Description
h Approximately 20 messages are displayed at a time. The actual number displayed is determined
by the type of terminal being used and the set screen option in your .mailrc file. If you enter
the h subcommand again, the same range of messages is displayed.
h 21 Message 21 and subsequent messages, up to and including message 40 (if you have that
number of messages in your mailbox), are displayed. Continue typing the h subcommand with
the subsequent message number until all messages have been displayed.
h1 To return to the first group of 20 messages, enter any number within the range of 1-20.
Mailbox scrolling
Use the z subcommand to scroll through your mailbox.
At your mailbox prompt, you can use the z subcommand in the ways shown in the following examples:
Ite Description
m
z Approximately 20 messages are displayed at a time. The actual number displayed is determined
by the type of terminal being used and the set screen option in your .mailrc file. enter the z
subcommand again to scroll to the next 20 messages.
Network management 13
Ite Description
m
z + The plus sign (+) argument scrolls to the next 20 messages. Message 21 and subsequent
messages, up to and including message 40 (if you have that number of messages in your mailbox),
are displayed. Continue typing the z+ subcommand until all messages have been displayed. The
system will respond with the following message:
z The minus sign (-) argument scrolls to the previous 20 messages. When you reach the first set of
- messages, the system will respond with the following message:
Item Description
f Displays header information for the current message.
f 1 4 7 Displays header information for the specific messages 1, 4, and 7.
f 1-10 Displays header information for a range of messages 1 through 10.
f * Displays all messages.
f ron Messages, if any, from user ron are displayed. The characters entered for an address do
not need to exactly match the address; therefore, the request for address ron in either
uppercase or lowercase letters matches all of the following addresses:
RoN
ron@topdog
hron
rOn
fmeet Messages, if any, where the Subject: field contains the letters meet are displayed. The
characters entered for a pattern do not need to exactly match the Subject: field. They must
only be contained in the Subject: field in either uppercase or lowercase letters; therefore,
the request for subject meet matches all of the following subjects:
Meeting on Thursday
Come to meeting tomorrow
MEET ME IN ST. LOUIS
Ite Description
m
= The current message number is displayed.
"/u/lance/mbox": 29 messages.
Item Description
3 If you use the number of the message, by default, the text of the message is displayed.
t If you use the t subcommand, by default, the text of the current message is displayed.
t3 The text of message 3 is displayed.
t2 4 9 The text for messages 2, 4, and 9 is displayed.
t 2-4 The text for the range of messages 2 through 4 is displayed.
t If you use the p subcommand, by default, the text of the current message is displayed.
p3 The text of message 3 is displayed.
p2 4 9 The text for messages 2, 4, and 9 is displayed.
p 2-4 The text for the range of messages 2 through 4 is displayed.
Item Description
n or + Displays the text of the next message, and this message becomes the current message.
You can also press the Enter key to display the text of the next message.
Ite Description
m
- The text of the previous message is displayed.
Network management 15
Deleting mail
When deleting a message, you can delete the current message, delete a specific message, or delete a
range of messages.
You can also delete the current message and display the next message by combining subcommands.
Ensure that the following conditions are met:
1. The mail program must be installed on your system.
2. There must be mail in your system mailbox.
3. The mail program must be started.
Deleting messages
Use various forms of the d subcommand to delete messages.
At your mailbox prompt, you can use the (d)elete subcommand in the ways shown in the following
examples:
Item Description
d The current message is deleted.
dp or dt The current message is deleted and the next message is displayed. This also can be
accomplished by including the set autoprint option in the .mailrc file, which will set
the d subcommand to function like the dp or dt subcommand combination.
d4 Deletes the specific message 4.
d 4-6 Deletes a range of messages 4 through 6.
d 2 6 8 Deletes messages 2, 6, and 8.
Undeleting messages
Use the u subcommand for undeleting messages.
At your mailbox prompt, you can use the u subcommand in the ways shown in the following examples:
Item Description
u The current message is undeleted.
u4 Undeletes the specific message 4.
u 4-6 Undeletes a range of messages 4 through 6.
u2 6 8 Undeletes messages 2, 6, and 8.
Exiting mail
Ensure that the following requirements are met before exiting the mail program.
1. The mail program must be installed on your system.
2. There must be mail in your system mailbox.
3. The mail program must be started.
Item Description
q When using the q subcommand in your personal mailbox or a mail folder, messages read
and not read will remain in your personal mailbox or in a mail folder until acted upon.
Item Description
x or ex The x or ex subcommand allows you to leave the mailbox and return to the operating
system without changing the original contents of the mailbox. The program ignores any
requests you made prior to the x request; however, if you did save a message to another
folder, the save will occur.
Organizing mail
Use folders to save messages in an organized fashion.
You can create as many folders as you need. Give each folder a name that pertains to the subject matter
of the messages it contains, similar to file folders in an office filing system. Each folder is a text file that
is placed in the directory you specify in your .mailrc file with the set folder option. You must create
this directory before using folders to store messages. When the directory exists, the mail program creates
the folders in that directory as needed. If you do not specify a directory with the set folder option in
your .mailrc file, the folder is created in your current directory. Using the mail program, you can put a
message into a folder from the system mailbox, a personal mailbox, or another folder.
You can add the contents of a message to a file or folder using the s or w subcommands. Both of these
subcommands append information to an existing file or create a new file if it does not exist. Information
currently in the file is not destroyed. If you save a message from your system mailbox to a file or folder,
the message is deleted from your system mailbox and transferred to the file or folder specified. If you
save a message from your personal mailbox or folder to another file or folder, the message is not deleted
from your personal mailbox but is copied to the specified file or folder. When using the s subcommand,
you can read the folder like a mailbox because the messages and the header information are appended
at the end of the folder. When using the w subcommand, you can read the folder like a file because the
message is appended without header information at the end of the file.
Before organizing mail, ensure that the following requirements are met:
1. The mail program must be installed on your system.
2. There must be mail in your system mailbox, personal mailbox, or a folder you have defined.
3. The mail program must be started.
set
Network management 17
The set subcommand displays a list of the enabled mail options in your .mailrc file.
If the set folder option has been enabled, the system responds with a message similar to the
following:
folder /home/george/letters
In this example, letters is the directory in which mail folders will be stored.
2. If the set folder option has not been enabled, add a line similar to the following in the .mailrc
file:
set folder=/home/george/letters
In this example, /home/george is George's home directory and letters is the directory in which
mail folders will be stored. The set folder option enables you to use the plus sign (+) shorthand
notation at your mailbox prompt to save messages in your letters directory.
3. You must create a letters directory in your home directory. In your home directory at the system
command line prompt, type:
mkdir letters
Item Description
s 1-4 notes Saves messages 1, 2, 3 and 4 with their header information to a folder called
notes in the current directory.
The mail program responds with the following message:
s +admin Saves the current message to an existing folder called admin in your folder
directory.
If the folder directory is defined as /home/george/letters in your .mailrc file,
the system responds with:
s 6 +admin Saves message 6 to an existing folder called admin in your folder directory.
If the folder directory is defined as /home/george/letters in your .mailrc file,
the system responds with:
If the pass file exists, the system responds with the following message:
w 1-3 safety Saves only the text of the specific messages 1, 2, and 3 to a file called
safety in the current directory.
The text of the messages in this example will be appended one after the
other into one file. If the safety file does not already exist, the system
responds with the following message:
Item Description
folder Finds the name of your current mailbox or folder.
If the current mailbox is /home/lance/mbox, the following is displayed:
This message indicates that /home/lance/mbox is the current mailbox you are in, it
contains two messages, and one of those messages will be deleted when you finish
with this mailbox.
Item Description
folder +project After the mail program is started with one mailbox, use the file or
folder subcommands to change to another mailbox.
If you change from the mbox file to the mbox folder and you have
deleted all the messages in the mbox file, the mail program displays:
/home/dee/mbox removed
+project: 2 messages 2 new
Network management 19
Creating and sending mail
You can use the mail program to create, send, reply, and forward messages to other users or to send
ASCII files to other users.
An ASCII file might, for example, be a document you have written using a preferred editor or a source file
for a program.
You can send messages and files to a user on your local system, on your network, or to a user on another
connected network. The recipient does not need to be logged on to the system when you send the
information. Mail is sent to a user's address.
Addressing mail
Mail is sent to a user's address. The address, containing the login name and system name, directs the
delivery of the mail message.
Generally, to send a message to another user, you must enter the mail command and the address as
follows:
mail User@Address
The format of the Address parameter depends upon the location of the recipient. The concept is similar
to how you might address a note to a fellow worker in an office. To send a note to Ryan, who works in a
small department of six to eight people, you might write the name on an envelope and put it in the office
mail system. However, if Ryan is in another department, you might have to provide more information on
the envelope:
Ryan
Payroll
If Ryan is in another geographic location, you might need even more information to ensure that the
message reaches him:
Ryan
Payroll
Gaithersburg
mail LoginName
Item Description
mail ryan If Ryan is on your system and has the login name ryan, this command activates the mail
program, enables you to create a message, and tries to send the message to a local login
name of ryan. If the message is delivered successfully, you receive no notification. If
Ryan is not on your system, the mail system immediately returns an error message and
returns the unsent message to your system mailbox.
Item Description
mail LoginName@SystemName For example, if Ryan is on system zeus, use the following
command to create and send a message to him:
mail ryan@zeus
Note: To send a message through a local network to a user on another system, you must
know the login name and the name of the other system. For more information about displaying
information that identifies users, see “Common network commands” on page 6.
mail LoginName@SystemName
If the networks use a central database of names, you do not need any additional information to send
mail to users on the connected networks. Use the same addressing format as for users on your local
network.
This type of addressing works well when the nature of the network allows a central database of names
to be maintained.
• If your network uses domain name addressing, use the mail command shown in the following example:
mail LoginName@SystemName.DomainName
Network management 21
For networks that span large, unrelated networks in widespread locations, a central database of names
is not possible. The DomainName parameter defines the remote network, relative to your local network,
within the defined structure for the larger group of interconnected networks.
For example, if you enter the following command:
mail kelly@merlin.odin.valryanl
your mail is sent to user kelly on the system merlin, which is on a local network named odin that is
connected to a second network whose domain is called valryanl.
Item Description
mail UUCPRoute!LoginName If your local computer has a BNU or UUCP connection
that can be used to reach the remote system, use the
format in this example to address a message. The variable
LoginName is the login name on the remote system for
the message recipient. The variable UUCPRoute describes
the physical route the message must follow along the
UUCP network. If your system is connected to the remote
system without any intermediate UUCP systems between,
this variable is the name of the remote system.
mailarthur!lancelot!merlin!ken If your message must travel through one or more
intermediate UUCP systems before reaching the desired
remote system, this variable is a list of each of the
intermediate systems. The list starts with the nearest
system and proceeds to the farthest system, separated
by an exclamation mark (!). You can follow this example,
if the message must travel through systems arthur and
lancelot (in that order) before reaching merlin.
mail merlin!ken If your local system has a UUCP link to a system called
merlin and there are no other UUCP systems between
your system and merlin, you can send a message to ken
on that system.
When the BNU or UUCP Link Is on Another Computer: In a local or wide area network environment, one
of the systems on the network may have a BNU or other type of UUCP connection to a remote system. You
can use that UUCP connection to send a message to a user on that remote UUCP system. At your system
command line prompt, use the mail command as shown in the following example:
mail @arthur:merlin!ken
Sends mail to ken on UUCP system merlin from the Internet system arthur. The delimiter @ is for
the internet addressing, the delimiter ! is for the UUCP addressing, and the delimiter : connects the
Item Description
mail User@Address Issue this command from the command line prompt. The message is
addressed to User@Address. The Address parameter depends upon the
location of the recipient.
mUser@Address Issue this subcommand from the mailbox prompt. The message is addressed
to User@Address. The Address parameter depends upon the location of the
recipient.
The mail editor is also activated, if you use the R or r subcommands to reply to a message. For more
information on how to reply to a message, see “Sending mail” on page 28 and “Replying to mail” on page
29.
Message editing
While in your mailbox, you can add information to an existing message by typing the (e)dit or (v)isual
subcommand at the mailbox prompt.
While in the mail editor, you cannot change information on a line after you have pressed the Enter key
and gone on to the next line. You can change the content of your message before sending it by editing the
message with another editor.
Before editing a message in another editor, make sure the following conditions are true:
1. The mail program must be installed on your system.
2. The alternate editor must be defined in the .mailrc file with:
Network management 23
set EDITOR=PathName
This defines the editor you activate with the ~e subcommand. The value of PathName must be
the full path name to the editor program that you want to use. For example, the definition set
EDITOR=/usr/bin/vi defines the vi editor for use with the ~e subcommand.
3. To add information to a message in your mailbox, you must have started the mail command to read
mail in the system mailbox, other mailbox, or folder.
4. To start an alternate editor while creating a message, you must be in the mail editor prompt.
Item Description
e 13 To add a note to message 13 using the e editor (or whatever editor is defined in the .mailrc
file).
v 15 To add a note to message 15 using the vi editor (or whatever editor is defined in the .mailrc
file).
If you do not specify a message number, the mail command activates the editor using the current
message. When you leave the editor, you return to the mailbox prompt to continue processing the
messages in the mailbox.
Ite Description
m
~e Activates the e editor or other editor that you define in the .mailrc file.
~v Activates the vi editor or other editor that you define in the .mailrc file.
This enables you to edit the text of the current message. When you leave the different editor, you return to
the mail editor.
Ite Description
m
~p The editor displays the contents of the message including the header information for the message.
The text scrolls up from the bottom of the display. The end of the message is followed by the mail
editor's (Continue) prompt.
If the message is larger than one screen and you have not set the page size for your terminal by using
the stty command, the text scrolls off the top of the screen to the end. To look at the content of
Item Description
~q Quits the mail editor and the message is not sent. The message is saved in the dead.letter
file in your home directory, unless you have not entered any text. The system prompt is
displayed.
Ctrl-C To quit the editor using an interrupt key sequence, press the break (Ctrl-C key sequence) or
the interrupt (Alt-Pause key sequence). The following message is displayed:
The message is not sent. The message is saved in the dead.letter file in your home
directory, unless you have not entered any text. The system prompt is displayed.
Note: When you exit the mail editor without sending the message, the previous content of the
dead.letter file is replaced with the incomplete message. To retrieve the file, see “Options
for adding a file and a specific message within a message” on page 25.
Item Description
~r schedule Where schedule is the name of the file to include. In this example, the information in
the file schedule is included at the current end of the message being written.
Network management 25
Including a specific message within a message
Use the ~f or ~m subcommand to include a specific message within your message.
At the beginning of a new line while in the mail editor, you can use either the ~f or ~m subcommand as
shown in the following examples:
Item Description
~f MessageList Appends the indicated message or messages to the end of the current message,
but does not indent the appended message. Also, use this subcommand to
append messages for reference whose margins are too wide to embed with the
~m subcommand.
Note: The parameter MessageList is a list of integers that refer to valid
message numbers in the mailbox or folder being handled by mail. You
can enter simple ranges of numbers also. For example:
~f 1-4
Appends messages 1, 2, 3, and 4 to the end of the message
being written. These messages are aligned with the left margin
(not indented).
~m 2 Appends the indicated message to the end of the current message. The included
message is indented one tab character from the normal left margin of the
message. In this example, message 2 is appended to the current message.
~m 1 3 Appends message 1 and then message 3 to the end of the message being
written, indented one tab from the left margin.
Adding the contents of the dead.letter file into your current message
Use the ~d subcommand to add dead.letter contents to your message.
At the beginning of a new line while in the mail editor, you can use the ~d subcommand as shown in the
following example:
Ite Description
m
~d Retrieves and appends the contents of the dead.letter file to the end of the current message. At
the (Continue) prompt, continue by adding to the message or by sending the message.
Item Description
To: Contains the address or addresses for sending the message.
Subject: Contains a short summary of the topic of the message.
Cc: Contains the address or addresses for sending copies of the message. The contents of this
field are part of the message sent to all who receive the message.
Bcc: Contains the address or addresses for sending blind copies of the message. This field is
not included as part of the message sent to all who receive the message.
Item Description
~s Fishing Trip This changes the current Subject: field:
Subject: Vacation
To the following:
Item Description
~t geo@austin mel@gtwn This changes the current To: field:
To: mark@austin
to the following:
to the following:
Bcc: mark@austin
to the following:
Note: You cannot use the ~t, ~c, or ~b subcommands to change or delete the contents of
the To:, Cc:, and Bcc: fields. Use the ~h subcommand, as described in “Editing the header
information” on page 26.
Network management 27
Message reformats in the mail editor
After typing the message and before sending it, you can reformat the message to improve its appearance
by using the fmt shell program.
Before reformatting a message, make sure the following conditions are true:
1. The mail program must be installed on your system.
2. The fmt command must be installed on your system.
At the beginning of a new line while in the mail editor, you can use the fmt command as shown in the
following example:
Item Description
~| fmt Changes the appearance of the message by re-flowing the information for each paragraph
within defined margins (a blank line must separate each paragraph). The pipe (|)
subcommand pipes the message to standard input of the command and replaces the
message with the standard output from that command.
Attention: Do not use the fmt command if the message contains embedded messages or pre-
formatted information from external files. The fmt command reformats the header information
in embedded messages and may change the format of pre-formatted information. Instead, use
the ~e or ~v subcommand to enter a full-screen editor and reformat the message.
~w checkit
2. Run the spell command using the temporary file as input. Type:
~! spell checkit
In this example, the exclamation point (!) is the subcommand that starts a shell, runs a command,
and returns to the mailbox. The spell command responds with a list of words that are not in its list
of known words, followed by an exclamation point (!) to indicate that you have returned to the mail
program.
3. Examine the list of words. Determine if you need to use an editor to make corrections.
4. Type the following to delete the temporary file:
~! rm checkit
Sending mail
Use this procedure to send a message after you have created it.
• The mail program must be installed on your system.
• You must know the name and address of the mail recipient.
1. Enter the mail command on the command line, followed by the name and address of the recipient (or
recipients) of the message. For example:
>mail jan@brown
Subject:
and press Enter. You can now type the body of the text.
3. Type your message. For example:
4. To send a message you have typed with the mail editor, press the end-of-text character, which is
usually the Ctrl-D key sequence or a period (.), while at the beginning of a new line in the message.
The system displays the Cc: field:
Cc:
5. Type the names and addresses of those users who should receive copies of the message. For example:
Note: If you do not want to send copies, press Enter without typing.
When you press the Enter key, the message is delivered to the specified address.
Note: If you enter an address unknown to the system, or not defined in an alias or distribution
list, the system responds with the login name followed by an error message: [user ID]...
User unknown.
Replying to mail
At the mailbox prompt, you can use the r and R subcommands to reply to mail as shown in the following
examples.
1. The mail program must be installed on your system.
2. There must be mail in your system mailbox.
Item Description
r Creates a new message that is addressed to the sender of the selected message and copied
to the people in the Cc: field (if any). The Subject: field of the new message refers to the
selected message. The default value of the r subcommand is the current message. This
default can be overridden by typing the message number after the r.
R Starts a reply only to the sender of the message. The default value of the R subcommand is
the current message.
R4 Starts a reply only to the sender of the message. You can override the current message
by typing the message number after the R. This example starts a reply to message 4. The
system responds with a message similar to the following:
To: karen@thor
Subject: Re: Department Meeting
I'll be there.
When you finish typing the text, press either the period (.) or the Ctrl-D key sequence to
send the message. After the reply is sent, you are returned to the mailbox prompt.
Network management 29
Creating a new message while in the mailbox
At the mailbox prompt, you can use the m subcommand as shown in the following example to create new
messages.
Item Description
m Address The Address parameter is any correct user address. This subcommand starts the mail
editor and enables you to create a new message while in the mailbox. When you send
the message, you will be returned to the mailbox prompt.
Forwarding mail
While reading your mail, you might want to forward a specific note to another user.
1. The mail program must be installed on your system.
2. If forwarding a selected message, start the mail facility with the mail command. Make a note of the
number of the mail message that you wish to forward.
This task can be accomplished by using the ~f and ~m subcommands.
If you are going to be away from your normal network address, you can have your mail sent to another
network address by creating the .forward file. See “.forward files” on page 31. The new address can
be any valid mail address on your network or a network connected to yours. It can be the address of a
coworker who will handle your messages while you are away. When you choose to forward your network
mail, you do not receive a copy of any incoming mail in your mailbox. All mail is forwarded directly to the
address or addresses that you have specified.
m User@Host
where User refers to the login name of another user, and Host is the name of the user's system. If the
user is on your system, you can omit the @Host part of the address.
2. Type a subject name at the Subject: prompt.
3. To specify the number of the mail message to be forwarded, type:
~f MessageNumber
OR
~m MessageNumber
Interpolating: 1
(continue)
4. To exit mail, type a period (.) on a blank line. At the Cc: prompt, type any additional names to whom
you wish to forward a mail message.
cd
pwd
/home/mary
.forward files
The .forward file contains the network address or addresses that will receive your forwarded network
mail.
Addresses must take the form of User@Host. User refers to the login name of another user, and Host is the
name of the user's system. If the user is on your system, you can omit the @Host part of the address. You
can use the cat command to create a .forward file as follows:
[END OF FILE] represents the end of file character, which is the Ctrl-D key sequence on most
terminals. This must be typed on a blank line.
The .forward file contains the addresses of the users you want your mail forwarded to. Your mail will be
forwarded to mark on your local system, and to joe on system saturn.
This file must contain valid addresses. If it is a null file (zero length), your mail is not forwarded and is
stored in your mailbox.
Note: You will not receive any mail until you delete the .forward file.
rm .forward
vacation -I
This creates a .vacation.dir file and a .vacation.pag file where names of the people who send
messages are kept.
2. Modify the .forward file.
For example, carl types the following statement in the .forward file:
The first carl entry is the user name to which mail is forwarded. The second carl entry is the user
name of the sender of the vacation message. The sender of the mail message receives one vacation
message from carl per week, regardless of how many messages are sent to carl from the sender. If
Network management 31
you have your mail forwarded to someone else, the mail message from the sender is forwarded to the
person defined in your .forward file.
Use the -f flag to change the frequency intervals at which the message is sent. For example, carl
types the following statement in the .forward file:
The sender of mail messages receives one vacation message from carl every ten days, regardless of
how many messages are sent to carl from the sender.
3. To send a message to each person who sends you mail, create the file $HOME/.vacation.msg and
add your message to this file.
The following is an example of a vacation message:
The sender receives the message that is in the $HOME/.vacation.msg file, or if the file does not
exist, the sender receives the default message found in the /usr/share/lib/vacation.def file. If
neither of these files exists, no automatic replies are sent to the sender of the mail message, and no
error message is generated.
To cancel the vacation message, remove the .forward file, .vacation.dir file, .vacation.pag file,
and .vacation.msg file from your $HOME (login) directory as follows:
Item Description
xsend barbara In this example, secret mail is being addressed to the login name barbara.
When you press Enter, a single line editor is used to type the text of the message.
When you are finished typing your message, press the Ctrl-D key sequence or
a period (.) to exit the mail editor and send the message. The xsend command
encrypts the message before it is sent.
The system displays the list of messages in your system mailbox. The secret mail program sends you a
notification that you have received secret mail. The message line will be similar to the following:
The message text directs you to read your secret mail on your host using the xget command.
2. At the system command line prompt, type:
xget
Item Description
To get help in the Mailbox Enter ? or help at the mailbox prompt.
The ? and help subcommands display a summary of
common mailbox subcommands.
You can display a list of all mailbox subcommands (with no
summary) by entering the (l)ist subcommand.
To get help in the Mail Editor Type ~? at the mail editor prompt.
The ~? subcommand displays a summary of common mail
editor subcommands.
To get help using manual pages Type man mail at the system command line prompt.
In this example, mail is the command name being
searched. The system will provide you with ASCII
documentation about the mail command. At the
continuation marker (:), press Enter to view the rest of the
document.
The man command provides information in ASCII form for
reference topics on commands, subroutines, and files.
Network management 33
• Number of lines displayed when reading messages. You can change the number of lines of message
headers or of message text that scroll across the screen. See “Changes to the number of message
headers or message text lines displayed in the mail program” on page 36.
• Information listed in messages. You can turn off message headers, such as the machine-set
message-id field. See “Displaying information in a message” on page 37.
• Folder directory for storing messages. You can create a special directory for storing messages. You
can use the shorthand plus sign (+) subcommand to designate that directory when storing messages or
looking at folders. See “Creating default folders to store messages” on page 39.
• Log file for recording outgoing messages. You can instruct the mail program to record all your
outgoing messages in a file or a subdirectory in your home directory. See “Creating default folders to
store messages” on page 39.
• Editors for typing messages. In addition to the mail editor, you can choose two different editors to edit
messages. See “Text editors for typing messages” on page 40.
For more information on customizing the mail program, see the following topics.
Item Description
set Enables mail options.
source Enables mail options that are stored in a file. When reading mail, you can issue this
subcommand at the mailbox prompt:
source PathName
where PathName is the path and file containing the mail commands. Commands in this
file override the previous settings of any similar commands for the duration of the current
session. You can also alter the characteristics of the current mail session by typing commands
at the mailbox prompt.
You can set these options while in the mailbox or by making entries in the .mailrc file.
ask
metoo
toplines 10
In this example, two binary options are enabled: ask and metoo. There is no askcc entry in the list.
This indicates that the askcc option is not enabled. The toplines option has been assigned the value 10.
The ask, metoo, askcc, and toplines options are described in .mailrc File Format section of the Files
Reference.
Item Description
unset Disables mail options.
unalias Deletes the specified alias names.
ignore Suppresses message header fields.
You can set these options while in the mailbox or by making entries in the .mailrc file.
Note: The form unset option is equivalent to set no option.
Item Description
set ask Subject: field prompting is enabled by editing the .mailrc file ask option.
unset ask Subject: field prompting is disabled by editing the .mailrc file ask option.
Item Description
set askcc Carbon copy (Cc:) field prompting is enabled by editing the .mailrc file askcc
option.
unset askcc Carbon copy (Cc:) field prompting is disabled by editing the .mailrc file askcc
option.
Network management 35
2. You must know the names and addresses of users you want to include in your alias or distribution list.
You can create an alias or distribution list in the following ways:
Item Description
alias kath kathleen@gtwn
In this example, the alias kath has been listed for user kathleen at address
gtwn. After you have added this line to your $HOME/.mailrc file, to send a
message to Kathleen, type the following at the command line prompt:
mail kath
You are now able to send mail to Kathleen using the kath alias.
mail dept
The message you now create and send will go to dee on system merlin, anne
on system anchor, jerry on system zeus, and to bill and carl on the local
system.
To list the aliases and distribution lists, type the following at the mailbox prompt:
alias
OR
Changes to the number of message headers or message text lines displayed in the mail
program
By changing the .mailrc file, you can customize the ability to scroll through mailbox lists or through
actual messages.
In order to make these changes, the mail program must be installed on your system.
set screen=20
In this example, the system will display 20 message headers at a time. Use either the h or z subcommand
to view additional groups of headers. You can also type this subcommand at the mailbox prompt.
EOF:
At the prompt, you can enter any valid pg subcommand. You can display previous pages, search the
message for character strings, or quit reading the message and return to the mailbox prompt.
The set crt option is entered in the .mailrc file as:
set crt=Lines
For example:
set crt=20
specifies that a message must be 20 lines before the pg command is started. The pg command is started
when you read messages with more than 20 lines.
set toplines=Lines
In this subcommand, the Lines variable is the number of lines, starting from the top and including all
header fields, that are displayed with the top subcommand.
For example, if user Amy has the following line in her .mailrc file:
set toplines=10
when Amy runs the mail command to read her new messages, the following text is displayed:
When Amy uses the top subcommand to browse through her messages, the following partial message is
displayed:
top 1
Message 1:
From george Wed Jan 6 9:47 CST 1988
Received: by zeus
id AA00549; Wed, 6 Jan 88 9:47:46 CST
Date: Wed, 6 Jan 88 9:47:46 CST
From: george@zeus
Message-Id: <8709111757.AA00178>
To: amy@zeus
Subject: Dept Meeting
Please plan to attend the department meeting on Friday
at 1:30 in the planning conference room. We will be
The message is partially displayed because toplines is set to 10. Only lines 1 (the Received: field)
through 10 (the second line of the message body) are displayed. The first line, From george Wed Jan
6 9:47 CST 1988, is always present and does not count in the toplines option.
Network management 37
Prerequisites
ignore [FieldList]
The FieldList can consist of one or more field names that you want to ignore when you display a message.
For example, if user Amy includes the following line in her .mailrc file:
t 1
Message 1:
From george Wed Jan 6 9:47 CST 1988
Subject: Dept Meeting
Please plan to attend the department meeting on Friday
at 1:30 in the planning conference room. We will be
discussing the new procedures for using the project
planning program developed by our department.
The Received:, Date:, From:, Message-Id:, and To: fields are not displayed. To display these fields, use a
T or P subcommand or the top subcommand.
Note: In the example, the From line is displayed. This is not the same as the From: field that
has been listed in the FieldList for the ignore subcommand.
ignore
mail-from
message-id
return-path
retain date
To prevent the banner from displaying when you start the mail program, add the following line to your
$HOME/.mailrc file:
set quiet
set noheader
With this option in the .mailrc file, the list of messages in your mailbox is not displayed. When you start
the mail program, the only response is the mailbox prompt. You can get a list of messages by typing the
(h)eader subcommand.
set autoprint
With the set autoprint option in the .mailrc file, the d subcommand deletes the current message
and displays the next.
set
If the set folder option has been enabled, the system responds with the following:
folder /home/george/letters
In this example, letters is the directory in which mail folders will be stored.
2. If the set folder option has not been enabled, make a set folder entry in the .mailrc file:
set folder=/home/george/letters
In this example, /home/george is George's home directory and letters is the directory in which
mail folders will be stored. The set folder option will allow you to use the plus sign (+) shorthand
notation to save messages in your letters directory.
3. If a letters directory does not exist, you must create a letters directory in your home directory.
From your home directory, at your system command line, type:
mkdir letters
Use the following procedure to keep a record of messages you send to others:
Network management 39
1. Type the following statement in your .mailrc file:
set record=letters/mailout
2. If a letters directory does not exist, you must create a letters directory in your home directory.
From your home directory, at your system command line, type:
mkdir letters
mail -f +mailout
In this example, the file mailout contains copies of the messages you have sent to others.
Item Description
set EDITOR=PathName This option in your .mailrc file defines the editor that you activate
with the ~e key sequence. The value of PathName must be the full
path name to the editor program you want to use.
To change to the e editor, while in the mail program, type:
~e
This sequence activates the e editor or other editor that you have
defined in the .mailrc file. Edit your mail message using this editor.
set VISUAL=PathName This option in your .mailrc file defines the editor that you activate
with the ~v key sequence. The value of PathName must be the full
path name to the editor program that you want to use. The default
is /usr/bin/vi.
To change to the vi editor while in the mail program, type:
~v
This sequence activates the vi editor or other editor that you have
defined in the .mailrc file. Edit your mail message using this editor.
Item Description
mail Displays the system mailbox.
mail -f Displays your personal mailbox (mbox).
mail -f +folder Displays a mail folder.
mailuser@address Addresses a message to the specified user.
Item Description
q Quits and applies the mailbox subcommands entered this session.
x Quits and restores the mailbox to original state.
! Starts a shell, runs a command, and returns to the mailbox.
cd dir Changes directory to dir or $HOME.
Message handling
Use these subcommands to edit, delete, recall, append, or retain messages.
Item Description
e num Edits the message num (default editor is e).
d msg_list Deletes the messages in msg_list or the current message.
u msg_list Recalls deleted messages in msg_list.
s msg_list +file Appends messages (with headings) to file.
w msg_list +file Appends messages (text only) to file.
pre msg_list Keeps messages in the system mailbox.
Network management 41
Item Description
R msg_list Sends a reply only to senders of messages.
a Displays a list of aliases and their addresses.
Item Description
xsend barbara Addresses a message to the specified user.
xget Displays the secret mailbox.
Mailbox tasks
The following subcommands accomplish various mailbox tasks.
Item Description
q Quits, leaving unread messages.
n Deletes the current message and displays the next message.
d Deletes the current message and displays the next message.
Return key Deletes the current message and displays the next message.
! Executes a shell command.
s Saves the message in the named file or mbox.
w Saves the message in the named file or mbox.
Network management 43
/usr/lib/sendmail -L sm-msp-queue -Ac -q 30m
Mail aliases
Aliases map names to address lists using personal, system-wide, and domain-wide alias files.
You can define three types of aliases:
Item Description
personal Defined by individual users in the user's $HOME/.mailrc file.
local system Defined by the mail system administrator in the /etc/mail/aliases file. These
aliases apply to mail handled by the sendmail program on the local system. Local
system aliases rarely need to be changed.
domainwide By default, sendmail reads /etc/alias to resolve aliases. To override the
default and use NIS, edit or create /etc/netsvc.conf and add the line:
aliases=nis
/etc/mail/aliases file
The properties, contents, and location of the /etc/mail/aliases file are described here.
The /etc/mail/aliases file consists of a series of entries in the following format:
where Alias can be any alphanumeric string that you choose (not including special characters, such as @
or !). Name1 through NameX is a series of one or more recipient names. The list of names can span one
or more lines. Each continued line begins with a space or a tab. Blank lines and lines beginning with a #
(pound sign) are comment lines.
The /etc/mail/aliases file must contain the following three aliases:
Item Description
MAILER-DAEMON The ID of the user who is to receive messages addressed to the mailer daemon.
This name is initially assigned to the root user:
MAILER-DAEMON: root
postmaster The ID of the user responsible for the operation of the local mail system. The
postmaster alias defines a single mailbox address that is valid at each system in
a network. This address enables users to send inquiries to the postmaster alias
at any system, without knowing the correct address of any user at that system.
This name is initially assigned to the root user:
postmaster: root
nobody The ID that is to receive messages directed to programs such as news and msgs.
This name is initially assigned to /dev/null:
nobody: /dev/null
Whenever you change this file, you must recompile it into a database format that the sendmail
command can use. See “Alias database building” on page 45.
3. Create an owner for the alias. If the sendmail command is unsuccessful in sending mail to the alias, it
sends an error message to the owner.
Add a line in the /etc/mail/aliases to specify the owner. The format for this line is owner-
groupname: owner, where groupname is the name of the alias and owner is the e-mail address of
the owner. In this example, glenda@hera is made the owner of the testers alias:
4. After the alias is created, run the sendmail -bi command to recompile the aliases database. You
will need to run this command each time you update your /etc/mail/aliases file.
You can now send email to the testers alias.
Network management 45
The /etc/netsvc.conf file contains the ordering of system services. To specify the service ordering of
aliases, add the following line:
aliases=service, service
aliases=files, nis
tells the sendmail command to try the local alias file first; and if that fails, try nis. If nis is defined as a
service, it should be running.
For further information on the /etc/netsvc.conf file, see Files Reference.
Mail queue
The mail queue is a directory that stores data and controls files for mail messages that the sendmail
command delivers. By default, the mail queue is /var/spool/mqueue.
Mail messages might be queued for many reasons.
For example:
1. The sendmail command can be configured to process the queue at certain intervals, rather than
immediately. If this is so, mail messages must be stored temporarily.
2. If a remote host does not answer a request for a mail connection, the mail system queues the message
and tries again later.
TypefID
where ID is a unique message queue ID, and Type is one of the following letters indicating the type of file:
Ite Description
m
d The data file containing the message body without the heading information.
q The queue-control file. This file contains the information necessary to process the job.
t A temporary file. This file is an image of the q file when it is being rebuilt. It is quickly renamed to
the q file.
x A transcript file that exists during the life of a session and shows everything that happens during
that session.
For example, if a message has a queue ID of AA00269, the following files are created and deleted in the
mail queue directory while the sendmail command tries to deliver the message:
q control file
The q control file contains a series of lines, each beginning with a code letter.
Ite Description
m
B Specifies the body type. The remainder of the line is a text string defining the body type. If this
entire field is missing, the body type is 7-bit by default, and no special processing is attempted.
Legal values are 7BIT and 8BITMIME.
C Contains the controlling user. For recipient addresses that are a file or a program, sendmail
performs delivery as the owner of the file or program. The controlling user is set to the owner of the
file or program. Recipient addresses that are read from a .forward or :include: file will also have
the controlling user set to the owner of the file. When sendmail delivers mail to these recipients, it
delivers as the controlling user, then converts back to root.
F Contains envelope flags. The flags are any combination of w, which sets the EF_WARNING flag;
r, which sets the EF_RESPONSE flag; 8, which sets the EF_HAS8BIT flag; and b, which sets the
EF_DELETE_BCC flag. Other letters are silently ignored.
H Contains a heading definition. There can be any number of these lines. The order in which the
H lines appear determines their order in the final message. These lines use the same syntax as
heading definitions in the /etc/mail/sendmail.cf configuration file.
I Specifies the inode and device information for the df file; this can be used to recover your mail
queue after a disk crash.
K Specifies the time (as seconds) of the last delivery attempt.
M When a message is put into the queue because an error occurred during a delivery attempt, the
nature of the error is stored in the M line.
N Specifies the total number of delivery attempts.
O Specifies the original message transfer system (MTS) value from the ESMTP. It is used for Delivery
Status Notifications only.
P Contains the priority of the current message. The priority is used to order the queue. Higher
numbers mean lower priorities. The priority increases as the message sits in the queue. The initial
priority depends on the message class and the size of the message.
Q Contains the original recipient as specified by the ORCPT= field in an ESMTP transaction. Used
exclusively for Delivery Status Notifications. It applies only to the immediately following R line.
R Contains a recipient address. There is one line for each recipient.
S Contains the sender address. There is only one of these lines.
T Contains the message creation time used to compute when to time out the message.
V Specifies the version number of the queue file format used to allow new sendmail binaries to read
queue files created by older versions. Defaults to version zero. Must be the first line of the file, if
present.
Z Specifies the original envelope ID (from the ESMTP transaction). Used for Delivery Status
Notifications only.
Network management 47
Ite Description
m
$ Contains a macro definition. The values of certain macros ($r and $s) are passed through to the
queue run phase.
The q file for a message sent to amy@zeus would look similar to:
P217031
T566755281
MDeferred: Connection timed out during user open with zeus
Sgeo
Ramy@zeus
H?P?return-path: <geo>
Hreceived: by george (0.13 (NL support)/0.01)
id AA00269; Thu, 17 Dec 87 10:01:21 CST
H?D?date: Thu, 17 Dec 87 10:01:21 CST
H?F?From: geo
Hmessage-id: <8712171601.AA00269@george>
HTo: amy@zeus
Hsubject: test
Where:
Item Description
P217031 Priority of the message
T566755281 Submission time in seconds
MDeferred: Connection timed out during Status message
user open with zeus
Sgeo ID of the sender
Ramy@zeus ID of the receiver
H lines Header information for the message
-qNumberUnit
where Number is an integer value and Unit is the unit letter. Unit can have one of the following values:
Ite Description
m
s Seconds
m Minutes
h Hours
d Days
w Weeks
If Unit is not specified, the sendmail daemon uses minutes (m) as the default. Here are three examples
illustrating time-value specification:
/usr/sbin/sendmail -q15d
This command tells the sendmail daemon to process the queue every 15 days.
This command tells the sendmail daemon to process the queue every 15 hours.
/usr/sbin/sendmail -q15
This command tells the sendmail daemon to process the queue every 15 minutes.
/usr/sbin/sendmail -q -v
You can also limit the jobs to those with a particular queue identifier, sender, or recipient using one of the
queue modifiers. For example, -qRsally restricts the queue run to jobs that have the string sally in one
of the recipient addresses. Similarly, -qSstring limits the run to particular senders, and -qIstring limits it to
particular queue identifiers.
qpi=30m
3. Change the value assigned to the qpi variable to the time value you prefer.
These changes will take effect at the next system restart. If you want the changes to take effect
immediately, stop and restart the sendmail daemon, specifying the new -q flag value. See “Stopping the
sendmail daemon” on page 50 and “Starting the sendmail daemon” on page 50 for more information.
cd /var/spool
mv mqueue omqueue
3. Restart the sendmail daemon by following the instructions in “Starting the sendmail daemon” on
page 50.
4. Process the old mail queue by entering:
Network management 49
/usr/sbin/sendmail -oQ/var/spool/omqueue -q
The -oQ flag specifies an alternate queue directory. The -q flag specifies to run every job in the queue.
To get a report about the progress of the operation, use the -v flag.
Note: This operation can take some time.
5. Remove the log files and the temporary directory when the queue is empty by entering:
rm /var/spool/omqueue/*
rmdir /var/spool/omqueue
If the sendmail daemon is already active when you enter one of these commands, you see the following
message on the screen:
The sendmail subsystem is already active. Multiple instances are not supported.
If the sendmail daemon is not already active, then you see a message indicating that the sendmail
daemon has been started.
Mail logging
The sendmail command logs mail system activity through the syslogd daemon.
The syslogd daemon must be configured and running for logging to occur. Specifically, the /etc/
syslog.conf file should contain the uncommented line:
mail.debug /var/spool/mqueue/log
If it does not, use your favorite editor to make this change; be certain that the path name is correct. If
you change the /etc/syslog.conf file while the syslogd daemon is running, refresh the syslogd
daemon by typing the following command at a command line:
refresh -s syslogd
If the /var/spool/mqueue/log file does not exist, you must create it by typing the following command:
touch /var/spool/mqueue/log
Item Description
from Specifies the envelope sender address.
size Specifies the size of the message in bytes.
class Indicates the class (numeric precedence) of the message.
pri Specifies the initial message priority (used for queue sorting).
nrcpts Indicates the number of envelope recipients for this message (after aliasing and forwarding).
proto Specifies the protocol used to receive the message, for example ESMTP or UNIX-to-UNIX
Copy Program (UUCP).
relay Specifies the machine from which it was received.
The delivery attempt line is logged each time there is delivery attempt (so there can be several per
message if delivery is deferred or there are multiple recipients). These fields are:
Item Description
to Contains a comma-separated list of the recipients to this mailer.
ctladdr Specifies the controlling user, that is, the name of the user whose credentials are used for
delivery.
delay Specifies the total delay between the time this message was received and the time it was
delivered.
xdelay Specifies the amount of time needed in this delivery attempt.
mailer Specifies the name of the mailer used to deliver to this recipient.
relay Specifies the name of the host that actually accepted (or rejected) this recipient.
stat Specifies the delivery status.
Because such a large amount of information can be logged, the log file is arranged as a succession of
levels. Beginning at level 1, the lowest level, only very unusual situations are logged. At the highest
level, even the insignificant events are logged. As a convention, log levels ten and under the most useful
information. Log levels above 64 are reserved for debugging purposes. Levels from 11-64 are reserved for
verbose information.
The types of activities that the sendmail command puts into the log file are specified by the L option in
the /etc/mail/sendmail.cf file.
Log management
Because information is continually appended to the end of the log, the file can become very large. Also,
error conditions can cause unexpected entries to the mail queue. To keep the mail queue and the log file
from growing too large, run the /usr/lib/smdemon.cleanu shell script.
This script forces the sendmail command to process the queue and maintains four progressively older
copies of log files, named log.0, log.1, log.2, and log.3. Each time the script runs it moves:
• log.2 to log.3
• log.1 to log.2
Network management 51
• log.0 to log.1
• log to log.0
Running this script allows logging to start over with a new file. Run this script either manually or at a
specified interval with the cron daemon.
Traffic logs
Use the -X flag of the sendmail command to set traffic logging.
Many Simple Mail Transfer Protocols (SMTPs) implementations do not fully implement the protocol. For
example, some personal computer-based SMTPs do not understand continuation lines in reply codes.
These can be very hard to trace. If you suspect such a problem, you can set traffic logging by using the -X
flag. For example:
This illustration is a type of top-down organizational chart with Mail and MH at the top. Branching from
them are bellmail, BNU and SMTP. Underneath the previous level are local mailbox, UUCP link, and TCP/IP
link respectively. Beneath UUCP link is remote mailbox and under TCP/IP link is remote mailbox.
To start the accumulation of mailer statistics, create the /etc/mail/statistics file by typing the
following:
touch /etc/mail/statistics
If the sendmail command encounters errors when trying to record statistics information, the command
writes a message through the syslog subroutine. These errors do not affect other operations of the
sendmail command.
/usr/sbin/mailstats
This reads the information in the /etc/mail/statistics file, formats it, and writes it to standard
output. For more information, see the /usr/sbin/mailstats command.
You can specify filters in your .mc file using the following syntax:
where filter(number) is the name of your filter. The first line of the syntax specifies that the filter attach to
a socket in the UNIX domain in the /var/run directory. The second line specifies that the filter use an
IPv6 socket on port 999 of the local host. The third line specifies that the filter use an IPv4 socket on port
3333 of the local host.
The F= denotes which of the following flags applies:
Item Description
R Rejects the connection if the filter is unavailable.
T Fails the connection temporarily if the filter is unavailable.
If neither flag is specified, the message is passed through sendmail as if the filter were not present.
Network management 53
By specifying a value for T=, you can use the filters to override the default timeouts used by sendmail.
The T= equate uses the following fields:
Item Description
C Timeout for connecting to a filter (if 0, use the system timeout).
S Timeout for sending information from the MTA to a filter.
R Timeout for reading replies from the filter.
E Overall timeout between sending end-of-message notices to the filter and waiting for the
final acknowledgement.
As indicated in the preceding example, the separators between each timeout is a semicolon (;), and the
separator between each equate is a comma (,).
The default values for timeouts are as follows:
T=C:0m;S:10s;R:10s;E:5m
the three filters will be called in the same order they were specified.
By using MAIL_FILTER() instead of INPUT_MAIL_FILTER() in your .mc file, you can define a filter without
adding it to the input filter list.
smfi_opensocket Function
Purpose
The smfi_opensocket function attempts to create the interface socket mail transfer agents (MTA) that are
used to connect to the filter.
Syntax
#include <libmilter/mfapi.h>
int smfi_opensocket(
bool rmsocket
);
Description
The smfi_opensocket function is called only from program mainline, after calling the smfi_setconn
function and the smfi_register function, but before calling the smfi_main function. The smfi_opensocket
function creates the socket specified previously by calling the smfi_setconn function which is the
interface between MTAs and the filter. The smfi_opensocket function allows the calling application
to create the socket. If the smfi_opensocket function is not called, the smfi_main function calls the
function implicitly.
Arguments
Table 3. Arguments
Item Description
rmsocket A flag indicates if the library must try to remove
any existing UNIX domain socket before trying to
create a new one.
Return values
The smfi_opensocket function returns the MI_FAILURE value in the following cases. Otherwise, the
function returns MI_SUCCESS.
• The interface socket could not be created.
• The rmsocket value is true, and either the socket could not be examined, or the existing socket could not
be removed.
• The smfi_setconn function or smfi_register function is not called.
Related information
libmilter_smfi_register.dita
Network management 55
libmilter_smfi_setconn.dita
smfi_register Function
Purpose
The smfi_register function registers a set of sendmail filter callback functions.
Syntax
#include <libmilter/mfapi.h>
int smfi_register(
smfiDesc descr)
);
Description
The smfi_register function creates a sendmail filter by using the information provided in the smfiDesc
argument. The smfi_register function must be called before smfi_main function.
Note: Multiple successful calls to smfi_register function within a single process are not allowed. Only a
single sendmail filter can be successfully registered. Note, however, that the library cannot check if the
restriction is obeyed.
The xxfi_flags field must contain the bitwise or zero or any of the following values, describing the actions
the sendmail filter can take.
Table 4. Values
Item Description
SMFIF_ADDHDRS The smfi_addheader function adds headers.
SMFIF_CHGHDRS The smfi_chgheader function either modifies
headers or deletes headers.
SMFIF_CHGBODY The smfi_replacebody function replaces the
body during filtering. The filter has significant
performance impact if other filters do body filtering
after this filter.
SMFIF_ADDRCPT The smfi_addrcpt function adds recipients to the
message.
SMFIF_ADDRCPT_PAR The smfi_addrcpt_par function adds recipients
including extended simple mail transfer protocol
(ESMTP) arguments.
SMFIF_DELRCPT The smfi_delrcpt function removes recipients from
the message.
SMFIF_QUARANTINE The smfi_quarantine function quarantines a
message.
SMFIF_CHGFROM The smfi_chgfrom function modifies the envelope
sender (Mail From).
SMFIF_SETSYMLIST The smfi_setsymlist function sends a set of
symbols (macros) that are required.
struct smfiDesc
{
char *xxfi_name; /* filter
name */
int xxfi_version; /* version
code
-- do not change */
unsigned long xxfi_flags; /* flags
*/
/* negotiation callback */
sfsistat (*xxfi_negotiate)(SMFICTX *,
unsigned long, unsigned long,
unsigned long,
unsigned long,
unsigned long *, unsigned long *,
unsigned long *,
unsigned long *
);
};
Network management 57
Table 5. Arguments (continued)
Item Description
headerv The header value to be added, can be a non-NULL
null-terminated string or an empty string.
Return values
The smfi_register function returns the MI_FAILURE value in the following cases. Otherwise, the function
returns MI_SUCCESS.
• Memory allocation failed.
• Incompatible version or illegal flags value.
Related information
libmilter_smfi_addheader.dita
libmilter_smfi_chgheader.dita
libmilter_smfi_replacebody.dita
libmilter_smfi_addrcpt.dita
libmilter_smfi_addrcpt_par.dita
libmilter_smfi_delrcpt.dita
libmilter_smfi_quarantine.dita
libmilter_smfi_chgfrom.dita
libmilter_smfi_setsymlist.dita
smfi_setconn Function
Purpose
The smfi_setconn function sets the socket through which this filter can communicate with the sendmail
command.
Syntax
#include <libmilter/mfapi.h>
int smfi_setconn(
char *oconn;
);
Description
The smfi_setconn function must be called before calling the smfi_main function.
The filters must not be run as root when communicating over UNIX or local domain sockets.
The permissions for UNIX or local sockets must be set to 0600 (read or write permission only for owner
or group of sockets) or 0660 (read/write permission for the sockets owner and group). These permissions
are useful if the sendmail RunAsUser option is used.
The permissions for a UNIX or local domain socket are determined by the umask, which must be set to
007 or 077. For operating systems like Solaris operating system that do not use permissions of the
socket, place the socket in a protected directory.
* {unix|local}:/path
/to/file -- A named pipe.
* inet:port
@{hostname|ip-address} -- An IPV4 socket.
* inet6:port
@{hostname|ip-address} -- An IPV6 socket.
Return values
The smfi_setconn function does not fail, if it is an invalid address. However, the smfi_setconn function
fails to set the socket if there is no memory. The failure is detected only in smfi_main function.
Related information
libmilter_smfi_main.dita
smfi_settimeout Function
Purpose
The smfi_settimeout function sets the filters I/O timeout value.
Syntax
#include <libmilter/mfapi.h>
int smfi_settimeout((
int otimeout
);
Description
The smfi_settimeout function is called only from smfi_main function. The smfi_settimeout function
sets the duration (in seconds) for libmilter parameter to wait for a mail transfer agent (MTA)
communication (read or write) before timing out.
Note: If the smfi_settimeout function is not called, the default timeout duration is 7210 seconds.
Arguments
Table 7. Arguments
Item Description
otimeout The duration in seconds for thelibmilter
parameter to wait for an MTA before timing out.
The otimeout value must be greater than zero.
If the otimeout value is zero, the libmilter
parameter does not wait for an MTA.
Network management 59
Return values
The smfi_settimeout function always returns the MI_SUCCESS value.
Related information
smfi_main
smfi_setbacklog Function
Purpose
The smfi_setbacklog function sets the listen(2) backlog value of the filter.
Syntax
#include <libmilter/mfapi.h>
int smfi_setbacklog(
int obacklog
);
Description
The smfi_setbacklog function is called only before calling the smfi_main function. The smfi_setbacklog
function sets the incoming socket backlog, which is used by the listen(2) backlog value. If the
smfi_setbacklog function is not called, the default operating system is used.
Arguments
Table 8. Arguments
Item Description
obacklog The number of incoming connections allowed in
the listen queue.
Return values
The smfi_setbacklog function returns MI_FAILURE value if the obacklog argument is set to less than or
equal to null.
Related information
libmilter_smfi_main.dita
smfi_setdbg Function
Purpose
The smfi_setdbg function sets the debugging (tracing) level for the milter library.
Syntax
#include <libmilter/mfapi.h>
int smfi_setdbg(
int level;
);
Arguments
Table 9. Arguments
Item Description
level The new debugging level.
Return values
The smfi_setdbg function returns the MI_SUCCESS value by default.
smfi_stop Function
Purpose
The smfi_stop function turns off the milter. Connections are not accepted after this call.
Syntax
#include <libmilter/mfapi.h>
int smfi_stop(void);
);
Description
The smfi_stop function is called from the Callback functions or error-handling routines at any time. The
smfi_stop routine does not allow new connections. However, the function does not wait for existing
connections (threads) to terminate. This function causes the smfi_main function to return to the calling
program, which can then exit or warm-restart.
Arguments
Table 10. Arguments
Item Description
void This argument does not take any value.
Return values
The smfi_stop function returns SMFI_CONTINUE value in the following cases:
• An internal routine causes the milter library to stop.
• A routine causes the milter library to stop.
• The process that is started cannot be stopped.
Example
int ret;
SMFICTX *ctx;
...
Network management 61
ret = smfi_addheader(ctx, "Content-Type",
"multipart/mixed;\n\tboundary=\"foobar\"");
Related information
Callback functions
smfi_main Function
Purpose
The smfi_main function hands over the control to the libmilter event loop.
Syntax
#include <libmilter/mfapi.h>
int smfi_main(
);
Description
The smfi_main function is called after the initialization of the filter is complete.
Return values
The smfi_main function returns the MI_FAILURE value if connection could not be established. Otherwise,
the function returns MI_SUCCESS.
Failure occurs for different reasons and the reasons for failure are logged. For example, passing invalid
address within the smfi_setconn function causes the function to fail.
Related information
libmilter_smfi_setconn.dita
Purpose
The smfi_getsymval function fetches the value of a sendmail macro.
Syntax
#include <libmilter/mfapi.h>
char* smfi_getsymval(
SMFICTX *ctx,
char *headerf,
char *symname
);
Description
The smfi_getsymval function is called from any of the xxfi_* callback functions to add a header to the
message. The macro definition depends on the function that is called.
By default, the following macros are valid:
All macros remain in effect from the point they are received until the end of the connection for the
xxfi_connect, xxfi_hello functions.
All macros stay in effect until the end of the message for the xxfi_envfrom function , and the xxfi_eom
function.
All the macros stay in effect for each recipient for xxfi_envrcpt function.
The macro list can be changed by using the confMILTER_MACROS_* options in the sendmail.mc. The
scope of such macros is determined by when they are set by the sendmail command. For descriptions of
macros values, see Sendmail Installation and Operation Guide.
Arguments
Table 13. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
Network management 63
Table 13. Arguments (continued)
Item Description
symname The name of a sendmail macro. Single letter
macros can optionally be enclosed in braces ("{"
and "}"), longer macro names must be enclosed in
braces, as in a sendmail.cf file.
Return values
The smfi_getsymval function returns the value of the given macro as a null-terminated string. Otherwise,
the smfi_getsymval function returns NULL if the macro is not defined.
Related information
libmilter_xxfi_connect.dita
libmilter_xxfi_helo.dita
libmilter_xxfi_envfrom.dita
libmilter_xxfi_envrcpt.dita
libmilter_xxfi_data.dita
libmilter_xxfi_eoh.dita
libmilter_xxfi_eom.dita
smfi_getpriv Function
Purpose
The smfi_getpriv function fetches the connection-specific data pointer for this connection.
Syntax
#include <libmilter/mfapi.h>
void* smfi_getpriv(
SMFICTX *ctx
);
Description
The smfi_getpriv function can be called in any of the xxfi_* callback functions.
Arguments
Table 14. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
Return values
The smfi_getpriv function that is stored by returns the private data pointer stored by a call before the
smfi_setpriv function. Otherwise, the smfi_setpriv function returns NULL if the value is not set.
smfi_setpriv Function
Purpose
The smfi_setpriv function sets the private data pointer for this connection.
Syntax
#include <libmilter/mfapi.h>
int smfi_setpriv
SMFICTX *ctx,
void *privatedata
();
Description
The smfi_setpriv function is called from any of the xxfi_* callback functions, to set the private data
pointer for the ctx.
Note: There is one private data pointer per connection; multiple calls to the smfi_setpriv function with
different values cause previous values to be lost. Before a filter terminates, the filter must release the
private data and set the pointer to NULL.
Arguments
Table 15. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
privatedata The argument points to private data. This value is
returned by subsequent calls to the smfi_getpriv
function by using ctx.
Return values
The smfi_setpriv function returns the MI_FAILURE value if ctx is an invalid context. Otherwise, the
function returns MI_SUCCESS.
Related information
libmilter_smfi_setpriv.dita#smfi_setpriv
smfi_setreply Function
Purpose
The smfi_setreply function sets the default simple mail transfer protocol (SMTP) error reply code and
accepts only 4XX and 5XX reply codes.
Syntax
#include <libmilter/mfapi.h>
int smfi_setreply
Network management 65
SFICTX *ctx,
char *rcode,
char *xcode,
char *message
);
Description
The smfi_setreply function is called from any of the xxfi_ callback functions other than the xxfi_connect
function. The smfi_setreply function sets the SMTP error reply code for the connection. This code is used
for subsequent error replies resulting from actions taken by this filter.
The values passed to the smfi_setreply function are not checked for standards compliance.
The message argument must contain only printable characters. Other characters can lead to undefined
behavior. For example, characters like CR or LF causes the call to fail, single '%' characters causes the text
to be ignored.
Note: If a '%' string is required in the parameter use '%%' just like for printf(3).
For details about reply codes and their meanings, see RFC 821 or 2821 and RFC 1893 or 2034.
If the rcode argument is set as 4XX but, the SMFI_REJECT value is used for the message, the custom
reply is not used.
If the rcode argument is set as 5XX but, the SMFI_TEMPFAIL value is used for the message, the custom
reply is not used.
Note: In the above two cases an error is returned to the milter parameter. The Libmilter parameter
ignores the above reply code.
If the milter parameter returns the SMFI_TEMPFAIL value and sets the reply code to 421, the SMTP
server terminates the SMTP session with a 421 error code.
Arguments
Table 16. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
rcode The three-digit ( RFC 821 or 2821) SMTP reply
code is a null-terminated string. rcode cannot be
NULL, and must be a valid 4XX or 5XX reply code.
xcode The extended (RFC 1893 or 2034) reply code.
If xcode is NULL, extended code is not used.
Otherwise, xcode must conform to RFC 1893 or
2034.
message The text part of the SMTP reply. If message is
NULL, an empty message is used.
Return values
The smfi_setreply function returns the MI_FAILURE value in the following cases. Otherwise, the function
returns MI_SUCCESS.
• The rcode or xcode argument is invalid.
• A memory-allocation failure occurs.
smfi_setmlreply Function
Purpose
The smfi_setmlreply function sets the default simple mail transfer protocol (SMTP) error reply code to a
multi-line response. The smfi_setmlreply function accepts only 4XX and 5XX replies.
Syntax
#include <libmilter/mfapi.h>
int smfi_setmlreply(
SMFICTX *ctx,
char *rcode,
char *xcode,
...
);
Description
The smfi_setmlreply function is called from any of the xxfi_callback functions, except for xxfi_connect
function. The smfi_setmlreply function provides SMTP error reply code for the connections mentioned
below the xcode. The list of arguments must be null-terminated. This code is used for subsequent error
replies resulting from actions taken by this filter.
The values passed to the smfi_setmlreply function are not checked for standards compliance.
The message parameter must contain only printable characters, other characters can lead to undefined
behavior. For example, characters like CR or LF causes the call to fail, single '%' characters causes the text
to be ignored.
Note: If a '%' string is required in the message parameter use '%%' string similarly like printf(3) string
is used.
For reply codes and their meanings, see RFC 821 or 2821 and RFC 1893 or 2034.
If the rcode is set as 4XX but, the SMFI_REJECT value is used for the message, the custom reply is not
used.
If the rcode is set as 5XX but, the SMFI_TEMPFAIL value is used for the message, the custom reply is not
used.
Note: In the above two cases an error is returned to the milter parameter, and the Libmilter
parameter ignores the error.
If the milter parameter returns the SMFI_TEMPFAIL value and sets the reply code to 421, the SMTP
server terminates the SMTP session with an 421 error code.
Arguments
Table 17. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
Network management 67
Table 17. Arguments (continued)
Item Description
rcode The three-digit ( RFC 821 or 2821) SMTP reply
code, as a null-terminated string. The rcode
argument cannot be NULL, and must be a valid 4XX
or 5XX reply code.
xcode The extended ( RFC 1893 or 2034) reply code.
If xcode is NULL, no extended code is used.
Otherwise, xcode must conform to RFC 1893 or
2034
... The remainder of the arguments is single lines
of text, up to 32 arguments, which is used as
text part of the SMTP reply. The list must be null-
terminated.
Return values
The smfi_setmlreply function returns the MI_FAILURE value in the following cases. Otherwise, the
function returns MI_SUCCESS.
• The rcode or xcode argument is invalid.
• A memory-allocation failure occurs.
• The text line contains a carriage return or line feed.
• The length of any text line is more than MAXREPLYLEN(980).
• The text replies exceeds more than 32 lines.
Example
ret = smfi_setmlreply(ctx, "550", "5.7.0",
"Spammer access rejected",
"Please see our policy at:",
"http://www.example.com/spampolicy.html",
NULL);
Related information
libmilter_xxfi_connect.dita
smfi_addheader Function
Purpose
The smfi_addheader function adds a header to the current message.
Syntax
#include <libmilter/mfapi.h>
int smfi_addheader(
SMFICTX *ctx,
char *headerf,
char *headerv
);
Description
The smfi_addheader function is called from the xxfi_eom function to add a header to the message.
Network management 69
The smfi_addheader function does not modify the existing headers of a message.
To modify the current value of a header, use the smfi_chgheader function.
A filter that calls the smfi_addheader function must set the SMFIF_ADDHDRS flag in the smfiDesc_str
argument. The filter then passes the value to the smfi_register function.
The smfi_addheader function requires the filter order to be specified. You can view the modifications in
the header by using the filters that were created earlier.
The name or the value of the header is not checked for standards compliance. However, each line of the
header must be below 998 characters. If you require longer header names, use a multi-line header. If
you must create a multi-line header, insert a line feed (ASCII 0x0a, or \n in C programming language)
followed by a whitespace character such as a space (ASCII 0x20) or tab (ASCII 0x09, or \t in C
programming language). The line feed cannot be preceded by a carriage return (ASCII 0x0d). The mail
transfer agent (MTA) adds it automatically. The filter writers responsibility must ensure that no standards
are violated.
The MTA adds a leading space to an added header value unless the SMFIP_HDR_LEADSPC flag is set, in
which case the milter parameter must include any desired leading spaces.
Arguments
Table 19. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
headerf The header name is a null-terminated string that is
not NULL.
headerv The header value to be added, can be a non-NULL
null-terminated string or an empty string.
Return values
The smfi_addheader function returns the MI_FAILURE value in the following cases. Otherwise, the
function returns MI_SUCCESS.
• The headerf or headerv argument is NULL.
• Adding headers in the current connection state is invalid.
• Memory allocation fails.
• A network error occurs.
• The SMFIF_ADDHDRS flag was not set when the smfi_register function was called.
Example
int ret;
SMFICTX *ctx;
...
ret = smfi_addheader(ctx, "Content-Type",
"multipart/mixed;\n\tboundary=\"foobar\"");
Related information
libmilter_xxfi_eom.dita
libmilter_smfi_chgheader.dita
libmilter_smfi_register.dita
Purpose
The smfi_chgheader function modifies or deletes a message header.
Syntax
#include <libmilter/mfapi.h>
int smfi_chgheader(
SMFICTX *ctx,
char *headerf,
mi_int32 hdridx,
char *headerv
);
Description
The smfi_chgheader function is called from the xxfi_eom function to modify a headers value for the
current message.
The smfi_chgheader function can be used to add new headers. However, it is efficient and safer to use
the smfi_addheader function.
A filter that calls the smfi_chgheader function must set the SMFIF_CHGHDRS flag in the smfiDesc_str
argument. The filter then passes the value to the smfi_register function.
The smfi_chgheader function requires the filter order to be specified. You can view the modifications in
the header by using the filters that were created earlier.
The name or the value of the header is not checked for standards compliance. However, each line of the
header must be below 998 characters. If you require longer header names, use a multi-line header. If
you must create a multi-line header, insert a line feed (ASCII 0x0a, or \n in C programming language)
followed by a whitespace character such as a space (ASCII 0x20) or tab (ASCII 0x09, or \t in C
programming language). The line feed cannot be preceded by a carriage return (ASCII 0x0d), mail
transfer agent (MTA) adds it automatically. The filter writers responsibility must ensure that no standards
are violated.
The MTA adds a leading space to an added header value unless the flag SMFIP_HDR_LEADSPC is set, in
which case the milter parameter must include desired leading spaces itself.
Arguments
Table 20. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
headerf The header name is a null-terminated string that is
not NULL.
hdridx The header index value (one-based). A hdridx
value of 1 modifies the first occurrence of a
header named headerf. If hdridx is greater than the
number of times headerf appears, a new copy of
headerf is added.
headerv The header value to be added, can be a non-NULL
null-terminated string or an empty string.
Network management 71
Return values
The smfi_chgheader function returns the MI_FAILURE value in the following cases. Otherwise, the
function returns MI_SUCCESS.
• The headerf argument is NULL.
• Modifying headers in the current connection state is invalid.
• Memory allocation fails.
• A network error occurs.
• The SMFIF_CHGHDRS flag was not set when the smfi_register function was called.
Example
int ret;
SMFICTX *ctx;
...
Related information
libmilter_xxfi_eom.dita
libmilter_smfi_addheader.dita
smfi_insheader Function
Purpose
The smfi_insheader function prepends a header to the current message.
Syntax
#include <libmilter/mfapi.h>
int smfi_insheader(
SMFICTX ,
int hdridx,
char *headerf,
char *headerv
);
Description
The smfi_insheader function is called from the xxfi_eom function, to prepend a header to the current
message.
The smfi_insheader function does not modify the existing headers of a message.
To change the current value of a header, use the smfi_chgheader function.
A filter that calls the smfi_insheader function must set the SMFIF_ADDHDRS flag in the smfiDesc_str
argument, which is passed in the smfi_register function.
The smfi_insheader function requires the filter order to be specified. You can view the modifications in
the header by using the filters that were created earlier.
A filter receives headers that are sent by the simple mail transfer protocol (SMTP) client and also the
headers modified by the earlier filters. The headers inserted by the sendmail command and headers
inserted by itself are not received. The position to insert the header is dependent on the headers existing
in the incoming message and also on the headers that are configured to be added by the sendmail
command.
Arguments
Table 21. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
headerf The header name is a null-terminated string that is
not NULL.
headerv The header value to be added, can be a non-NULL
null-terminated string or an empty string.
Return values
The smfi_insheader function returns the MI_FAILURE value in the following cases, else the function
returns MI_SUCCESS.
• The headerf or headerv argument is NULL.
• Adding headers in the current connection state is invalid.
• The memory allocation fails.
• A network error occurs.
• The SMFIF_ADDHDRS flag was not set when smfi_register function was called.
Example
int ret;
SMFICTX *ctx;
...
ret = smfi_insheader( ctx, 0, "First", "See me?");;
Related information
libmilter_xxfi_eom.dita
libmilter_smfi_register.dita
libmilter_smfi_chgheader.dita
Network management 73
smfi_chgfrom Function
Purpose
The smfi_chgfrom function modifies the envelope sender (MAIL From) for the current message.
Syntax
#include <libmilter/mfapi.h>
int smfi_chgfrom(
SMFICTX *ctx,
const char *mail,
char *args
);
Description
The smfi_chgfrom function is called from the xxfi_eom function, to modify the envelope sender and the
MAIL From of the current message.
A filter that calls the smfi_chgfrom function must set the SMFIF_CHGFROM flag in the smfiDesc_str
argument. The filter then passes the value to the smfi_register function.
All extended simple mail transfer protocol (ESMTP) arguments can be set through the call. But, setting
values for some of the arguments like SIZE and BODY are causing problems. Hence, proper care must be
taken when setting the arguments. There is no feedback from mail transfer agent (MTA) to the milter
parameter if the call is successful.
Arguments
Table 22. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
mail The new sender address.
args Extended simple mail transfer protocol (ESMTP)
arguments.
Return values
The smfi_chgfrom function returns the MI_FAILURE value in the following cases. Otherwise, the function
returns MI_SUCCESS.
• The mail argument is NULL.
• Changing the sender in the current connection state is invalid.
• A network error occurs.
• The SMFIF_CHGFROM flag was not set when smfi_register function was called.
Related information
libmilter_xxfi_eom.dita
libmilter_smfi_register.dita
Purpose
The smfi_addrcpt function adds a recipient for the current message.
Syntax
#include <libmilter/mfapi.h>
int smfi_addrcpt(
SMFICTX *ctx
char *rcpt
);
Description
The smfi_addrcpt function is called only from the xxfi_eom function, to add a recipient to the message
envelope.
Note: The filter that calls the smfi_addrcpt function must set the SMFIF_ADDRCPT flag in the
smfiDesc_str structure which is passed to the smfi_register function.
Arguments
Table 23. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
rcpt The new recipients address.
Return values
The smfi_addrcpt function returns the MI_FAILURE value in the following cases. Otherwise, the function
returns MI_SUCCESS.
• The rcpt argument is NULL.
• Adding recipients in the current connection state is invalid.
• A network error occurs.
• The SMFIF_ADDRCPT flag was not set when smfi_register function was called.
Related information
libmilter_xxfi_eom.dita
libmilter_smfi_register.dita
smfi_addrcpt_par Function
Purpose
The smfi_addrcpt_par function adds a recipient for the current message including extended simple mail
transfer protocol (ESMTP) arguments.
Syntax
#include <libmilter/mfapi.h>
int smfi_addrcpt_par(
Network management 75
SMFICTX *ctx,
char *rcpt,
char *args
);
Description
The smfi_addrcpt_par function is called from the xxfi_eom function, to add a recipient to the message
envelope.
Arguments
Table 24. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
rcpt The new recipients address.
args The new recipients ESMTP parameters.
Return values
The smfi_addrcpt function returns the MI_FAILURE value in the following cases. Otherwise, the function
returns MI_SUCCESS.
• The rcpt argument is NULL.
• Adding recipients in the current connection state is invalid.
• A network error occurs.
• The SMFIF_ADDRCPT_PAR flag was not set when smfi_register function was called.
Related information
libmilter_smfi_addrcpt.dita
libmilter_smfi_register.dita
smfi_delrcpt Function
Purpose
The smfi_delrcpt function deletes the recipient from the envelope of the current message.
Syntax
#include <libmilter/mfapi.h>
int smfi_delrcpt(
SMFICTX *ctx;
char *rcpt;
);
Description
The smfi_delrcpt function is called from the xxfi_eom callback function to remove the named recipient
from the current messages envelope.
Note: The addresses to be removed must match exactly. For example, an address and its expanded form
do not match.
Return values
The smfi_delrcpt function returns the MI_FAILURE value in the following cases. Otherwise the function
returns MI_SUCCESS.
• The rcpt argument is NULL.
• Deleting the recipients in the current connection state is invalid.
• A network error occurs.
• The SMFIF_DELRCPT flag was not set when the smfi_register function was called.
Related information
smfi_register
xxfi_eom
smfi_replacebody Function
Purpose
The smfi_replacebody function replaces the body of the message.
Syntax
#include <libmilter/mfapi.h>
int smfi_replacebody(
SMFICTX *ctx,
unsigned char *bodyp,
int bodylen
);
Description
The smfi_replacebody function replaces the body of the current message. If the function is called more
than once, the subsequent calls results in data being appended to the new body. The function might be
called more than once.
Because the message body might be large, setting the SMFIF_CHGBODY flag might significantly affect the
filter performance.
If a filter sets the SMFIF_CHGBODY flag, but does not call the smfi_replacebody function, the original
body remains unchanged.
Filter order is important for the smfi_replacebody function. New body contents is created by old filters in
the new filter files.
Network management 77
Arguments
Table 26. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
bodyp A pointer to the start of the new body data, which
does not have to be null-terminated. If the bodyp is
NULL, it is treated as having length == 0. The body
data should be in CR or LF form.
bodylen The number of data bytes pointed to by bodyp.
Return values
The smfi_replacebody function returns the MI_FAILURE value in the following cases. Otherwise the
function returns MI_SUCCESS.
• bodyp == NULL and bodylen > 0
• Changing the body in the current connection state is invalid.
• A network error occurs.
• The SMFIF_CHGBODY flag was not set when the smfi_register function was called.
Related information
smfi_register
smfi_progress Function
Purpose
The smfi_progress function reports the progress of the operation.
Syntax
#include <libmilter/mfapi.h>
int smfi_progress(
Description
The smfi_progress function is called from the xxfi_eom callback function to notify the mail transfer agent
(MTA) that the filter is still working on a message. This function cause the MTA to restart its timeouts.
Arguments
Table 28. Arguments
Item Description
ctx The opaque context structure maintained in the
libmilter parameter.
Return values
The smfi_progress function returns the MI_FAILURE value if there is a network error. Otherwise, the
function returns MI_SUCCESS.
Related information
xxfi_eom
smfi_quarantine Function
Purpose
The smfi_quarantine function quarantines the message.
Syntax
#include <libmilter/mfapi.h>
int smfi_quarantine(
SMFICTX *ctx;
char *reason;
);
Description
The smfi_quarantine function is called from the xxfi_eom callback function to quarantine a message by
using a given reason.
Arguments
Table 29. Arguments
Item Description
ctx The opaque context structure maintained in the
libmilter parameter.
reason The quarantine reason, a non-NULL, and non-
empty null-terminated string.
Network management 79
Return values
The smfi_quarantine function returns the MI_FAILURE value in the following cases. Otherwise, the
function returns MI_SUCCESS.
• The reason is NULL or empty.
• A network error occurs.
• The SMFIF_QUARANTINE flag was not set when the smfi_register function was called.
Related information
smfi_register
xxfi_eom
Callback functions
The sendmail filter must implement one or more of the callback functions, which are registered through
smfi_register function.
Network management 81
Table 31. Callback functions (continued)
Item Description
Purpose
The xxfi_connect callback function provides the connection information.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_connect)(
SMFICTX *ctx,
char *hostname,
_SOCK_ADDR *hostaddr);
Description
The xxfi_connect callback function is called once at the start of each simple mail transfer protocol
(SMTP) connection and returns the SMFIS_CONTINUE flag.
Arguments
Table 32. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter.
hostname The host name of the message sender, as
determined by a reverse lookup on the host
address. If the reverse lookup fails or if none
of the IP addresses of the resolved host name
matches the original IP address, the hostname
would contain the message sender's IP address,
which is enclosed in square brackets (for example.
`[a.b.c.d]'). If the simple mail transfer protocol
(SMTP) connection is made via stdin, the value is
localhost.
hostaddr The host address, as determined by the
getpeername(2) call on the SMTP socket. The
value is NULL if the type is not supported in the
current version or if the SMTP connection is made
via stdin.
Purpose
The xxfi_helo callback function handles the HELO or EHLO command.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_helo)(
SMFICTX *ctx,
char *helohost
);
Description
The xxfi_hello callback function is called whenever the client sends a HELO or EHLO command and
returns the SMFIS_CONTINUE flag. The callback might, therefore be called several times or even not
called. Some restrictions can be imposed by the mail transfer agent (MTA) configuration.
Arguments
Table 33. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
helohost The value passed to HELO or EHLO command,
should be the domain name of the sending host
Network management 83
xxfi_envfrom callback Function
Purpose
The xxfi_envfrom callback function handles the MAIL (envelope sender) command.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_envfrom)(
SMFICTX *ctx,
char **argv
);
Description
The xxfi_envfrom callback function is called when the client uses the DATA command and returns the
SMFIS_CONTINUE flag.
Note: For more details on ESMTP responses, see RFC 1869.
Arguments
Table 34. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
argv The null-terminated SMTP command arguments;
argv[0] is guaranteed to be the sender address.
Later arguments are the extended simple mail
transfer protocol (ESMTP) arguments.
Return values
Table 35. Return Values
Item Description
SMFIS_TEMPFAIL The sender and the message are rejected with
a temporary error; a new sender (and hence a
new message) might later be specified and the
xxfi_abort callback function is not called.
SMFIS_REJECT The sender and the message are rejected; a new
sender and message might be specified and the
xxfi_abort callback function is not called.
SMFIS_DISCARD The message is accepted and discarded, and the
xxfi_abort callback function is not called.
SMFIS_ACCEPT The message is accepted and the xxfi_abort
callback function is not called.
Related information
xxfi_abort
Purpose
The xxfi_envrcpt callback function handles the envelope RCPT command.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_envrcpt)(
SMFICTX *ctx,
char **argv
);
Description
The xxfi_envrcpt callback function is called once per recipient, and one or more times per message
immediately after the xxfi_envfrom callback function and returns the SMFIS_CONTINUE flag.
Note: For more details on extended simple mail transfer protocol (ESMTP) responses, see RFC 1869.
Arguments
Table 36. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
argv The null-terminated SMTP command arguments;
argv[0] is guaranteed to be the recipient
address. Later arguments are the extended simple
mail transfer protocol (ESMTP) arguments.
Return values
Table 37. Return values
Item Description
SMFIS_TEMPFAIL The recipient is temporarily failed; further
recipients might still be sent and the xxfi_abort
callback function is not called.
SMFIS_REJECT The recipient is rejected; further recipients might
still be sent and the xxfi_abort callback function is
not called.
SMFIS_DISCARD The message is accepted or discarded, and the
xxfi_abort callback function is called.
SMFIS_ACCEPT The recipient is accepted and the xxfi_abort
callback function is not be called.
Related information
xxfi_envfrom
xxfi_abort
Network management 85
xxfi_data callback Function
Purpose
The xxfi_data callback function handles the DATA command.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_data)(
SMFICTX *ctx
);
Description
The xxfi_data callback function is called when the client uses the DATA command and returns the
SMFIS_CONTINUE flag.
Note: For more details on ESMTP responses, see RFC 1869.
Arguments
Table 38. Arguments
Item Description
ctx The opaque context structure maintained in
libmilter parameter.
Return values
Table 39. Return values
Item Description
SMFIS_TEMPFAIL The message is rejected with a temporary error.
SMFIS_REJECT The message is rejected.
SMFIS_DISCARD The message is accepted and discarded.
SMFIS_ACCEPT The message is accepted.
Purpose
The xxfi_unknown callback function handles the unknown and unimplemented simple mail transfer
protocol (SMTP) commands.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_unknown)(
SMFICTX *ctx,
const char *arg
);
Arguments
Table 40. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
arg The SMTP command including all arguments.
Return values
Table 41. Return Values
Item Description
SMFIS_TEMPFAIL The command is rejected with a temporary error.
SMFIS_REJECT The command is rejected.
Purpose
The xxfi_header callback function handles the message header.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_header)(
SMFICTX *ctx ,
char *headerf,
char *headerv
);
Description
The xxfi_header callback function is called once for each message header and returns SMFIS_CONTINUE
flag.
Note:
• Starting with sendmail 8.14, spaces after the colon in a header field are preserved if requested by using
the SMFIP_HDR_LEADSPC flag. For example, the following header:
Network management 87
while previously (or without the flag SMFIP_HDR_LEADSPC) it was as follows:
Arguments
Table 42. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
headerf The header field name.
headerv The header field value. The content of the header
might include folded white space, that is, multiple
lines with following white space where lines are
separated by LF (not CR or LF). The trailing line
terminator (CR or LF) is removed.
Related information
RFC 2822
RFC 822
Purpose
The xxfi_eoh callback function handles the end of message headers.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_eoh)(
SMFICTX *ctx
);
Description
The xxfi_eoh callback function is called once after all the headers have been sent and processed, and
returns the SMFIS_CONTINUE flag.
Arguments
Table 43. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
Purpose
The xxfi_body callback function handles a piece of a messages body.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_body)(
SMFICTX *ctx,
unsigned char*bodyp ,
size_t len
);
Description
The xxfi_body callback function is not called or is called many times between the xxfi_eoh and xxfi_eom
callback function and returns the SMFIS_CONTINUE flag.
Note:
• The bodyp points to a sequence of bytes. It is not a C string (a sequence of characters that is terminated
by '\0'). Therefore, do not use the usual C string functions like strlen(3) on this byte block. The byte
sequence might contain '\0' characters inside the block. Hence, even if a trailing '\0' is added, C string
functions might still fail to work as expected.
• Because the message bodies can be large, defining the xxfi_body callback function can significantly
affect the filter performance.
• End-of-lines are represented as received from SMTP (normally CR/LF).
• Old filters make body changes to the new filters.
• Message bodies might be sent in multiple chunks with one call to the xxfi_body callback function per
chunk.
• This function returns the SMFIS_SKIP flag if a milter parameter has received sufficiently many body
chunks to make a decision, but still wants to invoke message modification functions that are only
allowed to be called from xxfi_eom callback function.
• The milter parameter must negotiate this behavior with the mail transfer agent (MTA), that is, it must
check whether the protocol action SMFIP_SKIP flag is available and if so, the milter parameter must
request it.
Arguments
Table 44. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
bodyp The pointer to the start of this block of body data.
bodyp is not valid outside this call to the xxfi_body
callback function.
len The amount of data pointed to by bodyp.
Related information
xxfi_eoh
xxfi_eom
Network management 89
xxfi_eom callback Function
Purpose
The xxfi_eom callback function handles the end of message.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_eom)(
SMFICTX *ctx
);
Description
The xxfi_eom callback function is called once after all calls to the xxfi_body callback function for a given
message and returns the SMFIS_CONTINUE flag.
Note: A filter is required to make all its modifications to the message headers, body, and envelope in the
xxfi_eom callback function. Modifications are made via the smfi_* routines.
Arguments
Table 45. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
Related information
xxfi_body
Purpose
The xxfi_abort callback function handles the current messages that are being aborted.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_abort)(
SMFICTX *ctx
);
Description
The xxfi_abort callback function is called at any time during message processing (that is between some
message-oriented routine and the xxfi_eom callback function) and returns the SMFIS_CONTINUE flag.
Note:
• The xxfi_abort callback function must reclaim any resources allocated on a per-message basis, and
must be tolerant of being called between any two message-oriented callbacks.
• Calls to the xxfi_abort and xxfi_eom callback function are mutually exclusive.
• The xxfi_abort callback function is not responsible for reclaiming connection-specific data, because the
xxfi_close callback function is always called when a connection is closed.
Arguments
Table 46. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter.
Related information
xxfi_close
xxfi_eom
Purpose
The xxfi_close callback function closes the current connection.
Syntax
#include <libmilter/mfapi.h>
sfsistat (*xxfi_close)(
SMFICTX *ctx
);
Description
The xxfi_close callback function is always called once at the end of each connection and returns the
SMFIS_CONTINUE flag.
The xxfi_close callback function might be called out-of-order, that is, before even the xxfi_connect
callback function is called. After a connection is established by the mail transfer agent (MTA) to the filter,
if the MTA decides this connection traffic will be discarded (for example, via an access_db result), no data
will be passed to the filter from the MTA until the client closes down. At that time, the xxfi_close callback
function is called. It can therefore be the only callback ever used for a given connection, and you should
anticipate this possibility when crafting the xxfi_close callback function code. In particular, it is incorrect
to assume that the private context pointer will be a value other than NULL in this callback.
The xxfi_close callback function is called on close even if the previous mail transaction was aborted.
The xxfi_close callback function is responsible for freeing any resources allocated on a per-connection
basis.
Because the connection is already closing, the return value is currently ignored.
Network management 91
Arguments
Table 47. Arguments
Item Description
ctx The opaque context structure is maintained in the
libmilter parameter.
Related information
xxfi_connect
Purpose
The xxfi_negotiate callback function handles negotiation.
Syntax
#include <libmilter/mfapi.h>
#include <libmilter/mfdef.h>
sfsistat (*xxfi_negotiate)(
SMFICTX *ctx,
unsigned long f0,
unsigned long f1,
unsigned long f2,
unsigned long f3,
unsigned long *pf0,
unsigned long *pf1,
unsigned long *pf2,
unsigned long *pf3);
Description
The xxfi_negotiate callback function is called at the start of each simple mail transfer protocol (SMTP)
connection and returns SMFIS_ALL_OPTS flag.
With this function, a milter parameter could dynamically determine and request operations and actions
during startup. In previous versions, the actions (f0) were fixed in the flags field of the smfiDesc
structure and the protocol steps (f1) were implicitly derived by checking whether a callback was
defined. Due to the extensions in the new milter version, such a static selection would not work if a
milter parameter requires new actions that are not available when talking to an older mail transfer
agent (MTA). Hence, in the negotiation a callback can determine which operations are available and
dynamically select those callback function which it needs and which are offered. If some operations are
not available, the milter parameter might either fall back to an older mode or stop the session and ask
the user to upgrade.
Protocol steps
(f1, *pf1)
:
• SMFIP_RCPT_REJ: By setting this bit, a milter parameter can request that the MTA should also send
RCPT commands that have been rejected because the user is unknown (or similar reasons), but not
those function which have been rejected because of syntax errors. If a milter requests this protocol
step, then it should check the macro {rcpt_mailer}: if that is set to error, then the recipient would be
rejected by the MTA. Usually the macros {rcpt_host} and {rcpt_addr} would contain an enhanced status
code and an error text in that case.
• SMFIP_SKIP indicates that the MTA understand the SMFIS_SKIP return code.
*pf1.
(f0, *pf0)
Arguments
Table 48. Arguments
Item Description
ctx The opaque context structure maintained in
libmilter parameter.
f0 The actions offered by the MTA.
f1 The protocol steps offered by the MTA.
Network management 93
Table 48. Arguments (continued)
Item Description
f2 For future extensions.
f3 For future extensions.
pf0 The actions requested by the milter
pf1 The protocol steps requested by the milter.
pf2 For future extensions.
pf3 For future extensions.
Return values
Table 49. Return Values
Item Description
SMFIS_ALL_OPTS If a milter just wants to inspect the available
protocol steps and actions, then it can return the
SMFIS_ALL_OPTS flag and the MTA would make
all protocol steps and actions available to the
milter. In this case, no values should be assigned
to the output parameters pf0 -pf3 as they would
be ignored.
SMFIS_REJECT The milter startup fails and it would not be
contacted again (for the current connection).
SMFIS_CONTINUE Continue processing. In this case the milter
parameter must set all output parameters pf0 -
pf3. See the following for an explanation how to
set those output parameters.
Purpose
The smfi_version function provides the libmilter (runtime) version information.
Syntax
#include <libmilter/mfapi.h>
int smfi_version(
unsigned int *pmajor,
unsigned int *pminor,
unsigned int *ppl
);
Description
The smfi_version callback function might be called at any time.
The compile-time version of the libmilter library is available in the SMFI_VERSION macro. To
extract the major and minor version as well as the current patch level from this macro, the
SM_LM_VRS_MAJOR(v), SM_LM_VRS_MINOR(v), and SM_LM_VRS_PLVL(v) macros might be used. A
milter parameter can check the SMFI_VERSION macro to determine which functions to use (at
compile time via C preprocessor statements). Using this macro and the smfi_version function, a milter
parameter can determine at run time whether it has been (dynamically) linked against the expected
libmilter version. Such a function must compare the major and minor version only, not the patch level,
that is, the libmilter library will be compatible despite different patch levels.
Arguments
Table 52. Arguments
Item Description
pmajor A pointer to an unsigned int variable to store major
version number.
pminor A pointer to an unsigned int variable to store minor
version number.
ppl A pointer to an unsigned int variable to store patch
level number.
Return values
The smfi_version function returns the MI_SUCCESS value.
smfi_setsymlist Function
Purpose
The smfi_setsymlist function sets the list of macros that the milter parameter wants to receive from
the mail transfer agent (MTA) for a protocol stage.
Syntax
#include <libmilter/mfapi.h>
int smfi_setsymlist(
SMFICTX *ctx,
int stage,
Network management 95
char *macros
);
Description
The smfi_setsymlist callback function must be called during the xxfi_negotiate function, and this
function can be used to override the list of macros that the milter parameter wants to receive from
the mail transfer agent (MTA).
Note: There is an internal limit on the number of macros that can be set (currently 5). However, this limit
is not enforced by the milter parameter, and is enforced only by the MTA, but a possible violation of this
restriction is not communicated back to the milter parameter.
Arguments
Table 53. Arguments
Item Description
ctx The opaque context structure maintained in
libmilter parameter.
stage The protocol stage during which the macro list
should be used. See the include/libmilter/
mfapi.h file for legal values, and look for the C
macros with the SMFIM_ prefix. Available protocol
stages are at least the initial connection, HELO or
EHLO, MAIL, RCPT, DATA, end of header, and the
end of a message.
macros The list of macros (separated by space). For
example: "{rcpt_mailer} {rcpt_host}".
Return values
The smfi_setsymlist function returns the MI_FAILURE value in the following cases. Otherwise the
function returns MI_SUCCESS.
• There is no enough free memory to make a copy of the macro list.
• The macros are NULL or empty.
• The stage is not a valid protocol stage.
• The macro list for a stage has been set before.
Related information
xxfi_negotiate
debug-flag: -d debug-list
debug-list: debug-flag[.debug-flag]*
debug-flag: debug-range[.debug-level]
debug-range: integer|integer-integer
debug-level: integer
Item Description
-d0 General debugging.
-d1 Show send information.
-d2 End with finis( ).
-d3 Print the load average.
-d4 Enough disk space.
-d5 Show events.
-d6 Show failed mail.
-d7 The queue file name.
-d8 DNS name resolution.
-d9 Trace RFC1413 queries.
-d9.1 Make host name canonical.
-d10 Show recipient delivery.
-d11 Trace delivery.
-d12 Show mapping of relative host.
-d13 Show delivery.
-d14 Show header field commas.
-d15 Show network get request activity.
-d16 Outgoing connections.
-d17 List MX hosts.
Note: There are now almost 200 defined debug flags in sendmail.
Network management 97
For example, clients can perform searches and mark messages with status flags such as deleted or
answered. In addition, messages can remain in the server database until explicitly removed. The IMAP
server also allows simultaneous interactive access to user mailboxes by multiple clients. The IMAPDS
version uses the OpenSSL libraries, which require security certificates.
Each type of server is used for mail access only. These servers rely on the Simple Mail Transfer Protocol
(SMTP) for sending mail.
Each protocol is an open protocol, based on standards described in RFCs. The IMAP servers are based
on RFC 2060 and 2061, and the POP servers are based on RFC 1939. Both are connection-oriented using
TCP sockets. The IMAP server listens on port 143, and the IMAPDS server listens on port 993. The POP
server listens on port 110, and the POP3DS server listens on port 995. All servers are handled by the
inetd daemon.
Requirement: To use the OpenSSL versions, you must install OpenSSL. OpenSSL is available on the AIX
Toolbox for Linux Applications CD.
1. Uncomment the imapd or imapds and pop3d or pop3ds configuration entries in the /etc/
inetd.conf file.
The following are examples of the configuration entries:
2. Set the configuration files for the imapds server in the /etc/imapd.cf file and for the pop3ds server
in the /etc/pop3d.cf file.
By default, the less secured security handshaking protocols Secure Sockets Layer version 2 (SSLv2)
and SSLv3 are enabled for the imapds server and the pop3ds server. However, you can disable SSLv2
and SSLv3 by updating the configuration files as shown in the following example. You can also enable
or disable any cipher by specifying the SSL_CIPHER_LIST string in the configuration file. This option
overwrites the default ciphers string that is hardcoded in the applications.
Configuration file for the imapds server (/etc/imapd.cf):
#==================================================================
#
# Sample IMAP Server Configuration File
#
#==================================================================
#==================================================================
# Uncomment the line below to Disable SSL v2 for the imap server.
#
# Disable SSL V2 ---> SSL_OP_NO_SSLv2 YES
# Allow SSL V2 ---> SSL_OP_NO_SSLv2 NO
#
#
#SSL_OP_NO_SSLv2 YES <-------------- uncomment this line to disable sslv2
#==================================================================
# Uncomment the line below to Disable SSL v3 for the imap server.
#
# Disable SSL V3 ---> SSL_OP_NO_SSLv3 YES
# Allow SSL V3 ---> SSL_OP_NO_SSLv3 NO
#
#
#SSL_OP_NO_SSLv3 YES <-------------- uncomment this line to disable sslv3
#==================================================================
# Uncomment the line below to use the user provided cipher list
# for the imap server. Parser logic expect Cipher string within " ".
#
#
#SSL_CIPHER_LIST "ALL:!LOW" <--- uncomment this line to customized (enable/disabled)
#==================================================================
#
# Sample POP3 Server Configuration File
#
#==================================================================
#==================================================================
# Uncomment the line below to Disable SSL v2 for the pop3d server.
#
# Disable SSL V2 ---> SSL_OP_NO_SSLv2 YES
# Allow SSL V2 ---> SSL_OP_NO_SSLv2 NO
#
#
#SSL_OP_NO_SSLv2 YES <----------- uncomment this line to disable sslv2
#==================================================================
# Uncomment the line below to Disable SSL v3 for the pop3d server.
#
# Disable SSL V3 ---> SSL_OP_NO_SSLv3 YES
# Allow SSL V3 ---> SSL_OP_NO_SSLv3 NO
#
#
#SSL_OP_NO_SSLv3 YES <----------- uncomment this line to disable sslv3
#==================================================================
# Uncomment the line below to use the user provided cipher list
# for the pop3d server. Parser logic expect Cipher string within " ".
#
#
#SSL_CIPHER_LIST "ALL:!LOW" <---- uncomment this line to customized (enable/disabled)
ciphers string
#==================================================================
refresh -s inetd
2. If you do not receive similar output, recheck the entries in the /etc/inetd.conf file, and then rerun
the refresh -s inetd command.
3. To test the configuration of the imapd server, use Telnet to access the imap2 server, port 143 (for
IMAPDS, Telnet port 993).
When you connect using Telnet, you get the imapd prompt. You can then enter the IMAP Version 4
commands as defined in RFC 1730. To run a command, type a period (.), followed by a space, then
token, command name, and any parameters. The token is used to sequence the command name. For
example:
Passwords are echoed when you Telnet into the imapd server.
Network management 99
In the following Telnet example, you must provide your own password where id_password is indicated
in the login command.
Tip: For IMAPDS, the command and output varies slightly.
4. To test the configuration of the pop3d server, use Telnet to access the POP3 port, 110 (for POP3DS,
Telnet port 995).
When you connect using Telnet, you get the pop3d prompt. You can enter the POP commands that are
defined in RFC 1725. To run one of the commands, type a period (.), followed by a space, and then the
command name. For example:
. CommandName
Passwords are echoed when you Telnet into the pop3d server.
In the following Telnet example, you must provide your own password where id_password is indicated
in the pass command.
Tip: For POP3DS, the command and output varies slightly.
*.debug /usr/adm/imapd.log
2. The usr/adm/imapd.log file must exist before the syslogd daemon reads the /etc/
syslog.conf configuration file. To create this file, type the following at a command-line prompt
and press Enter:
3. Refresh the syslogd daemon to read its configuration file again. Type the following at a command line
prompt and press Enter:
refresh -s syslogd
Item Description
/usr/share/lib/Mail.rc Sets local system defaults for all users of the mail
program. A text file you can modify to set the default
characteristics of the mail command.
$HOME/.mailrc Enables the user to change the local system defaults
for the mail facility.
$HOME/mbox Stores processed mail for the individual user.
/usr/bin/Mail, /usr/bin/mail, Specifies three names linked to the same program.
or /usr/bin/mailx The mail program is one of the user interfaces to the
mail system.
/var/spool/mail Specifies the default mail drop directory. By default,
all mail is delivered to the /var/spool/mail/
UserName file.
/usr/bin/bellmail Performs local mail delivery.
/usr/bin/rmail Performs remote mail interface for BNU.
/var/spool/clientmqueue Keeps the log file and temporary files that are
associated with the locally generated outbound
messages in the mail queue.
/var/spool/mqueue Contains the log file and temporary files associated
with the messages in the mail queue.
Item Description
/usr/sbin/imapd The Internet Message Access Protocol (IMAP) server process.
/usr/sbin/pop3d The Post Office Protocol Version 3 (POP3) server process.
TCP/IP terminology
You might find it useful to become familiar with the following Internet terms as they are used in relation to
TCP/IP.
Item Description
client A computer or process that accesses the data, services, or resources of another computer
or process on the network.
host A computer that is attached to an Internet network and can communicate with other
Internet hosts. The local host for a particular user is the computer at which that user is
working. A foreign host is any other host name on the network. From the point of view of
the communications network, hosts are both the source and destination of packets. Any
host can be a client, a server, or both. On an Internet network, a host is identified by its
Internet name and address.
network The combination of two or more hosts and the connecting links between them. A physical
network is the hardware that makes up the network. A logical network is the abstract
organization overlaid on all or part of one or more physical networks. The Internet network
is an example of a logical network. The interface program handles translation of logical
network operations into physical network operations.
1. Decide which type of network hardware you want to use: token-ring, Ethernet Version 2, IEEE 802.3,
Fiber Distributed Data Interface (FDDI), Serial Optical Channel (SOC), or Serial Line Interface Protocol
(SLIP).
2. Plan the physical layout of the network.
Consider which functions each host machine will serve. For example, you must decide which machine
or machines will serve as gateways before you cable the network.
3. Decide whether a flat network or a hierarchical network organization best fits your needs.
If your network is fairly small, at a single site, and consists of one physical network, then a flat network
probably suits your needs. If your network is very large or complex with multiple sites or multiple
physical networks, a hierarchical network might be a more efficient network organization for you.
4. If your network is to be connected to other networks, you must plan how your gateways should be set
up and configured.
Things to consider are:
a. Decide which machine or machines will serve as gateways.
b. Decide whether you need to use static or dynamic routing, or a combination of the two. If you
choose dynamic routing, decide which routing daemons each gateway will use in light of the types
of communications protocols you need to support.
5. Decide on an addressing scheme.
If your network will not be part of a larger internetwork, choose the addressing scheme that best fits
your needs. If you want your network to be connected to a larger internetwork such as the Internet,
you will have to obtain an official set of addresses from your internet service provider (ISP).
6. Decide whether your system needs to be divided into subnets. If so, decide how you will assign subnet
masks.
7. Decide on a naming scheme. Each machine on the network needs its own unique host name.
Installation of TCP/IP
Software that is required to configure TCP/IP network is installed along with the installation of base
operating system. TCP/IP network does not require any specific packages to be installed further.
For information on installing base operating system, see Installation and Migration.
Configuration of TCP/IP
After the base operating system of AIX is installed on your system, you are ready to begin configuring the
TCP/IP network for your system.
Many TCP/IP configuration tasks can be performed in more than one way:
• Using the System Management Interface Tool (SMIT)
• Editing a file format
• Issuing a command at the shell prompt.
For example, the rc.net shell script performs required minimum host configuration for TCP/IP during
the system startup process (the rc.net script is run by the configuration manager program during the
second boot phase). By using SMIT to perform the host configuration, the rc.net file is configured
automatically.
Alternatively, you can configure the /etc/rc.bsdnet file using a standard text editor. With this method,
you can specify the traditional UNIX TCP/IP configuration commands such as ifconfig, hostname,
and route. If using the file edit method, you must enter smit configtcp fast path and then select
BSD Style rc Configuration. See List of TCP/IP Programming References in Communications Programming
Concepts for information about TCP/IP files and file formats.
A few tasks, such as configuring a name server, cannot be done using SMIT.
Use this procedure as a guide for configuring your network. Ensure that you have read and understood the
appropriate material.
Before beginning this procedure, make sure that the following prerequisites are true:
1. Network hardware is installed and cabled. For more information about installing and cabling your
hardware, see “TCP/IP local area network adapter cards” on page 159.
2. TCP/IP software is installed. For more information about installing the TCP/IP software, see the
Installation and migration.
After you bring your network up and it is running properly, you might find it useful to refer to this checklist
for the purpose of debugging.
To configure your TCP/IP network, use the following steps:
1. Read “TCP/IP protocols” on page 122 for the basic organization of TCP/IP.
You should understand:
• the layered nature of TCP/IP (that is, different protocols reside at different layers)
• how data flows through the layers
2. Minimally configure each host machine on the network.
This means adding a network adapter, assigning an IP address, and assigning a host name to each
host, as well as defining a default route to your network. For background information on these tasks,
Host configuration
Each host machine on your network must be configured to function according to the needs of the end
users and the network as a whole.
For each host on the network, you must configure the network interface, set the Internet address, and
set the host name. You also must set up static routes to gateways or other hosts, specify daemons to be
started by default, and set up the /etc/hosts file for name resolution (or set up the host to use a name
server for name resolution).
Gateway configuration
If your network is going to communicate with other networks, you will need to configure at least one
gateway host.
You must consider which communications protocols you want to support, and then use whichever routing
daemon (the routed or gated daemon) that supports those protocols.
Item Description
arp Displays or changes the Internet address to hardware address
translation tables used by the Address Resolution protocol.
finger Returns information about users on a specified host.
host Shows the Internet address of a specified host or the host name
of a specified Internet address.
hostname Shows or sets the Internet name and address of the local host.
ifconfig Configures network interfaces and their characteristics.
netstat Shows local and foreign addresses, routing tables, hardware
statistics, and a summary of packets transferred.
no Sets or shows current network kernel options.
ping Determines whether a host is reachable.
route Permits you to manipulate the routing tables manually.
ruptime Shows status information on hosts that are connected to local
physical networks and are running the rwhod server.
rwho Shows status information for users on hosts that are connected
to local physical networks and running the rwhod server.
setclock Reads the network time service and sets the time and date of the
local host accordingly.
timedc Returns information about the timed daemon.
trpt Reports protocol tracing on TCP sockets.
whois Provides the Internet name directory service.
host/FullInterfaceName
ftp/FullInterfaceName
where FullInterfaceName is the interface name and domain name for the primary
HostName.DomainName.
host/FullInterfaceName@Realmname
ftp/FullInterfaceName@Realmname
where FullInterfaceName is the interface name and the domain name for the primary
HostName.DomainName. Realmname is the name of the Native Kerberos V realm.
TCP/IP customization
To customize TCP/IP, create a .netrc file.
The .netrc file specifies automatic login information for the ftp and rexec commands. You can also
write new ftp macros, which are defined in the $HOME/.netrc file. To customize key functions or
sequences, create and edit the $HOME/.3270keys file. In addition, the .k5login file specifies which
DCE principals on which cells are allowed access to the user's account.
cp /usr/samples/tcpip/netrc $HOME
2. Edit the $HOME/netrc file to supply the appropriate HostName, LoginName, and Password variables.
For example:
4. Rename the $HOME/netrc file to $HOME/.netrc file. The initial period (.) causes the file to be
hidden.
mv $HOME/netrc $HOME/.netrc
The $HOME/.netrc file can contain multiple login definitions and up to 16 macros per login definition.
macdef init
put schedule
Be sure to insert a blank line at the end of your ftp macro. The blank line terminates the ftp macro.
In the above example, the macdef subcommand defines the subcommand macro init. The line
following is the command the macro specifies, in this case put schedule, where schedule is the
name of a file.
2. After you create the ftp macro, at the command line prompt, type:
ftp hostname
Where hostname is the name of the host to which you are connecting.
ftp scans the $HOME/.netrc file for a login definition matching your host name and uses that login
definition to log you in.
3. After you log in, at the command line prompt, type:
ftp init
In this example, ftp scans for the macro named init and executes the command or commands the
macro specifies.
An ftp macro is associated with the login entry immediately preceding it. ftp macros are not global
to the $HOME/.netrc file. The macro init is executed automatically upon login. Other macros can be
executed from the ftp prompt (ftp>) by typing the following:
$getit
2. Change the bind statements in the $HOME/.3270keys file to change the assignment of a key set using
the following steps:
a) Start the vi editor on a new file and enter insert mode.
b) Press the Ctrl-V key sequence and then the key that you want to map.
This displays a value for the pressed key.
c) Place the displayed value on the appropriate line in the Sequence column of the
$HOME/.3270keys file.
For example, after you have invoked the vi editor and entered insert mode, press Ctrl-V and then
Alt-Insert. This displays [[141q. The first [ is replaced with \e in the Sequence column so that the
configured line looks like the following:
.k5login file
The .k5login file is used when Kerberos V.5 authentication is used for the secure rcmds. This file
specifies which DCE principals on which cells are allowed access to the user's account.
The file is located at $HOME/.k5login. It should be owned by the local user and the owner should have
read permission on this file. The minimum permission setting for this file is 400.
The .k5login file contains a list of the DCE principal/cell pairs allowed to access the account. The
principal/cell pairs are kept in Kerberos format (as opposed to DCE format). For example, if the file
contains
UserA@Cell1
then the DCE principal UserA on the DCE cell Cell1 can access the account.
If the DCE principal is the same as the user's account name, and if there is no$HOME/.k5login file for
the user's account, the DCE principal gains access to the account (provided Kerberos V.5 authentication is
configured).
For more information about Kerberos V.5 authentication, see “Authentication and the secure rcmds” on
page 107.
Note: The rsh and rexec commands can be used to execute commands on a remote host, but neither is
a trusted command, so they may not meet all security levels configured into your computer. As a result,
these commands can be disabled if your system requires extra security.
telnet host1
Trying . . .
Connected to host1
Escape character is '^T'.
After you have logged in, you can issue commands. To log out of the system and close the connection,
press the Ctrl-D key sequence.
If you cannot log in, cancel the connection by pressing the Ctrl-T key sequence.
Item Description
mail Sends and receives electronic memos and letters
talk Lets you have an interactive conversation with a user on a remote host
1. To talk to the remote user dale@host2 logged in on a remote host, jane@host1 types:
talk dale@host2
This message informs dale@host2 that jane@host1 is trying to converse with her.
2. To accept the invitation, dale@host2 types:
talk jane@host1
Users dale@host2 and jane@host1 are now able to have an interactive conversation.
3. To end a conversation at any time, either user can press the Ctrl-C key sequence.
This returns them to the command line prompt.
File transfers
Although it is possible to send relatively short files using electronic mail, there are more efficient ways of
transferring large files.
Electronic mail programs are usually designed to transmit relatively small amounts of text; therefore,
other means are needed to transfer large files effectively. The ftp, rcp, and tftp commands rely on
TCP/IP to establish direct connections from your local host to a remote host. Basic Network Utilities
(BNU) can also use TCP/IP to provide direct connections with foreign hosts.
Before attempting file transfer using the ftp and rcp commands, make sure the following conditions are
true:
1. You must have remote login permission specified in the remote host's $HOME/.netrc file if the
automatic login feature is to be used. Otherwise, you must know a login name and password for the
remote host. For more information about the .netrc file, see “Creating the .netrc file” on page 109.
Alternatively, the system can be configured to use Kerberos V.5 authentication. This is used instead of
the .netrc or $HOME/.rhosts files. See “Authentication and the secure rcmds” on page 107.
2. If you wish to copy a file from a remote host, you must have read permission for that file.
Note: The read and write permissions for files and directories on a remote host are determined by the
login name used.
3. If you wish to copy a file from your local host to a remote host, you must have write permission for the
directory that is to contain the copied file. Also, if the directory on the remote host contains a file with
the same name as the file that you wish to place in it, you must have write permission to append the
file on the remote host.
ftp HostName
If you have automatic login permission, information similar to the following is displayed on your local
host:
Connected to canopus.austin.century.com.
220 canopus.austin.century.com FTP server
(Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready.
331 Password required for dee.
230 User dee logged in.
ftp>
Connected to canopus.austin.century.com.
220 canopus.austin.century.com FTP server
(Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready.
Name (canopus:eric): dee
331 Password required for dee.
Password:
230 User dee logged in.
ftp>
ftp
open HostName
If you have automatic login permission, information similar to the following is displayed on your local
host:
Connected to canopus.austin.century.com.
220 canopus.austin.century.com FTP server
(Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready.
331 Password required for dee.
230 User dee logged in.
ftp>
Connected to canopus.austin.century.com.
220 canopus.austin.century.com FTP server
(Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready.
Name (canopus:eric): dee
331 Password required for dee.
Password:
230 User dee logged in.
ftp>
binary
get FileName
The file is placed in the directory from which you issued the ftp command.
4. To end the session, press the Ctrl-D key sequence, or type quit.
binary
put FileName
4. To end the session, press the Ctrl-D key sequence, or type quit.
tftp host1
In this example, host1 is the name of the host to which you wish to connect.
The tftp> prompt is displayed.
2. To determine that a connection has been established, type:
status
Connected to host1
Mode: netascii Verbose: off Tracing: off
Remxt-interval: 5 seconds, Max-timeout: 25 seconds
tftp>
3. Enter the get subcommand, the name of the file to be transferred, and the name to be assigned to the
file on the remote system:
The /home/alice directory on the remote host must have read permission set for other users. In this
example, the /home/alice/update file is transferred from host1 to the update file in the current
directory on the local system.
4. To end the session, type:
quit
tftp host1
In this example, host1 is the name of the host to which you wish to connect.
The tftp> prompt is displayed.
2. To determine that a connection has been established, type:
status
Connected to host1
Mode: netascii Verbose: off Tracing: off
Remxt-interval: 5 seconds, Max-timeout: 25 seconds
tftp>
3. Enter the put subcommand, the name of the file to be transferred from the local host, and the path
and file name for the file on the remote host:
The /home/alice directory on the remote host must have write permission set for others.
The myfile file, located in the user's current working directory, is transferred to host1. The path
name must be specified unless a default has been established. The myfile file appears on the remote
host as yourfile.
4. To end the session, type:
quit
where QueueName is the name of the queue (such as rp1), and PrinterName is the name of the printer
(such as drp1) as found in the /usr/lib/lpd/qconfig file. Do not omit the colon (:) between the
QueueName and the PrinterName. FileName is the name of the file that you wish to print.
The following are examples of how the enq command can be used:
• To print the file memo on the default printer, type:
enq memo
pr prog.c | enq
The pr command puts a heading at the top of each page that includes the date the file was last
modified, the name of the file, and the page number. The enq command then prints the file.
• To print the file report on the next available printer configured for the fred queue, type:
• To print several files beginning with the prefix sam on the next available printer configured for the fred
queue, type:
All files beginning with the prefix sam are included in one print job. Normal status commands show only
the title of the print job, which in this case is the name of the first file in the queue unless a different
value was specified with the -T flag. To list the names of all the files in the print job, use the enq -A -L
long status command .
smit
where QueueName is the name of the queue (such as rp1), and PrinterName is the name of the printer
(such as drp1) as found in the /usr/lib/lpd/qconfig file. Do not omit the : (colon) between the
QueueName and the PrinterName. FileName is the name of the file that you want to print.
4. End the connection to the remote host by pressing the Ctrl-D sequence or by typing quit.
Item Description
finger or f Displays information about the current users on a specified host. This information
can include the user's login name, full name, and terminal name, as well as the date
and time of login.
host Resolves a host name into an Internet address or an Internet address into a host
name.
ping Helps determine the status of a network or host. It is most commonly used to verify
that a network or host is currently running.
rwho Shows which users are logged in to hosts on a local network. This command displays
the user name, host name, and date and time of login for everyone on the local
network.
whois Identifies to whom a user ID or nickname belongs. This command can only be used if
your local network is connected to the Internet.
finger @alcatraz
User brown is logged in at the console, user smith is logged in from a pseudo teletype line pts0, and
user jones is logged in from a tty0. Your system administrator can set up your system so that the finger
command works differently. If you encounter any problems using the finger command, contact your
system administrator.
finger brown@alcatraz
Your system administrator can set up your system so that the finger command works differently. If you
encounter any problems using the finger command, contact your system administrator.
TCP/IP protocols
Protocols are sets of rules for message formats and procedures that allow machines and application
programs to exchange information. These rules must be followed by each machine involved in the
communication in order for the receiving host to be able to understand the message. The TCP/IP suite of
protocols can be understood in terms of layers (or levels).
This figure depicts the layers of the TCP/IP protocol. From the top they are, Application Layer, Transport
Layer, Network Layer, Network Interface Layer, and Hardware.
TCP/IP carefully defines how information moves from sender to receiver. First, application programs send
messages or streams of data to one of the Internet Transport Layer Protocols, either the User Datagram
Protocol (UDP) or the Transmission Control Protocol (TCP). These protocols receive the data from the
application, divide it into smaller pieces called packets, add a destination address, and then pass the
packets along to the next protocol layer, the Internet Network layer.
The Internet Network layer encloses the packet in an Internet Protocol (IP) datagram, puts in the
datagram header and trailer, decides where to send the datagram (either directly to a destination or
else to a gateway), and passes the datagram on to the Network Interface layer.
The Network Interface layer accepts IP datagrams and transmits them as frames over a specific network
hardware, such as Ethernet or Token-Ring networks.
This figure shows the flow of information down the TCP/IP protocol layers from the Sender to the Host.
Frames received by a host go through the protocol layers in reverse. Each layer strips off the
corresponding header information, until the data is back at the application layer.
This figure shows the flow of information up the TCP/IP protocol layers from the Host to the Sender.
Frames are received by the Network Interface layer (in this case, an Ethernet adapter). The Network
Interface layer strips off the Ethernet header, and sends the datagram up to the Network layer. In the
Network layer, the Internet Protocol strips off the IP header and sends the packet up to the Transport
layer. In the Transport layer, the TCP (in this case) strips off the TCP header and sends the data up to the
Application layer.
Hosts on a network send and receive information simultaneously. Figure 7 on page 123 more accurately
represents a host as it communicates.
This figure shows data flowing both ways through the TCP/IP layers.
IPv6 autoconfiguration
The primary mechanisms available that enable a node to start up and communicate with other nodes over
an IPv4 network are hard-coding, BOOTP, and DHCP
IPv6 introduces the concept of scope to IP addresses, one of which is link-local. This allows a host to
construct a valid address from the predefined link-local prefix and its local identifier. This local identifier is
typically derived from the medium access control (MAC) address of the interface to be configured. Using
this address, the node can communicate with other hosts on the same subnet and, for a fully-isolated
subnet, might not need any other address configuration.
Item Description
unicast A packet sent to a unicast address is delivered to the interface identified by
that address. A unicast address has a particular scope: link-local, site-local,
global. There are also two special unicast addresses:
• ::/128 (unspecified address)
• ::1/128 (loopback address)
Note: There are no broadcast addresses in IPv6. Their function has been superseded by the multicast
address.
IPv6 autoconfiguration
The primary mechanisms available that enable a node to start up and communicate with other nodes over
an IPv4 network are hard-coding, BOOTP, and DHCP.
IPv6 introduces the concept of scope to IP addresses, one of which is link-local. This allows a host to
construct a valid address from the predefined link-local prefix and its local identifier. This local identifier is
typically derived from the medium access control (MAC) address of the interface to be configured. Using
this address, the node can communicate with other hosts on the same subnet and, for a fully-isolated
subnet, might not need any other address configuration.
Routing simplification
To simplify routing issues, IPv6 addresses are considered in two parts: a prefix and an ID. This might
seem the same as the IPv4 net-host address breakdown, but it has two advantages.
Item Description
no class No fixed number of bits for prefix or ID, which allows for a reduction in loss
due to over-allocation
nesting An arbitrary number of divisions can be employed by considering different
numbers of bits as the prefix.
Case 1
128 bits
node address
Case 2
Item Description
n bits 128-n bits
Subnet prefix Interface ID
Item Description
n bits 80-n bits 48 bits
Subscriber prefix Subnet ID Interface ID
Case 4:
Item Description
s bits n bits m bits 128-s-n-m bits
Subscribe prefix Area ID Subnet ID Interface ID
Generally, IPv4 cannot go beyond Case 3, even with Variable Length Subnet Mask (VLSM is a means of
allocating IP addressing resources to subnets according to their individual need rather than some general
network-wide rule). This is as much an artifact of the shorter address length as the definition of variable
length prefixes, but is worth noting nonetheless.
IPng includes an improved options mechanism over IPv4. IPv6 options are placed in separate extension
headers that are located between the IPv6 header and the transport-layer header in a packet. Most
extension headers are not examined or processed by any router along a packet delivery path until it
arrives at its final destination. This mechanism facilitates a major improvement in router performance
for packets containing options. In IPv4 the presence of any options requires the router to examine all
options.
Another improvement is that, unlike IPv4 options, IPv6 extension headers can be of arbitrary length and
the total amount of options carried in a packet is not limited to 40 bytes. This feature, plus the manner in
which it is processed, permits IPv6 options to be used for functions that were not practical in IPv4, such
as the IPv6 Authentication and Security Encapsulation options.
To improve the performance when handling subsequent option headers and the transport protocol that
follows, IPv6 options are always an integer multiple of eight octets long to retain this alignment for
subsequent headers.
By using extension headers instead of a protocol specifier and options fields, newly defined extensions
can be integrated more easily.
Current specifications define extension headers in the following ways:
• Hop-by-hop options that apply to each hop (router) along the path
• Routing header for loose/strict source routing (used infrequently)
• A fragment defines the packet as a fragment and contains information about the fragment (IPv6 routers
do not fragment)
• Authentication (See TCP/IP security in Security
• Encryption (See TCP/IP security in Security
• Destination options for the destination node (ignored by routers).
Item Description
0 uncharacterized traffic
1 "filler" traffic (for example, netnews)
2 unattended data transfer (for example, mail)
3 (reserved)
4 attended bulk transfer (for example, FTP)
5 (reserved)
Non-congestion-controlled traffic is defined as traffic that responds to congestion by dropping (or simply
not resending) packets, such as video, audio, or other real-time traffic. Explicit levels are not defined with
examples, but the ordering is similar to that for congestion-controlled traffic:
• The lowest value that the source is most willing to have discarded should be used for traffic.
• The highest value that the source is least willing to have discarded should be used for traffic.
This priority control is only applicable to traffic from a particular source address. Control traffic from one
address is not an explicitly higher priority than attended bulk transfer from another address.
Flow labeling
Outside of basic prioritization of traffic, IPv6 defines a mechanism for specifying a particular flow of
packets. In IPv6 terms, a flow is defined as a sequence of packets sent from a particular source
to a particular (unicast or multicast) destination for which the source desires special handling by the
intervening routers.
This flow identification can be used for priority control, but might also be used for any number of other
controls.
The flow label is chosen randomly, and does not identify any characteristic of the traffic other than the
flow to which it belongs. This means that a router cannot determine that a packet is a particular type by
examining the flow label. It can, however, determine that it is part of the same sequence of packets as the
last packet containing that label.
Note: Until IPv6 is in general use, the flow label is mostly experimental. Uses and controls involving flow
labels have not yet been defined nor standardized.
IPv6 tunneling
Tunneling provides a way to use an existing IPv4 routing infrastructure to carry IPv6 traffic.
The key to a successful IPv6 transition is compatibility with the existing installed base of IPv4
hosts and routers. Maintaining compatibility with IPv4 while deploying IPv6 streamlines the task of
transitioning the Internet to IPv6. While the IPv6 infrastructure is being deployed, the existing IPv4
routing infrastructure can remain functional, and can be used to carry IPv6 traffic.
IPv6 or IPv4 hosts and routers can tunnel IPv6 datagrams over regions of IPv4 routing topology by
encapsulating them within IPv4 packets. Tunneling can be used in a variety of ways:
Item Description
Router-to-Router IPv6 or IPv4 routers interconnected by an IPv4 infrastructure can tunnel
IPv6 packets between themselves. In this case, the tunnel spans one
segment of the end-to-end path that the IPv6 packet takes.
Host-to-Router IPv6 or IPv4 hosts can tunnel IPv6 packets to an intermediary IPv6 or
IPv4 router that is reachable through an IPv4 infrastructure. This type of
tunnel spans the first segment of the packet's end-to-end path.
Host-to-Host IPv6 or IPv4 hosts that are interconnected by an IPv4 infrastructure can
tunnel IPv6 packets between themselves. In this case, the tunnel spans
the entire end-to-end path that the packet takes.
Router-to-Host IPv6/IPv4 routers can tunnel IPv6 packets to their final destination IPv6
or IPv4 host. This tunnel spans only the last segment of the end-to-end
path.
Item Description
Option 0 No multihomed actions are taken. Transmissions will go out on the first
link-local interface. When the Neighbor Discovery Protocol (NDP) must
perform address resolution, it multicasts a Neighbor Solicitation message
out on each interface with a link local address defined. NDP queues the data
packet until the first Neighbor Advertisement message is received. The data
packet is then sent out on this link.
Option 1 When the NDP must perform address resolution, that is, when sending a
data packet to a destination and the link-layer information for the next hop
is not in the Neighbor Cache, it multicasts a Neighbor Solicitation message
out on each interface with a link-local address defined. NDP then queues
the data packet until it gets the link-layer information. NDP then waits until
a response is received for each interface. This guarantees that the data
packets are sent on the appropriate outgoing interfaces. If NDP did not wait,
but responded to the first Neighbor Advertisement received, it would be
possible for a data packet to be sent out on a link not associated with the
packet source address. Because NDP must wait, a delay in the first packet
being sent occurs. However, the delay occurs anyway in waiting for the first
response.
netstat -ni
2. With root authority, configure your IPv6 settings by typing the following command:
autoconf6
netstat -ni
startsrc -s ndpd-host
netstat -ni
autoconf6
3. Manually configure global addresses on the router's interfaces belonging to each of the two subnets by
typing the following commands:
You will need to do this for every subnet that your router is sending packets to.
4. To activate IPv6 forwarding, type the following:
no -o ip6forwarding=1
startsrc -s ndpd-router
The ndpd-router daemon will advertise prefixes corresponding to the global addresses that you
configured on the router. In this case, the ndpd-router will advertise prefix 3ffe:0:0:aaaa::/64 on
en0 and prefix 3ffe:0:0:bbbb::/64 on en1
When you reboot, your IPv6 configuration will be set. Repeat this process for each host.
3. Add the following lines immediately after the line that you just uncommented in the previous step:
In this scenario, our network has only two subnets, en0 and en1. You will need to add a line to this file
for every subnet that your router is sending packets to.
4. Uncomment the following line in the file:
autoconf6 -A
netstat -ni
startsrc -s ndpd-host
autoconf6 -A
2. Manually configure global addresses on the router's interfaces belonging to each of the two subnets by
typing the following commands:
Note: You will need to do this for every subnet that your router is sending packets to.
3. To activate IPv6 forwarding, type the following:
no -o ip6forwarding=1
startsrc -s ndpd-router
The ndpd-router daemon will advertise prefixes corresponding to the global addresses that you
configured on the router. In this case, the ndpd-router will advertise prefix 3ffe:0:0:aaaa::/64 on
en0 and prefix 3ffe:0:0:bbbb::/64 on en1.
5. Press Enter to continue.
6. Press Enter a second time to confirm your decision and begin the installation of your software bundle.
4. Add the following lines immediately after the line that you just uncommented in the previous step:
In this scenario, our network has only two subnets, en0 and en1. You will need to add a line to this file
for every subnet that your router is sending packets to.
5. Uncomment the following line in the file:
no -r -o ip6forwarding=1
Things to consider
• The information in this how-to scenario was tested by using specific versions of AIX. The results that
you obtain might vary significantly depending on your version and level of AIX.
• The example assumes 2001:1:2::/48 is the Aggregate Global Unicast Address for the IPv6
interface assigned by the Internet Assigned Numbers Authority (IANA) to the provider. And
2001:1:2:3:4::/64 is the subnet that uses bits 49 - 64 assigned by the network administrator.
• You must refer RFC 3587 to understand the IPv6 Global Unicast Address Format.
Step 1. Setting up hosts for IPv6
Follow this procedure for setting up hosts for IPv6.
1. With root authority, configure your IPv6 settings by entering the following command:
# netstat -ni
3. Use the chdev command to add the IPv6 address to the host interface. For this example, the low-order
64 bits are taken from low-order 64 bits of Link-Local IP generated by autoconf6 on interface en0.
4. Delete any existing prefix link routes for the following prefix:
5. Configure prefix static route on the host to add reachability to the router, where
fe80::206:29ff:fe04:66e is the router or a gateway that has connectivity to the router.
Note: If a change is needed for the default route, make sure autoconf6 is run with the –R option that
prevents it from adding or overwriting any default routes on the node. Then, repeat steps 3-5.
Step 2. Setting up the router for IPv6
Follow this procedure for setting up the router for IPv6.
1. Check to ensure that the IPv4 settings are configured, by entering the following command:
# netstat -ni
# autoconf6
# no -o ip6forwarding=1
5. Manually configure routes on the router to enable accurate delivery of packets. For example, if fe80::
3ca6:70ff:fe00:3004/64 is the gateway for prefix 2001:2:3:4::/64, add a prefix route as
follows:
Note: If the preceding line is not present in the /etc/rc.tcpip file, add it in the file.
3. Add the -A flag to start /usr/sbin/autoconf6 "".
4. Add the following line in the /etc/rc.tcpip file after the line you uncommented (or added):
5. Delete any previously existing prefix routes, by entering the following command:
Note: If the preceding line is not present in the /etc/rc.tcpip file, add it in the file.
3. Add the -A flag to start /usr/sbin/autoconf6 "".
4. Add the following lines after the line that you uncommented (or added) in step 2 to configure Global IP
on the router and to configure the prefix route.
In this scenario, the network has only one subnet, en0. You must add a line to this file for every subnet
to which the router sends packets.
• To enable IPv6 and one automatic tunnel, type the following command:
autoconf6
Running the netstat -ni command now produces the following results:
# netstat -in
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en0 1500 fe80::204:acff:fe49:4910 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
en2 1500 fe80::220:35ff:fe12:3ae8
sit0 1480 link#7 10.1.1.1 0 0 0 0 0
sit0 1480 ::10.1.1.1
If en2 (IP address 10.1.1.1) is the primary interface, address ::10.1.1.1 is now available for automatic
tunneling over the en2 interface.
• To enable an automatic tunnel through interface en0, type the following command:
autoconf6 -s -i en0
Running the netstat -ni command now produces the following results:
# netstat -in
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en0 1500 fe80::204:acff:fe49:4910 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
en2 1500 fe80::220:35ff:fe12:3ae8
sit0 1480 link#7 1.1.1.3 0 0 3 0 0
sit0 1480 ::10.1.1.1 0 0 3 0 0
sit0 1480 ::1.1.1.3 0 0 3 0 0
This action causes an IPv4-compatible IPv6 address to be added to the existing SIT interface, sit0.
Tunneling is now also enabled for interface en0 using address ::1.1.1.3. The same interface, sit0, will
be used for both tunnels.
Note: The automatic tunnels are deleted when the system is restarted. To have the automatic tunnel
present at boot time, add the required arguments to the autoconf6 command in the /etc/rc.tcpip
file.
smit ctinet6
autoconf6
ifconfig ctiX
where X is the number of the interface. In this scenario, the following results were returned. On alpha:
cti0: flags=8080051<UP,POINTOPOINT,RUNNING,MULTICAST>
inet6 fe80::a01:101/128 --> fe80::a01:102
On beta:
SMIT automatically creates IPv6 addresses for both ends of the tunnel using the following method:
• The lower 32 bits contain the IPv4 address
• The upper 96 bits contain the prefix fe80::/96
You can fill in specific IPv6 addresses if desired.
Packet tracing
Packet tracing is the process by which you can verify the path of a packet through the layers to its
destination.
The iptrace command performs network interface level packet tracing. The ipreport command
issues output on the packet trace in both hexadecimal and ASCII format. The trpt command performs
transport protocol level packet tracking for the TCP. The trpt command output is more detailed,
including information on time, TCP state, and packet sequencing.
Item Description
IP 0800
ARP 0806
Item Description
bit (0) = 0 Use the nonbroadcast route specified in the RI field.
bit (0) = 1 Create the RI field and broadcast to all rings.
bit (1) = 0 Broadcast through all bridges.
bit (1) = 1 Broadcast through limited bridges.
The logical link control (LLC) header is composed of five fields, as shown in the following LLC header table.
Item Description
x`03' Unnumbered Information (UI) frame. This is the normal, or unsequenced, way
in which token-ring adapter data is transmitted through the network. TCP/IP
sequences the data.
x`AF' Exchange identification (XID) frame. This frame conveys the characteristics of the
sending host.
x`E3' Test frame. This frame supports testing of the transmission path, echoing back the
data that is received.
This illustration shows the various layers of the TCP/IP Suite of Protocols. From the top, the application
layer consists of the application. The transport layer contains UDP and TCP. The network layer contains
the network (hardware) interface. And finally, the hardware layer contains the physical network.
TCP/IP provides the protocols that are required to comply with RFC 1100, Official Internet Protocols, as
well as other protocols commonly used by hosts in the Internet community.
Note: The use of Internet network, version, socket, service, and protocol numbers in TCP/IP also
complies with RFC 1010, Assigned Numbers.
Internet Timestamp Used to record the time stamps through the route.
Internet Protocol
The third network-level protocol is the Internet Protocol (IP), which provides unreliable, connectionless
packet delivery for the Internet.
IP is connectionless because it treats each packet of information independently. It is unreliable because
it does not guarantee delivery, meaning, it does not require acknowledgments from the sending host, the
receiving host, or intermediate hosts.
IP provides the interface to the network interface level protocols. The physical connections of a network
transfer information in a frame with a header and data. The header contains the source address and the
destination address. IP uses an Internet datagram that contains information similar to the physical frame.
The datagram also has a header containing Internet Protocol addresses of both source and destination of
the data.
IP defines the format of all the data sent over the Internet.
This illustration shows the first 32 bits of a typical IP packet header. Table below lists the various entities.
IP header field definitions
Item Description
Version Specifies the version of the IP used. The current version of the IP
protocol is 4.
Length Specifies the datagram header length, measured in 32-bit words.
Outgoing packets automatically have an IP header prefixed to them. Incoming packets have their IP
header removed before being sent to the higher-level protocols. The IP protocol provides for the universal
addressing of hosts in the Internet network.
This illustration shows the various layers of the TCP/IP Suite of Protocols. From the top, the application
layer consists of the application. The transport layer contains UDP and TCP. The network layer contains
the network (hardware) interface. And finally, the hardware layer contains the physical network.
This illustration shows the first 32 bits of the UDP packet header. The first 16 bits contain the source port
number and the length. The second 16 bits contain the destination port number and the checksum.
Applications that require reliable delivery of datagrams must implement their own reliability checks when
using UDP. Applications that require reliable delivery of streams of data should use TCP.
UDP Header Field Definitions
Item Description
Source Port Number Address of the protocol port sending the information.
Destination Port Number Address of the protocol port receiving the information.
Length Length in octets of the UDP datagram.
Checksum Provides a check on the UDP datagram using the same
algorithm as the IP.
The applications programming interface (API) to UDP is a set of library subroutines provided by the
sockets interface.
#include <sys/bypass.h>
include <net/rds_rdma.h> /* for RDSv3 only */
sock = socket (AF_BYPASS, SOCK_SEQPACKET,BYPASSPROTO_RDS);
If the BYPASSPROTO_RDS protocol is the only reliable datagram protocol that is supported in the
AF_BYPASS family, you can also call the socket() system call as follows:
System calls
The RDS also supports the following system calls:
• blind()
• close()
• getsockopt()
• recvform()
• recvmsg()
• sendmsg()
• sendto()
• setsockopt()
In addition, RDSv3 also supports the following system calls:
• connect()
• read()
• recv()
• send()
• write()
Note: Although RDS sockets are connectionless, the connect() system call is supported by RDSv3.
However, in this case, connect() does not create a socket-level connection entity between two RDS
endpoints. It merely associates a default destination endpoint with the socket. For this reason, the
listen(), accept(), and shutdown() system calls are not supported for the RDS sockets.
Item Description
help [<tunable name>] The help option displays a descriptive message of the specified
RDSv3 tunable. If no tunable is specified, this option displays the
list of all the tunables that are supported for RDSv3, along with the
description of each tunable.
set [-p] {<tunable name> = The set option sets the value of the specified RDSv3 tunable.
<value>} It verifies that the user has the required privileges to prevent
unauthorized users to change the RDS tunables. It also does range
validation for the new tunable values.
The -p flag makes the assignment permanent across reboot
operations.
get [<tunable name>] The get option gets the current value of the queried tunable. When
no name field is specified to this command, it returns the current
value of all the available RDS tunables.
default [-p] [<tunable name>] The default option is used to reset a tunable to its default value.
When the name field is specified, only that tunable is reset. If no
name field is specified, this command resets all the tunables to
their default values.
This option also provides a way to make the change permanent
across reboots by using the -p flag.
unload The unload option is used to unload the RDSv3 kernel extension.
ras [-p] <minimal | normal | detail The ras option sets the AIX operating system RAS tracing and
| maximal> error checking settings for RDSv3 to the specified level. Internally,
this command calls the errctrl and ctctrl AIX operating system
commands.
The -p flag makes the settings persistent across reboot
operations.
ras extract The ras extract option dumps the contents of the RAS error and
non-error trace buffers for RDS to standard output.
info [<flags>] The info option is an alias for the rds-info command.
ping [<IP v4 address>] The ping option is an alias for the rds-ping command.
conn <restart | kill> <source IP The conn option restarts the specified RDS connection (restart
address> <destination IP address> suboption) or permanently ends the specified RDS connection
(kill suboption). The RDS connection to be restarted or ended is
specified by giving the IP addresses of the local and remote nodes
for the connection. Restarting a connection drops the underlying
InfiniBand connection and attempts to establish the connection
again. In contrast, ending a connection (kill suboption) drops the
underlying InfiniBand connection and deallocates all resources
that are associated with the corresponding RDS connection.
trace start <trace file path> The trace start option initiates a tracing session to capture over-
<maximum data captured per RDS the-wire traffic for the RDSv3 protocol. The RDSv3 messages are
fragment> transmitted in fragments. Each RDS fragment that is transmitted
or received is captured as a trace packet in the specified trace file.
For each RDS fragment, its payload is captured up to <maximum
data captured per RDS fragment> bytes. Only privileged users can
trace RDS traffic and only one tracing session can be active at a
time.
trace stop The trace stop option ends a tracing session that was previously
initiated by a trace start command. It closes the trace file that is
associated with the tracing session. After this command, the trace
report command can be used to generate a text report of the trace
file.
trace report <trace file path> The trace report option prints a text report to standard output,
from a previously captured RDS protocol trace file.
version The version option prints the RDS protocol version that is
currently loaded in the system.
Item Description
Basic Data Transfer TCP can transfer a continuous stream of 8-bit octets in each
direction between its users by packaging some number of bytes
into segments for transmission through the Internet system.
TCP implementation allows a segment size of at least 1024
bytes. In general, TCP decides when to block and forward
packets at its own convenience.
Reliability TCP must recover data that is damaged, lost, duplicated, or
delivered out of order by the Internet. TCP achieves this
reliability by assigning a sequence number to each octet it
transmits and requiring a positive acknowledgment (ACK) from
the receiving TCP. If the ACK is not received within the time-
out interval, the data is retransmitted. The TCP retransmission
time-out value is dynamically determined for each connection,
based on round-trip time. At the receiver, the sequence
numbers are used to correctly order segments that may be
received out of order and to eliminate duplicates. Damage is
handled by adding a checksum to each segment transmitted,
checking it at the receiver, and discarding damaged segments.
Flow Control TCP governs the amount of data sent by returning a window
with every ACK to indicate a range of acceptable sequence
numbers beyond the last segment successfully received. The
window indicates an allowed number of octets that the sender
may transmit before receiving further permission.
Multiplexing TCP allows many processes within a single host to use TCP
communications facilities simultaneously. TCP receives a set
of addresses of ports within each host. TCP combines the
port number with the network address and the host address
to uniquely identify each socket. A pair of sockets uniquely
identifies each connection.
Connections TCP must initialize and maintain certain status information
for each data stream. The combination of this information,
including sockets, sequence numbers, and window sizes, is
called a connection. Each connection is uniquely specified by
a pair of sockets identifying its two sides.
Precedence and Security Users of TCP may indicate the security and precedence of their
communications. Default values are used when these features
are not needed.
This illustration shows what is contained in the TCP packet header. The individual entities are listed in the
text below.
Item Description
Source Port Identifies the port number of a source application program.
Destination Port Identifies the port number of a destination application program.
Sequence Number Specifies the sequence number of the first byte of data in this
segment.
Acknowledgment Number Identifies the position of the highest byte received.
Data Offset Specifies the offset of data portion of the segment.
Reserved Reserved for future use.
Code Control bits to identify the purpose of the segment:
URG
Urgent pointer field is valid.
ACK
Acknowledgement field is valid.
PSH
Segment requests a PUSH.
RTS
Resets the connection.
SYN
Synchronizes the sequence numbers.
FIN
Sender has reached the end of its byte stream.
The applications programming interface to TCP consists of a set of library subroutines provided by the
sockets interface.
This illustration shows the various layers of the TCP/IP Suite of Protocols. From the top, the application
layer consists of the application. The transport layer contains UDP and TCP. The network layer contains
the network (hardware) interface. And finally, the hardware layer contains the physical network.
When an application needs to send data to another application on another host, the applications send the
information down to the transport level protocols to prepare the information for transmission.
The official Internet application-level protocols include:
• Domain Name Protocol
• Exterior Gateway Protocol
• File Transfer Protocol
• Name/Finger Protocol
• Telnet Protocol
• Trivial File Transfer Protocol
TCP/IP implements other higher-level protocols that are not official Internet protocols but are commonly
used in the Internet community at the application program level. These protocols include:
• Distributed Computer Network (DCN) Local-Network Protocol
• Remote Command Execution Protocol
• Remote Login Protocol
• Remote Shell Protocol
• Wake On LAN Protocol
• Routing Information Protocol
• Time Server Protocol
Item Description
Neighbor Acquisition Request Used by exterior gateways to request to become
neighbors of each other.
TCP/IP implements the EGP protocol in the gated server command and does not provide an API to this
protocol.
Name/Finger Protocol
The Name/Finger Protocol (FINGER) is an application-level Internet protocol that provides an interface
between the finger command and the fingerd daemon.
The fingerd daemon returns information about the users currently logged in to a specified remote
host. If you execute the finger command specifying a user at a particular host, you will obtain specific
information about that user. The FINGER Protocol must be present at the remote host and at the
requesting host. FINGER uses Transmission Control Protocol (“Transmission Control Protocol” on page
152) as its underlying protocol.
Note: TCP/IP does not provide an API to this protocol.
Telnet Protocol
The Telnet Protocol (TELNET) provides a standard method for terminal devices and terminal-oriented
processes to interface.
TELNET is commonly used by terminal emulation programs that allow you to log into a remote
host. However, TELNET can also be used for terminal-to-terminal communication and interprocess
communication. TELNET is also used by other protocols (for example, FTP) for establishing a protocol
control channel.
TCP/IP implements TELNET in the tn, telnet, or tn3270 user commands. The telnetd daemon does
not provide an API to TELNET.
TCP/IP supports the following TELNET options which are negotiated between the client and server:
Item Description
BINARY TRANSMISSION Transmits characters as binary data.
(Used in tn3270 sessions)
SUPPRESS GO_AHEAD (The Indicates that when in effect on a connection between a sender of
operating system suppresses data and the receiver of the data, the sender need not transmit a
GO-AHEAD options.) GO_AHEAD option. If the GO_AHEAD option is not desired, the parties
in the connection will probably suppress it in both directions. This action
must take place in both directions independently.
TIMING MARK (Recognized, Makes sure that previously transmitted data has been completely
but has a negative response) processed.
EXTENDED OPTIONS LIST Extends the TELNET option list for another 256 options. Without this
option, the TELNET option allows only 256 options.
ECHO (User-changeable Transmits echo data characters already received back to the original
command) sender.
TERM TYPE Enables the server to determine the type of terminal connected to a user
TELNET program.
Note: TELNET must allow transmission of eight bit characters when not in binary mode in order to
implement ISO 8859 Latin code page.
Assigned Numbers
For compatibility with the general network environment, well-known numbers are assigned for the
Internet versions, networks, ports, protocols, and protocol options. Additionally, well-known names are
also assigned to machines, networks, operating systems, protocols, services, and terminals.
TCP/IP complies with the assigned numbers and names defined in RFC 1010, Assigned Numbers.
The Internet Protocol (IP) defines a 4-bit field in the IP header that identifies the version of the general
Internetwork protocol in use. For IP, this version number in decimal is 4. For details on the assigned
numbers and names used by TCP/IP, see /etc/protocols and /etc/services files included with
TCP/IP. For further details on the assigned numbers and names, refer to RFC 1010 and the /etc/
services file.
Note:
1. The name of a network adapter can change if you move it from one slot to another or remove it from
the system. If you ever move the adapter, issue the diag -a command to update the configuration
database.
2. Substitute your adapter name for tok0 and ent0.
3. Substitute your hardware address for 0X10005A4F1B7F.
4. After performing this procedure, you might experience a disruption of communication with other hosts
until they flush their Address Resolution Protocol (ARP) cache and obtain the new hardware address of
this host.
2. If a user (for example, IP interface) is currently using the VLAN logical device, any attempt to remove
the VLAN logical device fails. A message similar to the following displays:
To remove the logical VLAN device, first detach the user. For example, if the user is IP interface en1,
then you can use the following command:
Then remove the network interface using the SMIT TCP/IP menus.
3. If a user (for example, IP interface) is currently using the VLAN logical device, any attempt to change
the VLAN characteristic (VLAN tag ID or base adapter) fails. A message similar to the following
displays:
To change the logical VLAN device, first detach the user. For example, if the user is the IP interface
en1, you could use the following command:
Then change the VLAN and add the network interface again using the SMIT TCP/IP menus.
VLAN troubleshooting
tcpdump and trace can be used to troubleshoot the VLAN.
The trace hook ID for each type of transmit packet follows:
Item Description
transmit packets 3FD
receive packets 3FE
other events 3FF
The entstat command gives the aggregate statistics of the physical adapter for which the VLAN is
configured. It does not provide the individual statistics for that particular VLAN logical device.
VLAN restrictions
Remote dump is not supported over a VLAN. Also, VLAN logical devices cannot be used to create a Cisco
Systems' Etherchannel.
The following valid 802.3 network device driver attribute is shown along with its default values, which can
be changed using the Network Interface Drivers menu in SMIT.
The following valid token-ring network device driver attributes are shown along with its default values,
which can be changed using the Network Interface Drivers menu in SMIT.
Note: When operating through a bridge, the default value of 1500 for the maximum transmission unit
(MTU) should be changed to a value that is 8 less than the maximum information field (maximum I-frame)
advertised by the bridge in the routing control field. For example, if the maximum I-frame value is 1500
The following valid SLIP network device driver attribute is shown along with its default values as
displayed under the Network Interface Drivers menu in SMIT.
The following valid serial optical network device handler attribute is shown along with its default values as
displayed under the Network Interface Drivers menu in SMIT.
Note:
1. Changes from a remotely mounted /usr affect only the Information Database (ODM) until the network
is restarted or until the ifconfig command is used to make the changes take effect right away.
2. When using a remotely mounted /usr, be careful not to modify the interface being used, because that
is the location of the libraries, commands, and kernel.
Name AIX 4.3.3 Value AIX 4.3.3 (4330-08) AIX 5.1 (and later)
Value Value
tcp_sendspace 131072 262144 262144
tcp_recvspace 92160 131072 131072
rfc1323 1 1 1
Gigabit Ethernet interfaces, when configured to use an MTU of 1500, use the following ISNO values by
default:
Name AIX 4.3.3 Value AIX 4.3.3 (4330-08) AIX 5.1 (and later)
Value Value
tcp_sendspace 65536 131072 131072
tcp_recvspace 16384 65536 65536
rfc1323 0 not set not set
Name Value
tcp_sendspace 45046
tcp_recvspace 45046
The ISNO parameters cannot be displayed or changed using SMIT. They can be set using the chdev
command or the ifconfig command. The ifconfig command changes the values only until the next
reboot. The chdev command changes the values in the ODM database so they are used on subsequent
reboots. The lsattr or ifconfig commands can be used to display the current values.
The following examples show commands that can be used first to verify system and interface support and
then to set and verify the new values.
1. Verify general system and interface support using the no and lsattr commands.
• Ensure the use_isno option is enabled using a command similar to the following:
$ no -a | grep isno
use_isno=1
• Ensure the interface supports the five new ISNOs using the lsattr -El command, as shown in the
following:
$ lsattr -E -l en0 -H
attribute value description
rfc1323 N/A
tcp_nodelay N/A
tcp_sendspace N/A
tcp_recvspace N/A
tcp_mssdflt N/A
2. Set the interface specific values, using either the ifconfig or chdev command. The ifconfig
command sets values temporarily, which is recommended for testing. The chdev command alters the
ODM, so customized values remain valid after reboot.
• Set the tcp_recvspace and tcp_sendspace to 64K and enable tcp_nodelay by using one of the
following:
• Alternatively, assuming the no command reports an rfc1323=1 global value, the root user can turn
rfc1323 off for all connections over en0 with the following commands:
3. Verify the settings using the ifconfig or lsattr command, as shown in the following example:
Internet addresses
The Internet Protocol (IP) uses a 32-bit, two-part address field.
The 32 bits are divided into four octets as in the following:
01111101 00001101 01001001 00001111
These binary numbers translate into:
125 13 73 15
The two parts of an Internet address are the network address portion and the host address portion. This
allows a remote host to specify both the remote network and the host on the remote network when
sending information. By convention, a host number of 0 is used to refer to the network itself.
TCP/IP supports three classes of Internet addresses: Class A, Class B, and Class C. The different classes
of Internet addresses are designated by how the 32 bits of the address are allocated. The particular
address class a network is assigned depends on the size of the network.
Class A addresses
A Class A address consists of an 8-bit network address and a 24-bit local or host address.
The first bit in the network address is dedicated to indicating the network class, leaving 7 bits for the
actual network address. Because the highest number that 7 bits can represent in binary is 128, there are
128 possible Class A network addresses. Of the 128 possible network addresses, two are reserved for
special cases: the network address 127 is reserved for local loopback addresses, and a network address
of all ones indicates a broadcast address.
There are 126 possible Class A network addresses and 16,777,216 possible local host addresses. In a
Class A address, the highest order bit is set to 0.
This illustration shows a typical class A address structure. The first 8 bits contain the network address
(always beginning with a zero). The remaining 24 bits contain the local host address.
The first octet of a Class A address is in the range 1 to 126.
This illustration shows a typical class B address structure. The first 16 bits contain the network address.
The two highest order bits will always be a one and a zero. The remaining 16 bits contain the local host
address.
The first octet of a Class B address is in the range 128 to 191.
Class C addresses
A Class C address consists of a 24-bit network address and an 8-bit local host address.
The first three bits in the network address indicate the network class, leaving 21 bits for the actual
network address. Therefore, there are 2,097,152 possible network addresses and 256 possible local host
addresses. In a Class C address, the highest order bits are set to 1-1-0.
This figure shows a typical class C address structure. The first 24 bits contain the network address (the
three highest order bits will always be 1-1-0). The remaining 8 bits contain the local host address.
In other words, the first octet of a Class C address is in the range 192 to 223.
When deciding which network address class to use, you must consider how many local hosts there will
be on the network and how many subnetworks will be in the organization. If the organization is small and
the network will have fewer than 256 hosts, a Class C address is probably sufficient. If the organization is
large, then a Class B or Class A address might be more appropriate.
Note: Class D (1-1-1-0 in the highest order bits) addresses provide for multicast addresses and are
supported by UDP/IP under this operating system.
Machines read addresses in binary code. The conventional notation for Internet host addresses is the
dotted decimal, which divides the 32-bit address into four 8-bit fields. The following binary value:
0001010 00000010 00000000 00110100
can be expressed as:
010.002.000.052 or 10.2.0.52
where the value of each field is specified as a decimal number and the fields are separated by periods.
Note: The hostent command does recognize the following addresses: .08, .008, .09, and .009.
Addresses with leading zeros are interpreted as octal, and numerals in octal cannot contain 8s or 9s.
Subnet addresses
Subnet addressing allows an autonomous system made up of multiple networks to share the same
Internet address.
The subnetwork capability of TCP/IP also makes it possible to divide a single network into multiple logical
networks (subnets). For example, an organization can have a single Internet network address that is
known to users outside the organization, yet it can configure its network internally into departmental
subnets. In either case, fewer Internet network addresses are required while local routing capabilities are
enhanced.
A standard Internet Protocol address field has two parts: a network address and a local address. To make
subnets possible, the local address part of an Internet address is divided into a subnet number and a host
number. The subnet is identified so that the local autonomous system can route messages reliably.
In the basic Class A Internet address, which consists of an 8-bit network address and 24-bit local
address, the local address identifies the specific host machine on the network.
This illustration shows a typical class A address structure. The first 8 bits contain the network address
(always beginning with a zero). The remaining 24 bits contain the local host address.
To create a subnet address for this Class A Internet address, the local address can be divided into a
number identifying the physical network (or subnet) and a number identifying the host on the subnet.
Senders route messages to the advertised network address, and the local system takes responsibility for
routing messages to its subnets and their hosts. When deciding how to partition the local address into
subnet address and host address, you should consider the number of subnets and the number of hosts on
those subnets.
In the following figure, the local address is partitioned into a 12-bit subnet address and a 12-bit host
address.
This illustration shows a typical class A address structure. The first 8 bits contain the network address
(always beginning with a zero). The remaining 24 bits contain the local host address with the subnet
address occupying the first 8 bits and the host address occupying the last 8 bits.
Subnet masks
When a host sends a message to a destination, the system must determine whether the destination is
on the same network as the source or if the destination can be reached directly through one of the local
interfaces. The system compares the destination address to the host address using the subnet mask.
If the destination is not local, the system sends the message on to a gateway. The gateway performs the
same comparison to see if the destination address is on a network it can reach locally.
The subnet mask tells the system what the subnet partitioning scheme is. This bit mask consists of the
network address portion and subnet address portion of the Internet address.
This illustration shows a typical class A address structure. The first 8 bits contain the network address
(always beginning with a zero). The remaining 24 bits contain the local host address with the subnet
address occupying the first 8 bits and the host address occupying the last 8 bits.
For example, the subnet mask of the Class A address with the partitioning scheme defined above is shown
in this figure.
The subnet mask is a set of 4 bytes, just like the Internet address. The subnet mask consists of high
bits (1's) corresponding to the bit positions of the network and subnetwork address, and low bits (0's)
corresponding to the bit positions of the host address. A subnet mask for the previous address looks like
the following figure.
This illustration shows a an example of a subnet mask structure. The first 8 bits contain the network
address. The remaining 24 bits contain the local host address with the subnet address occupying the first
8 bits and the host address occupying the last 8 bits.
The corresponding subnet masks for the local network interfaces are shown in the following example:
If the source network, T125, is requested to send a message to a destination network with the host
address 114.16.23.8 (represented in binary as: 01110010 00010000 00010111 00001000), the system
checks whether the destination can be reached through a local interface.
Note: The subnetmask keyword must be set in the configuration database of each host that is to support
subnets. Before the subnetwork capability can be used, all hosts on the network must support it. Set the
subnet mask permanently in the configuration database using the Network Interface Selection menu in
SMIT. The subnet mask can also be set in the running system using the ifconfig command. Using the
ifconfig command to set the subnet mask is not a permanent change.
Broadcast addresses
The TCP/IP can send data to all hosts on a local network or to all hosts on all directly connected networks.
Such transmissions are called broadcast messages.
For example, the routed routing daemon uses broadcast messages to query and respond to routing
queries.
For data to be broadcast to all hosts on all directly connected networks, User Datagram Protocol (UDP)
and Internet Protocol (IP) are used to send the data, and the host destination address in the IP header
has all bits set to 1. For data to be broadcast to all hosts on a specific network, all the bits in the
local address part of the IP address are set to 0. There are no user commands that use the broadcast
capability, although such commands, or programs, can be developed.
The broadcast address can be changed temporarily by changing the broadcast parameter in the
ifconfig command. Change the broadcast address permanently by using the SMIT fast path smit
chinet. Changing the broadcast address may be useful if you need to be compatible with older versions
of software that use a different broadcast address; for example, the host IDs are all set to 0.
Naming authority
In a flat network, all hosts in the network are administered by one central authority. This form of network
requires that all hosts in the network have unique host names. In a large network, this requirement
creates a large administrative burden on the central authority.
In a domain network, groups of hosts are administered separately within a tree-structured hierarchy of
domains and subdomains. In this case, host names need to be unique only within the local domain,
and only the root domain is administered by a central authority. This structure allows subdomains to be
administered locally and reduces the burden on the central authority. For example, the root domain of the
Internet consists of such domains as com (commercial organizations), edu (educational organizations),
gov (governmental organizations), and mil (military groups). New top-level domains can only be added
by the central authority. Naming at the second level is delegated to designated agents within the
respective domains. For example, in the following figure, com has naming authority for all commercial
organization subdomains beneath it. Likewise, naming at the third level (and so on) is delegated to
agents within that level. For example, in the Domain Structure of the Internet figure, Century has naming
authority for its subdomains Austin, Hopkins, and Charlotte.
This figure illustrates the hierarchical structure of the internet. It begins at the top with the root and
branches to the next level containing the mil, com, and edu domains. Below the com domain is another
level containing Charlotte, Austin, and Hopkins. Below Austin is Dev and Graphics.
Century's Austin subdomain might also be divided into zones, for example, Dev and Graphics. In this
case, the zone austin.century.com has all the data contained in the domain austin.century.com,
except that which was delegated to Dev and Graphics. The zone dev.century.com would contain
only the data delegated to Dev; it would know nothing about Graphics, for example. The zone
Naming conventions
In the hierarchical domain name system, names consist of a sequence of case-insensitive subnames
separated by periods with no embedded blanks.
The DOMAIN protocol specifies that a local domain name must be fewer than 64 characters and that a
host name must be fewer than 32 characters in length. The host name is given first, followed by a period
(.), a series of local domain names separated by periods, and finally the root domain. A fully specified
domain name for a host, including periods, must be fewer than 255 characters in length and in the
following form:
host.subdomain1.[subdomain2 . . . subdomain].rootdomain
Because host names must be unique within a domain, you can use an abbreviated name when
sending messages to a host within the same domain. For example, instead of sending a message to
smith.eng.lsu.edu, a host in the eng domain could send a message to smith. Additionally, each host
can have several aliases that other hosts can use when sending messages.
Zones
To properly operate a name server, you must understand the difference between a zone and a domain.
A zone is a point of delegation in the DNS tree. A zone consists of those contiguous parts of the domain
tree for which a name server has complete information and over which it has authority. The zone contains
all domain names from a certain point downward in the domain tree except those that are delegated to
other zones. A delegation point is marked by one or more name space (NS) records in the parent zone,
which must be matched by equivalent NS records at the root of the delegated zone.
For instance, consider the example.com domain that includes names such as host.aaa.example.com
and host.bbb.example.com, even though the example.com zone includes only delegations for the
aaa.example.com and bbb.example.com zones. A zone can map exactly to a single domain, but can
also include only part of a domain, the rest of which can be delegated to other name servers. Every name
in the DNS tree is a domain, even if it is terminal, that is, has no subdomains. Every subdomain is a domain
and every domain except the root is also a subdomain. You can read more about this at RFC 1033, RFC
1034, and RFC 1035.
Though BIND 9 is called a domain name server, it deals primarily in terms of zones. The primary
and secondary declarations in the named.conf file specify zones, not domains. When BIND requests
another site to be a secondary server for a domain, it means that BIND is requesting for secondary service
for some collection of zones.
Name resolution
The process of obtaining an Internet address from a host name is known as name resolution and is done
by the gethostbyname subroutine.
The process of translating an Internet address into a host name is known as reverse name resolution
and is done by the gethostbyaddr subroutine. These routines are essentially accessors into a library of
name translation routines known as resolvers.
Resolver routines on hosts running TCP/IP normally attempt to resolve names using the following
sources:
1. BIND/DNS (named)
2. Network Information Service (NIS)
3. Local /etc/hosts file
To resolve a name in a domain network, the resolver routine first queries the domain name server
database, which might be local if the host is a domain name server or on a foreign host. Name servers
translate domain names into Internet addresses. The group of names for which a name server is
responsible is its zone of authority. If the resolver routine is using a remote name server, the routine
uses the domain name protocol (DOMAIN) to query for the mapping. To resolve a name in a flat network,
the resolver routine checks for an entry in the local /etc/hosts file. When NIS is used, the /etc/hosts
file on the master server is checked.
By default, resolver routines attempt to resolve names using the above resources. BIND/DNS is tried first.
If the /etc/resolv.conf file does not exist or if BIND/DNS could not find the name, NIS is queried if it
is running. NIS is authoritative over the local /etc/hosts, so the search ends here if it is running. If NIS
is not running, then the local /etc/hosts file is searched. If none of these services can find the name,
then the resolver routines return with HOST_NOT_FOUND. If all of the services are unavailable, then the
resolver routines return with SERVICE_UNAVAILABLE.
The default order described above can be overwritten by creating the /etc/irs.conf configuration
file and specifying the desired order. Also, both the default and /etc/irs.conf orderings can be
overwritten with the environment variable, NSORDER. If either the /etc/irs.conf file or NSORDER
environment variable are defined, then at least one value must be specified along with the option.
To specify host ordering with the /etc/irs.conf file:
The order is specified with each method indicated on a line by itself. The value is one of the listed
methods and the continue keyword indicates that another resolver method follows on the next line.
To specify host ordering with the NSORDER environment variable:
The order is specified on one line with values separated by commas. White spaces are permitted between
the commas and the equal sign.
For example, if the local network is organized as a flat network, then only the /etc/hosts file is needed.
Given this example, the /etc/irs.conf file contains the following line:
hosts local
NSORDER=local
If the local network is a domain network using a name server for name resolution and an /etc/hosts file
for backup, then both services should be specified. Given this example, the /etc/irs.conf file contains
the following lines:
NSORDER=bind,local
hosts = nis=auth,dns,local
The search ends after the NIS query (if NIS is running), regardless of whether the name was found. If NIS
is not running, then the next source is queried, which is DNS.
TCP/IP name servers use caching to reduce the cost of searching for names of hosts on remote networks.
Instead of searching for a host name each time a request is made, a name server first looks at its cache to
see if the host name has been resolved recently. Because domain and host names do change, each item
remains in the cache for a limited length of time specified by the time-to-live (TTL) value of the record. In
this way, name servers can specify how long they expect their responses to be considered authoritative.
host.subdomain.subdomain.rootdomain
Note: Resolver routines require the default domain to be set. If the default domain is not set in the
hostname command, then it must be set in the /etc/resolv.conf file.
If the host name is not set up as a fully qualified domain name, and if the system is set up to use a
domain name server in conjunction with the sendmail program, the sendmail configuration file (/etc/
sendmail.cf) must be edited to reflect this official host name. In addition, the domain name macros in
this configuration file must be set for the sendmail program to operate correctly.
Note: The domain specified in the /etc/sendmail.cf file takes precedence over the domain set by the
hostname command for all sendmail functions.
objectclass container
requires
objectclass,
cn
objectclass hosts
requires
objectclass,
hname
allows
addr
halias,
comment
Item Description
conf This file is read when the named daemon starts. The records in the conf file
tell the named daemon which type of server it is, which domains it has authority
over (its zones of authority), and where to get the data for initially setting up its
database. The default name of this file is /etc/named.conf. However, you can
change the name of this file by specifying the name and path of the file on the
command line when the named daemon is started. If you intend to use the /etc/
named.conf as the conf file and it does not exist, a message is generated in
syslog file and named terminates. However, if an alternative conf file is specified,
and the alternative file does not exist, an error message is not generated, and
named continues.
cache Contains information about the local cache. The local cache file contains the names
and addresses of the highest authority name servers in the network. The cache file
uses the Standard Resource Record Format. The name of the cache file is set in the
conf file.
domain data There are three typical domain data files, also referred to as the named data files.
The named local file contains the address resolution information for local loopback.
The named data file contains the address resolution data for all machines in
the name server zone of authority. The named reverse data file contains the
reverse address resolution information for all machines in the name server zone
of authority. The domain data files use the Standard Resource Record Format. Their
file names are user definable and are set in the conf file. By convention, the names
of these files generally include the name of the daemon (named), and the type of
file and name of the domain is given in the extension. For example, the name server
for the domain abc might have the following files:
named.abc.data
named.abc.rev
named.abc.local
When modifying the named data files the serial number in the SOA Resource
Record must be incremented for worker name servers to properly realize the new
zone changes.
Time-to-live (TTL) is specified in resource records. If TTL is not specified in a record, the length of this
time period defaults to the minimum field as defined in the start of authority (SOA) record for that zone.
TTL is used when data is stored outside a zone (in a cache) to ensure that the data is not retained
indefinitely.
widget.com IN MX 10 black.widget.com
widget.com IN A 192.10.143.9
black.widget.com IN A 192.10.143.9
2. Edit sendmail.cf on the mail server (black.widget.com) to add the domain alias (the w class):
Cw $w $?D$w.$D$. widget.com
3. Mail clients must know where to send their non-local mail, so edit sendmail.cf on each client to
point to the mail server (the S macro):
DRblack.widget.com
4. Use the NameServOpt option to configure the sendmail daemon so everyone can use the MX records
defined in the name server brown.widget.com.
5. Add aliases for users in the domain that do not have accounts on the mail server using the aliases file,
for example:
sam:sam@orange.widget.com
david:david@green.widget.com
judy:judy@red.widget.com
sam IN MB orange.widget.com.
sammy IN MR sam
This record causes all mail addressed to sammy to be delivered to sam. Each MR record should be
entered on a line by itself.
3. The serial number in the SOA Resource Record must be incremented, because the database has been
modified.
4. Refresh the name server database by typing the refresh -s named command.
5. Type the refresh -s sendmail command to make the changes take effect.
This example causes all mail addressed to users@widget.com to be delivered to sam, david, and
judy. Enter each MG record on a line by itself.
Note: Users sam, david, and judy must have MB records defined.
3. The serial number in the SOA Resource Record must be incremented, because the database has been
modified.
4. Refresh the name server database by typing the refresh -s named command.
purple.widget.com IN MX 0 post.office.widget.
You must specify both host and machine names when using MX records. Enter each MG record on a
line by itself. You can use wildcards, for example:
*.widget.com IN MX 0 post.office.widget.
This example causes mail to an unknown host (a host without an explicit MX record) in the
widget.com domain to be forwarded to post.office.widget.
Note: Wildcard MX records are not appropriate for use on the Internet.
3. The serial number in the SOA Resource Record must be incremented because the database has been
modified.
4. Refresh the name server database by typing the refresh -s named command.
5. Type the refresh -s sendmail command to make the changes take effect.
touch /etc/resolv.conf
2. On the first line of the /etc/resolv.conf file, type the word domain followed by the full name of
the domain that this host is in. For example:
domain abc.aus.century.com
3. On any blank line below the domain line, type the word nameserver, followed by at least one space,
followed by the dotted decimal Internet address of the name server that this host is to use (the name
server must serve the domain indicated by the domain statement).
You can have up to 3 name server entries. For example, your /etc/resolv.conf file might contain
the entries:
nameserver 192.9.201.1
nameserver 192.9.201.2
search domainname_list
Alternatively, the search keyword could be used to specify the order in which the resolver will
query the domain list. In this case, domainname_list values are abc.aus.century.com and
aus.century.com. The domainname_list can have a maximum of 1024 character strings, each
separated by a space.
4. Assuming the name server is operational, you can test the communication between the host and the
name server by typing the following command:
Use the name of a host that should be resolved by the name server to see if the process is working.
The output you receive should appear similar to the following:
brown.abc.aus.century.com is 129.35.145.95
Related information
netsvc.conf File
Use the following procedure to configure the LDAP server compliant with the IBM SecureWay Directory
schema, for storing the name-to-Internet-address mapping host information.
1. Add a suffix on the LDAP server.
The suffix is the starting point of the hosts database. For example, "cn=hosts". This can done using the
web-based IBM SecureWay Directory Server Administration tool.
2. Create an LDAP Data Interchange Format (LDIF) file.
This can be done manually or with the hosts2ldif command, which creates a LDIF file from
the /etc/hosts file. See the hosts2ldif Command for more information. The following is a sample
LDIF file:
dn: cn=hosts
objectclass: top
objectclass: container
cn: hosts
dn: ipAddress=1.1.1.1, cn=hosts
host: test
ipAddress: 1.1.1.1
objectclass: ibm-HostTable
ipAddressType: 1
ibm-hostAlias: e-test
ibm-hostAlias: test.austin.ibm.com
description: first ethernet interface
dn: ipAddress=fe80::dead, cn=hosts
host: test
ipAddress: fe80::dead
objectclass: ibm-HostTable
ipAddressType: 2
ibm-hostAlias: test-ll
ibm-hostAlias: test-ll.austin.ibm.com
description: v6 link level interface
This sets up an LDAP server with administrator DN being cn=admin and password being
adminpwd. The default suffix, cn=aixdata, is also added to the /etc/slapd32.conf file, the
LDAP server configuration file.
By default, the mksecldap command migrates users and groups defined on the local system to
the LDAP server. If you want to disable this migration, use the -u NONE option, which prevents
the migration of local users and groups to the LDAP server, so that you can only add NIS users and
groups later.
b) Migrate the NIS data. Use the nistoldif command from the NIS server to migrate the NIS maps
to the LDAP server. The nistoldif command can also be used to migrate data from flat files.
Run the nistoldif command on a system that contains NIS data that needs to be migrated to the
LDAP server.
This sets up the local system to use the server1.ibm.com LDAP server. The LDAP server
administrator DN and password must be supplied for this client to authenticate to the server.
The /etc/netsvc.conf and the /etc/irs.conf files are updated so that the naming resolution
is resolved through NIS_LDAP.
See the /etc/netsvc.conf file format for TCP/IP or the /etc/irs.conf file format for TCP/IP
in the Files Reference for more information.
c) Naming resolution for users and groups is not controlled by the /etc/netsvc.conf or /etc/
irs.conf files. Rather it is through the /etc/security/user file. To enable a LDAP user to login
to an AIX system, set the user's SYSTEM and registry variables to LDAP in the /etc/security/
user file of that client system.
You can run the chuser command to do this.
You can configure your system to allow all LDAP users to login to a system. To do so, edit the /etc/
security/user file. Add registry = files to the root stanza. Then add SYSTEM = LDAP and
registry = LDAP to the default stanza.
For more information on user authentication, refer to Light Directory Access Protocol in Security.
Related information
Migrating from NIS to RFC 2307-compliant LDAP services
DHCP servers
In the AIX operating system, the DHCP server has been segmented into three main pieces.
The main components of the DHCP server are a database, a protocol engine, and a set of service threads,
each with its own configuration information.
DF01
"CLIENT ID" "0.0.0.0" State LeaseTimeStart LeaseTimeDuration LeaseTimeEnd
"Server IP Address" "Class ID" "Vendor ID" "Hostname" "Domain Name"
"CLIENT ID" "0.0.0.0" State LeaseTimeStart LeaseTimeDuration LeaseTimeEnd
"Server IP Address" "Class ID" "Vendor ID" "Host Name" "Domain Name"
...
The first line is a version identifier for the file: DF01c. The lines that follow are client record definition
lines. The server reads from the second line to the end of the file. (The parameters in quotes must be
enclosed in quotes.)
"CLIENT ID"
The ID the client uses to represent itself to the server.
"0.0.0.0"
is the IP address currently assigned to the DHCP server. If no address has been assigned, it is
"0.0.0.0".
State
The current state of the client. The DHCP protocol engine contains the allowable set, and the states
are maintained in the DHCP database. The number next to State represents its value. The states can
be:
(1) FREE
Represents addresses that are available for use. In general, clients do not have this state unless
they have no address assigned. dadmin and the output from lssrc report this state as Free.
(2) BOUND
Indicates client and address are tied and that the client has been assigned this address for some
amount of time. dadmin and the output from lssrc report this state as Leased.
(3) EXPIRED
Indicates the client and address are tied together, but only for informational purposes, in a similar
manner to released addresses. The expired state, however, represents clients that let their leases
expire. An expired address is available for use and is reassigned after all free addresses are
unavailable and before released addresses are reassigned. dadmin and the output from lssrc
report this state as Expired.
(4) RELEASED
Indicates the client and address are tied for informational purposes only. The DHCP protocol
suggests that DHCP servers maintain information about the clients it has served for future
reference (mainly to try giving the same address to that client that has been assigned that address
in the past). This state indicates that the client has released the address. The address is available
for use by other clients, if no other addresses are available. dadmin and the output from lssrc
report this as Released.
(5) RESERVED
Indicates client and address are tied, but loosely. The client has issued a DHCP discover message
and the DHCP server has responded, but the client has not yet responded with a DHCP request for
that address. dadmin and the output from lssrc report this state as Reserved.
DHCP planning
To use this protocol, the network administrator needs to set up a DHCP server and configure BOOTP relay
agents on links that do not have a DHCP server. Advance planning can reduce DHCP load on the network.
For example, one server can be configured to handle all your clients, but all packets must be passed
through it. If you have a single router between two large networks, it is wiser to place two servers in your
network, one on each link.
Another aspect to consider is that DHCP implies a pattern of traffic. For example, if you set your default
lease time to fewer than two days and your machines are powered off for the weekend, Monday morning
becomes a period of high DHCP traffic. Although DHCP traffic does not cause huge overhead for the
network, it needs to be considered when deciding where to place DHCP servers on a network and how
many to use.
After enabling DHCP to get the client on the network, a client has no requirement to enter anything.
The DHCP client, dhcpcd, reads the dhcpcd.ini file, which contains information on logging and
other parameters needed to start running. After installation, decide which method to use for TCP/IP
configuration: minimum configuration or DHCP. If DHCP is selected, choose an interface and specify
some optional parameters. To choose the interface, select the keyword any, which tells dhcpcd to find
the first interface that works and use it. This method minimizes the amount of input on the client side.
DHCP configuration
By default, the DHCP server is configured by reading the /etc/dhcpsd.cnf file, which specifies the
initial database of options and addresses.
The server is started in the /etc/rc.tcpip file. It can also be started from SMIT, or through SRC
commands. The DHCP client can be configured by running the System Management Interface Tool
(SMIT), or editing a flat ASCII file.
Configuring the DHCP server is usually the hardest part of using DHCP in your network. First, decide what
networks you want to have DHCP clients on. Each subnet in your network represents a pool of addresses
that the DHCP server must add to its database. For example:
database db_file
{
The example above shows a subnet, 9.3.149.0, with a subnet mask 255.255.255.0. All addresses in
this subnet, 9.3.149.1 through 9.3.149.254, are in the pool. Optionally, a range can be specified on the
DHCP containers
When the DHCP server receives a request, the packet is parsed and identifying keys determine which
containers, options, and addresses are extracted.
The example in “DHCP configuration” on page 192shows a subnet container. Its identifying key is the
position of the client in the network. If the client is from that network, then it falls into that container.
Each type of container uses a different option to identify a client:
• The subnet container uses the giaddr field or the interface address of the receiving interface to
determine from which subnet the client came.
• The class container uses the value in option 77 (User Site Class Identifier).
• The vendor uses the value in option 60 (Vendor Class Identifier).
• The client container uses the option 61 (Client Identifier) for DHCP clients and the chaddr field in the
BOOTP packet for BOOTP clients.
Except for subnets, each container allows the specification of the value that matches it, including regular
expression matching.
There is also an implicit container, the global container. Options and modifiers are placed in the global
container unless overridden or denied. Most containers can be placed inside other containers implying
a scope of visibility. Containers may or may not have address ranges associated with them. Subnets, by
their nature, have ranges associated with them.
The basic rules for containers and subcontainers are:
• All containers are valid at the global level.
• Subnets can not be placed inside other containers.
• Restricted containers cannot have regular containers of the same type within them. (For example, a
container with an option that only allows a class of Accounting cannot include a container with an
option that allows all classes that start with the letter "a". This is illegal.)
• Restricted client containers cannot have subcontainers.
Given the above rules, you can generate a hierarchy of containers that segment your options into groups
for specific clients or sets of clients.
Subnet 1
--Class 1
--Client 1
Subnet 2
--Class 1
----Vendor 1
----Client 1
--Client 1
The example shows two subnets, Subnet 1 and Subnet 2. There is one class name, Class 1, one
vendor name, Vendor 1, and one client name, Client 1. Class 1 and Client 1 are defined in
multiple places. Because they are in different containers, their names can be the same but values inside
them can be different. If Client 1 sends a message to the DHCP server from Subnet 1 with Class 1
specified in its option list, the DHCP server would generate the following container path:
The most specific container is listed last. To get an address, the list is examined in reverse hierarchy to
find the first available address. Then, the list is examined in forward hierarchy to get the options. Options
override previous values unless an option deny is present in the container. Also, because Class 1 and
Client 1 are in Subnet 1, they are ordered according to the container priority. If the same client is in
Subnet 2 and sends the same message, the container list generated is:
Subnet 2, Class 1, Client 1 (at the Subnet 2 level), Client 1 (at the Class 1 level)
Subnet 2 is listed first, then Class 1, then the Client 1 at the Subnet 2 level (because this client
statement is only one level down in the hierarchy). The hierarchy implies that a client matching the first
client statement is less specific than the client matching Client 1 of Class 1 within Subnet 2.
Priority selected by depth within the hierarchy is not superseded by the priority of the containers
themselves. For example, if the same client issues the same message and specifies a vendor identifier,
the container list is:
Subnet 2, Class 1, Vendor 1, Client 1 (at Subnet 2 level), Client 1 (at Class 1 level)
Container priority improves search performance because it follows a general concept that client
containers are the most specific way to define one or more clients. The class container holds less specific
addresses than a client container; vendor is even less specific; and subnet is the least specific.
DHCP modifiers
Modifiers are items that change some aspect of a particular container, such as access or lease time.
Define the address and option pools before modifying the container. The most common modifiers are
leasetimedefault, supportBootp, and supportUnlistedclients.
leasetimedefault
Defines the amount of time an address is to be leased to a client.
supportBootp
Defines whether or not the server responds to BOOTP clients.
supportUnlistedclients
Indicates whether clients are to be explicitly defined by a client statement to receive addresses. The
value for supportUnlistedClients can be none, dhcp, bootp, or both. This allows for you to
restrict access to bootp client and allow all DHCP clients to get addresses.
Other modifiers are listed in “DHCP server file syntax for db_file database” on page 210.
DHCP logging
After selecting modifiers, the next item to set up is logging.
Logging parameters are specified in a container like the database, but the container keyword is
logging_info. When learning to configure DHCP, it is advisable to turn logging to its highest level.
Also, it is best to specify the logging configuration before any other configuration file data to ensure that
configuration errors are logged after the logging subsystem is initialized. Use the logitem keyword to
turn on a logging level or remove the logitem keyword to disable a logging level. Other keywords for
logging allow the specification of the log filename, file size, and the number of rotating log files.
vendor "AIX_CLIENT"
{
# No specific options, handles things based on class
}
The DHCP server also has a set of keywords to remove the DNS entries when a lease is released or
expires. The keywords are:
releasednsA
Removes the A-record.
releasednsP
Removes the PTR-record.
removedns
Removes both record types.
These keywords specify executable strings that the DHCP server runs when an address is released or
expired. The dhcpremove command works similarly to dhcpaction, but only takes three parameters:
1. The IP address, specified as a %s in the command string
2. Which record to remove (A, PTR, NONE, or BOTH).
3. Whether NIM should be updated (NIM or NONIM).
For example:
The dhcpaction and dhcpremove scripts do some parameter checking, then set up a call to nsupdate,
which has been updated to work with this operating system's servers and with OS/2 DDNS servers. See
the nsupdate command description for more information.
If NIM interaction is NOT required by the name update, the DHCP server can be configured to use a
socket transfer between the DHCP daemon and the nsupdate command to improve performance and
enable DNS updates to be retried upon failure. To configure this option, the updateDNSA, updateDNSP,
releaseDNSA, or the releaseDNSP keyword must specify "nsupdate_daemon" as the first quoted word.
The parameters and flags for this update are identical to those that are accepted by the nsupdate
command. Additionally, the following variable names can be used for substitution:
Item Description
$hostname Replaced by the host name of the client on DNS update or the host name
previously associated with the client for DNS removal.
$domain Replaced by the DNS domain for the update or the previously used domain
of the client host name for a DNS removal.
$ipadress Replaced by the IP address to be associated or disassociated from the
DHCP client name.
$leasetime Replaced by the lease time (in seconds).
For example:
118 One dotted quads No Subnet Selection Option is an option sent by the
client asking the dhcp server to allocate the IP
address from the specified subnet.
255 None No DHCP server and client use this option to indicate
the end of an option list.
pxeservertype proxy_on_dhcp_server
Vendor pxeserver
{
option 7 9.3.4.68
}
In the above example, the DHCP server informs the client that the proxy server is running on the
same machine but is listening on port 4011 for client requests. The vendor container is required here
because the BINLD server broadcasts an INFORM/REQUEST message on port 67 with option 60 set to
"PXEServer." In response, the DHCP server sends the Multicast IP address on which the BINLD has to
listen for PXEClient's request.
In the following example, the dhcpsd server either gives the bootfile name to the PXEClient or it directs
the PXEClient to the BINLD server by sending suboptions. The pxeboofile keyword is used to create a
list of boot files for a given client architecture and major and minor versions of the client system.
pxeservertype dhcp_pxe_binld
subnet default
{
vendor pxe
{
option 6 2 # Disable Multicast
option 8 5 4 10.10.10.1 12.1.1.15 12.5.5.5 12.6.6.6\
2 2 10.1.1.10 9.3.4.5 1 1 10.5.5.9\
1 1 9.3.149.15\
4 0
option 9 5 "WorkSpace On Demand" 2 "Intel"\
1 "Microsoft Windows NT" 4 "NEC ESMPRO"
option 10 2 "Press F8 to View Menu"
}
vendor pxeserver
{
option 7 239.0.0.239
}
vendor pxe
{
option 6 4 # bootfile is present in the offer packet
pxebootfile 1 2 1 os2.one
pxebootfile 2 2 1 aix.one
}
}
Each option line in PXE container is used by the server to tell the client what to do. “PXE vendor container
suboptions” on page 302 describes the currently supported and known PXE suboptions.
decimal_number-data
If decimal_number is zero, then data is an ASCII string. If any other number, data is hex digits.
Note: When a NIM object is placed into the BOS installation-pending state, the dhcpsd server might
pass arguments that are different from those originally intended. Minimize the time the client is in this
pending state to avoid this situation.
These suggestions allow the NIM environment to work with dynamic clients.
DHCPv6 server
There are three main components of the DHCPv6 server.
The DHCP server has been segmented into three main components: a database, a protocol engine, and a
set of service threads. Each component has its own configuration information.
DHCPv6 database
The db_filev6.dhcpo database is used to track clients and addresses and for access control.
Options are also stored in the database for retrieval and delivery to clients. The database is implemented
as a dynamically-loadable object.
Using the information in the configuration file, the database is primed and verified for consistency. The
database also contains the address and option pools
The main storage file and its back up are ASCII files. The format for the database main storage files are as
follows:
Note: Do not manually edit these files.
DB6-1.0
Client-Info {
duid 1-0006085b68e20004ace491d3
state 7
authinfo {
protocol 2
algorithm 1
rdm 0
replay 1206567640
}
Interface 0 {
Inoptions {
interface-id "en1"
policies 2
maxopcode 16
numiana 1
Ianalist {
option 3 40
00000001000000320000005000050018deaddeadaaaaaaaa000000000000000600000064000000c8
}
numiata 0
Optiontable {
option 6 10 00030004001700180237
option 8 2 e659
option 15 14 000369626d000373756e00026870
option 16 18 000004d2000730783131313131000369626d
}
}
Ianarec {
IAID 1
t1 50
t2 80
Addrec {
Address dead:dead:aaaa:aaaa::6
state 3
starttime 1087592918
preferred-lifetime 100
valid-lifetime 200
}
}
}
}
The first line is a version identifier for the file: DB6-1.0. The lines that follow are client record definition
lines. The server reads from the second line to the end of the file. (The parameters in quotes must be
enclosed in quotes.)
duid
The ID the client uses to represent itself to the server.
DHCPv6 configuration
By default, the DHCP server is configured by reading the /etc/dhcpv6/dhcpsdv6.cnf file, which
specifies the initial database of options and addresses.
The server is started from SRC commands. If dhcpsdv6 is intended to start across reboots, add an entry
into the /etc/rc.tcpip file.
Configuring the DHCP server is usually the hardest part of using DHCP in your network. First, decide what
networks you want to have DHCP clients on. Each subnet in your network represents a pool of addresses
that the DHCP server must add to its database. For example:
subnet dead:dead:aaaa:: 48 {
option 23 dead::beef beef:aaaa::bbbb:c aaaa:bbbb::cccc #nameserver list
option 24 austin.ibm.com ibm.com # domain list
}
The example above shows a subnet, dead:dead:aaaa::, with a prefix of 48 bits. All addresses in
this subnet, dead:dead:aaaa::1 through dead:dead:aaaa:ffff:ffff:ffff:ffff:ff7f, are in
the pool. Optionally, a range can be specified on the end of the line before the '{' or a range or exclude
statement can be included in the subnet container.
Comments begin with a # (pound sign). Text from the initial #, to the end of the line, is ignored by the
DHCP server. Each option line is used by the server to tell the client what to do.
If the server does not understand how to parse an option, it uses default methods to send the option to
the client. This also allows the DHCP server to send site-specific options that are not RFC defined, but
may be used by certain clients or client configurations.
DHCPv6 containers
When the DHCP server receives a request, the packet is parsed and identifying keys determine which
containers, options, and addresses are extracted.
Each type of container uses a different option to identify a client:
• The subnet container uses the hintlist field or the interface address of the receiving interface to
determine from which subnet the client belongs.
• The class container uses the value in option 15 (OPTION_USER_CLASS Identifier).
• The vendor uses the value in option 16 (OPTION_VENDOR_CLASS).
• The client container uses the option 1 (OPTION_CLIENTID) from the DHCP client's DUID.
• The inoption container matches the client's requested option.
Except for subnets, each container allows the specification of the value that matches it, including regular
expression matching.
There is also an implicit container, the global container. Options and modifiers are placed in the global
container unless overridden or denied. Most containers can be placed inside other containers implying
a scope of visibility. Containers may or may not have address ranges associated with them. Subnets, by
their nature, have ranges associated with them.
The basic rules for containers and subcontainers are:
• Only subnet containers are valid at the global level.
• Subnets cannot be placed inside other containers, including itself.
• Restricted containers cannot have regular containers of the same type within them. (For example, a
container with an option that only allows a class of Accounting cannot include a container with an option
that allows all classes that start with the letter a.)
• Restricted client containers cannot have subcontainers.
• Inoption containers cannot have subcontainers
Given the above rules, you can generate a hierarchy of containers that segment your options into groups
for specific clients or sets of clients.
If a client matches multiple containers, The DHCP server passes the request to the database, and a
container list is generated. The list is presented in order of depth and priority. Priority is defined as an
implicit hierarchy in the containers. Strict containers are higher priority than regular containers. Clients,
classes, vendors, and subnets are sorted, in that order, and within container type by depth. This generates
a list ordered by most specific to least specific. For example:
Subnet 1
--Class 1
The example shows two subnets, Subnet 1 and Subnet 2. There is one class name, Class 1, one
vendor name, Vendor 1, and one client name, Client 1. Class 1 and Client 1 are defined in
multiple places. Because they are in different containers, their names can be the same but values inside
them can be different. If Client 1 sends a message to the DHCP server from Subnet 1 with Class 1
specified in its option list, the DHCP server would generate the following container path:
The most specific container is listed last. To get an address, the list is examined in reverse hierarchy to
find the first available address. Then, the list is examined in forward hierarchy to get the options. Options
override previous values unless an option deny is present in the container. Also, because Class 1 and
Client 1 are in Subnet 1, they are ordered according to the container priority. If the same client is in
Subnet 2 and sends the same message, the container list generated is:
Subnet 2, Class 1, Client 1 (at the Subnet 2 level), Client 1 (at the Class 1 level)
Subnet 2 is listed first, then Class 1, then the Client 1 at the Subnet 2 level (because this client
statement is only one level down in the hierarchy). The hierarchy implies that a client matching the first
client statement is less specific than the client matching Client 1 of Class 1 within Subnet 2.
Priority selected by depth within the hierarchy is not superseded by the priority of the containers
themselves. For example, if the same client issues the same message and specifies a vendor identifier,
the container list is:
Subnet 2, Class 1, Vendor 1, Client 1 (at Subnet 2 level), Client 1 (at Class 1 level)
Container priority improves search performance because it follows a general concept that client
containers are the most specific way to define one or more clients. The class container holds less specific
addresses than a client container; vendor is even less specific; and subnet is the least specific.
/etc/dhcpv6/dhcpsdv6.cnf file
The DHCPv6 server is configured by editing the /etc/dhcpv6/dhcpsdv6.cnf file.
The keywords are case sensitive. When a '{' is listed, it must be on the same line as the keyword. A sample
configuration file can be found in /usr/samples/tcpip/dhcpv6.
Following is the description of the /etc/dhcpv6/dhcpsdv6.cnf file. The following stanzas are allowed
in this file:
• Logging
• Global keywords
• Non-nested container statements
• Nested container statements
• Options
• Common options
DHCPv6 logging
The DHCPv6 server keywords described here are for entries in the logging stanza.
This stanza is not required to exist but if present, must be at the top of the configuration file. It has the
following format:
logging_info { log_options }
Table 64. Keywords, values, and descriptions for entries in the logging stanza.
Keyword Value Description
logFileSize num Specifies the size of the log file. The num value is
the maximum size of the log file in kilobytes. The
log file will be rotated after this size is reached.
Infinite size is assumed if logFileSize is not
specified.
logFileName "filename" Specifies the name of the log file. The filename
value will be the name of the log file. The
default file name and location is /var/tmp/
dhcpsdv6.log.
numLogFiles num Specifies the number of log files for file rotation.
The default is 0.
Table 65. Keywords, values, and descriptions for entries in the global keywords stanza.
Keyword Value Description
UsedIpAddressExpiredInter num [units] Specifies how often addresses placed in the BAD
val state are recouped and retested for validity. If a
unit is not set, the system default is set to seconds.
The default value is -1.
leaseExpiredInterval num [units] Specifies how often addresses in the BOUND
state are checked to see if they have expired. If
the address has expired, the state is moved to
EXPIRED. If a unit is not set, the system default
is set to seconds. The default value 900 seconds.
reservedTime num [units] Specifies how long addresses should sit in
RESERVED state before being recouped into the
FREE state. If unit is not set, the system default is
set to seconds. The default value is -1.
reservedTimeInterval num [units] Specifies how often addresses in the RESERVE
state are checked to see if they should be
recouped into the FREE state. If unit not set, the
system default is set to seconds. The default value
is 900 seconds.
Table 66. Keywords, values, and descriptions for entries in the non-nested container statements.
Item Description
subnet subnetid Specifies subnet to be used. The subnetid must
prefix- be an IPv6 address. The prefix-length must be a
length positive integer less than 128.
[range]
{OPTIONS}
Table 67. Keywords, values, and descriptions for entries in the nested container statements.
Keyword Value Description
class name [range] {OPTIONS| Class container. The name value is one string,
COMMON OPTIONS } space separated strings, regular expression, hex
0xhexdigit, 0xhexdigit
vendor name [range] {OPTIONS| Vendor container. The name value is one string,
COMMON OPTIONS } space separated strings, regular expression, hex
0xhexdigit, 0xhexdigit
client <id | 0 0xhexdigit | Client container.
regular expression> <ip
id- 1-hexdigit, 2-hexdigit, 3-hexdigit <ip|range|
| range | none | any>
none|any> - IP address to give to clients that
{OPTIONA|COMMON OPTIONS }
match the ID
Table 68. Keywords, values, and descriptions for entries in the options stanza.
Keyword Value Description
exclude range IP range to exclude from the current range, often
used when a range is not specified as part of the
container statement
exclude ip IP address to exclude from the current range
range range IP range use to extend the current range, often
used when a range is not specified as part of the
container statement
range ip IP address to add, used to extend the range
stealfromchildren policy Steal address from children containers if all
addresses are exhausted. By default this is turned
off.
stealfrompeer policy Steal addresses from peer containers if all
addresses are exhausted. By default this is turned
off.
stealfromparent policy Steal addresses from parent containers if all
addresses are exhausted. By default this is turned
off.
balance-option { balance- Balance options container, options specified within
policy | this container will be given to the client base on
<option | the policy. This keyword can only exist under the
option subnet container.
option ...>
}
balance-policy b_policy The b_policy value can be fill or rotate. The
default is rotate.
fill-count num The number of times an option will be given out
before handing out the next instance of the same
option
interface-id "interface" This can only be listed under subnet. Clients
requests received on this interface will be allowed
to obtain addresses.
logging_info{
logFileSize 4000
logItem SYSERR
logItem PROTERR
logItem WARNING
logItem EVENT
logItem ACTION
logItem INFO
logItem ACNTING
logItem TRACE
numLogFiles 3
logFileName "/var/tmp/dhcpsdv6.log"
}
duid 1 en0
numprocessthreads 10
numpacketthreads 5
preference-number 255
reconfig-policy no
rapid-commit no
unicast-option yes
leaseExpiredInterval 3000 seconds
unicast-enable yes
saveInterval 60 seconds
Logging keywords
The valid logging keywords of the DHCPv6 server are described here.
The following keywords are valid:
DUID keywords
The following keyword values are for DUID entries.
The format of the DUID entries are as follows:
DUID type can be a keyword or a number, leaving room for any DUID types that may be defined in future.
There are three DUID types currently defined by RFC 3315 :
The specific format of the DUID entries depends on the keyword being used.
Information-only keyword
The information-only keyword is in the format info-only interface name.
Following is the information-only keyword:
Table 73. Keywords and descriptions for lease renewal and rebind keywords
Keywords Description
rebind-time value In the event of the client failing to renew its lease
(because the server does not respond), the rebind-
time specifies the time at which the client contacts
the other servers to rebind the lease.
renew-time value The renew-time specifies the time at which the
client contacts the server from which the client
obtained lease information, in order to renew the
lease.
Option keywords
If the option keywords appear outside of 'interface' stanzas, then they are considered global. Such
options apply to all interfaces. If the option keywords appear inside 'interface' stanzas, these options
apply only to that interface.
The options stanza follows this format:
An option code can be specified using the IANA registered option code. However, some of the options can
also be specified using keywords shown below:
ia-id value
renew-time value
rebind-time value
These parameters specify the user-preferred values and are optional. The value
specified can be a decimal number or a hex number prefixed with '0x'
ia-ta Purpose
Specifies option 4. If specified, the client requests for a temporary addresses from the
server.
Format
option ia-ta [ { parameters } ] [ exec "exec string" ]
Parameters
option ia-ta takes the following parameters:
ia-id value
This parameter specifies the user's preferred values and is optional. The value specified
can be a decimal number or a hex number prefixed with '0x'
request- Purpose
option Specifies option 6. If specified, the client requests a list of options from the server.
Format
option request-option { parameters } [ exec "exec string" ]
Parameters
option request-option takes a space separated list of option codes (in decimal) as
the argument
user- Purpose
class specifies option 15. If specified, the client indicates the type or category of user or
applications it represents.
Format
option user-class { parameters } [ exec "exec string" ]
Parameters
Option user-class takes one or more instances of user class data. Each instance of
user class data is a quoted or unquoted string of arbitrary length. If a string contains a
blank space, it must be enclosed in quotes. The parameters are required. The format
for the parameter is:
class value
class value
vendor- Purpose
class Specifies option 16. If specified, the client indicates the vendor that manufactured the
hardware on which the client is running.
Format
option vendor-class { parameters } [ exec "exec string" ]
Parameters
Option vendor-class takes the vendor's registered Enterprise number and one or
more instances of vendor class data. Each instance of vendor class data is a quoted or
unquoted string of arbitrary length, each of which describes some characteristic of the
client's hardware configuration. The parameters are not optional. The format is:
vendor-id value
class value
class value
vendor-id value
option opcode option-data
option opcode option-data
reconf- Purpose
accept Specifies option 20. If specified, the client indicates to the server whether the client is
willing to accept reconfigure message from the server.
Format
option reconf-accept [ { exec "exec string" } ]
Parameters
option reconf-accept takes no option specific parameters, other than the exec
statement.
dns- Purpose
servers specifies option 23. If specified, the client indicates to the server the preferred set of
DNS servers
Format
option dns-servers [ { parameters } ] [ exec "exec string" ]
Parameters
option dns-servers takes a space/line separated list of IPv6 addresses as argument.
domain- Purpose
list specifies option 24. If specified, the client indicates the preferred domain list.
Format
option domain-list [ { parameters } ] [ exec "exec string" ]
Parameters
option domain-list takes a space/line separated list of domain name strings.
interface en1 {
option ia-na {
ia-id 01
renew-time 0x40
rebind-time 0x60
}
option request-option { 3 23 24 }
option user-class {
class ibm
class "userclassA and B"
class "userclassB"
}
option vendor-class {
vendor-id 1234
class "vendorclassA"
class "vendorclassB"
}
option vendor-opts {
vendor-id 2343
option 89 vendoroption89
option 90 vendoroption90
}
option reconf-accept
The presence and values of these parameters are used by the relay agent that is started or restarted.
This set of parameters specifies the log files that will be maintained by this server. Each parameter is
identified by a keyword and followed by its value.
numLogFiles 4
logFileSize 1000
logFileName /usr/tmp/dhcprd.log
logItem SYSERR
logItem OBJERR
logItem PROTERR
logItem WARNING
logItem EVENT
PXED database
The db_file.dhcpo database is used to generate the options to be sent to the client when the client
send an REQUEST packet.
The options returned by the database depend on the type of server chosen. This is set using the keyword
pxeservertype in the pxed.cnf file.
Using the information in the configuration file, the database is primed and verified for consistency.
pxeservertype proxy_on_dhcp_server
subnet default
{
vendor pxe
{
option 6 2 # Disable Multicast boot server discovery
option 8 1 2 9.3.4.5 9.3.4.6 2 1 9.3.149.29
# The above option gives the list of bootservers
option 9 0 "PXE bootstrap server" \
The suboptions in the vendor container are sent to PXE clients only if the client's IP address is in the
subnet's IP address range (for example, 9.3.149.0 through 9.3.149.255).
The following example configures the pxed daemon to run on a different machine than the DHCP server:
subnet default
{
vendor pxe
{
option 6 10 # The bootfile name is present in the client's initial pxed
# offer packet.
option 8 1 2 9.3.4.5 9.3.4.6 2 1 9.3.149.29
# The above option gives the list of bootservers
option 9 0 "PXE bootstrap server" \
1 "Microsoft Windows NT Boot Server" \
2 "DOS/UNDI Boot Server"
option 10 20 "seconds left before the first item in the boot menu is auto-
selected"
bootstrapserver 9.3.148.65
pxebootfile 1 2 1 window.one
pxebootfile 2 2 1 linux.one
pxebootfile 1 2 1 hello.one
client 6 10005a8ad14d any
{
pxebootfile 1 2 1 aix.one
pxebootfile 2 2 1 window.one
}
}
Vendor pxeserver
{
option 7 224.234.202.202
}
The pxeservertype keyword is not set in the configuration file so the default value is taken, which
is pdhcp_only, meaning the PXED server is running on a different machine than the DHCP server.
Given this configuration, the PXED server listens on two ports (67 and 4011) for clients' BINLD REQUEST/
INFORM packets. The option 7 is sent to the BINLD server when the PXED server receives a REQUEST/
INFORM packet on port 67 from BINLD and option 60 is set to PXED server.
The db_file database clause indicates which database method to use for processing this part of the
configuration file. Comments begin with a pound sign (#). From the # to the end of the line are ignored
by the PXED server. Each option line is used by the server to tell the client what to do. “PXE vendor
container suboptions” on page 302 describes the currently supported and known options. See “PXED
server file syntax for general server operation” on page 304 for ways to specify options that the server
does not know about.
Subnet 1
--Class 1
--Client 1
Subnet 2
--Class 1
----Vendor 1
----Client 1
--Client 1
The above example shows two subnets, Subnet 1 and Subnet 2. There is one class name, Class 1,
one vendor name, Vendor 1, and one client name, Client 1. Class 1 and Client 1 are defined in
multiple places. Because they are in different containers, their names can be the same but values inside
them can be different. If Client 1 sends a message to the DHCP server from Subnet 1 with Class 1
specified in its option list, the DHCP server would generate the following container path:
The most specific container is listed last. To get an address, the list is examined in reverse hierarchy to
find the first available address. Then, the list is examined in forward hierarchy to get the options. Options
override previous values unless an option deny is present in the container. Also, since Class 1 and
PXED logging
Logging parameters are specified in a container like the database, but the container keyword is
logging_info.
When learning to configure PXED, it is advisable to turn logging to its highest level. Also, it is best to
specify the logging configuration prior to any other configuration file data to ensure that configuration
errors are logged after the logging subsystem is initialized. Use the logitem keyword to turn on a logging
level or remove the logitem keyword to disable a logging level. Other keywords for logging allow the
specification of the log filename, file size, and the number of rotating log files.
decimal_number-data
If decimal_number is zero, then data is an ASCII string. If any other number, data is hex digits.
For details about other options, see “DHCP server file known options” on page 200 and “Preboot
execution environment vendor container suboption” on page 203.
BINLD database
The db_file.dhcpo database is used to generate the options that respond to a client's REQUEST
packet.
The options returned by the database depend on the type of server chosen. Options are set using the
keyword pxeservertype in the binld.cnf file.
Using the information in the configuration file, the database is primed and verified for consistency.
BINLD configuration
By default, the BINLD server is configured by reading the /etc/binld.cnf file, which specifies the
server's initial database of options and addresses.
The server is started from SMIT, or through SRC commands.
Configuring the BINLD server is usually the hardest part of using BINLD in your network. First, figure out
what networks you need to have PXE clients on. The following example configures a BINLD server to run
on the same machine as the DHCP server:
pxeservertype binld_on_dhcp_server
subnet default
{
vendor pxe
{
bootstrapserver 9.3.149.6 #TFTP server IP address
pxebootfile 1 2 1 window.one 1 0
pxebootfile 2 2 1 linux.one 2 3
pxebootfile 1 2 1 hello.one 3 4
client 6 10005a8ad14d any
{
pxebootfile 1 2 1 aix.one 5 6
pxebootfile 2 2 1 window.one 6 7
}
}
}
Given the above configuration, the BINLD server listens for client's unicast packets on port 4011 and
Multicast packets on port 4011 if BINLD gets the Multicast Address from the dhcpsd/pxed. The BINLD
server responds to client REQUEST/INFORM packets with the bootfile name and TFTP server's IP
address. If BINLD does not find the bootfile with a matching Layer specified by the client, then it tries to
find a bootfile for the next layer. The BINLD does not respond when there is no boot file that matches the
client requirements (Type, SystemArch, MajorVers, MinorVers, and Layer).
The following example configures BINLD to run on a separate machine (that is, DHCP / PXED is not
running on the same machine).
vendor pxe
{
In the above example, the pxeservertype is not set, so the default server type is binld_only. The BINLD
server listens for client's unicast packets on port 4011, broadcast & unicast packets on port 67, and
Multicast packets on port 4011 if BINLD gets the Multicast Address from the dhcpsd/pxed. The bootfile
name and TFTP server IP address is sent to a PXE client only if the client's IP address is in the subnet's IP
address range (9.3.149.0 through 9.3.149.255).
The following example configures BINLD to run on the same machine as the PXED server:
In this configuration, the BINLD server only listens on port 4011 for Multicast packets only if BINLD gets
Multicast address from the dhcpsd/pxed. If it does not receive any multicast address, then BINLD exits
and an error message is logged to the log file.
The database db_file clause indicates which database method to use for processing this part of the
configuration file. Comments begin with a pound sign (#). From the # to the end of the line are ignored
by the PXED server. Each option line is used by the server to tell the client what to do. “PXE vendor
container suboptions” on page 302 describes the currently supported and known suboptions. See “BINLD
server file syntax for general server operation” on page 338 for ways to specify options that the server
does not know about.
BINLD containers
When the DHCP server receives a request, the packet is parsed and identifying keys determine which
containers, options, and addresses are extracted.
The last example in BINLD configuration shows a subnet container. Its identifying key is the client's
position in the network. If the client is from that network, then it falls into that container.
Each type of container uses a different option to identify a client:
• The subnet container uses the giaddr field or the interface address of the receiving interface to
determine which subnet the client came from.
• The class container uses the value in option 77 (User Site Class Identifier).
• The vendor uses the value in option 60 (Vendor Class Identifier).
• The client container uses the option 61 (Client Identifier) for PXED clients and the chaddr field in the
BOOTP packet for BOOTP clients.
Except for subnets, each container allows the specification of the value that it matches, including regular
expression matching.
There is also an implicit container, the global container. Options and modifiers placed in the global
container apply to all containers unless overridden or denied. Most containers can be placed inside other
containers implying a scope of visibility. Containers may or may not have address ranges associated with
them. Subnets, by their nature, have ranges associated with them.
The basic rules for containers and subcontainers are as follows:
• All containers are valid at the global level.
Subnet 1
--Class 1
--Client 1
Subnet 2
--Class 1
----Vendor 1
----Client 1
--Client 1
The example shows two subnets, Subnet 1 and Subnet 2. There is one class name, Class 1, one
vendor name, Vendor 1, and one client name, Client 1. Class 1 and Client 1 are defined in
multiple places. Because they are in different containers, their names can be the same but values inside
them may be different. If Client 1 sends a message to the DHCP server from Subnet 1 with Class 1
specified in its option list, the DHCP server would generate the following container path:
The most specific container is listed last. To get an address, the list is examined in reverse hierarchy to
find the first available address. Then, the list is examined in forward hierarchy to get the options. Options
override previous values unless an option deny is present in the container. Also, since Class 1 and
Client 1 are in Subnet 1, they are ordered according to the container priority. If the same client is in
Subnet 2 and sends the same message, the container list generated is:
Subnet 2, Class 1, Client 1 (at the Subnet 2 level), Client 1 (at the Class 1 level)
Subnet 2 is listed first, then Class 1, then the Client 1 at the Subnet 2 level (because this client
statement is only one level down in the hierarchy). The hierarchy implies that a client matching the first
client statement is less specific than the client matching Client 1 of Class 1 within Subnet 2.
Priority selected by depth within the hierarchy is not superseded by the priority of the containers
themselves. For example, if the same client issues the same message and specifies a vendor identifier,
the container list is:
Subnet 2, Class 1, Vendor 1, Client 1 (at Subnet 2 level), Client 1 (at Class 1 level)
Container priority improves search performance because it follows a general concept that client
containers are the most specific way to define one or more clients. The class container holds less specific
addresses than a client container; vendor is even less specific; and subnet is the least specific.
BINLD logging
Logging parameters are specified in a container like the database, but the container keyword is
logging_info.
When learning to configure PXED, it is advisable to turn logging to its highest level. Also, it is best to
specify the logging configuration prior to any other configuration file data to ensure that configuration
errors are logged after the logging subsystem is initialized. Use the logitem keyword to turn on a logging
level or remove the logitem keyword to disable a logging level. Other keywords for logging allow the
specification of the log filename, file size, and the number of rotating log files.
decimal_number-data
If decimal_number is zero, then data is an ASCII string. If any other number, data is hex digits.
For details about other options, see “DHCP server file known options” on page 200 and “PXE vendor
container suboptions” on page 302.
TCP/IP daemons
Daemons (also known as servers) are processes that run continuously in the background and perform
functions required by other processes. Transmission Control Protocol/Internet Protocol (TCP/IP)
provides daemons for implementing certain functions in the operating system.
These daemons are background processes that run without interrupting other processes (unless that is
part of the daemon function).
Note:
TCP/IP routing
A route defines a path for sending packets through the Internet network to an address on another
network.
A route does not define the complete path, only the path segment from one host to a gateway that can
forward packets to a destination (or from one gateway to another). There are five types of routes:
Item Description
host route Defines a gateway that can forward packets to a specific host on another
network.
network route Defines a gateway that can forward packets to any of the hosts on a specific
network.
default route Defines a gateway to use when a host or network route to a destination is not
otherwise defined.
loopback route Default route for all packets sent to local network addresses. The loopback route
IP is always 127.0.0.1.
broadcast route Default route for all broadcast packets. Two broadcast routes are automatically
assigned to each subnet on which the network has an IP (one to the subnet
address and one to the broadcast address of the subnet).
Routes are defined in the kernel routing table. The route definitions include information on networks
reachable from the local host and on gateways that can be used to reach remote networks. When a
gateway receives a datagram, it checks the routing tables to find out where next to send the datagram
along the path to its destination.
You can add multiple routes for the same destination in the kernel routing table. A routing lookup
evaluates all routes that match the request then chooses the route with the lowest distance metric. If
multiple matching routes have equal distance, a lookup chooses the most specific route. If both criteria
are equal for multiple routes, routing lookups alternate choices of matching routes.
Gateway protocols
All gateways, whether interior or exterior, use protocols to communicate with each other. Here are brief
descriptions of the more commonly used TCP/IP gateway protocols:
HELLO Protocol (HELLO)
HELLO is one protocol that the interior gateways use to communicate among themselves. HELLO
calculates the shortest path to other networks by determining the path that has the least delay time.
Routing Information Protocol (RIP)
Routing Information Protocol is a protocol that the interior gateways use to communicate among
themselves. Like the HELLO Protocol, RIP calculates the shortest path to other networks. Unlike
HELLO, RIP estimates distance not by delay time, but by hop counts. Because the gated daemon
stores all metrics internally as time delays, it converts RIP hop counts into time delays.
Routing Information Protocol Next Generation
RIPng is the RIP protocol that is enhanced to support IPv6.
Open Shortest Path First (OSPF)
OPSF is a protocol that the interior gateways use to communicate among themselves. It is a link-state
protocol that is better suited than RIP for complex networks with many routers. It provides equal cost
multipath routing.
Exterior Gateway Protocol (EGP)
The exterior gateways can use the Exterior Gateway Protocol to communicate among themselves.
The EGP does not calculate the shortest path to other networks. Instead, it merely indicates whether
a particular network is reachable or not.
Border Gateway Protocol (BGP)
The exterior gateways can use this protocol to communicate among themselves. It exchanges
reachability information between autonomous systems, but provides more capabilities than EGP.
BGP uses path attributes to provide more information about each route as an aid in selecting the best
route.
Border Gateway Protocol 4+
BGP4+ is the BGP protocol version 4, which supports IPv6 and has other enhancements over past
versions of the protocol.
Intermediate System to Intermediate System (IS-IS)
Interior gateways use IS-IS protocol to communicate among themselves. It is a link-state protocol
that can route IP and ISO/CLNP packets and, like OSPF, uses a "shorter path first" algorithm to
determine routes.
Gateway considerations
Take these actions before configuring your gateway.
Before you configure the gateways for your network, you must first do the following:
1. Consider the number of gateways to use.
The number of gateways you need to configure will depend upon:
• The number of networks you want to connect.
• How you want to connect the networks.
• The level of activity on the connected networks.
For example, suppose users on Network 1, Network 2, and Network 3 all need to communicate with
each other.
Configuring a gateway
To configure a machine to act as a gateway, use these instructions.
For clarity, this procedure assumes that the gateway machine connects two networks, and that the
gateway machine has already been minimally configured on one of the networks.
1. Install and configure the second network adapter, if you have not done so already. (See “Installing a
network adapter” on page 159 and “Adapter management and configuration” on page 160.)
2. Choose an IP address for the second network interface, and then configure the network interface by
following the instructions in “Network interface management” on page 165.
3. Add a route to the second network.
4. To use a machine as an internetwork router over TCP/IP networks, type:
no -o ipforwarding=1
The gateway machine can now access both of the networks to which it is directly attached.
1. If you want to use static routing to communicate with hosts or networks beyond these two networks,
add any other routes you want.
2. If you want to use dynamic routing, follow the instructions in either “Configuring the routed daemon”
on page 377 or “Configuring the gated daemon” on page 377. If your internetwork is to join the
Internet, you should also follow the instructions in “Autonomous system numbers” on page 380.
Note:
1. The table is divided into columns for destination address, gateway address, flags, reference count
(hop count), and network interface. If frames are not reaching their destination and the routing tables
indicate the correct route, one or more of the following conditions might exist:
• Network is failing.
• Remote host or gateway is failing.
• Remote host or gateway is down or not ready to receive frames.
• Remote host does not have a route back to the source network.
2. The destination value is the dotted decimal address or symbolic name of the destination host or
network, and the gateway value is the dotted decimal address or symbolic name of the gateway. (A
default route specifies 0 as the destination.)
Route cloning
Route cloning allows a host route to be created for every host that a system communicates with.
When network traffic is about to be sent, a search is done of the routing table to find a route to that host.
If a specific host route is found, it will be used. If a specific host route is not found, a network route
or the default route may be found. If the route that is found has the cloning flag, 'c', set, a host route
for the destination will be created using the gateway from the route that is being cloned. Subsequent
routing table searches for that destination will find the cloned host route. Cloned routes have the 'W' flag
set. These routes will time out and be deleted from the routing table if they are unused for route_expire
minutes. You can modify route_expire by using the no command.
The route cloning feature is used mainly by the path MTU discovery protocol within AIX operating system,
to allow it to keep track of path MTU information for every destination it communicates with. If the
network options tcp_pmtu_discover or udp_pmtu_discover (settable with the no command) are 1, the
cloning flag is turned on for all network routes on the system. The path MTU discovery protocol is on by
default.
Note: To manually add a cloning route entry, you can manipulate the routing table through the route
command.
Related information
route command
autonomoussystem 283 ;
egp yes {
group maxup 1 {
neighbor nogendefault 192.9.201.1 ;
neighbor nogendefault 192.9.201.2 ;
} ;
group {
neighbor 192.10.201.1 ;
neighbor 192.10.201.2 ;
} ;
} ;
rip/hello yes {
sourcegateways
101.25.32.1
101.25.32.2 ;
} ;
The following example shows the RIP/HELLO stanza in the gated.conf file of a machine that
does not send RIP packets, and does not receive RIP packets on its tr0 interface.
rip/hello nobroadcast {
interface tr0 noripin ;
} ;
• If using BGP:
– Set up the BGP autonomoussystem clause. Obtain an autonomous system number from the
Internet authority if you are on the Internet, or if not, assign an autonomous system number
considering the autonomous system numbers of other systems on your network.
bgp yes {
peer 192.9.201.1 ;
} ;
• If using SNMP:
– Set the SNMP statement to yes.
snmp yes ;
where
interface
Is the name of the interface, such as tr0 or en0.
n
Is any decimal number; for example, 11
address
Is the portion of the IPv6 interface address that follows the double colons; for example,
given the IPv6 address fe80::204:acff:fe86:298d, the address entry would be
204:acff:fe86:298d.
Note: You can use the command netstat -i to see what your IPv6 address is for each
configured interface.
If token ring tr0 has an IPv6 address of fe80::204:acff:fe86:298d, you issue the following
command:
no -o ip6forwarding=1
ndpd-router -g
Starting ndpd-router allows your system to act as a router for the Neighbor Discovery Protocol.
Neighbor Discovery Protocol routers inform Neighbor Discovery hosts with routing information so
hosts can route IPv6 packets.
Any hosts on the network that you want to be part of the IPv6 network must run ndpd-host. Hosts
on the network that run ndpd-host will recognize themselves as part of an IPv6 network and use
Neighbor Discovery Protocol, which allows them to determine and monitor link-layer addresses both
to allow neighbor routing and to find neighboring routers for forwarding packets.
INFO@INTERNIC.NET
Mobile IPv6
Mobile IPv6 provides mobility support for IPv6. It allows you to keep the same internet address all over
the world, and allows applications using that address to maintain transport and upper-layer connections
when changing locations. It allows mobility across homogenous and heterogeneous media.
For example, Mobile IPv6 facilitates node movement from an Ethernet segment to a wireless LAN cell
while the mobile node's IP address remains unchanged.
In Mobile IPv6, each mobile node is identified by two IP addresses: its home address and its care-of
address. The home address is a permanent IP address that identifies the mobile node regardless of its
location. The care-of address changes at each new point of attachment and provides information about
the mobile node's current situation. When a mobile node arrives to a visited network, it must acquire a
care-of address, which will be used during the time that the mobile node is under this location in the
visited network. It may use the methods of IPv6 Neighborhood Discovery to get the care-of address (see
“IPv6 expanded routing and addressing” on page 125). Both stateless and stateful autoconfiguration are
possible. The care-of address can also be manually configured. How the care-of address is acquired is
irrelevant to Mobile IPv6.
There must be at least one home agent configured on the home network, and the mobile node must
be configured to know the IP address of its home agent. The mobile node sends a packet containing
a binding update to the home agent. The home agent receives the packet and makes an association
between the home address to the mobile node and the care-of address it received. The home agent
responds with a packet containing a binding acknowledgment.
The home agent keeps a binding cache containing associations between the home addresses and the
care-of addresses for the mobile nodes it serves. The home agent will intercept any packets destined for
the home address and forward them to the mobile nodes. A mobile node will then send a binding update
to the correspondent node informing it of its care-of address, and the correspondent node will create a
binding cache entry so that it can send future traffic directly to the mobile node at its care-of address.
Mobility support in AIX provides the following basic functions:
As a Home Agent node:
• Maintain an entry in its binding cache for each mobile node for which it is serving.
• Intercept packets addressed to a mobile node for which it is currently serving as the home agent, on
that mobile node's home link, while the mobile node is away from home.
ndpd-router -m
mobip6ctrl -b
2. See “TCP/IP troubleshooting” on page 431 for information on using the TCP/IP troubleshooting
utilities.
Virtual IP address
A virtual IP address eliminates a host's dependency upon individual network interfaces.
Incoming packets are sent to the system's VIPA address, but all packets travel through the real network
interfaces.
Previously, if an interface failed, any connections to that interface were lost. With VIPA on your system
and routing protocols within the network providing automatic reroute, recovery from failures occurs
without disruption to the existing user connections that are using the virtual interface as long packets
can arrive through another physical interface. Systems running VIPA are more highly available because
adapter outages no longer affect active connections. Because multiple physical adapters carry the system
IP traffic, overall load is not concentrated on a single adapter and associated subnet.
The AIX VIPA function is transparent to the network equipment. No special network equipment or other
hardware is needed. To implement VIPA, you need to have the following items:
• two or more existing IP interfaces of any physical type on different subnets that connect into the
corporate network
• IP routing protocols running within the corporate network
Configuring VIPA
VIPA is configured, just as any IP network interface, in SMIT. In addition, you can specify a group of
interfaces while configuring VIPA.
When configured this way, for all the outgoing connections initiated by the VIPA host via these interfaces,
which are designated to use a VIPA, the virtual address becomes the source address placed in the TCP/IP
packet header of the outgoing packets.
1. For an IPv4 VIPA, type smit mkinetvi on the command line. For an IPv6 VIPA, type smit
mkinetvi6 on the command line.
2. Fill in the required fields. For additional information, see the “Sample VIPA environment” on page 384.
Press Enter.
vi0: flags=84000041<UP,RUNNING,64BIT>
inet 10.68.6.1 netmask 0xffffff00
iflist : en1 en5
Routing tables
Destination Gateway Flags Refs Use If PMTU Exp Groups
The outgoing packets that do not have a source address set and that are routed via interfaces en1 and
en5 will have the source address set to the virtual address (10.68.6.1). Incoming packets are routed to
the VIPA address (10.68.6.1) advertised on the network. Because vi0 is virtual (that is, not associated
with any device) there should be no entries for it in the system-wide routing table displayed using the
netstat -rn command. This means no interface route is added when the interface is configured in
SMIT.
If one of the physical interfaces, a network attachment, or a network path fails, the network protocols
route to the other physical interface on the same system. If a remote system telnets to the vi0 address,
packets to vi0 can arrive using either en1 or en5. If en1 is down, for example, packets can still arrive on
en5. Note that routing protocols might take time to propagate the routes.
When using the VIPA, the end systems and intervening routers must be able to route the packets destined
for VIPA (vi0) to one of the physical interfaces (en1 or en5).
In Teaming aggregation mechanism, each adapter in the channel retains its original hardware (MAC)
address. Therefore, you do not need to configure any switches. EtherChannel and IEEE 802.3ad Link
Aggregation can have both a primary and a backup channel. However, Teaming aggregation mechanism
uses only one channel. If you select the Teaming mode, you cannot control how the channel sends
packets. The channel automatically uses the standard mode to send packets. The Teaming mode controls
which adapter in the EtherChannel receives traffic so that switch configuration is not necessary.
Table 80. Differences between EtherChannel, IEEE 802.3ad Link Aggregation, and Teaming.
EtherChannel IEEE 802.3ad Link Aggregation Teaming
Requires switch configuration. Requires switch configuration for Does not require switch
Link Aggregation Control Protocol
configuration.
Data Unit (LACPDU) exchange.
Heartbeats are not exchanged Heartbeats (LACPDU) are Heartbeats are not exchanged
between the switch port and the exchanged at the interval that between the switch port and the
adjacent system port. is defined by the IEEE 802.3ad
adjacent system port.
standard. Heartbeats provide
extra protection in a failure.
Both primary and backup Both primary and backup Only a single (primary) channel
channels can be used. channels can be used.
is used.
Dynamic Adapter Membership functionality is available in the AIX operating system. You can use this
functionality to add or remove adapters from an EtherChannel without having to disrupt any user
connections.
Related information
Dynamic Adapter Membership
EtherChannel
IEEE 802.3ad Link Aggregation configuration
Interoperability scenarios
EtherChannel
The adapters that belong to an EtherChannel must be connected to the same EtherChannel-enabled
switch. If the adapters are connected to different switches, those switches must be stacked and act as a
single switch.
You must manually configure this switch to treat the ports that belong to the EtherChannel as an
aggregated link. Your switch documentation might refer to this capability as link aggregation or trunking.
For EtherChannel to work correctly, the link polling mechanism that periodically verifies the status of the
link must be enabled on each adapter before the EtherChannel is created. Traffic is distributed across
the adapters in either the standard way (where the adapter over which the packets are sent is chosen
depending on an algorithm) or on a round-robin basis (where packets are sent evenly across all adapters).
Incoming traffic is distributed in accordance to the switch configuration and is not controlled by the
EtherChannel operation mode.
You can configure multiple EtherChannels per system. If all links in one EtherChanel are attached to
a single switch and if the switch is unplugged or fails, the entire EtherChannel is lost. To solve this
Configuring an EtherChannel
Use this procedure to configure an EtherChannel.
1. Type smitty etherchannel at the command line.
2. Select Add an EtherChannel / Link Aggregation from the list and press Enter.
3. Select the primary Ethernet adapters that you want on your EtherChannel and press Enter.
If you are planning to use EtherChannel backup, do not select the adapter that you plan to use for the
backup at this point.
Note: The Available Network Adapters displays all Ethernet adapters. If you select an Ethernet
adapter that is already being used (has an interface defined), you will get an error message. You first
need to detach this interface if you want to use it.
4. Enter the information in the fields according to the following guidelines:
• Parent Adapter: Provides information of an EtherChannel's parent device (for example, when an
EtherChannel belongs to a Shared Ethernet Adapter). This field displays a value of NONE if the
EtherChannel is not contained within another adapter (the default). If the EtherChannel is contained
within another adapter, this field displays the parent adapter's name (for example, ent6). This field
is informational only and cannot be modified. The parent adapter option is available in AIX 5.3 and
later.
• EtherChannel / Link Aggregation Adapters: You should see all primary adapters that you are using
in your EtherChannel. You selected these adapters in the previous step.
• Enable Alternate Address: This field is optional. Setting this to yes will enable you to specify a MAC
address that you want the EtherChannel to use. If you set this option to no, the EtherChannel will
use the MAC address of the first adapter.
• Alternate Address: If you set Enable Alternate Address to yes, specify the MAC address that you
want to use here. The address you specify must start with 0x and be a 12-digit hexadecimal address
(for example, 0x001122334455).
Lossless failover
The lossless failover feature modifies the behavior of the lossless recovery feature.
When ping failures cause a failover, lossless recovery is observed by default. This involves a period
of waiting until the inactive adapter's switch receives traffic before finalizing the failover. If the
noloss_failover attribute is set to no, however, ping failovers occur immediately.
Automatic recovery
After a failover from the primary channel to the backup channel, EtherChannel automatically starts a
recovery to the primary channel that failed when at least one of its adapters recovers.
This default behavior can be modified by setting the auto_recovery attribute to no. With this setting,
the EtherChannel or IEEE 802.3ad Link Aggregation continues operating on the backup channel after the
failover. Operations on the backup channel continue until one of the following events occur:
• A failover is forced.
• The backup channel fails.
• A ping failure is detected on the backup channel.
Automatic recovery is not supported in IEEE 802.3ad mode so regardless of the setting of the
auto_recovery attribute, it will behave as if it were set to no. Therefore, if a failover to the backup channel
is forced, traffic will continue on the backup channel even though the primary channel is up.
Forced failovers
EtherChannel or IEEE 802.3ad Link Aggregation can be forced to fail over from the primary channel to the
backup adapter, or from the backup adapter to the primary channel.
Forced failovers work only if there is a backup adapter defined, and if the inactive channel is up and
running. For example, to force a failover from the primary channel to the backup adapter, the backup
adapter must be running.
To use this feature, enter smitty etherchannel and select the Force A Failover In An EtherChannel /
Link Aggregation option from the screen. Then select the EtherChannel or IEEE 802.3ad Link Aggregation
where the failover needs to be forced.
Table 81. Mode and Hash Mode combinations and the outgoing traffic distributions each produces.
Mode Hash Mode Outgoing Traffic Distribution
The traditional AIX behavior. The
adapter selection algorithm uses
the last byte of the destination
IP address (for TCP/IP traffic)
standard or 8023ad default or MAC address (for ARP and
other non-IP traffic). This mode is
typically a good initial choice for
a server with a large number of
clients.
Round-Robin distribution
All outgoing traffic is spread evenly across all of the adapters in the EtherChannel. It provides the highest
bandwidth optimization for the AIX server system. While round-robin distribution is the ideal way to
use all of the links equally, consider that it also introduces the potential for out-of-order packets at the
receiving system.
In general, round-robin mode is ideal for back-to-back connections running jumbo frames. In this
environment, there is no intervening switch, so there is no chance that processing at the switch could
alter the packet delivery time, order, or adapter path. On this direct cable network path, packets are
received exactly as sent. Jumbo frames (9000 byte MTU) always yield better file transfer performance
than traditional 1500 byte MTUs. In this case, however, they add another benefit. These larger packets
take longer to send so it is less likely that the receiving host would be continuously interrupted with
out-of-order packets.
Round-robin mode can be implemented in other environments but at increased risk of out-of-order
packets at the receiving system. This risk is particularly high when there are few, long-lived, streaming
TCP connections. When there are many such connections between a host pair, packets from different
connections could be intermingled, thereby decreasing the chance of packets for the same connection
arriving out-of-order. Check for out-of-order packet statistics in the tcp section of the netstat -s
1. Type smitty chinet and select the interface belonging to your EtherChannel. Change the Current
STATE attribute to detach, and press Enter.
2. On the command line type, smitty etherchannel.
3. Select Change / Show Characteristics of an EtherChannel / Link Aggregation and press Enter.
4. Select the EtherChannel or Link Aggregation that you want to modify.
5. Modify the attributes you want to change in your EtherChannel or Link Aggregation and press Enter.
6. Fill in the necessary fields and press Enter.
1. Type smitty chinet and select the interface belonging to your EtherChannel. Change the Current
STATE attribute to detach, and press Enter.
2. On the command line, type smitty etherchannel.
3. Select Change / Show Characteristics of an EtherChannel / Link Aggregation.
4. Select the EtherChannel or Link Aggregation that you are adding or modifying the backup adapter on.
5. Enter the adapter that you want to use as your backup adapter in the Backup Adapter field, or select
NONE if you wish to stop using the backup adapter.
entstat -d device
The following statistics are shown on both a port-by-port and aggregate basis:
Interoperability scenarios
Consider the following interoperability scenarios when configuring your EtherChannel or IEEE 802.3ad
Link Aggregation.
Additional explanation of each scenario is given after the table.
Table 82. Different AIX and switch configuration combinations and the results each combination will
produce.
EtherChannel mode Switch configuration Result
OK - AIX initiates LACPDUs,
8023ad IEEE 802.3ad LACP which triggers an IEEE 802.3ad
Link Aggregation on the switch.
OK - Results in traditional
standard or round_robin EtherChannel
EtherChannel behavior.
Supported adapters
EtherChannel and IEEE 802.3ad Link Aggregation are supported on IBM Power Systems Peripheral
Component Interconnect-X (PCI-X) and PCI Express (PCIe) Ethernet adapters.
Additional considerations are as follows:
• Virtual I/O Ethernet Adapter
Virtual I/O Ethernet Adapters are supported in only two possible EtherChannel configurations:
– One Virtual I/O Ethernet Adapter as the primary, one Virtual I/O Ethernet Adapter as the backup. In
this configuration, the Internet Address to Ping attribute must be enabled so that the EtherChannel
can detect remote connectivity failures. For Virtual I/O Server (VIOS) 2.2.3.0, or later, and AIX
Version 7.1 with Technology Level 3, or later, you can use the virtual Ethernet uplink status feature
to detect the serving VIOS or Shared Ethernet Adapter (SEA) failure by setting the poll_uplink
attribute of the virtual Ethernet device to yes.
– One supported physical Ethernet adapter as the primary, one Virtual I/O Ethernet Adapter as the
backup. In this configuration, the Internet Address to Ping attribute must be enabled so that the
EtherChannel can detect remote connectivity failures.
• Host Ethernet Adapter (HEA)
EtherChannel troubleshooting
If you are having trouble with your EtherChannel, there are many scenarios to consider.
You can use tracing and statistics to help diagnose the problem, which can involve issues with failover and
jumbo frames.
EtherChannel tracing
Use tcpdump and iptrace to troubleshoot the EtherChannel.
The trace hook ID for the transmission packets is 2FA and for other events is 2FB. You cannot trace
receive packets on the EtherChannel as a whole, but you can trace each adapter's receive trace hooks.
EtherChannel statistics
Use the entstat command to get the aggregate statistics of all of the adapters in the EtherChannel.
For example, entstat ent3 will display the aggregate statistics of ent3. Adding the -d flag will also
display the statistics of each adapter individually. For example, typing entstat -d ent3 will show you
the aggregate statistics of the EtherChannel as well as the statistics of each individual adapter in the
EtherChannel.
Note: In the General Statistics section, the number shown in Adapter Reset Count is the
number of failovers. In EtherChannel backup, coming back to the main EtherChannel from the backup
adapter is not counted as a failover. Only failing over from the main channel to the backup is counted.
In the Number of Adapters field, the backup adapter is counted in the number displayed.
Slow failover
If the failover time when you are using network interface backup mode or EtherChannel backup is slow,
verify that your switch is not running the Spanning Tree Protocol (STP).
When the switch detects a change in its mapping of switch port to MAC address, it runs the spanning
tree algorithm to see if there are any loops in the network. Network Interface Backup and EtherChannel
backup may cause a change in the port to MAC address mapping.
Switch ports have a forwarding delay counter that determines how soon after initialization each port
should begin forwarding or sending packets. For this reason, when the main channel is re-enabled, there
is a delay before the connection is reestablished, whereas the failover to the backup adapter is faster.
Check the forwarding delay counter on your switch and make it as small as possible so that coming back
to the main channel occurs as fast as possible.
For the EtherChannel backup function to work correctly, the forwarding delay counter must not be
more than 10 seconds, or coming back to the main EtherChannel might not work correctly. Setting the
forwarding delay counter to the lowest value allowed by the switch is recommended.
smitty chgenet
Change the Enable Link Polling value to yes and press Enter.
Jumbo frames
Aside from enabling the use_jumbo_frame attribute on the EtherChannel, you must also enable jumbo
frames on each adapter before creating the EtherChannel.
To do this, run the following command:
smitty chgenet
Jumbo frames are enabled automatically in every underlying adapter when the use_jumbo_frame
attribute of an EtherChannel is set to yes.
Remote dump
Remote dump is not supported over an EtherChannel.
where:
Item Description
-M 2044 Maximum transmit unit.
-m Net mask.
"255.255.254.0"
-p 1 Port number (defaults to 1 if not provided).
-A iba0 IB device name.
-a 1.2.3.8 IF IP address.
-i ib0 Interface name.
-P -1 Partition key (defaults to PKEY if not provided. After the interface is created,
PKEY cannot be changed; the user must obtain a non-default PKEY from the
network administrator.)
-S "up" Interface state.
-q 8000 Receive and Transmit Queues size (each).
-Q 0x1E Multicast Queue Key assigned to the Multicast group (defaults to Q_KEY = 0x1E if
not provided).
-k "on" Superpacket will allow the interface TCP/IP MTU to be 64K. It has to be enabled
in the remote host also to be able to work.
The following is an example of the command used to create an IB IF from the SMIT user interface:
$ smitty inet
After the Network Interface Selection menu is displayed, follow this procedure:
1. Select Add a Network Interface or Change / Show Characteristics of a Network Interface. The Add
a Network Interface menu displays.
2. In the Add a Network Interface menu, select Add an IB Network Interface. The Add an IB Network
Interface menu displays.
3. In the Add an IB Network Interface menu, make the necessary changes and press Enter.
Creating, displaying, adding, deleting ARP entries and modifying ARP timers
An Address Resolution Protocol (ARP) entry allows an interface to communicate with another interface
even if they are not in the same multicast group.
An ARP entry can be created manually using the arp -t ib command.
To display all ARP entries, run the$ arp -t ib -a command. If you want to display a specific number
of ARP entries, you can specify the number. For example, $ arp -t ib -a 5 displays 5 ARP entries.
The following command adds an ARP entry:
where:
$ arp -t ib -d IP Address
The following modify the ARP entry’s timer values for complete and incomplete ARP entries. These values
are used to remove the ARP entries after a period of time:
The current default time for incomplete ARP entries to be removed is 3 minutes. For complete ARP
entries, the default time is 24 hours. If the values need to be changed, the execution of the command will
change only the values for all the current interfaces configured (or in defined state). If new interfaces are
configured, the command must be executed again. The values are also changed in ODM.
The values can be changed dynamically to one specific interface by running the ifconfig command:
$ ifconfig ib0 [ib_port port number mtu maximum transmission unit p_key
16 bits hex partition key ib_adapter InfiniBand adapter name netmask
dotted decimals]
• inc_timer is the time in minutes that an incomplete ARP entry will expire. Default is 2 mintues.
• com_timer is the time in minutes that a complete ARP entry will expire. Default is 24 hours.
cfgmgr -l iscsi0
This command reconfigures the software initiator driver. It causes the driver to attempt to
communicate with the targets listed in the /etc/iscsi/targets file, and to define a new hdisk for
each LUN on the targets that are found. For more information, see the cfgmgr command description.
If the iSCSI disk supports command tag queuing and NACA=1 in the control byte, consider changing the
queue depth setting of the disk to a larger value. A larger value might help improve device performance.
The optimal queue depth setting cannot exceed the actual queue size on the drive. Setting the queue
depth to a value larger than the drive's queue size would possibly degrade performance. To determine the
drive's queue size, refer the drive documentation.
This command creates an iSCSI software initiator device and prints the name of the device. You can
create multiple initiator devices by using the mkdev command. You are suggested not to create or use
more than 8 iSCSI initiator devices.
After the device is created, you must assign a unique name to the device. You can use the chdev
command to set the initiator_name attribute of the new device. You must also configure the new
device to access certain iSCSI target devices similar to the configuration of the iscsi0 device. When you
create multiple iSCSI software initiator devices, you can configure the devices to access the same iSCSI
target devices or different iSCSI target devices.
If two initiator devices are accessing the same target devices and are using the file discovery policy
(that is, if the disc_policy attribute is set to file), the two initiator devices might point to the same
file name. If two initiator devices access different target devices, the two initiator devices must point
to different file names. If two initiator devices are accessing the same target devices and are using the
Object Data Manager (ODM) discovery policy (that is, if the disc_policy attribute is set to odm), the
ODM entries for the first initiator device must be duplicated to be listed for the second initiator device. You
can use the cpiscsi command to duplicate the iSCSI target device configuration.
– Set the sb_max network option to at least 524288, and preferably 1048576.
– Set the mtu_size to 9000.
– For some iSCSI targets, the TCP Nagle algorithm must be disabled for best performance. Use the no
command to set the tcp_nagle_limit parameter to 0, which will disable the Nagle algorithm.
For more information and additional tuning parameters, see TCP and UDP performance tuning.
lsattr -E -l target0
In general, SCTP may provide more flexibility for certain applications, like Voice over IP (VoIP), that
require the reliable but message-oriented data transfer. For this category of applications, SCTP is most
likely better-suited than TCP or UDP.
• TCP provides reliable and strict order-of-transmission data delivery. For applications that need
reliability, but can tolerate unordered or partially ordered data delivery, TCP may cause some
unnecessary delay because of head-of-line blocking. With the concept of multiple streams within a
single connection, SCTP can provide strictly ordered delivery within a stream while logically isolating
data from different streams.
• SCTP is message-oriented, unlike TCP, which is byte-oriented. Because of the byte-oriented nature of
TCP, the application has to add its own record marking to maintain message boundaries.
• SCTP provides some degree of fault tolerance by using the Multihoming feature. A host is considered
multihomed when it has more than one network interface attached, either on the same or different
networks. An SCTP association can be established between two multihomed hosts. In this case, all IP
addresses of both endpoints are exchanged at association startup; this allows each endpoint to use any
of these addresses over the life of the connection if one of the interfaces is down for any reason, as long
as the peer is reachable through the alternate interfaces.
• SCTP provides additional security features that TCP and UDP do not. In SCTP, resource allocation
during association setup is delayed until the client's identity can be verified using a cookie exchange
mechanism, thus reducing the possibility of Denial of Service attacks.
Library
/usr/lib/libsctp.a
Syntax
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>
int sctp_bindx(int sd, struct sockaddr * addrs, int addrcnt, int flags);
Description
The sctp_bindx subroutine adds or removes a set of bind addresses passed in the addrs array to or from
the socket sd. The addrcnt parameter is the number of addresses in the array, and the flags parameter
specifies if the addresses need to be added or removed.
If the socket sd is an IPv4 socket, the addresses passed must be IPv4 addresses. If the socket sd is an
IPv6 socket, the addresses passed can be either IPv4 or IPv6 addresses.
The addrs parameter is a pointer to an array of one or more socket addresses. Each address is contained
in its appropriate structure, that is, struct sockaddr_in or struct sockaddr_in6. The family of the address
type must be used to distinguish the address length. The caller specifies the number of addresses in the
array along with addrcnt.
The flags parameter can be either SCTP_BINDX_ADD_ADDR or SCTP_BINDX_REM_ADDR. An
application can use SCTP_BINDX_ADD_ADDR to associate additional addresses with an endpoint after
calling the bind command. The SCTP_BINDX_REM_ADDR parameter directs SCTP to remove the given
addresses from the association. A caller might not remove all addresses from an association. The
command fails resulting in the EINVAL error code.
Return values
Upon successful completion, the sctp_bindx() command returns 0. On failure, the sctp_bindx() command
returns -1 and sets the errno parameter to the appropriate error code.
Error codes
Error Description
EINVAL The EINVAL error code indicates that the port or address is invalid or the
command is trying to remove all addresses from an association.
EOPNOTSUPP The EOPNOTSUPP error code indicates that the command is trying to add or
remove addresses from a connected association.
Library
/usr/lib/libsctp.a
Description
The sctp_getladdrs subroutine returns all locally bound addresses on a socket. On return, the addrs
parameter points to a dynamically allocated packed array of the sockaddr structures of the appropriate
type for each local address. You must use the sctp_freeladdrs parameter to free the memory.
Note: The in or out parameter addrs must not be NULL.
If the sd parameter is an IPv4 socket, the addresses returned are all IPv4 addresses. If the sd parameter
is an IPv6 socket, the addresses returned can be a mix of IPv4 or IPv6 addresses.
For one-to-many style sockets, the id field specifies the association to query. For one-to-one style
sockets, the id field is ignored. If the id field is set to 0, the locally bound addresses are returned without
regard to any particular association.
The sctp_freeladdrs subroutine frees all the resources allocated by the sctp_getladdrs subroutine.
Return value
On success, the sctp_getladdrs subroutine returns the number of local addresses bound to the socket.
If the socket is unbound, 0 is returned and the value of the *addrs field is undefined. On error, the
sctp_getladdrs subroutine returns -1, and the value of the *addrs field is undefined.
Library
/usr/lib/libsctp.a
Syntax
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>
Description
The sctp_getpaddrs subroutine returns all the peer addresses in an association. On return, the addrs
parameter points to a dynamically allocated packed array of the sockaddr structures of the appropriate
type for each address. You must use the sctp_freepaddrs subroutine to free the memory.
Note: The in or out parameter addrs must not be NULL.
If the sd parameter is an IPv4 socket, the addresses returned are all IPv4 addresses. If the sd parameter
is an IPv6 socket, the addresses returned can be a mix of IPv4 or IPv6 addresses. For one-to-many
style sockets, the id field specifies the association to query. For one-to-one style sockets, the id field is
ignored.
The sctp_freepaddrs subroutine frees all the resources allocated by the sctp_getpaddrs subroutine.
Integrated services
Integrated Services (IS) is a dynamic resource reservation model for the Internet described in RFC 1633.
Hosts use a signaling protocol called Resource ReSerVation Protocol (RSVP) to dynamically request a
specific quality of service from the network. QoS parameters are carried in these RSVP messages and
each network node along the path installs the parameters to obtain the requested quality of service.
These QoS parameters describe one of two currently defined services, guaranteed service and controlled-
load service. An important characteristic of IS is that this signaling is done for each traffic flow and
reservations are installed at each hop along the route. Although this model is well-suited for meeting
the dynamically changing needs of applications, there exist some significant scaling issues that imply it
cannot be deployed in a network in which single routers handle many simultaneous flows.
Differentiated services
Differentiated Services (DS) removes the per-flow and per-hop scalability issues, replacing them with a
simplified mechanism of classifying packets.
Rather than a dynamic signaling approach, DS uses bits in the IP type of service (TOS) byte to separate
packets into classes. The particular bit pattern in the IP TOS byte is called the DS codepoint and is
used by routers to define the quality of service delivered at that particular hop, in much the same way
routers do IP forwarding using routing table lookups. The treatment given to a packet with a particular DS
codepoint is called a per-hop behavior (PHB) and is administered independently at each network node.
When the effects of these individual, independent PHBs are concatenated, this results in an end-to-end
service.
Differentiated services is being standardized by an IETF working group, which has defined three PHBs:
the Expedited Forwarding (EF) PHB, the Assured Forwarding (AF) PHB group, and the Default (DE) PHB.
The EF PHB can be used to implement a low latency, low jitter, low loss, end-to-end service such as
a virtual leased line (VLL). AF is a family of PHBs, called a PHB group, that is used to classify packets
into various drop precedence levels. The drop precedence assigned to a packet determines the relative
importance of a packet within the AF class. It can be used to implement the so-called Olympic service,
which consists of three classes: bronze, silver, and gold. The DE PHB is the traditional best-effort service
model as standardized in RFC 1812.
Item Description
RFC 2474 Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6
Headers
RFC 2475 An Architecture for Differentiated Services
RFC 1633 Integrated Services in the Internet Architecture: an Overview
RFC 2205 Resource ReSerVation Protocol (RSVP)
RFC 2210 The Use of RSVP with IETF Integrated Services
RFC 2211 Specification of the Controlled-Load Network Element Service
RFC 2212 Specification of Guaranteed Quality of Service
RFC 2215 General Characterization Parameters for Integrated Service Network
Elements
Note: QoS is an emerging Internet technology. There are many benefits of QoS at all stages of
deployment. However, true end-to-end services can only be realized when QoS support exists all along a
particular route.
QoS installation
QoS is packaged with bos.net.tcp.server. This fileset must be installed in order to use QoS.
To use the RAPI shared library, bos.adt.include must also be installed.
/usr/sbin/rmqos -B
/usr/sbin/mkqos -N
See the command descriptions for mkqos and rmqos for the startup and removal command flags.
The policyd and rsvpd daemons are configured through the /etc/policyd.conf and /etc/
rsvpd.conf configuration files, respectively. These configuration files must be edited to customize
the QoS subsystem to the local environment. QoS does not work correctly with the supplied example
configurations.
interface 1.2.3.1
interface 1.2.3.2 disabled
interface 1.2.3.3 disabled
interface 1.2.3.4
{
trafficControl
}
rsvp 1.2.3.4
{
maxFlows 100
}
Interface 1.2.3.1 has been enabled for RSVP. However, traffic control has not been specified and
incoming RSVP RESV messages do not cause resource reservation within the TCP subsystem. This
interface can support a maximum of 64 simultaneous RSVP sessions.
Interfaces 1.2.3.2 and 1.2.3.3 have been disabled. The RSVP agent cannot use this interface to
transmit or receive RSVP messages.
Interface 1.2.3.4 has been enabled for RSVP. In addition, it can install resource reservations into the
TCP subsystem in response to an RSVP RESV message. This interface can support up to 100 RSVP
sessions.
Any other interfaces present on the host but not mentioned explicitly in /etc/rsvpd.conf are disabled.
ServiceCategories premium
{
PolicyScope DataTraffic
MaxRate 110000
MaxTokenBucket 10000
OutgoingTOS 11100000
}
ServicePolicyRules tcptraffic
{
PolicyScope DataTraffic
ProtocolNumber 6 # tcp
SourceAddressRange 1.2.3.6-1.2.3.6
DestinationAddressRange 1.2.3.3-1.2.3.3
DestinationPortRange 0-1024
ServiceReference premium
}
The following statements set up a default service category and use it to restrict the UDP traffic flowing
from interfaces 1.2.3.1 through 1.2.3.4 to IP addresses 1.2.3.6 through 1.2.3.10, port 8000.
ServiceCategories default
{
MaxRate 110000
MaxTokenBucket 10000
ServicePolicyRules udptraffic
{
ProtocolNumber 17 # udp
SourceAddressRange 1.2.3.1-1.2.3.4
DestinationAddressRange 1.2.3.6-1.2.3.10
DestinationPortRange 8000-8000
ServiceReference default
}
The following example configuration can be used to download rules from an LDAP server using the
distinguished subtree name, to lookup the policies on the LDAP server host.
ReadFromDirectory
{
LDAP_Server 1.2.3.27
Base ou=NetworkPolicies,o=myhost.mydomain.com,c=us
}
QoS troubleshooting
The qosstat command may be used to display status information about the installed and active policies
in the QoS subsystem. This information may be useful to you in determining where a problem exists if you
are troubleshooting your QoS configuration.
qosstat can be used to generate the following report.
Action:
Token bucket rate (B/sec): 10240
Token bucket depth (B): 1024
Peak rate (B/sec): 10240
Min policied unit (B): 20
Max packet size (B): 1452
Type: IS-CL
Flags: 0x00001001 (POLICE,SHAPE)
Statistics:
Compliant packets: 1423 (440538 bytes)
Conditions:
Source address Dest address Protocol
192.168.127.39:8000 192.168.256.29:35049 tcp (1 connection)
Action:
Token bucket rate (B/sec): 10240
Token bucket depth (B): 1024
Peak rate (B/sec): 10240
Outgoing TOS (compliant): 0xc0
Outgoing TOS (non-compliant): 0x00
Flags: 0x00001011 (POLICE,MARK)
Type: DS
Statistics:
Compliant packets: 335172 (20721355 bytes)
Non-compliant packets: 5629 (187719 bytes)
Conditions:
Source address Dest address Protocol
192.168.127.39:80 *:* tcp (1 connection)
192.168.127.40:80 *:* tcp (5 connections)
ReadFromDirectory statement
This statement specifies parameters for establishing an LDAP session.
The ReadFromDirectory statement is used in the /etc/policyd.conf file to establish the LDAP
session.
ReadFromDirectory
{
LDAP_Server a # IP address of directory server running LDAP
LDAP_Port i # Port number LDAP server is listening to
Base s # Distinguished Name for LDAP usage
LDAP_SelectedTag s # Tag to match SelectorTag in object classes
}
where
ServiceCategories statement
This statement specifies the type of service that a flow of IP packets (for example, from a TCP connection
or UDP data) should receive end-to-end as they traverse the network.
ServiceCategories can be repeated with each having a different name so that they can be referred to
later. A ServiceCategories object requires ServicePolicyRules to complete the policy definition.
ServiceCategories s
{
SelectorTag s # Required tag for LDAP Search
MaxRate i # Target rate for traffic in this service class
MaxTokenBucket i # The bucket depth
OutgoingTOS b # TOS value of outbound traffic for this service class
FlowServiceType p # Type of traffic
where
ServicePolicyRules statement
This statement specifies characteristics of IP packets that are used to match to a corresponding service
category.
In other words, it defines a set of IP datagrams that should receive a particular service.
ServicePolicyRules are associated with ServiceCategories through the ServiceReference
attribute. If two rules refer to the same ServiceCategory, each rule is associated with a unique
instance of the ServiceCategory.
ServicePolicyRules s
{
where
2. Shaping Only
Note: The type of service set for the out of profile packets is set to zero in the case of policing.
######################################################################
#
# Mark rsh traffic on TCP source ports 513 and 514.
ServiceCategories tcp_513_514_svc
{
MaxRate 0 # Mark only
OutgoingTOS 00011100 # binary
FlowServiceType ControlledLoad
}
ServicePolicyRules tcp_513_514_flt
{
ProtocolNumber 6 # TCP
ServicePolicyRules udp_9000_flt
{
ProtocolNumber 17 # UDP
SourceAddressRange 0.0.0.0-0.0.0.0 # Any IP src addr
DestinationAddressRange 0.0.0.0-0.0.0.0 # Any IP dst addr
SourcePortRange 9000-9000
DestinationPortRange 0-0 # Any dst port
ServiceReference udp_9000_svc
}
#
######################################################################
#
# Mark and police finger traffic on TCP source port 79.
ServiceCategories tcp_79_svc
{
MaxRate 8 # kilobits
MaxTokenBucket 32 # kilobits
OutgoingTOS 00011100 # binary
FlowServiceType ControlledLoad
}
ServicePolicyRules tcp_79_flt
{
ProtocolNumber 6 # TCP
SourceAddressRange 0.0.0.0-0.0.0.0 # Any IP src addr
DestinationAddressRange 0.0.0.0-0.0.0.0 # Any IP dst addr
SourcePortRange 79-79
DestinationPortRange 0-0 # Any dst port
ServiceReference tcp_79_svc
}
#
######################################################################
#
# Mark and shape ftp-data traffic on TCP source port 20.
ServiceCategories tcp_20_svc
{
MaxRate 81920 # kilobits
MaxTokenBucket 128 # kilobits
OutgoingTOS 00011101 # binary
FlowServiceType Guaranteed
}
ServicePolicyRules tcp_20_flt
{
ProtocolNumber 6 # TCP
SourceAddressRange 0.0.0.0-0.0.0.0 # Any IP src addr
DestinationAddressRange 0.0.0.0-0.0.0.0 # Any IP dst addr
SourcePortRange 20-20
DestinationPortRange 0-0 # Any dst port
ServiceReference tcp_20_svc
}
#
######################################################################
#
# LDAP server entry.
#ReadFromDirectory
#{
# LDAP_Server 9.3.33.138 # IP address of LDAP server
# Base o=ibm,c=us # Base distinguished name
# LDAP_SelectedTag myhost # Typically client hostname
#}
#
######################################################################
objectClasses {
( ServiceCategories-OID NAME 'ServiceCategories' SUP top MUST
( objectClass $ SelectorTag $ serviceName ) MAY
( description $ FlowServiceType $ MaxRate $ MaxTokenBucket $ OutgoingTos ) )
( ServicePolicyRules-OID NAME 'ServicePolicyRules' SUP top MUST
( objectClass $ PolicyName $ SelectorTag ) MAY
( description $ DestinationAddressRange $ DestinationPortRange $
ProtocolNumber $ ServiceReference $ SourceAddressRange $ SourcePortRange ) )
}
attributeTypes {
( DestinationAddressRange-OID NAME 'DestinationAddressRange' SYNTAX
1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( DestinationPortRange-OID NAME 'DestinationPortRange' SYNTAX
1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( FlowServiceType-OID NAME 'FlowServiceType'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( MaxRate-OID NAME 'MaxRate' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( MaxTokenBucket-OID NAME 'MaxTokenBucket' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( OutgoingTos-OID NAME 'OutgoingTos' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( PolicyName-OID NAME 'PolicyName' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( ProtocolNumber-OID NAME 'ProtocolNumber' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( SelectorTag-OID NAME 'SelectorTag' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( ServiceReference-OID NAME 'ServiceReference' SYNTAX
1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( SourceAddressRange-OID NAME 'SourceAddressRange' SYNTAX
1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( SourcePortRange-OID NAME 'SourcePortRange' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
}
IBMattributeTypes {
( DestinationAddressRange-OID DBNAME ( 'DestinationAddressRange' 'DestinationAddressRange' ) )
( DestinationPortRange-OID DBNAME ( 'DestinationPortRange' 'DestinationPortRange' ) )
( FlowServiceType-OID DBNAME ( 'FlowServiceType' 'FlowServiceType' ) )
( MaxRate-OID DBNAME ( 'MaxRate' 'MaxRate' ) )
( MaxTokenBucket-OID DBNAME ( 'MaxTokenBucket' 'MaxTokenBucket' ) )
( OutgoingTos-OID DBNAME ( 'OutgoingTos' 'OutgoingTos' ) )
( PolicyName-OID DBNAME ( 'PolicyName' 'PolicyName' ) )
( ProtocolNumber-OID DBNAME ( 'ProtocolNumber' 'ProtocolNumber' ) )
( SelectorTag-OID DBNAME ( 'SelectorTag' 'SelectorTag' ) )
( ServiceReference-OID DBNAME ( 'ServiceReference' 'ServiceReference' ) )
( SourceAddressRange-OID DBNAME ( 'SourceAddressRange' 'SourceAddressRange' ) )
( SourcePortRange-OID DBNAME ( 'SourcePortRange' 'SourcePortRange' ) )
}
ldapSyntaxes {
}
matchingRules {
}
IPv6 Support
QoS only supports IPv4. IPv6 is not supported.
stopsrc -s policyd
TCP/IP troubleshooting
The netstat command is a good tool for diagnosing common problems in a Transmission Control
Protocol/Internet Protocol (TCP/IP) network environment.
The netstat command lets you determine which area of the network has a problem. After you have
isolated the problem to an area, you can use more sophisticated tools to proceed. For example, you might
use the netstat -i and netstat -v to determine if you have a problem with a particular hardware
interface, and then run diagnostics to further isolate the problem. Or, if the netstat -s command shows
that there are protocol errors, you could then use the trpt or iptrace commands.
Communication problems
Common TCP/IP communication problems include the inability to communicate with a host on your
network and routing problems. These are some solutions.
If you cannot communicate with a host on your network:
• Try to contact the host, using the ping command. Run the ping command on the local host to verify
that the local interface to the network is up and running.
• Try to resolve the name of the host, using the host command. If the name does not resolve, you have a
name resolution problem. See “Name resolution problems” on page 431 for more information.
If the name resolves and you are trying to contact a host on another network, you may have a routing
problem. See “TCP/IP routing problems” on page 433 for more information.
• If your network is a token-ring network, check to see if the target host is on another ring. If so, the
allcast field is probably set incorrectly. Use the System Management Interface Tool (SMIT) fast path
smit chinet to access the Network Interfaces menu. Then, set the Confine Broadcast to Local Ring
field to no in the token-ring dialog.
• If there are a large number of Address Resolution Protocol (ARP) packets on your network, verify that
your subnet mask is set correctly. This condition is known as a broadcast storm and can affect your
system performance.
lssrc -s named
2. Verify that the address of the target host exists and is correct in the name server database.
Send a SIGINT signal to the named daemon to dump the database and cache to the file /var/tmp/
named_dump.db. Verify that the address you are trying to resolve is there and is correct.
Add or correct name-to-address resolution information in the named hosts data file for the controller
name server of the domain. Then issue the following SRC command to reread the data files:
refresh -s named
– Run the routed daemon using the -t flag, which causes all packets sent or received to be written to
standard output. When routed is run in this mode, it remains under the control of the terminal that
started it. Therefore, an interrupt from the controlling terminal kills the daemon.
• If you are using dynamic routing with the gated daemon:
– Verify that the /etc/gated.conf file is configured correctly and that you are running the correct
protocols.
– Make sure the gateway on the source network is using the same protocol as the gateway on the
destination network.
– Make sure that the machine with which you are trying to communicate has a route back to your host
machine.
– Verify that the gateway names in the gated.conf file correspond to the gateway names listed in
the /etc/networks file.
The System Resource Controller subsystem has not been activated. Issue the srcmstr & command to
start SRC, then reissue the startsrc command.
You might also want to try starting the daemon from the command line without SRC support.
• If the refresh -s [subsystem name] or lssrc -ls [subsystem name] returns the following error
message:
The subsystem does not support the SRC option issued. Check the subsystem documentation to verify
options the subsystem supports.
• If the following message is displayed:
A daemon was invoked directly from the command line instead of using the startsrc command. This
is not a problem. However, SRC commands, such as stopsrc and refresh, will not manipulate a
subsystem that is invoked directly.
If the inetd daemon is up and running correctly and the appropriate service seems to be correct but you
still cannot connect, try running the inetd daemon processes through a debugger.
1. Stop the inetd daemon temporarily:
stopsrc -s inetd
vi /etc/syslog.conf
a. Add the line *.debug /tmp/myfile at the bottom of the file and exit.
b. The file that you specify must exist (/tmp/myfile in this example). You can use the touch
command to make your file exists.
3. Refresh the file:
refresh -s syslogd
tn bastet
Trying...
connected to bastet
login:>
Connection closed
tail -f /tmp/myfile
env
echo $TERM
2. Verify that the TERM variable is set to a value that matches the type of terminal display you are using.
telnet subcommands that can help in debugging problems include:
Item Description
display Displays set and toggle values.
toggle Toggles the display of all network data in hex.
toggle options Toggles the display of internal telnet process options.
If the inetd daemon could execute the telnet service but you still cannot connect using the telnet
command, there may be something wrong with the telnet interface.
1. Verify that telnet is using the correct terminal type.
a. Check the $TERM variable on your machine:
echo $TERM
b. Log in to the machine to which you are trying to attach and check the $TERM variable:
echo $TERM
2. Use the telnet interface's debugging capabilities by entering the telnet command without flags.
telnet
tn>
telnet bastet
Trying...
Connected to bastet
Escape character is '^T'.
Watch the display as the various commands scroll up the screen. For example:
SENT do ECHO
SENT do SUPPRESS GO AHEAD
SENT will TERMINAL TYPE (reply)
SENT do SUPPORT SAK
SENT will SUPPORT SAK (reply)
RCVD do TERMINAL TYPE (don't reply)
RCVD will ECHO (don't reply)
RCVD will SUPPRESS GO AHEAD (don't reply)
RCVD wont SUPPORT SAK (reply)
SENT dont SUPPORT SAK (reply)
RCVD do SUPPORT SAK (don't reply)
SENT suboption TELOPT_NAWS Width 80, Height 25
RCVD suboption TELOPT_TTYPE SEND
RCVD suboption TELOPT_TTYPE aixterm
...
ls -a /usr/lib/terminfo
5. If the aixterm definition is missing, add it by building the ibm.ti file. For example:
tic ibm.ti
arp -a
The arp command looks for the physical adapter address. This command might show an incomplete
address. For example:
? (192.100.61.210) at (incomplete)
This could be due to an unplugged machine, a stray address with no machine at that particular address,
or a hardware problem (such as a machine that connects and receives packets but is not able to send
packets back).
• Look for errors on the adapter card. For example:
netstat -v
The netstat -v command shows statistics for the Ethernet, Token Ring, X.25, and 802.3 adapter
device drivers. The command also shows network and error logging data for all device drivers
active on an interface including: No Mbufs Errors, No Mbuf Extension Errors, and Packets
Transmitted and Adapter Errors Detected.
• Check the error log by running the errpt command to ensure that there are no adapter problems.
• Verify that the adapter card is good by running diagnostics. Use the smit diag fast path, or the diag
command.
This illustration shows byte 0 and byte 1 of a routing control field. The eight bits of byte one are B, B, B, B,
L, L, L, L. The eight bits of byte 1 are D, F, F, F, r, r, r, r.
Values for the Largest Frame Bits are as follows:
Ite Description
m
00 Specifies a maximum of 516 bytes in the information field.
0
00 Specifies a maximum of 1500 bytes in the information field.
1
01 Specifies a maximum of 2052 bytes in the information field.
0
01 Specifies a maximum of 4472 bytes in the information field.
1
10 Specifies a maximum of 8144 bytes in the information field.
0
10 Reserved.
1
11 Reserved.
0
11 Used in all-routes broadcast frames.
1
For example, if the maximum I-frame value is 2052 in the routing control field, the MTU size should be set
to 2044. This is for token-ring network interfaces only.
Note: When using iptrace, the output file must not be on a Network File System (NFS).
no -o udp_sendspace=64000
no -o udp_recvspace=64000
The maximum size for a UDP packet is 64K. If your query is larger than 64K, it will be rejected. Split the
packet into smaller packets to avoid this problem.
TCP/IP commands
TCP/IP is part of the underlying structure of your system. It allows you to communicate with another
terminal or system merely by executing a command or program.
TCP/IP is part of the underlying structure of your system. It allows you to communicate with another
terminal or system merely by executing a command or program. Your system takes care of the rest.
Item Description
chnamsv Changes Transmission Control Protocol/Internet Protocol (TCP/IP) based
name service configuration on a host.
chprtsv Changes a print service configuration on a client or server machine.
hostent Directly manipulates address-mapping entries in the system configuration
database.
ifconfig Configures or displays network interface parameters for a network, using TCP/IP.
mknamsv Configures TCP/IP-based name service on a host for a client.
mkprtsv Configures TCP/IP-based print service on a host.
mktcpip Sets the required values for starting TCP/IP on a host.
no Configures network options.
rmnamsv Unconfigures TCP/IP-based name service on a host.
rmprtsv Unconfigures a print service on a client or server machine.
SRC commands
SRC commands can affect one daemon, a group of daemons, or a daemon and those daemons it controls
(subsystem with subservers).
In addition, some TCP/IP daemons do not respond to all SRC commands. The following is a list of SRC
commands that can be used to control TCP/IP daemons and their exceptions.
Item Description
startsrc Starts all TCP/IP subsystems and inetd subservers. The startsrc command
works for all TCP/IPP subsystems and inetd subservers.
stopsrc Stops all TCP/IP subsystems and inetd subservers. This command is also called
the stop normal command. The stop normal command allows subsystems to
process all outstanding work and terminate gracefully. For inetd subservers, all
pending connections are allowed to start and all existing connections are allowed
to complete. The stop normal command works for all TCP/IP subsystems and
inetd subservers.
stopsrc -f Stops all TCP/IP subsystems and inetd subservers. This command is also
called the stop force. The stop force command immediately terminates
all subsystems. For inetd subservers, all pending connections and existing
connections are terminated immediately.
traceson Turns on socket-level debugging. Use the trpt command to format the output. The
timed and iptraced subsystems do not support the traceson command.
tracesoff Turns off socket-level debugging. Use the trpt command to format the output.
The timed and iptraced subsystems do not support the tracesoff command.
For examples of how to use these commands, see the topics about the individual commands. For more
information on the System Resource Controller, see System Resource Controller in Operating system and
device management.
Item Description
ftp hostname Transfers files between a local and a remote host.
rcpfile host:file Transfers files between local and remote host or between two remote hosts.
tftp Transfers files between hosts.
Item Description
rexec host command Executes commands one at a time on a remote host.
rlogin remotehost Connects a local host with a remote host.
rsh and remsh remotehost Executes specified command at remote host or logs into the remote
command host.
telnet, tn and tn3270 Connects the local host with a remote host, using the TELNET
hostname interface.
Status commands
Brief descriptions of the TCP/IP status commands are listed here.
Item Description
finger or f Shows user information.
user@host
host hostname Resolves a host name into an Internet address or an Internet address into a host
name.
ping hostname Sends an echo request to a network host.
rwho Shows which users are logged in to hosts on the local network.
whois name Identifies a user by user ID or alias.
Item Description
talk User@Host Converse with another user.
Print commands
Brief descriptions of the TCP/IP print commands are listed here.
Item Description
enq file Enqueues a file.
refresh Requests a refresh of a subsystem or group of subsystems.
smit Performs system management.
Item Description
gated Provides gateway routing functions and supports the Routing Information
Protocol (RIP), the Routing Information Protocol Next Generation (RIPng),
Exterior Gateway Protocol (EGP), the Border Gateway Protocol (BGP) and
BGP4+, the Defense Communications Network Local-Network Protocol (HELLO),
Open Shortest Path First (OSPF), Intermediate System to Intermediate System
(IS-IS), and Internet Control Message Protocol (ICMP and ICMPv6)/Router
Discovery routing protocols. In addition, the gated daemon supports the Simple
Network Management Protocol (SNMP). The gated daemon is one of two routing
daemons available for routing to network addresses and is the preferred routing
daemon. The gated daemon is preferred over the routed daemon because the
gated daemon supports more gateway protocols.
inetd Invokes and schedules other daemons when requests for the daemon services are
received. This daemon can also start other daemons. The inetd daemon is also
known as the super daemon.
iptrace Provides interface-level packet-tracing function for Internet protocols.
named Provides the naming function for the Domain Name Server protocol (DOMAIN).
routed Manages the network routing tables and supports the Routing Information
Protocol (RIP). The gated daemon is preferred over the routed daemon because
the gated daemon supports more gateway protocols.
rwhod Sends broadcasts to all other hosts every three minutes and stores information
about logged-in users and network status. Use the rwhod daemon with extreme
care, because it can use significant amounts of machine resources.
timed Provides the time server function.
Note: Both the routed and gated daemons are listed as TCP/IP subsystems. Do not run the startsrc
-g tcpip command, which initiates both of these routing daemons, along with all the other TCP/IP
subsystems. Running both daemons simultaneously on one machine can produce unpredictable results.
TCP/IP daemons controlled by the inetd subsystem are the following:
inetd Subservers
Item Description
comsat Notifies users of incoming mail.
fingerd Provides a status report on all logged-in users and network status at the specified
remote host. This daemon uses the Finger protocol.
ftpd Provides the file transfer function for a client process using the File Transfer
Protocol (FTP).
rexecd Provides the foreign host server function for the rexec command.
Device methods
Device methods are programs associated with a device that perform basic device configuration
operations.
See List of TCP/IP Programming References in Communications Programming Concepts for information
about TCP/IP methods.
Item Description
Devices Contains information about available devices, including both modems and direct
connections.
The configuration files cross-reference each other when BNU is in use. For example:
• The Devices file contains a Token field that refers to entries in the Dialers file.
• The Systems file contains an entry for a Class of device. A device of each Class referred to in the
Systems file must be defined in the Devices file.
• The Poll file contains entries for systems your system calls. Each of these systems must be defined in
the Systems file.
Entries in the BNU configuration files depend on the types of connections between your system and each
remote system. For example, special entries must be made if Transmission Control Protocol/Internet
Protocol (TCP/IP) or direct connections are used to contact other systems. If modems are used to contact
other systems, the modems must be defined in the Dialers file.
The Systems, Devices, and Permissions files must be configured on your system before you can
contact remote systems using BNU. Other configuration files enable you to use BNU capabilities, such as
automatic polling. Many of the configuration files must be modified periodically to reflect changes to your
system or the systems you contact. The Sysfiles file can be used to specify files other than the default
Systems, Devices, and Dialers files to fulfill the same role.
Item Description
.Admin Contains four administrative files:
• audit
• Foreign
• errors
• xferstats
These files contain error and log information about BNU activities.
The directories whose names begin with a dot are hidden. They cannot be found with an ls or li
command unless the -a flag is used. When the uucico daemon is started, it searches the /var/spool/
uucp directory for work files and transfers the files from any directory that is not hidden. The uucico
daemon sees only the SystemName directories, not the other administrative directories.
The files in the hidden directories are owned by the uucp login ID. These files can be accessed only with
root authority or with a login ID with a UID of 5.
For further information about maintaining the BNU administrative directories, see “BNU maintenance” on
page 461.
Configuring BNU
This procedure explains how to configure Basic Network Utilities (BNU) for various types of connections,
such as direct, modem, and Transmission Control Protocol/Internet Protocol (TCP/IP) connections.
Prerequisites
• BNU must be installed on your system.
• You must have root user authority to edit the BNU configuration files.
• If you use direct connections for BNU communications, the appropriate connections between your
system and the remote systems must be set up.
• If you use modems for BNU communications, you must install and configure each modem.
• If one or more of your connections uses TCP/IP, then TCP/IP must be running between your system and
the appropriate remote systems.
direct:
hera 9600 tty5
zeus& 2400 tty2
ariadne 2400 tty1
hayes modem (tty3): apollo, athena
TCP/IP: merlin, arthur, percy
In the previous example, to connect to system hera, a direct connection at a speed of 9600 from port
tty5 is used. To connect to system apollo, the hayes modem, which is connected to port tty3, is
used. TCP/IP is used to connect to systems merlin, arthur, and percy.
Configuring remote communication facilities
For BNU to function correctly at your site, you must configure the remote communication facilities as
follows:
• List the devices that are used to establish a direct, telephone, or modem communications link.
• List the modems that are used to contact remote systems over the telephone network.
• List the accessible remote systems.
• List the abbreviations by representing the prefixes of telephone numbers that are used to contact the
specified remote systems (optional).
• Set access permissions by specifying the ways in which local and remote systems communicate.
• Schedule monitoring for the networked remote systems (optional).
lslpp -h bos.net.uucp
If BNU is installed, bos.net.uucp is displayed in the output. If you do not see it, install BNU from the
installation tape.
2. Set appropriate login IDs and passwords for the remote systems that call your system, and provide the
person responsible for administering BNU or the UNIX-to-UNIX Copy Program (UUCP) on each remote
system with the login and password.
This step is completed by editing the /etc/passwd, /etc/group, /etc/security/login.cfg,
and /etc/security/passwd files.
Attention: If you allow the remote systems to log in to the local system with the UUCP login
ID, the security of your system is at risk. Remote systems that are logged in with the UUCP ID
can display and possibly change the local Systems and Permissions files. These actions of
the remote system depend on the permissions that are specified in the LOGNAME entry of the
Permissions file. It is recommended that you create other BNU login IDs for remote systems
and reserve the UUCP login ID for the person administering BNU on the local system. For the
best security, each remote system that contacts the local system must have a unique login
ID with a unique user ID (UID) number. These login IDs must have group IDs (GIDs) of 5. By
default, the operating system includes the NUUCP login ID for transferring files.
a) If you need to maintain complete control over the access of each individual system, you must
create separate login IDs and combine the MACHINE and LOGNAME entries in the Permissions
file. You have the option of maintaining separate logins, or having one login for all BNU connections.
A few example /etc/passwd entries follow:
Umicrtk:!:105:5:micrtk uucp:/usr/spool/uucppublic:/usr/sbin/uucp/uucico
Ufloydl:!:106:5:floydl uucp:/usr/spool/uucppublic:/usr/sbin/uucp/uucico
Uicus:!:107:5:icus uucp:/usr/spool/uucppublic:/usr/sbin/uucp/uucico
Urisctkr:!:108:5::/usr/spool/uucppublic:/usr/sbin/uucp/uucico
b) If you want to have one set of permissions and do not want to maintain separate control of any of
the UUCP connections, you can have a single login for all the systems. An example entry for such a
scenario follows:
nuucp:!:6:5::/usr/spool/uucppublic:/usr/sbin/uucp/uucico
Note:
• The UID, which is the third colon-separated field, must be unique to avoid any security risk.
• The GID, which is the fourth colon-separated field, must be 5 to ensure that it is in the same
group as UUCP.
• The home directory, which is the sixth colon-separated field, can be changed to any valid
directory.
uucp:!:5:uucp,uucpadm,nuucp,Umicrtk,Uicus,Urisctakr
d) Add any users to the UUCP group, who use modems to connect with programs other than the cu
command.
e) After you edit these files as root, set a password for the new users with the command passwd
UserName.
Note: If you change a password from the root login, the flags entry in the stanza for the user in
the /etc/security/passwd file contains the following line:
flags = ADMCHG
You must change the preceding line, as shown in the following example:
flags =
Otherwise, when the remote uucico process logs in to your system, the system prompts it to enter
a new password. This action is not possible and hence the login fails.
f) To avoid interruptions in the login process that are caused by the uucico process, which might be
started by the default herald with all of its Ctrl-J's, comment the default stanza (with asterisks) and
define a stanza for your tty, as shown in the following example:
/dev/tty0:
herald = "\nrisc001 login:"
g) Use an ASCII text editor or the uucpadm command to edit the Poll file. Add an entry for each
system that your system polls.
Note: The systems that are listed in the Poll file must also be listed in the /etc/uucp/Systems
file.
h) Use an ASCII text editor to edit the /var/spool/cron/crontabs/uucp file. Remove the
comment characters (#) from the lines that run the uudemon.hour and uudemon.poll
commands.
You can change the number of times these commands are run. However, be sure to schedule
the uudemon.poll command approximately 5 minutes before you schedule the uudemon.hour
command.
i) Ensure that your changes took effect by running the following command:
crontab -l uucp
j) Set up the following BNU data files: Systems, Permissions, Devices, Dialers, and Sysfiles.
You might use the /usr/sbin/uucp/uucpadm command to initially set up the files and then
edit them to suit your needs. Use the Sysfiles file to specify files other than /etc/uucp/
Systems, /etc/uucp/Devices, and /etc/uucp/Dialers for BNU configuration. For more
information, see Sysfiles.
3. If you decide to use dial-code abbreviations for telephone numbers in the Systems files, set up the
Dialcodes entry for each abbreviation. For details, see Dialcodes File Format for BNU.
If you use TCP/IP for your BNU connections, use the netstat command to see whether the uucpd
daemon is working, by entering the following command:
netstat -a
The uucpd daemon is started by the inetd daemon. If the uucpd daemon does not run, reconfigure
the inetd daemon to start the uucpd daemon. For more information, see “Configuring the inetd
daemon” on page 369).
/usr/sbin/uucp/uucheck -v
The uucheck command verifies that the directories, programs, and support files are set up properly
and that the Permissions file entries are consistent. If the uucheck command reports any errors, fix
the errors.
9. Optional: Set up automatic monitoring of BNU operations and automatic polling of remote systems. For
more information, see “Setting up automatic monitoring of BNU” on page 452 and “Setting up BNU
polling of remote systems” on page 453).
/etc/uucp/Systems file
The remote systems are listed in the /etc/uucp/Systems files.
The /etc/uucp/Systems file is the default Systems file. The system administrator can specify
additional files in the /etc/uucp/Sysfiles file.
Each entry in a Systems file contains the following items:
• The name of the remote system
• The times when users can connect to the remote system
• The type of link (direct line or modem)
• The speed of transmission over the link
• The information that is needed to log in to the remote system
Each entry in a Systems file represents one remote system. To establish communications, the remote
system must be listed in the local Systems file. A Systems file must be present on every system that
uses the BNU facility. Normally, only the root user can read the Systems files. Any user, however, can list
the names of remote BNU systems, by using the uuname command.
Continue adding entries to the Devices file until you have listed each device that connects the local
system directly to a remote system.
To set up a direct connection between two systems that use a permanent asynchronous serial connection,
make a one-line entry as follows:
1. Enter the name of the remote system in the Type field.
2. Enter the name of the tty device in the Line field.
3. Enter a hyphen (-) for a placeholder in the Line2 field.
4. Enter the transmission rate appropriate for the direct connection that is used at your site in the Class
field.
5. Enter direct (all lowercase) in the Dialer-Token Pairs field.
For example:
Continue adding entries to the Devices file until you have listed each direct device that connects the
local system to a remote system.
Continue adding entries to the Devices file until you have listed each connection between the local
system and a remote system that uses a telephone line and a modem.
TCP - - - TCP
BNU files for TCP/IP connection entries in the local system files
These BNU files are entries on the local system zeus.
• Systems file: The Systems file on system zeus contains the following entry so that zeus can contact
system hera:
This example specifies that system zeus can call system hera at any time, by using the t protocol for
communications with system hera. System zeus logs in to system hera as uzeus with the password
birthday.
Note: The t protocol supports TCP. Therefore, always use the t protocol for BNU communications over
TCP/IP connections. However, the t protocol cannot be used when the Type field is ACU (automatic
calling unit) or when a modem connection is used.
BNU uses the Type and Class fields in the Systems file to find the appropriate device for the
connection. It checks the Devices file for an entry of type TCP.
• Devices file: The Devices file that is used by the uucico daemon on system zeus contains the
following entry for TCP/IP connections:
TCP - - - TCP
Because the device type is TCP, there are no Class, Line, or Line2 entries. The Dialer is also specified as
TCP. BNU looks in the Dialers files for a TCP entry.
• Dialers file: The Dialers file that is used by the uucico daemon on system zeus contains a TCP/IP
entry as follows:
TCP
The combined LOGNAME and MACHINE entries provide the following permissions to system hera,
when system zeus and system hera are connected:
– System hera can request and send files regardless of who initiated the call.
– System hera can read and write to the public directory and to the /home/hera directory on system
zeus.
– System hera can run all commands on system zeus.
– System hera must log in to system zeus as user uhera, and system hera cannot use any other login
ID for BNU transactions.
Note: Because the permissions are the same regardless of which system initiates the call, the
preceding LOGNAME and MACHINE entries are combined. If the permissions are not the same for
system hera and system zeus, the LOGNAME and MACHINE entries are as follows:
BNU files for TCP/IP connection entries in the remote system's files
These files are on the remote system hera.
• Systems file: A Systems file on system hera contains the following entry to allow hera to contact
system zeus:
This example specifies that system hera can call system zeus at any time, by using the t protocol
for communications with system zeus. System hera logs in to system zeus as user uhera with the
password lightning. Again, BNU next checks the Devices files for an entry of type TCP.
Note: The t protocol supports the TCP. Therefore, always use the t protocol for BNU communications
over TCP/IP connections. However, the t protocol cannot be used when the Type field is ACU or when a
modem connection is being used.
• Devices file: The Devices file that is used by the uucico daemon on system hera contains the
following entry for TCP/IP connections:
TCP - - - TCP
Because the device type is TCP, there are no Type, Line, or Line2 entries. The Dialer is also specified as
TCP. BNU looks in the Dialers files for a TCP entry.
• Dialers file: The Dialers file that is used by the uucico daemon on system hera contains a TCP/IP
entry as follows:
TCP
The combined LOGNAME and MACHINE entries provide the following permissions to system zeus,
when system zeus and system hera are connected:
– System zeus can request and send files regardless of who initiated the call.
– System zeus can read and write only to the public directory (the default).
– System zeus can run only the rmail, who, and uucp commands.
– System zeus must log in to system hera as user uzeus and system zeus cannot use any other login
ID for BNU transactions.
Note: If the permissions are not the same for system hera and system zeus, the LOGNAME and
MACHINE entries are as follows:
merlin Any ACU 1200 local8784 "" in:--in: uvenus word: mirror
System venus can call system merlin at any time, by using an ACU device at 1200 baud and logging in
as uvenus with the password mirror. The telephone number is expanded based on the code local in
the Dialcodes file, and the device to be used is determined based on the Type and Class entries. BNU
checks the Devices files for a device of type ACU and class 1200.
• Dialcodes File: The Dialcodes file on system venus contains the following dial-code prefix for use
with the number in the Systems file:
local 9=445
Given this code, the telephone number for system merlin in the Systems file is expanded to
9=4458784.
• Devices file: The Devices file on system venus contains the following entry for the connection to
system merlin:
The port to be used is tty1, and the Dialer entry in the Dialer-Token Pairs field is hayes. The Token
entry, \T, indicates that the telephone number is to be expanded by using a code from the Dialcodes
file. BNU checks the Dialers files for a hayes dialer type.
• Dialers file: The Dialers file that is used by the uucico daemon on system venus contains the
following entry for the hayes modem:
Note: The expect-send characters are defined in the Dialers file format.
• Permissions file: The Permissions file on system venus contains the following entries, which specify
the ways in which system merlin can conduct uucico and uuxqt transactions with system venus:
System merlin logs in to system venus as umerlin, which is a unique login for system merlin.
System merlin can request and send files regardless of who initiated the call. Also, system merlin
can read and write to the /var/spool/uucppublic directory and to the /home/merlin directory on
system venus. System merlin can issue all commands in the default command-set on system venus.
merlin Any ACU 1200 local8784 "" in:--in: uvenus word: mirror
System venus can call system merlin at any time, by using an ACU device at 1200 baud and logging
in as user uvenus with the password mirror. The telephone number is expanded based on the code
local in the Dialcodes file, and the device to be used is determined based on the Type and Class
entries. BNU checks the Devices files for a device of type ACU and class 1200.
• Dialcodes file: The Dialcodes file on system venus contains the following dial-code prefix for use
with the number in the Systems file:
local 9=445
Given this code, the telephone number for system merlin in the Systems file is expanded to
9=4458784.
• Devices file: The Devices file on system venus contains the following entry for the connection to
system merlin:
The port to be used is tty1, and the Dialer entry in the Dialer-Token Pairs field is hayes. The Token
entry, \T, indicates that the telephone number is to be expanded by using a code from the Dialcodes
file. BNU checks the Dialers files for an entry of a hayes dialer type.
• Dialers file: The Dialers file that is used by the uucico daemon on system venus contains the
following entry for the hayes modem:
Note: The expect-send characters are defined in the Dialers file format.
• Permissions file: The Permissions file on system venus contains the following entries, which specify
the ways in which system merlin can conduct uucico and uuxqt transactions with system venus:
System merlin logs in to system venus as umerlin, which is a unique login for system merlin.
System merlin can request and send files regardless of who initiated the call. Also, system merlin
can read and write to the /var/spool/uucppublic directory and to the /home/merlin directory on
system venus. System merlin can issue all commands in the default command-set on system venus.
venus Any ACU 1200 intown4362 "" in:--in: umerlin word: oaktree
System merlin can call system venus at any time, by using an ACU device at 1200 baud and logging in
as user umerlin with the password oaktree. The telephone number is expanded based on the code
intown in the Dialcodes file, and the device to be used is determined based on the Type and Class
entries. BNU checks the Devices files for a device of type ACU and class 1200.
• Dialcodes file: The Dialcodes file on system merlin contains the following dial-code prefix for use
with the number in the Systems file:
intown 9=325
The ACU is attached to port tty1, and the dialer is hayes. The telephone number is expanded with
information from the Dialcodes file. BNU checks the Dialers files for an entry of the hayes modem.
• Dialers file: The Dialers file that is used by the uucico daemon on system merlin contains the
following entry for its modem:
• Permissions file: The Permissions file on system merlin contains the following entries, which grant
system venus access to system merlin:
hera Any hera 1200 - "" \r\d\r\d\r in:--in: uzeus word: thunder
This entry specifies that system hera can log in to system zeus at any time, by using a direct
connection, which is specified in the Devices files. To find the entry in the Devices files, BNU uses
the third and fourth fields of the Systems entry. Thus, BNU looks for an entry in the Devices files
with a Type of hera and a Class of 1200. System zeus logs in to system hera as user uzeus with the
password thunder.
• Devices file: The Devices file on system zeus contains the following entry to connect to the remote
system hera:
This entry specifies that system zeus uses device tty5 at 1200 bps to communicate with system
hera. Note that the Dialer in both Dialer-Token Pairs fields is direct. When you connect to system
hera, BNU checks the Dialers file for a direct entry.
• Dialers file: The Dialers file on system zeus contains the following entry for direct connections:
direct
This entry specifies that system hera logs in as uhera. Because the VALIDATE=uhera option is
included, system hera cannot log in to system zeus with any other login ID, nor can any other remote
system use the uhera ID. System hera can read and write to any directory on system zeus, and can
send and request files regardless of who initiated the call. System hera can also initiate any commands
on system zeus.
Note: Because the permissions that are granted are the same regardless of which system initiated the
connection, the LOGNAME and MACHINE entries have been combined. If the permissions are not the
same for system hera and system zeus, the LOGNAME and MACHINE entries are as follows:
Attention: Providing the permissions in the preceding example is equivalent to giving any user
on the remote system a login ID on the local system. Such liberal permissions can jeopardize
your security and are given only to well-trusted remote systems at the same site.
• Systems file: The Systems file on system hera contains the following entry for system zeus:
zeus Any zeus 1200 - "" \r\d\r\d\r in:--in: uhera word: portent
This entry specifies that system hera can log in to system zeus at any time, by using a direct
connection, which is specified in the Devices files. To find the entry in the Devices files, BNU uses the
This entry specifies that system hera uses device tty1 at 1200 bps to communicate with system
zeus. Because the Dialer is specified as direct, BNU checks the Dialers files for a direct entry.
• Dialers file: The Dialers file on system hera contains the following entry for direct connections:
direct
This entry specifies that no dialer configuration is required on the direct connection.
• Permissions file: The Permissions file on system hera contains the following entries, which specify
the ways in which zeus can conduct uucico and uuxqt transactions with system hera:
These entries specify that system zeus logs in to system hera as uzeus. Because the
VALIDATE=uzeus parameter is included, system zeus cannot log in to system hera with any other
login ID, nor can any other remote system use the uzeus ID. System zeus can read and write to any
directory on system hera, and can send and request files regardless of who initiated the call. System
zeus can also initiate any commands on system hera.
Attention: If you provide all the permissions in the preceding example, it is equivalent to giving
any user on the remote system a login ID on the local system. Such liberal permissions can
jeopardize your security and are given only to remote systems at the same site.
BNU maintenance
BNU must be maintained to work correctly on your system.
To maintain BNU:
• Read and remove log files periodically.
• Use the uuq and uustat commands to check the BNU queues to ensure jobs are transferring to remote
systems correctly.
• Schedule automatic commands that poll remote systems for jobs, return unsent files to users, and send
you periodic messages about BNU status.
• Periodically update the configuration files to reflect changes in your system.
In addition, occasionally check with administrators of remote systems to keep up with changes on
their systems that might affect your configuration. For example, if the supervisor of system venus
changes your system password, you must put the new password in the /etc/uucp/Systems file (or the
appropriate Systems file specified by /etc/uucp/Sysfiles) before your system can log in to system
venus.
Item Description
uuclean Deletes all files older than a specified number of hours, from the BNU
administrative directories. Use the uuclean command to specify a directory
to be cleaned or a type of file to be deleted. You can also instruct the
command to notify the owners of the deleted files. The uuclean command is
the Berkeley equivalent of the uucleanup command.
uucleanup Performs functions similar to the uuclean command. However, the
uucleanup command checks the age of files based on days rather than
hours. Use the uucleanup command to send a warning message to users
whose files have not been transferred, notifying them that the files are still
in the queue. The uucleanup command also removes files relating to a
specified remote system.
uudemon.cleanu A shell procedure that issues the uulog and uucleanup commands to
compress the BNU log files and remove log and work files over three days
old. The uudemon.cleanu command is run by the cron daemon.
Item Description
uuq Displays jobs currently in the BNU job queue. Use the uuq command to display the status of
a specified job or of all jobs. With root authority, you can use the uuq command to delete a
job from the queue.
uustat Provides information similar to that provided by the uuq command, in a different format.
Use the uustat command to check the status of jobs and delete jobs you own. With root
authority, you can also delete jobs belonging to other users.
uulog Displays a summary of uucp or uux requests, by user or by system. The uulog command
displays the file names. See “BNU log files” on page 461 .
uupoll Forces a poll of a remote system. This is helpful when work for that system is waiting
in the queue and needs to be transferred, before the system is scheduled to be called
automatically.
uusnap Displays a very brief summary of BNU status. For each remote system, this command shows
the number of files awaiting transfer. However, it does not show how long they have been
waiting. The uusnap command is the Berkeley equivalent of the uustat command.
Item Description
uudemon.cleanu Discussed in “BNU cleanup commands” on page 463.
These shell procedures are stored in the /usr/sbin/uucp directory. Copy the procedures and modify
the copy, if you want to change what they do. Run the procedures from the command line or schedule
them to be run by the cron daemon.
To automatically run the uudemon.cleanu and uudemon.admin commands, remove the comment
characters (#) from the beginning of the relevant lines in the /var/spool/cron/crontabs/uucp file.
BNU daemons
The BNU software includes four daemons stored in the /usr/sbin/uucp directory.
Item Description
uucico Facilitates file transfers (see “uucico daemon” on page 465)
uusched Facilitates work request scheduling of files queued in the local
spooling directory (see “uusched daemon” on page 466)
uuxqt Facilitates remote command executions (see “uuxqt daemon” on
page 466)
uucpd Facilitates communications using TCP/IP (see “uucpd daemon” on
page 466)
The uucico, uusched, and uuxqt daemons are started by the cron daemon according to a schedule
set by the BNU administrator. With root authority, you can also start these daemons manually. The uucpd
daemon should be started by the TCP/IP inetd daemon.
uucico daemon
The uucico daemon transports the files required to send data from one system to another.
The uucp and uux commands start the uucico daemon to transfer command, data, and execute files
to the designated system. The uucico daemon is also started periodically by the BNU scheduler, the
uusched daemon. When started by the uusched daemon, the uucico daemon attempts to contact other
systems and execute the instructions in the command files.
To run the instructions in the command files, the uucico daemon first checks the /etc/uucp/Systems
file (or one or more other files specified by /etc/uucp/Sysfiles) for the system to be called. The
daemon then checks the Systems file entry for a valid time to call. If the time is valid, the uucico
daemon checks the Type and Class fields and accesses the /etc/uucp/Devices file (or one or more
other files specified by /etc/uucp/Sysfiles) for a device that matches.
After finding a device, the uucico daemon checks the /var/locks directory for a lock file for the device.
If one exists, the daemon checks for another device of the requested type and speed.
When no device is available, the daemon returns to the Systems files for another entry for the remote
system. If one exists, the daemon repeats the process of searching for a device. If another entry is
not found, the daemon makes an entry in the /var/spool/uucp/.Status/SystemName file for that
uusched daemon
The uusched daemon schedules the transfer of files that are queued in the spooling directory on the local
system.
The spooling directory is /var/spool/uucppublic. When the uusched daemon is invoked, it scans
the spooling directory for command files, then randomizes the files and starts the uucico daemon. The
uucico daemon transfers the files.
uuxqt daemon
When a user issues the uux command to run a specified command on a designated system, the uuxqt
daemon runs the command.
After creating the necessary files, the uux command starts the uucico daemon, which transfers those
files to the public spooling directory on the specified system.
The uuxqt daemon periodically searches the spooling directory for command-execution requests on
every connected system. When it locates such a request, the uuxqt daemon checks for necessary files
and permissions. Then, if permitted, the daemon runs the specified command.
uucpd daemon
The uucpd daemon must be able to run on the remote system before BNU can establish communications
with a remote computer with Transmission Control Protocol/Internet Protocol (TCP/IP).
The uucpd daemon is a subserver of the TCP/IP inetd daemon and is started by the inetd daemon.
By default, the uucpd daemon is commented in the inetd.conf file. To use it, you must remove the
comment character and restart inetd. However, if this has been changed on your system, you might need
to reconfigure the inetd daemon to start the uucpd daemon.
BNU security
Because other systems contact your system to log in, transfer files, and enter commands, BNU provides a
means to establish security.
BNU security enables you to restrict what users of remote systems can do on the local system (users
of remote systems can also restrict what you can do on their systems). BNU runs several daemons to
uucp login ID
When BNU is installed, all of the configuration files, daemons, and many of the commands and shell
procedures are owned by the uucp login ID.
The uucp login ID has a user ID (UID) of 5 and a group ID (GID) of 5. The cron daemon reads the /var/
spool/cron/crontabs/uucp file to schedule automatic jobs for BNU.
Usually, logging in as user uucp is not allowed. To change files that are owned by the uucp login ID, log in
with root authority.
Attention: Allowing remote systems to log in to the local system with the uucp login ID seriously
jeopardizes the security of the local system. Remote systems logged in with the uucp ID can
display and possibly modify the local Systems and Permissions files depending on the other
permissions specified in the LOGNAME entry. It is strongly recommended that you create other
BNU login IDs for remote systems and reserve the uucp login ID for the person responsible for
administering BNU on the local system. For the best security, each remote system that contacts
the local system must have a unique login ID with a unique UID number.
The operating system provides a default nuucp login ID for transferring files.
passwd nuucp
pwadm -f NOCHECK
nuucp
The system prompts you for a password for the nuucp login ID. Completing these steps allows the remote
system to log in without being immediately prompted for a new password (which the batch-oriented
nuucp login ID cannot provide).
After creating the login ID for a remote system, notify that system BNU administrator of the login ID and
password to access your system.
A user with root authority can set up a BNU administrative login ID. This is useful if you want to delegate
BNU administration duties to a user without root authority. The BNU administrative login ID should have
password security, a UID of 5, and be in a uucp group ID 5. The login shell for the administrative login
should be the /usr/bin/sh program (instead of the uucico daemon). Giving the BNU administrative
login a UID of 5 causes it to have the same privileges as the uucp login ID. Thus, for security, remote
systems should not be allowed to log in as the BNU administrator.
Item Description
LOGNAME Defines login names and the privileges associated with them. LOGNAME entries
take effect when a remote system calls the local system and attempts to log in.
MACHINE Defines machine names and the privileges associated with them. MACHINE entries
take effect when the remote system attempts to carry out commands on the local
system.
Options in the Permissions file enable you to establish various levels of security for each remote
system. For example, if many remote systems share one login ID on the local system, use the VALIDATE
option to require each remote system to use a unique login ID. The SENDFILES, REQUEST, and CALLBACK
options specify which system has control, keeping the local system in control of transactions if necessary.
The READ, WRITE, NOREAD, and NOWRITE options define access to specific directories on the local
system. These options also control where on your system remote users can place data. The COMMANDS
option limits the number of commands users on remote systems can execute on the local system. The
COMMANDS=ALL option allows total privileges to systems closely associated with your system.
Attention: The COMMANDS=ALL option can seriously jeopardize the security of your system.
ct -w3 5550990
This dials the remote modem at phone numbers 555-0990. The -w3 flag and number instructs the ct
command to dial the remote modem at one minute intervals until a connection is made or until three
minutes have passed.
Note: Type the phone number of the remote modem on the ct command line, either before or
after the flag.
This dials the remote modems at phone numbers 555-0990, 555-0991, 555-0992, and 555-0993. The
-w6 flag and number instructs the ct command to dial the remote modems at one minute intervals until a
connection is made or until six minutes have passed.
Note: Type the phone numbers of the remote modems on the ct command line, either before
or after the flag.
This sends file1 from the local /home/bin directory to user joe on the remote system distant.
The uuto command runs under the uucp command. The file is transferred to the remote system,
in /var/spool/uucppublic. The file is deposited in the /var/spool/uucppublic/receive/user/
System directory on the remote system. If the target directory does not exist, it is created during the file
exchange.
The BNU rmail command notifies the receiver that a file has arrived.
Note: To send a file to a user on a local system, enter the uuto command, and include the file to
be sent, the local system destination, and the user at the local destination. For example:
This sends file2 from the local /home/bin directory to user nick on the local system near.
Receiving files
In order to receive and handle files, the sending and receiving systems must be running either Basic
Networking Utilities (BNU) or some version of the UNIX-to-UNIX Copy Program (UUCP).
Use the uupick command to receive and manipulate files sent with the uuto command. It has file-
handling options that allow the recipient to find sent files, move files to a specified directory, execute
commands, or delete files.
uupick
The uupick command searches the public directory for files that include the remote user ID in the path
names. The uupick command then displays on the remote screen a message similar to:
The ? (question mark) on the second line of the notification display prompts the receiver to use any
uupick options for handling files in BNU's public directory.
For a list of all available options, type an asterisk (*) on the line below the question mark (?) prompt. The
display, save, and quit options are:
Item Description
p Displays the contents of the file.
m [Directory] Saves the file to the directory specified by the [Directory] variable. If no
destination is given with the m option, the file is moved to the current working
directory.
q Quits (exits) from the uupick file-handling process.
uustat -q
This report indicates that three command (C.*) files intended for remote system venus have been in
the queue for two days. There could be several reasons for this delay. For example, perhaps system
venus has been shut down for maintenance or the modem has been turned off.
2. Before you begin more extensive troubleshooting activities, issue the Uutry command as follows to
determine whether your local system can contact system venus now:
/usr/sbin/uucp/Uutry -r venus
This command starts the uucico daemon with a moderate amount of debugging and the instruction
to override the default retry time. The Uutry command directs the debugging output to a temporary
file, /tmp/venus.
3. If your local system succeeds in establishing a connection to system venus, the debugging output
contains a good deal of information. However, the final line in this script, which follows, is the most
important:
If the connection is successful, assume that the temporary file-transfer problems are now resolved.
Issue the uustat command again to make certain that the files in the spooling directory have been
transferred successfully to the remote system. If they have not, use the steps in “Monitoring a BNU
First, check the physical connections between the local and remote systems. Make sure that the
remote computer is turned on and all cables are properly connected, that the ports are enabled or
disabled (as appropriate) on both systems, and that the modems (if applicable) are working.
If the physical connections are correct and secure, then verify all the relevant configuration files on
both the local and remote systems, including the following:
• Make certain that the entries in the Devices, Systems, and Permissions files (and Sysfiles file,
if applicable) in the /etc/uucp directory are correct on both systems.
• If you are using a modem, make sure that the /etc/uucp/Dialers file (or an alternate
file specified in /etc/uucp/Sysfiles) contains the correct entry. If you are using dial-code
abbreviations, be sure the abbreviations are defined in the /etc/uucp/Dialcodes file.
• If you are using a TCP/IP connection, make sure that the uucpd daemon can be run on the remote
system and that the configuration files contain the correct TCP entries.
5. After you have checked the physical connections and configuration files, issue the Uutry command
again.
If the debugging output still reports that the connection failed, you might need to confer with a
member of your systems support team. Save the debugging output produced by the Uutry command.
This might prove helpful in diagnosing the problem.
The -r flag instructs the UUCP program to create and queue all necessary transfer files but not to start
the uucico daemon.
2. Issue the Uutry command with the -r flag to start the uucico daemon with debugging turned on by
entering:
/usr/sbin/uucp/Uutry -r venus
This instructs the uucico daemon to contact remote system venus overriding the default retry
time. The daemon contacts system venus, logs in, and transfers the file, while the Uutry command
produces debugging output that enables you to monitor the uucico process. Press the Interrupt key
sequence to stop the debugging output and return to the command prompt.
The Uutry command also stores the debugging output in the /tmp/SystemName file. If you break out
of the debugging output before the connection is complete, you can page through the output file to see
the outcome of the connection.
uuname
arthur
hera
merlin
zeus
This information is used to determine the name of an accessible system before copying a file to it. The
uuname command is also used to establish the identity of the local system. The uuname command
acquires its information by reading the /etc/uucp/systems file.
Item Description
PHONES Specifies the name of the user phone file. The file can have any valid file name and must be
set up in the format of the file /usr/lib/phones-file. The default file is etc/phones. If
a file is specified with the PHONES variable, it is used in place of (not in addition to) the /etc/
phones file.
REMOTE Specifies the name of the user remote system definition file. The file can have any valid file
name and must be set up in the format of the /usr/lib/remote-file file. The default file
is /etc/remote. If a file is specified with the REMOTE variable, it is used in place of (not in
addition to) the /etc/remote file.
To use an environment variable, set it before starting the tip command. As an alternative, the names of
the phones and remote files can be determined using the tip command phones variable and remote
variable, respectively, in the .tiprc file.
Note: The tip command reads only the last remote or phones file specified. Thus, if you specify a
remote or phones file with a variable, the new file is used in place of (not in addition to) any previous files
you specified.
The tip command uses variable settings in the following order:
1. The command checks the settings of the PHONES and REMOTE environment variables for the files to
use as the phones and remote files.
2. The command reads the .tiprc file and sets all variables accordingly. If the phones or remote
variable is set in the .tiprc file, this setting overrides the environment variable setting.
3. When a connection to a remote system is initiated, the command reads the remote file entry for that
system. The settings in the remote file entry override settings made in the .tiprc file.
4. If the - BaudRate flag is used with the tip command, the specified rate overrides all previous baud
rate settings.
5. A setting made with the ~s escape signal overrides all previous settings of a variable.
Note: Any tip user can create a .tiprc file and use this file to specify initial settings for tip
variables. The .tiprc file must be placed in the user $HOME directory.
Item Description
/etc/remote Defines attributes of remote systems such as the port and type of device to use to
reach the system, as well as the signals to use to indicate the beginnings and endings
of transmissions.
/etc/phones Lists telephone numbers used to contact remote systems over a modem line.
Sample remote and phones files are delivered with the bos.net.uucp package. The sample remote
file is named /usr/lib/remote-file. The sample phones file is named /usr/lib/phones-file.
Copy /usr/lib/remote-file to /etc/remote and modify /etc/remote. To establish one of these
files, copy a sample file to the correct name and modify it to suit the needs of your site.
A tip user can also create customized remote and phones files. An individual remote file must be in
the format of the /usr/lib/remote-file file and specified with the remote variable or the REMOTE
environment variable. An individual phones file must be in the format of the /usr/lib/phones-file
file and specified with the phones variable or the PHONES environment variable. If an individual phones
1. Determine the job ID number of the process, listed in the remote queue. On the command line of the
local system, type:
uustat -a
The -a option displays all jobs in the remote system's holding queue and the job requests of any other
BNU users on the system.
BNU responds with a message similar to:
2. Then type:
uustat -k heraC3113
BNU troubleshooting
BNU error messages can be linked to a specific phase in the conversation flow. Use the "BNU
conversation flow diagram" and the following error descriptions to help diagnose your BNU problems.
Some of the following messages might not be sent from BNU, but are included in case another UUCP
version is in use.
This illustration shows the flow and different phases of BNU conversion. From uucico at the top,
data is passed to Phase 1-System Verification, then Phase 2-Device Selection, and Phase 3-Link
Establishment, then Phase 4-Login Sequence, next Phase 5-Data Transfer and File Execution and last,
Phase 6-Disconnect.
Item Description
Assert Error The local system unit is having problems. Check the error report for
possible causes by issuing the command errpt -a | pg.
System not in Systems If you supply a remote system name that is not found in the
Systems files, this status message is created, BNU will terminate.
Use the uuname command to check the system name again.
Wrong time to call The Systems file has restrictions on times to allow outgoing calls.
BNU will keep trying until the time is right. Check the Systems file.
Callback required The network has restricted usage either for security or economic
reasons, and access is denied at this time.
Cannot call No Call These errors mean BNU recently tried to call the remote system
and failed. It will not immediately try again. They can also be
caused by an old system status file being retained thus keeping
the uucico daemon from trying again.
Item Description
Dialer Script Failed Your Dialers file script did not complete successfully.
No Device Available Can't The modem or the outgoing phone line from your system is busy.
Access Device Check for an error in the device entry of the Systems file. Also,
check the Devices and Dialers files to be sure logical devices
have physical devices associated with them. The file /etc/uucp/
Sysfiles might be specifying an alternate Systems, Devices, or
Dialers file that is not correctly configured. Is the device in use by
some other program? Check the /var/locks directory for lock on
port. If a lock file exists (for example, LCK..TTY0), check to see if
the process identified by the number in the lock file is still active. If
not, you can remove it (for example, rm /var/locks/LCK..TTY0 ).
Also check the permissions on the port.
Dial Failed Failed (call These errors appear when your system dials another successfully but
to system) the other system does not answer. It might also indicate a problem
in the Devices files. Enter the command uucico -r1 -x6 -s
SystemName. It could be that BNU is expecting some string that it is
not receiving. Make the connection by hand to find out what needs to
be incorporated into the Systems files entry to satisfy the request.
Please keep "timing" in mind; perhaps some delays in the modem
dial string are needed. This could also mean that the port is busy, you
dialed an incorrect number, or BNU lost ownership of the port.
OK Auto Dial These are informative messages only and do not indicate an error.
Item Description
Handshake Failed (LCK) The device is being used by someone else; the process could not
create the LCK file. Sometimes LCK files must be manually removed
by the administrator. After a number of retries, see your system
administrator. See if another process has control of the port (for
example, another instance of the uucico daemon).
Login Failed The login failed due to a bad connection or possibly a slow machine.
Timeout The remote system did not respond within a set period of time. This
could also indicate a problem with the chat script.
Succeeded (Call to The call was completed.
System)
BNU (continued) These are informative messages only and do not indicate an error.
Item Description
Startup Failed Remote After login, the uucico daemon is started on the remote system.
reject after login If there is a problem initiating a conversation between the two
systems, these messages are created. You might have also logged
into the incorrect BNU account or the initial handshake failed.
Wrong machine name A machine was called incorrectly or the machine name was changed.
Bad login/machine The login to the remote system failed. The problem could be an
combination incorrect phone number, an incorrect login or password, or an error in
the chat script.
Remote has a LCK file for Both systems were simultaneously trying to call each other. The local
me request will fail temporarily.
OK Talking These are informative messages only and do not indicate an error.
LOGIN: PASSWORD: If the login or password prompt is in all capital letters, the modem
might be in echo mode (E1 on Hayes compatibles). This causes the
modem to echo back, or send, a RING to your system when an
incoming call is received. The getty command receives the string
and accordingly changes the login: or password: into all caps.
Change the echo mode on the modem to off (use ATE0 for Hayes
compatibles).
Note: Keep in mind that once this change is made, you should use
ATE1 in the chat script of your Dialers files, or you will not get the
expected OK back from the modem.
If the remote port is set for delay or getty -r and the chat script
expects key input, then the ports set for delay are expecting one or
more carriage returns before proceeding with the login. Try beginning
the chat script on the dialing system with the following:
Item Description
Alarm The uucico daemon is having trouble with the connection. Either
the connection is bad or "xon/xoff" is set to yes on the modem.
Remote access to path/ These messages indicate a permission problem; check file and path
file denied copy (failed) permissions.
Bad read The remote system ran out of space, most likely in the spool area, or
the uucico daemon could not read or write to device.
Conversation failed The modem carrier detect was lost. Possibly the modem was turned
off, the cable is loose or disconnected, or the remote system crashed
or is shut down. Telephone disconnection can also cause this error.
Requested Copy These are informative messages only and do not indicate an error.
(succeeded)
Item Description
OK (Conversation The remote system can deny the hangup request and reverse the
Complete) roles (meaning the remote system has work for the local system to
do). After the two uucico daemons agree that no more work exists,
they hang up.
Conversation succeeded This is an informative message only and does not indicate an error.
1. To produce debugging information about a local-to-remote system connection that is not working,
start the uucico daemon with the -x flag as follows:
/usr/sbin/uucp/uucico -r 1 -s venus -x 9
where -r 1 specifies the master, or caller mode; -s venus, the name of the remote system to which
you are trying to connect; and -x 9, the debug level that produces the most detailed debugging
information.
2. If the expect-send sequence entry in a Systems file in the format of /etc/uucp/Systems is:
expect: ""
got it
sendthem (^J^M)
expect (in:)^
M^Jlogin:got it
sendthem (uucp1^M)
expect (word:)^
M^JPassword:got it
sendthem (mirror^M)
imsg >^M^J^PShere^@Login Successful: System=venus
where:
Item Description
expect: "" Specifies that the local system will not wait for
any information from the remote system.
got it Acknowledges that the message has been
received.
sendthem (^J^M) Specifies that the local system will send the
remote system a carriage return and a new line.
expect (in:) Specifies that the local system expects to receive
the remote system login prompt, which ends in
the in: character string.
^M^Jlogin:got it Confirms that the local system received the
remote login prompt.
sendthem (uucp1^M) Specifies that the local system will send the
uucp1 login ID to the remote system.
expect (word:) Specifies that the local system expects to receive
the remote system password prompt, which ends
in the word: character string.
^M^JPassword:got it Confirms the local system received the remote
password prompt.
sendthem (mirror^M) Specifies that the local system will send the
password for the uucp1 login ID to the remote
system.
imsg >^M^J^PShere^@Login Successful: Confirms the local system is successfully logged
System=venus in to remote system venus.
Note:
1. The expect-send debugging output produced by the uucico command can come either from
information in the /etc/uucp/Dialers file or from information in the /etc/uucp/Systems file.
Information about communication with the modem comes from the Dialers file, while information
about communication with the remote system comes from the Systems file. (Note that /etc/uucp/
Systems and /etc/uucp/Dialers are default BNU configuration files. Other files can be specified
in /etc/uucp/Sysfiles to serve the same role.)
2. To set up a connection with a remote system, you must be familiar with the login sequence of that
system.
Item Description
RFC 1155 Structure and Identification of Management Information for TCP/IP-based Internets
RFC 1157 A Simple Network Management Protocol (SNMP)
RFC 1213 Management Information Base for Network Management of TCP/IP-based internets: MIB-
II
RFC 1227 Simple Network Management Protocol (SNMP) single multiplexer (SMUX) protocol and
Management Information Base (MIB)
RFC 1229 Extensions to the generic interface Management Information Base (MIB)
RFC 1231 IEEE 802.5 token-ring Management Information Base (MIB)
RFC 1398 Definitions of Managed Objects for the Ethernet-like Interface Types
RFC 1512 FDDI Management Information Base
RFC 1514 Host Resources MIB
RFC 1592 Simple Network Management Protocol-Distributed Program Interface Version 2
RFC 1905 Protocol Operations for Version 2 of the Simple Network Management Protocol (SNMPv2)
RFC 1907 Management Information Base for Version 2 of the Simple Network Management Protocol
(SNMPv2)
RFC 2572 Message Processing and Dispatching for the Simple Network Management Protocol
(SNMP)
RFC 2573 SNMP Applications
RFC 2574 User-based Security Model (USM) for version 3 of the Simple Network Management
Protocol (SNMPv3)
RFC 2575 View-based Access Control Model (VACM) for the Simple Network Management Protocol
(SNMP)
SNMPv3 architecture
There are four main parts to the SNMPv3 architecture.
The interaction between these systems to provide the necessary data requested is depicted in the
following figure:
SNMP agent
The SNMP agent receives requests from, and makes responses to, the SNMP manager.
In addition, the SNMP agent communicates with all DPI2 subagents and SMUX peers on the system. The
SNMP agent manages some MIB variables, and all DPI2 subagents and SMUX peers register their MIB
variables with the SNMP agent.
When clsnmp (the SNMP manager) issues a request, it is sent to UDP 161 on the SNMP agent. If the
request is an SNMPv1 or SNMPv2c request, the SNMP agent will verify the community name and process
the request. If the request is an SNMPv3 request, the SNMP agent will attempt to authenticate the user
requesting the data and ensure that the user has the access permissions required to fulfill the request by
using the authentication keys, and, if the encrypted version is running, privacy keys. If the SNMP agent
cannot authenticate the user, or if the user does not have the correct access permissions to fulfill the
request, the SNMP agent will not honor the request. For information on creating users in SNMPv3, see
“Creating users in SNMPv3” on page 494.
If the user is authenticated and has the correct access permissions, the SNMP agent will fulfill the
request. The SNMP agent will locate the MIB variables being requested. If the SNMP agent itself is
managing the requested MIB variables, it will process the request and send a response back to the SNMP
manager. If a DPI2 subagent or SMUX peer is managing the requested MIB variables, the SNMP agent will
forward the request to the DPI2 subagent or SMUX peer on which the MIB variables are managed, allow it
to process the request, and will then respond to the SNMP manager.
DPI2 subagents
A DPI2 subagent, such as hostmibd, communicates with the DPI2 agent, which, in SNMPv3, is part of
the SNMP agent.
The DPI2 subagent sends responses and traps to the DPI2 agent through dpiPortForTCP.0. Because
this is not a well-known port, the DPI2 subagent must first issue a request for the port number for
dpiPortForTCP.0. This request is issued to UDP 161 on the SNMP agent, after which the SNMP agent
responds to the DPI2 subagent with the port number for dpiPortForTCP.0. After the port number is
received, the DPI2 subagent establishes a connection with the DPI2 agent using the port number given.
The DPI2 subagent then registers its MIB subtrees with the DPI2 agent.
Note: To enable the SNMP Agent to listen on a port other than UDP 161, you must set the SNMP_PORT
environment. There are two ways to set this variable:
• Method 1: Stop the DPI2 subagent and type the following commands:
– SNMP_PORT=<port_number> /usr/sbin/aixmibd -d 128
– SNMP_PORT=<port_number> /usr/sbin/hostmibd -d 128
– SNMP_PORT=<port_number> /usr/sbin/snmpmibd -d 128
where port_number is the number of the port that you want to use.
After the commands have completed executing, start the DPI2 subagent.
• Method 2: Include the SNMP_PORT variable in the /etc/environment file and assign the new
port value to it. Allow the aixmibd, hostmibd, snmpmibd, and snmpd daemons to run from /etc/
rc.tcpip as is. In this method, you do not have to run the aixmibd, hostmibd, and snmpmibd
commands from the command line.
After the connection is established and the MIB subtrees have been registered, the DPI2 subagent
is ready to respond to requests received from the DPI2 agent. When a request is received, the DPI2
subagent processes the request and responds with the necessary information.
The DPI2 subagent is also ready to send traps, if necessary. When a trap is sent, the SNMP agent will
check its /etc/snmpdv3.conf file to determine the IP address or addresses to which the trap must be
forwarded to, and it will send the trap to those addresses.
SNMP manager
The SNMP manager runs clsnmp, which is compatible with SNMPv1, SNMPv2c, and SNMPv3.
Use the clsnmp command to issue a request, such as a get, get-next, get-bulk, or set request. The
request is sent to UDP 161 on the SNMP agent, after which it waits for the response from the SNMP
agent.
Note: To allow the SNMP Manager to use a port other than UDP 161, you need to declare the port
number you want to use and the IP address in the targetAgent field of the /etc/clsnmp.conf file. For
information on the /etc/clsnmp.conf file, see clsnmp.conf File in Files Reference.
It also can listen to SNMP traps on UDP 162. The SNMP manager will receive traps if its IP address is so
specified in the /etc/snmpdv3.conf file on the SNMP agent.
MIB variables
Information on MIB variables can be found in the following locations.
For information on MIB variables, see Management Information Base, Terminology Related to
Management Information Base Variables, Working with Management Information Base Variables, and
Management Information Base Database in Communications Programming Concepts.
If you want to configure your own DPI2 subagent or smux peer, see the /usr/samples/snmpd/smux
and /usr/samples/snmpd/dpi2 directories.
These entries would appear in the /etc/snmpdv3.conf file. The following nine configurations are
possible:
• Localized authentication and privacy keys using the HMAC-MD5 protocol:
Configuring users in SNMPv3 requires configuration of both the /etc/snmpdv3.conf file and the /etc/
clsnmp.conf file. For a scenario on generating user keys and editing the necessary configuration
files, see “Creating users in SNMPv3” on page 494. You can also refer to the sample snmpdv3.conf
configuration file and clsnmp.conf configuration file located in the /usr/samples/snmpdv3 directory.
Below is the /etc/clsnmp.conf file that will be updated for user u8:
Things to consider
• The information in this how-to scenario was tested using specific versions of AIX. The results you obtain
might vary significantly depending on your version and level of AIX.
1.3.6.1.6.3.15.1.2.2.1.6.12.0.0.0.2.0.0.0.0.9.3.149.49.2.117.56 = '8173701d7c00913af002a3379
d4b150af9566f56a4dbde21dd778bb166a862494aa3a477e3b96e7d'h
3. On the SNMP manager side, run the pwtokey command to generate the new authentication key based
on the new password to place in the /etc/clsnmp.conf file. In this scenario, we ran the following
command:
• -u auth specifies that only an authentication key will be created. If you are updating privacy keys
as well, use -u all.
• -p HMAC-SHA specifies the protocol that will be used in creating the authentication key. If you are
updating privacy keys as well, use -p all.
• The password used (in this case newpassword) must be the same as the password used when
generating new authentication keys with the pwchange command.
• The IP address used (in this case 9.3.149.49) must be the IP address where the agent is running.
The result gives the localized and non-localized authentication keys:
4. Open the /etc/clsnmp.conf file with your favorite text editor and place the non-localized
authentication key in the line for the user whose keys are being updated. In this scenario, the entry is
as follows:
where mib is a MIB variable to which user u8 has read access. In this case, user u8 has access to
internet.
SNMPv3 requests
The clsnmp command is used to send SNMP requests to SNMP agents on local or remote hosts.
The requests can be SNMPv1, SNMPv2c, or SNMPv3 requests. In order to process requests, the /etc/
clsnmp.conf file must be configured.
The clsnmp command can issue get, getnext, getbulk, set, walk, and findname requests. Each of these
requests is briefly described below:
get
allows the user to gather data from one MIB variable
getnext
gives the next MIB variable in the MIB subtree
getbulk
gives all MIB variables from multiple MIB subtrees
set
allows the user to set a MIB variable
To complete the steps in this scenario, refer to your /etc/snmpd.conf file. Have a copy of that file ready
when you start this procedure.
Things to consider
• The information in this how-to scenario was tested using specific versions of AIX. The results you obtain
might vary significantly depending on your version and level of AIX.
#--------------------------------------------------------------------
# VACM_GROUP entries
# Defines a security group (made up of users or communities)
# for the View-based Access Control Model (VACM).
# Format is:
# groupName securityModel securityName storageType
VACM_GROUP group2 SNMPv1 vasu -
VACM_GROUP group3 SNMPv1 daniel -
VACM_GROUP group3 SNMPv1 david -
#--------------------------------------------------------------------
#------------------------------------------------------------------------
# COMMUNITY
# Defines a community for community-based security.
# Format is:
# communityName securityName securityLevel netAddr netMask storageType
COMMUNITY public public noAuthNoPriv 0.0.0.0 0.0.0.0 -
COMMUNITY daniel daniel noAuthNoPriv 0.0.0.0 0.0.0.0 -
COMMUNITY vasu vasu noAuthNoPriv 9.3.149.49 255.255.255.255 -
COMMUNITY david david noAuthNoPriv 9.53.150.67 255.255.255.255 -
#------------------------------------------------------------------------
2. Create a VACM_VIEW entry for every MIB object or variable that each group has access to.
According to the /etc/snmpd.conf file, daniel and david have access to udp, icmp, snmp,
and 1.3.6.1.2.1.25 (host subtree as defined in RFC 1514), and vasu has access to system,
interfaces, tcp, and icmp. These view entries are migrated to the /etc/snmpdv3.conf file as
follows:
#--------------------------------------------------------------------
# VACM_VIEW entries
# Defines a particular set of MIB data, called a view, for the
# View-based Access Control Model.
# Format is:
# viewName viewSubtree viewMask viewType storageType
#---------------------------------------------------------------------------------------------------------
--
# VACM_ACCESS entries
# Identifies the access permitted to different security groups
# for the View-based Access Control Model.
# Format is:
# groupName contextPrefix contextMatch securityLevel securityModel readView writeView notifyView
storageType
VACM_ACCESS group1 - - noAuthNoPriv SNMPv1 defaultView - defaultView -
VACM_ACCESS group2 - - noAuthNoPriv SNMPv1 group2View - group2View -
VACM_ACCESS group3 - - noAuthNoPriv SNMPv1 group3View group3View group3View -
#---------------------------------------------------------------------------------------------------------
--
#-------------------------------------------------------------------------------------
# TARGET_ADDRESS
# Defines a management application's address and parameters
# to be used in sending notifications.
# Format is:
# targetAddrName tDomain tAddress tagList targetParams timeout retryCount storageType
TARGET_ADDRESS Target1 UDP 127.0.0.1 traptag trapparms1 - - -
TARGET_ADDRESS Target2 UDP 9.3.149.49 traptag trapparms2 - - -
TARGET_ADDRESS Target3 UDP 9.3.149.49 traptag trapparms3 - - -
TARGET_ADDRESS Target4 UDP 9.53.150.67 traptag trapparms4 - - -
#-------------------------------------------------------------------------------------
2. The community names specified in the trap entries in the /etc/snmpd.conf file become part of
the TARGET_PARAMETERS entries in the /etc/snmpdv3.conf file. The community names must
be mapped to a specific TARGET_ADDRESS entry using the targetParams values. For example,
community daniel is mapped with trapparms2, which, under the TARGET_ADDRESS entry, maps
to IP address 9.3.149.49. Community daniel and IP address 9.3.149.49 were originally a trap
entry in the /etc/snmpd.conf file. See the following example:
#--------------------------------------------------------------------------
# TARGET_PARAMETERS
# Defines the message processing and security parameters
# to be used in sending notifications to a particular management target.
# Format is:
# paramsName mpModel securityModel securityName securityLevel storageType
TARGET_PARAMETERS trapparms1 SNMPv1 SNMPv1 public noAuthNoPriv -
TARGET_PARAMETERS trapparms2 SNMPv1 SNMPv1 daniel noAuthNoPriv -
TARGET_PARAMETERS trapparms3 SNMPv1 SNMPv1 vasu noAuthNoPriv -
TARGET_PARAMETERS trapparms4 SNMPv1 SNMPv1 david noAuthNoPriv -
#--------------------------------------------------------------------------
3. The trapmask information in the /etc/snmpd.conf file does not migrate to the /etc/
snmpdv3.conf file.
#--------------------------------------------------------------------------------------------
# smux <client OIdentifier> <password> <address> <netmask>
smux 1.3.6.1.4.1.2.3.1.2.3.1.1 sampled_password # sampled
#--------------------------------------------------------------------------------------------
stopsrc -s snmpd
startsrc -s snmpd
Note: Simply refreshing the SNMPv3 agent will not work as it did in SNMPv1. If you make changes to
the /etc/snmpdv3.conf file, you must stop and start the daemon as instructed above. The dynamic
configuration function supported in SNMPv3 will not allow you to refresh.
3. With root authority, open the /etc/snmpdv3.conf file with your favorite text editor.
4. Create a user by adding a USM_USER entry following the format given in the file. The authKey value
will be the localized authentication key that was generated using the pwtokey command. The entry for
user u1 follows:
#---------------------------------------------------------------------------
# USM_USER entries
# Defines a user for the User-based Security Model (USM).
# Format is:
# userName engineID authProto authKey privProto privKey keyType storageType
#
USM_USER u1 - HMAC-MD5 b3b6c6306d67e9c6f8e7e664a47ef9a0 - - L -
#----------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------
--------
#
# Format of entries:
# winSnmpName targetAgent admin secName password context secLevel authProto authKey
privProto privKey
#
user1 9.3.230.119 SNMPv3 u1 - - AuthNoPriv HMAC-MD5
63960c12520dc8829d27f7fbaf5a0470 - -
#--------------------------------------------------------------------------------------------
--------
• winSnmpName can be any value. This value will be used when making SNMP requests using the
clsnmp command.
• targetAgent is the IP address where the agent is running, which was also used in creating the
authentication keys.
• admin is set to SNMPv3 because we will be sending SNMPv3 requests.
• secName is the name of the user that you are creating. In this case, it is u1.
• seclevel is set to AuthNoPriv because it is being configured to use authentication but not privacy
(as a result, there are no values for privProto and privKey).
• authproto is set to the authentication protocol that was used in creating the authentication keys.
• authKey is the non-localized key that was generated by the pwtokey command.
8. Save and close the /etc/clsnmp.conf file.
#--------------------------------------------------------------
# VACM_GROUP entries
# Defines a security group (made up of users or communities)
# for the View-based Access Control Model (VACM).
# Format is:
# groupName securityModel securityName storageType
VACM_GROUP group1 USM u1 -
#--------------------------------------------------------------
• groupName can be any name. It becomes that name of your group. In this case, it is group1.
• securityModel is set to USM, which takes advantage of the SNMPv3 security features.
• securityName is the name of the user. In this case, it is u1.
#----------------------------------------------------------------
# VACM_VIEW entries
# Defines a particular set of MIB data, called a view, for the
# View-based Access Control Model.
# Format is:
# viewName viewSubtree viewMask viewType storageType
VACM_VIEW group1View interfaces - included -
VACM_VIEW group1View tcp - included -
VACM_VIEW group1View icmp - included -
VACM_VIEW group1View system - included -
VACM_VIEW group1View sysObjectID - excluded -
#----------------------------------------------------------------
In this scenario, we use the value that is specified in the default entry, traptag.
1. Add a TARGET_ADDRESS entry to specify where you want traps to be sent.
#-------------------------------------------------------------------------------------
# TARGET_ADDRESS
# Defines a management application's address and parameters
# to be used in sending notifications.
# Format is:
# targetAddrName tDomain tAddress tagList targetParams timeout retryCount storageType
#-------------------------------------------------------------------------------------
TARGET_ADDRESS Target1 UDP 9.3.207.107 traptag trapparms1 - - -
#-------------------------------------------------------------------------
# TARGET_PARAMETERS
# Defines the message processing and security parameters
# to be used in sending notifications to a particular management target.
# Format is:
# paramsName mpModel securityModel securityName securityLevel storageType
#-------------------------------------------------------------------------
TARGET_PARAMETERS trapparms1 SNMPv3 USM u1 AuthNoPriv -
• paramsName is the same as the targetParams value in the TARGET_ADDRESS entry, which, in this
case, is trapparms1.
• mpModel is the version of SNMP being used.
stopsrc -s snmpd
startsrc -s snmpd
where mib is a MIB subtree to which the user has access. In this scenario, it could be interfaces, tcp,
icmp, or system. If the configuration is correct, you will see the information from the specified subtree.
If you did not get the correct output, review the steps in this document and verify that you have entered
all information correctly.
SNMPv3 troubleshooting
These problems might be encountered using SNMPv3.
• While migrating, you need to migrate the community and SMUX entries defined in the /etc/
snmpd.conf file to the /etc/snmpdv3.conf file. For information on migrating this information, see
“Migrating from SNMPv1 to SNMPv3” on page 491.
• Requests are not generating any responses.
The most likely cause of this problem is a configuration error in either the /etc/snmpdv3.conf file
or the /etc/clsnmp.conf file, or both. Carefully review these files to ensure that all information is
entered correctly. For information on editing these files when creating new users, see “Creating users in
SNMPv3” on page 494.
• A new user was configured using both authentication and privacy keys, but an error message is returned
when using this user.
The most likely cause is that you are not running the SNMPv3 encrypted version. Follow these steps to
determine what version you are running:
1. Run ps -e|grep snmpd.
– If you receive no output, you probably need to start the snmpd daemon. Run startsrc -s
snmpd.
– If your output included snmpdv1, you are running SNMPv1. You will be able to make SNMPv1
requests when running this version.
The SNMP daemon will attempt to bind sockets to certain well-known User Datagram Protocol (UDP)
and Transmission Control Protocol (TCP) ports, which must be defined in the /etc/services file as
follows:
snmp 161/udp
snmp-trap 162/udp
smux 199/tcp
The snmp service must be assigned port 161, as required by RFC 1157. The /etc/services file assigns
ports 161, 162, and 199 to these services. If the /etc/services file is being serviced off another
machine, these assigned ports must be made available in the served /etc/services file on the server
before the SNMP daemon can run.
/etc/snmpd.conf file
The /etc/snmpd.conf configuration file specifies community names and associated access privileges
and views, hosts for trap notification, logging attributes, snmpd-specific parameter configurations, and
single multiplexer (SMUX) configurations for the SNMP daemon for SNMPv1.
See the /etc/snmpd.conf file in Files Reference for more information.
This illustration shows and example of the SNMPv1 architecture. The DPI2 subagent, smux peer, SNMP
manager, and SNMP agent are shown. In addition, how they communicate with each other is shown.
The SNMP daemon receives and transmits all SNMP protocol messages through the Transmission
Control Protocol/Internet Protocol (TCP/IP) User Datagram Protocol (UDP). Requests are accepted
on well-known port 161. Traps are transmitted to the hosts listed in the trap entries in the /etc/
snmpd.conf file that are listening on well-known port 162.
When a request is received, the source IP address and the community name are checked against a list
containing the IP addresses, community names, permissions, and views as specified in the community
and view entries in the /etc/snmpd.conf file. The snmpd agent reads this file at startup and on a
refresh command or a kill -1 signal. If no matching entry is found, the request is ignored. If a
matching entry is found, access is allowed according to the permissions specified in the community and
view entries for that IP address, community, and view name association in the /etc/snmpd.conf file.
Both the message and the PDU must be encoded according to the ASN.1 rules.
The request-ID field identifies the nature of the request; the error-status field and error-index field are
unused and must be set to 0 (zero); and the variable-bindings field contains a variable-length list of
numeric-format instance IDs whose values are being requested. If the value of the request-ID field is SET,
the variable-bindings field is a list of pairs of instance IDs and values.
Read Using the Management Information Base (MIB) Database in Communications Programming Concepts
for a discussion of the three request types.
If the request was successfully processed, the value for both the error-status and error-index field is 0
(zero), and the variable-bindings field contains a complete list of pairs of instance IDs and values.
If any instance ID in the variable-bindings field of the request PDU was not successfully processed,
the SNMP agent stops processing, writes the index of the failing instance ID into the error-index field,
records an error code in the error-status field, and copies the partially completed result list into the
variable-bindings field.
RFC 1157 defines the following values for the error-status field:
Item Description
enterprise The object identifier assigned to the vendor implementing the agent.
This is the value of the sysObjectID variable, and it is unique
for each implementer of an SNMP agent. The value assigned to
this implementation of the agent is 1.3.6.1.4.1.2.3.1.2.1.1.3, or
risc6000snmpd.3.
agent-address IP address of the object generating the trap.
The following generic-trap values indicate that certain system events have been detected:
Item Description
coldStart The agent is reinitializing. Configuration data or MIB variable
values, or both, might have changed. Restart the measurement
epochs.
warmStart The agent is reinitializing but configuration data or MIB variable
values have not changed. In this implementation of the SNMP
agent, a warmStart trap is generated when the /etc/snmpd.conf
file is reread. The configuration information in the /etc/
snmpd.conf file is for agent configuration that has no side effects
on SNMP manager databases. Measurement epochs should not be
restarted.
linkDown The agent has detected that a known communications interface
has been disabled.
linkUp The agent has detected that a known communications interface
has been enabled.
authenticationFailure A message was received that could not be authenticated.
egpNeighborLoss An Exterior Gateway Protocol (EGP) neighbor was lost. This value
is only generated when the agent is running on a host that runs the
gated daemon using EGP.
enterpriseSpecific Not implemented; reserved for future use.
The linkDown and linkUp traps contain a single instance ID/value pair in the variable-bindings list. The
instance ID identifies the ifIndex of the adapter that was disabled or enabled, and the value is the ifIndex
value. The trap for egpNeighborLoss also contains a binding consisting of the instance ID and value of
egpNeighAddr for the lost neighbor.
Item Description
egpInMsgs Number of EGP messages received without error.
egpInErrors Number of EGP messages received in error.
egpOutMsgs Total number of EGP messages transmitted by the gated daemon running on the
agent's host.
egpOutErrors Number of EGP messages that could not be sent by the agent host gated daemon
because of resource limitations.
egpAs Autonomous system number of the agent host gated daemon.
The following EGP MIB variables have an instance for each EGP peer or neighbor acquired by the agent
host gated daemon:
Item Description
egpNeighState The state of this EGP peer:
1
idle
2
acquisition
3
down
4
up
5
cease.
If the gated daemon is not running, or if the gated daemon is running but is not configured to
communicate with the snmpd agent, or if the gated daemon is not configured for EGP, get and set
requests for the values of these variables will return the noSuchName error response code.
The gated daemon configuration file, /etc/gated.conf, should contain the following statement:
snmp yes;
The gated daemon is internally configured to be an Simple Network Management Protocol (SNMP)
single multiplexer (SMUX) protocol peer, or proxy agent, of the snmpd daemon. When the gated daemon
starts up, it registers the ipRouteTable MIB variable tree with the snmpd agent. If the gated daemon
is configured for EGP, then thegated daemon also registers the EGP MIB variable tree. After this
registration is complete, an SNMP manager can successfully make requests to the snmpd agent for
the ipRouteTable an EGP MIB variables supported by this agent host gated daemon. When the gated
daemon is running, all MIB routing information is obtained using the gated daemon. In this case, set
requests to the ipRouteTable are not allowed.
The SMUX communication between the gated daemon and the snmpd daemon takes place over the
well-known Transmission Control Protocol (TCP) port 199. If the gated daemon terminates, snmpd
immediately unregisters the trees the gated daemon previously registered. If the gated daemon is
started before the snmpd daemon, the gated daemon periodically checks for the snmpd daemon until the
SMUX association can be established.
To configure the snmpd agent to recognize and allow the SMUX association with the gated daemon
client, the user must add a SMUX entry to the /etc/snmpd.conf file. The client object identifier and
password specified in this SMUX entry for the gated daemon must match those specified in the /etc/
snmpd.peers file.
The snmpd agent supports set requests for the following read-write MIB I and MIB II variables:
sysContact
The textual identification of the contact person for this agent host. This information includes the name
of this person and how to contact this person: for example, "Bob Smith, 555-5555, ext 5." The value
is limited to 256 characters. If, for a set request, the string for this MIB variable is greater than 256
characters, the snmpd agent will return the error badValue, and the set operation is not performed.
The initial value of sysContact is defined in /etc.snmp.conf. If nothing is defined, the value is null
string.
sysName
The host name for this agent host. Typically this is the fully qualified domain name of the node. The
value is limited to 256 characters. If, for a set request, the string for this MIB variable is greater than
256 characters, the snmpd agent returns the error badValue, and the set operation is not performed.
sysLocation
A textual string stating the physical location of the machine on which this snmpd agent resides: for
example, "Austin site, building 802, lab 3C-23." The value is limited to 256 characters. If, for a set
request, the string for this MIB variable is greater than 256 characters, the snmpd agent returns the
error badValue, and the set operation is not performed. The initial value of sysLocation is defined
in /etc/snmp.conf. If nothing is defined, the value is null string.
ifAdminStatus
The desired state of an interface adapter on the agent's host. Supported states are up and down. The
state can be set to testing but such an action has no effect on the operational state of the interface.
Note: It is possible that the ifAdminStatus value can be set to up or down, yet the actual operational
change of the interface failed. In such a case, a get request of the ifAdminStatus might reflect up
while an ifOperStatus for that interface might reflect down. If such a situation occurs, the network
administrator would issue another set request to set ifAdminStatus to up to attempt the operational
change again.
atPhysAddress
The hardware address portion of an address table binding on the agent host (an entry in the Address
Resolution Protocol table). This is the same MIB variable as ipNetToMediaPhysAddress.
atN0etAddress
The IP address corresponding to the hardware or physical address specified in atPhysAddress. This is
the same MIB variable as ipNetToMediaNetAddress.
ipForwarding
Indicates whether this agent host is forwarding datagrams.
ipDefaultTTL
The default time-to-live (TTL) value inserted into IP headers of datagrams originated by the agent
host.
ipRouteDest
The destination IP address of a route in the route table.
ipRouteNextHop
The gateway by which a destination IP address can be reached from the agent host (an entry in the
route table).
ipRouteType
The state of a route table entry on the agent host (used to delete entries).
ipNetToMediaPhysAddress
The hardware address portion of an address table binding on the agent host (an entry in the ARP
table). This is the same MIB variable as atPhysAddress.
ipNetToMediaNetAddress
The IP address corresponding to the hardware or physical address specified in
ipNetToMediaPhysAddress. This is the same MIB variable as atNetAddress.
ipNetToMediaType
The type of mapping from the IP address to the physical address.
snmpEnableAuthenTraps
Indicates whether the snmpd agent is configured to generate authenticationFailure traps.
smuxPstatus
The status of an SMUX protocol peer (used to delete SMUX peers).
smuxTstatus
The status of a SMUX MIB tree (used to delete MIB tree mounts).
The following variables are the settable variables as defined in RFC 1229. The snmpd daemon allows the
user to set these variables. The underlying device might not allow the setting of such variables. Check
with each device to see what is and is not supported.
ifExtnsPromiscuous
The status of the promiscuous mode on a given device. This is used to enable and disable
promiscuous mode on a given device. The snmpd action is final and complete. When snmpd is told
to turn off, promiscuous mode is turned completely off regardless of the other applications on the
machine.
ifExtnsTestType
The test initiation variable. When this variable is set, the appropriate test is run for that device. An
Object Identifier is the value of the variable. The specific value is dependent on the device type
and the test that is to be run. Currently, the only defined test that snmpd knows to run is the
testFullDuplexLoopBack test.
ifExtnsRcvAddrStatus
The address status variable. When this variable is set, the specified address comes into existence with
the appropriate level of duration. snmpd only allows the setting of temporary addresses because it is
not able to set device Object Data Manager (ODM) records and it is only allowed to set multicast or
broadcast addresses.
dot5RingSpeed
The current ring speed or bandwidth.
dot5ActMonParticipate
The object specifies whether the device participates in the active monitor selection process.
dot5Functional
The functional mask that allows the token-ring device to specify what addresses it receives frames
from.
The following complex timer manipulations variables are defined in the RFC as read-only but you are
encouraged to make them read-write. Review the RFC to gain a full understanding of their interactions.
snmpd allows the requestor to set them, but the device might not. Check the device driver documentation
for more information. The variables are:
• dot5TimerReturnRepeat
• dot5TimerHolding
• dot5TimerQueuePDU
• dot5TimerValidTransmit
• dot5TimerNoToken
• dot5TimerActiveMon
• dot5TimerStandbyMon
• dot5TimerErrorReport
• dot5TimerBeaconTransmit
fddimibSMTConfigPolicy
The status of the configuration policies, specifically the hold policy usage.
fddimibSMTConnectionPolicy
The status of the connection policies in the FDDI node. See RFC 1512 for more information about the
specific settable values.
fddimibSMTTNotify
The timer, expressed in seconds, used in the Neighbor Notification protocol. It has a range of 2
seconds to 30 seconds, and its default value is 30 seconds.
fddimibSMTStatRptPolicy
The status of the status reporting frame generation.
fddimibSMTTraceMaxExpiration
This variable defines the maximum timer expiration value for trace.
fddimibSMTStationAction
This variable causes the SMT entity to take a specific action. See the RFC to get specific information
about this variable.
fddimibMACRequestedPaths
Defines the paths the medium access control (MAC) should be inserted.
fddimibMACFrameErrorThreshold
Threshold for when a MAC status report is generated. Defines the number of error that must occur
before a report is generated.
fddimibMACMAUnitdataEnable
This variable determines the value of the MA_UNITDATA_Enable flag in RMT. The default and initial
value of this flag is true (1).
fddimibMACNotCopiedThreshold
A threshold for determining when a MAC condition report is generated.
The following three variables are timer variables that are interactive among themselves. Before changing
any of these variables, you should have a good understanding of their meaning as defined in RFC 1512.
• fddimibPATHTVXLowerBound
• fddimibPATHTMaxLowerBound
• fddimibPATHMaxTReq
fddimibPORTConnectionPolicies
Specifies the connection policies for the specified port.
fddimibPORTRequestedPaths
This variable is a list of permitted paths where each list element defines the port permitted paths. The
first octet corresponds to `none', the second octet to `tree', and the third octet to `peer'.
fddimibPORTLerCutoff
The link error rate estimate at which a link connection is broken. It ranges from 10**-4 to 10**-15 and
is reported as the absolute value of the base 10 logarithm (default of 7).
Item Descripti
on
Instance Value Action
n.n k Defines the port LerCutoff.
fddimibPORTLerAlarm
The link error rate estimate at which a link connection generates an alarm. It ranges from 10**-4 to
10**-15 and is reported as the absolute value of the base 10 logarithm of the estimate (default is 8).
fddimibPORTAction
This variable causes the port to take a specific action. See the RFC to get specific information about
this variable.
Note: RFC 1213 describes all variables in the atEntry and ipNetToMediaEntry tables as read-write.
Set support is implemented only for the atEntry variables atPhysAddress and atNetAddress, and the
ipNetToMediaEntry variables ipNetToMediaPhysAddress, ipNetToMediaNetAddress, and ipNetToMediaType.
To accept set requests that might specify the remaining unsupported attributes in these two tables,
set requests for the remaining variables are accepted in atIfIndex and ipNetToMediaIfIndex. No error
response is returned to the set request originator, but a subsequent get request will show that the original
values are retained.
In the ipRouteEntry table, RFC 1213 describes all variables except ipRouteProtoas read-write. As
mentioned above, set support is implemented only for the variables ipRouteDest, ipRouteNextHop, and
ipRouteType. To accept set requests that might specify several unsupported route attributes, set requests
for the remaining variables in the ipRouteEntry table are accepted: ipRouteIfIndex, ipRouteMetric1,
ipRouteMetric2, ipRouteMetric3, ipRouteMetric4, ipRouteMetric5, ipRouteAge, and ipRouteMask. No error
response is returned to the set request originator, but a subsequent get request will show that the original
values are retained. The snmpd daemon does not coordinate routing with the routed daemon. If the
gated daemon is running and has registered the ipRouteTable with the snmpd daemon, set requests to
the ipRouteTable are not allowed.
RFC 1229 describes settable variables that snmpd allows. See the previous entries for actual deviations.
The following examples use the snmpinfo command. It is assumed that the snmpinfo default
community name, public, has read-write access for the respective MIB subtree.
This command sets the value of sysContact.0 to the specified string. If an entry for sysContact.0
already exists, it is replaced.
This command sets the value of sysName.0 to the specified string. If an entry for sysName.0 already
exists, it is replaced.
This command sets the value of sysLocation.0 to the specified string. If an entry for sysLocation.0
already exists, it is replaced.
This command disables the network interface adapter which has the ifIndex of 2. If the assigned value is
1, the interface adapter is enabled.
These two commands change the hardware address in the ARP table entry for 192.100.154.2
to 02:60:8c:2e:c2:00. These two commands affect the same ARP table entry. The MIB
variable atPhysAddress is a deprecated variable and is being replaced with the MIB variable
ipNetToMediaPhysAddress. Thus, atPhysAddress and ipNetToMediaPhysAddress access the same
structure in the TCP/IP kernel ARP table.
These commands change the IP address in the ARP table entry for 192.100.154.2 to 192.100.154.3.
These two commands affect the same ARP table entry. The MIB variable atNetAddress is a deprecated
variable and is being replaced with the MIB variable ipNetToMediaNetAddress. Thus, atNetAddress and
ipNetToMediaNetAddress access the same structure in the TCP/IP kernel ARP table.
This command sets the TCP/IP kernel so that it can forward packets if the agent host has more than one
interface that is up. If the host has only one active interface, then the set request fails and the snmpd
agent returns the error, badValue.
This command allows an IP datagram using default time-to-live (TTL) to pass through up to 50 gateways
before being discarded. When each gateway processes a datagram, the gateway subtracts 1 from the
time-to-live field. In addition, each gateway decrements the time-to-live field by the number of seconds
the datagram waited for service at that gateway before passing the datagram on to the next destination.
This command sets the destination IP address of the route associated with 192.100.154.0 to the IP
address 192.100.154.5, assuming route 192.100.154 already existed.
This command sets a route to host 192.100.154.1 using the gateway host 129.35.38.47, assuming
route 192.100.154.1 already existed.
This command sets a route to the class C network 192.100.154 using the gateway host
192.100.154.7, assuming route 192.100.154.0 already existed. Note that the host part of the
address must be 0 to indicate a network address.
This command creates a new route from host 129.35.128.90 to 129.35.128.1 as a gateway.
This command sets the ARP table entry for 192.100.154.11 to static.
This command causes the snmpd agent on the specified host to not generate authenticationFailure traps.
This command invalidates the SMUX peer 1. The result is that the connection between the snmpd agent
and this SMUX peer is terminated.
This command invalidates or removes the mounting of the SMUX tree 1.3.6.1.2.1.4.21, the ipRoute
Table. The first number in the instance indicates the number of levels in the SMUX tree identifier. The final
number in the instance indicates the smuxTpriority. In this example, there are 8 levels in the SMUX tree
identifier: 1.3.6.1.2.1.4.21. The priority, 0, is the highest priority.
This command turns on promiscuous mode for the first device in the interfaces table and turns off
promiscuous mode for the second device in the interfaces table.
This command tells interface 1 to remove physical address 129.35.128.1.3.2 from its list of
acceptable addresses.
This command tells the first interface to set it ring speed to 1 megabit.
This command tells the first interface to participate in the active monitor selection process.
This command sets the threshold for frame errors to 345 on the first MAC of the first SMT entity.
Note: All of the variables described previously fall into one of the listed methods used to set the variable.
See “Address Resolution Protocol” on page 142 and “Internet addresses” on page 168 for more
information on protocols and Internet addresses.
• Verify that the snmpd daemon has a route to the host where the requests are issued.
Solution: On the host where the snmpd daemon is running, add a route to the host where the route
add command is issued. For more information, see the route command.
• Check to see that the host name and the host IP address are the same value.
Solution: Reset the host name to correspond to the host IP address.
• Check to see that localhost is defined to be the lo0 IP address.
Solution: Define localhost to be the same address used by the lo0 IP address (usually 127.0.0.1).
MIB variable access in community entry problem
If a community entry is specified in the configuration file with a MIB view name, but MIB variables cannot
be accessed, check the following:
• Make sure that you have correctly specified the community entry. If you have specified a view name in
the community entry, all fields in the community are absolutely required.
Solution: Specify all fields in the community entry in the configuration file. Refresh the snmpd agent and
try your request again.
• Make sure the access mode in the community entry corresponds with your request type. If you are
issuing a get or get-next request, make sure that the community has read-only or read-write
permission. If you are issuing a set request, make sure that the community has read-write permission.
Solution: Specify the correct access mode in the community entry. Refresh the snmpd agent and try your
request again.
• Make sure that a view entry for the specified view name is specified in the community entry in
the configuration file. If there is a specified view name in the community entry, but there is no
Note: A computer can be both an NFS server and an NFS client simultaneously.
NFS version 2 and 3 servers are stateless, meaning that the server does not retain any transaction
information about its clients. A single NFS transaction corresponds to a single, complete file operation.
NFS requires that the client remember any information needed for later NFS use.
NFS RBAC
NFS provides support to Role Based Access Control (RBAC). The NFS client and server commands are
RBAC enabled.
This allows non-root users to execute NFS commands once the administrator assigns the RBAC role of
the command to the user. To see the list of authorization strings and privileges associated with NFS
commands, refer /etc/security/privcmds file on the system.
NFS4 ACL
NFS4 ACL is the ACL defined by the NFS version 4 protocol.
NFS4 ACL is platform-independent, so it can be supported by other vendors' clients or servers. NFS
version 4 clients and servers are not required to support NFS4 ACL.
In an AIX server, if an underlying physical file system instance supports NFS4 ACL, then the AIX NFS4
server supports NFS4 ACL for that file system instance. Most physical file systems types on AIX do not
support NFS4 ACL. These file system types include but are not limited to CFS, UDF, JFS, and JFS2 with
extended attribute version 1. All instances of JFS2 with extended attribute version 2 support NFS4 ACL.
NFS version 4 client file systems are able to read and write the NFS4 ACL if the exported NFS version 4 file
system instance on the server supports NFS4 ACL.
AIX ACL
The AIXC ACL is an access control list that is a proprietary of AIX servers.
It is not defined by the NFS version 4 protocol, and it is understood only by AIX servers and clients.
On an NFS version 4 server, AIXC ACL is supported when the underlying file system instance support AIXC
ACL. All instances of JFS and JFS2 support the AIXC ACL.
An NFS version 4 client has a mount option that enables or disables support for AIX ACL. The default is
to not support AIXC ACL. A user on an NFS version 4 client file system is able to read and write AIXC ACL
when both the client and the server are running AIX, the underlying physical file system instance on the
server supports AIXC ACL, and the AIX client mounts the file system instance with AIXC ACL enabled.
AIXC ACL support in NFS version 4 is similar to the AIXC ACL support in AIX NFS version 2 and NFS
version 3 implementations.
All instances of a JFS2 file system with extended attribute version 2 support both AIXC ACL and NFS4
ACL. A file in this type of file system may have mode bits only (no ACL), an NFS4 ACL, or an AIXC ACL. But,
it cannot have NFS4 ACL and AIXC ACL at the same time.
The aclgettypes command can be used to determine the ACL types the can be read and written on a
file system instance. This command may return different output when it runs against a physical file system
on an NFS version 4 server locally than when it runs against the same file system on a NFS version 4
client. For example, a NFS version 4 file system instance on and NFS version 4 server may support NFS4
ACL and AIXC ACL, but the client is only configured to send and receive NFS4 ACL. In this case, when
Notes:
1. After you have created the cache, do not perform any operations within the cache directory
(cachedir) itself. This causes conflicts within the CacheFS software.
2. If you use the mount command option to specify files for mounting, the command must be reissued
each time the system is restarted.
3. Use the -m or -o options of the fsck_cachefs command to check the file systems without making
any repairs.
The directories and files in the server's /tmp directory will now appear in the client's /mnt directory.
Note:
1. There are some differences between NFS versions 2 and 3 and NFS version 4 in how mounts are
handled. In NFS versions 2 and 3, the server exported the directories it wanted to make available for
mounting. The NFS version 2 or 3 client then had to explicitly mount each export to which it wanted
access.
With NFS version 4, the server still specifies export controls for each server directory or file system to
be exported for NFS access. From these export controls, the server renders a single directory tree of all
the exported data filling in gaps between the exported directories. This tree is known as a pseudo file
system and it starts at the NFS version 4 server's pseudo root. The NFS version 4 pseudo file system
model allows an NFS version 4 client, depending on its implementation, to perform a single mount of
the server's pseudo root in order to access all the server's exported data. The AIX NFS client supports
this feature. The actual content seen by the client is dependent on the server's export controls.
2. NFS version 4 does not allow file-to-file mounting.
Mounting NFS
Clients access files on the server by first mounting server exported directories. When a client mounts a
directory, it does not make a copy of that directory. Rather, the mounting process uses a series of remote
procedure calls to enable a client to transparently access the directories on the server.
The following describes the mounting process:
1. When the server starts, the /etc/rc.nfs script runs the exportfs command, which reads the
server /etc/exports file, and then tells the kernel which directories are to be exported and what
access restrictions they require.
2. The rpc.mountd daemon and several nfsd daemons are then started by the /etc/rc.nfs script.
3. Then the /etc/rc.nfs script executes the mount command, which reads the file systems listed in
the /etc/filesystems file.
4. The mount command locates one or more servers that export the information the client wants and
sets up communication between itself and that server.
This process is called binding.
5. The mount command then requests that one or more servers allow the client to access the directories
in the client /etc/filesystems file.
/etc/exports file
The /etc/exports file indicates all directories that a server exports to its clients.
Each line in the file specifies a single directory. A directory can be specified twice in the /etc/exports
file: once for NFS version 2 or NFS version 3, and once for NFS version 4. The server automatically
exports the listed directories each time the NFS server is started. These exported directories can then be
mounted by clients. The syntax of a line in the /etc/exports file is:
directory -option[,option]
The directory is the full path name of the directory. Options can designate a simple flag such as ro or a list
of host names. The /etc/rc.nfs script does not start the nfsd daemons or the rpc.mountd daemon if
the /etc/exports file does not exist.
The following example illustrates entries from an /etc/exports file:
/usr/games -ro,access=ballet:jazz:tap
/home -root=ballet,access=ballet
/var/tmp
/usr/lib -access=clients
/accounts/database -vers=4,sec=krb5,access=accmachines,root=accmachine1
/tmp -vers=3,ro
/tmp -vers=4,sec=krb5,access=accmachines,root=accmachine1
The first entry in this example specifies that the /usr/games directory can be mounted by the systems
named ballet, jazz, and tap. These systems can read data and run programs from the directory, but
they cannot write in the directory.
The second entry in this example specifies that the /home directory can be mounted by the system
ballet and that root access is allowed for the directory.
The third entry in this example specifies that any client can mount the /var/tmp directory. (Notice the
absence of an access list.)
The fourth entry in this example specifies an access list designated by the netgroup clients. In other
words, these machines designated as belonging to the netgroup clients can mount the /usr/lib
directory from this server. (A netgroup is a network-wide group allowed access to certain network
resources for security or organizational purposes. Netgroups are controlled by using NIS.
The fifth entry allows access to the directory /accounts/database only to clients in the accmachines
netgroup using NFS version 4 protocol and accessing the directory using Kerberos 5 authentication. Root
access is allowed only from accmachine1.
The sixth and the seventh entries export the /tmp directory using different versions and options. If two
entries for the same directory with different NFS versions exist in the /etc/exports file, the exportfs
command will export both. If a directory has the same options for NFS version 4 and NFS version 3, you
can have one entry in the /etc/exports file specifying -vers=3:4.
/etc/nfs/hostkey file
This file is used by the NFS server to specify the Kerberos host principal and the location of the keytab
file.
For instructions on how to configure and administer this file, see the nfshostkey command.
/etc/nfs/local_domain file
This file contains the local NFS domain of the system.
It is implied that systems that share the same NFS local domain also share the same user and group
registries. For instructions on how to configure and administer this file, see the chnfsdom command.
/etc/nfs/realm.map file
This file is used by the NFS registry daemon to map incoming Kerberos principals of the form
name@kerberos-realm to the form name@nfs-domain.
It then can resolve the name@nfs-domain to a local UNIX credential. This file provides a simple way to
map Kerberos principals into the server's user registry. It is appropriate when clients in different Kerberos
realms will be accessing the server, but the user namespace is global. The file should contain lines in the
following format:
realm1 nfs-domain
realm2 nfs-domain
for all Kerberos realms the server supports. If the Kerberos realm name is always the same as the
server's NFS domain, this file is not needed. If you need the more general capability of mapping
userA@kerberos-realm to userB@nfs-domain, use the Enterprise Identity Mapping (EIM) service. For
additional information, see “Identity mapping” on page 543.
To add, edit, or remove entries in this file, use the chnfsrtd command.
/etc/nfs/princmap file
This file maps host names to Kerberos principals when the principal is not the fully qualified domain name
of the server.
It consists of any number of lines of the following format:
To add, edit, or remove entries from this file, use the nfshostmap command.
/etc/nfs/security_default file
The /etc/nfs/security_default file contains the list of security flavors that may be used by the NFS
client, in the order in which they should be used.
Use the chnfssec command to manage this file.
portmap daemon
The portmap daemon helps clients map program number and version number pairs to the port number of
a server.
Each RPC application has associated with it a program number and a version number. These numbers
are used to communicate with a server application on a system. When making a request from a server,
the client needs to know what port number the server is accepting requests on. This port number is
associated with the User Datagram Protocol (UDP) or Transmission Control Protocol (TCP) that is being
used by the service. The client knows the program number, the version number, and the system name or
host name where the service resides. The client needs a way to map the program number and version
number pair to the port number of the server application. This is done with the help of the portmap
daemon.
The portmap daemon runs on the same system as the NFS application. When the server starts running,
it registers with the portmap daemon. As a function of this registration, the server supplies its program
number, version number, and UDP or TCP port number. The portmap daemon keeps a table of server
applications. When the client tries to make a request of the server, it first contacts the portmap daemon
to find out which port the server is using. The portmap daemon responds to the client with the port of the
server that the client is requesting. Upon receipt of the port number, the client is able to make all of its
future requests directly to the server application.
Related information
System Resource Controller Overview
chnfs -n 1000
Note: This command will stop the currently running daemons, update the SRC configuration information,
and then restart the daemons. As a result, NFS service will be temporarily unavailable.
The maximum number of biod threads can be specified on a per mount basis using the biods=n mount
option.
Note: If the number of nfsd daemons is not sufficient to serve the client, a nonidempotent operation
error is returned to the client. For example, if the client removes a directory, an ENOENT error is returned
even though the directory on the server is removed.
changes the nfsd subsystem so that when the daemon is started, the command line looks like nfsd 10.
The changes made by the chssys command do not take effect until the subsystem has been stopped and
restarted.
startsrc -s Daemon
where Daemon is any one of the SRC-controlled daemons. For example, to start the nfsd daemons, run:
startsrc -s nfsd
startsrc -g nfs
Note: If the /etc/exports file does not exist, the nfsd and the rpc.mountd daemons will not be
started. You can create an empty /etc/exports file by running the touch /etc/exports command.
This will allow the nfsd and the rpc.mountd daemons to start, although no file systems will be
exported.
stopsrc -s Daemon
where Daemon is anyone of the SRC-controlled daemons. For example, to stop the rpc.lockd daemon,
run:
stopsrc -s rpc.lockd
stopsrc -g nfs
lssrc -s Daemon
where Daemon is any one of the SRC-controlled daemons. For example, to get the current status of the
rpc.lockd daemon, run:
lssrc -s rpc.lockd
lssrc -a
Interaction of DIO, CIO, regular opens, and mapped files for NFS
The following behaviors exist between the different access modes that can occur with DIO and CIO.
When existing DIO opens are in effect:
• A regular open causes DIO to be turned off until there are no longer regular opens. When a close
reduces the regular opens to 0, DIO is re-enabled if there are still DIO opens outstanding.
• Mapping a file with shmat() or mmap() will deactivate DIO on the file until the number of mappings
drops to 0. Then if there are still DIO opens, DIO will be re-enabled.
• Attempts to open the file for CIO will fail with the EINVAL error.
When there are regular opens (no CIO or DIO) in effect:
• DIO open attempts succeed, but DIO is not activated until the count of regular opens drops to 0.
• Opens for CIO will fail with the EINVAL error.
NFS referrals
The following examples provide scenarios to help you understand referrals.
In the following examples, there are four servers:
• The server called publications contains documentation files.
• The server called projects contains user work directories.
• The server called data contains information databases.
• The server called account1 is the main NFS server that exports all other files, and is the server that all
the clients know about.
Allowing all clients to access files on the main NFS server
Server account1 exports the directory /work to all clients using the following statement in the /etc/
exports file:
/work -vers=4
All clients can access the files in the /work remote directory by mounting / from the account1 server
onto the /mnt directory using the following command:
When the user on the client lists the contents of the /mnt directory, they see the remote directory work at
the path /mnt/work. The contents of the /mnt/work directory on the client is the same as the contents
of the /work directory on the account1 server.
Allowing a client to access files on a specific server
The client user also wants to access the /usr/doc directory on the publications server.
In previous releases, you must export the directory from the server and mount the directory at the client.
/usr/doc -vers=4
/usr/doc -vers=4,refer=/usr/doc@publications
You then export the directory. At this point, the client that mounted the /mnt directory from the /
directory on the account1 server has access to the directory usr when the client lists the /mnt
directory. The client does not have to perform any mounts to other servers. The client user does not
even need to be aware that the files there are not being provided by the account1 server. For example,
you can make the directories of /databases/db on server data and /home/accts on server projects
available through account1 by exporting the directories from the data and projects servers, and
creating referrals on account1 to those directories.
Because a client user is unaware of the actual location of the data, the administrator can redirect clients
from one server to another simply by changing the referral statement in the exports file on the server. The
administrator is responsible for the placement and correctness of data that referrals reference with their
location specifications.
Administrators should make sure the second server will not refer the request back to the first server,
creating a circular referral. In the above example, if the administrator had created a referral on the
publications server at /usr/doc that referred to /usr/doc on the account1 server, the resulting
circular referral would be undesirable.
Although referrals are created using exportfs, they are different from data exports. Locations specified
for referrals should correspond to the root directories of NFSv4-exported file systems. You can create a
referral within exported namespaces or in unexported namespaces. In the above example, the /usr/doc
referral can be created on the account1 server even if /usr is not exported. This places the referral
within the NFSv4 pseudospace. If account1 had exported /usr, the referral export would still have been
allowed, in contrast to exporting a directory called doc, which would have failed if it were in the same file
system. In either case, the referral export would have failed if a file or directory had existed at /usr/doc.
There is no restriction on the number of referrals that can be created within either the server's NFSv4
pseudospace or within an exported file system.
Since a referral does not export any data and only has meaning to the NFSv4 protocol, referrals are
available in NSFv4 only. Exporting a referral without the vers=4 option will fail. Although this example
only specifies one location, up to 8 locations could have been specified.
Creating a referral creates a special referral object at the location specified by the directory
parameter. Since client access to the object is determined by the client's access to the
object's parent directory, most other export options have no meaning and are allowed and are
ignored. The only exception is the exname option, which will have the expected behavior. For
example, if the server creates the referral /n4root/special/users -vers=4,exname=/exported/
users,refer=/restricted/users@secrethost, the clients that mount / from that server would
see the path /mnt/exported/users, which would redirect the clients to the /restricted/users
directory on secrethost. On the exporting server, the referral object would actually be created in the
local namespace at /n4root/special/users, so no file or directory can exist there when the export is
done. A special object gets created on the server to hold the referral location information. Any directories
along the path to the referral will also be created if they do not exist. If the referral is unexported, the
referral information will be removed from the object, but the object itself will not be removed. The NSFv4
server will not allow clients to access the resulting stale or orphan referral object. It will return an access
NFS replicas
Replication allows you, as the NFSv4 administrator, to place copies of data on multiple NFSv4 servers and
inform NFSv4 clients where the replicas reside.
In the event that the primary data server becomes inaccessible to the clients, the clients can use one
of the replica servers to continue operations on the replicated file system. The replica file systems are
assumed to be exact copies of the data on the primary server. You can set up to 8 replica locations. The
AIX server does not specify how the replica file systems are created from the primary file system or how
the data is kept coherent. If you are going to specify replicas as read-write, you must keep the data on the
replicas coherent with the primary file system.
A replica is a server that contains a copy of the directory or directories of another server. If the primary
server becomes unavailable to the client, the client can access the same files from a replica location. The
following scenario is an example:
If the files in the /data directory on the account1 server are also available in the /backup/data
directory on the server inreserve, the NSFv4 clients could be made aware of this by specifying replica
locations on the export. By adding a statement similar to the following one in the export file, you can
export the /data directory and specify the location of the replica copy:
/data -vers=4,replicas=/data@account1:/backup/data@inreserve
If the account1 server becomes unavailable, client users using files under the /data directory of the
account1 server can begin using files in the /backup/data directory on the inreserve server, without
being aware that the client has switched to a different server.
For information about using the replicas option to change the order of the locations specified in the file
system location list, see Reordering the file system location list using the scatter option.
chnfs -R {on|off|host[+host]}
In order to specify replicas, the server must be configured with chnfs -R (chnfs -R on) to issue volatile
NFSv4 file handles. A file handle is an identifier that NFS servers issue to clients to identify a file or
directory on the server. By default, the server issues persistent file handles. Switching between file handle
types can result in errors to applications at NFSv4 clients that are actively using the server when the
switch is performed. In order to change the file handle mode with chnfs -R, no file systems can be
exported for NFSv4 access. Setting the file handle disposition should be done with a newly-provisioned
NFS server or done when NFS activity can be minimized or stopped. For clients actively connected to
servers when the mode is changed, it may be necessary to unmount and remount NFSv4 mounts on those
clients. To minimize this action, the number of client mounts can be reduced to a small number of mounts
that mount the top-level directories of an NFSv4 server's exported file space.
The NFSv4 client cannot fail over to replicas with different export access properties. Administrators
must make sure that all replicas are specified with the same export access controls and access mode
(read-only or read-write). With the possible exception of exported GPFS, it is expected that replicated
/webpages -vers=4,ro,replicas=/webpages@serverA:
/backup/webpages@serverB
Both /webpages on serverA and /backup/webpages on serverB are assumed to be the root
directories of their file systems. If serverA had not been listed in the export, it would have been silently
added as the first replica location. This is because the server exporting the data is assumed to be the
preferred server for the data it is exporting.
Replicas are only used by the NFSv4 protocol. The above export could have specified NFSv3 (vers=3:4),
but the replication information would not be available to NFSv3 clients. Clients using NFSv3 can, however,
access the information in /webpages on serverA, but they will not fail over to the replica if serverA
becomes unavailable.
/tmp/a -vers=4,replicas=/tmp/a@B:/tmp/a@A
/tmp/b -vers=4,refer=/tmp/a/b@B
/tmp/a -vers=4
/tmp/a/b -vers=4
In this example, the client mounts / on server A onto /mnt by using the command mount -o
vers=4 A:/ /mnt. The client user accesses /tmp/a/b on server B through cd /mnt/tmp/a/b
or cd /mnt/tmp/b. If the user changes the directory to cd /mnt/tmp/a/b first, then the
path /mnt/tmp/b acts as a symbolic link to /mnt/tmp/a/b. In this scenario, if the user is
in /mnt/tmp/b and uses the command /bin/pwd, /bin/pwd > will return /mnt/tmp/a/b.
Note: The above practice is not recommended. The administrator should set up export specifications that
result in only one possible namespace path to exported data.
You can list multiple locations in referrals if the target data of the referral is actually replicated. Clients will
only use the referral locations to find the referral target at an available server. Once the client establishes
access to the referral target, it will obtain new location information for the found data.
Since clients may not immediately detect changes on referral location information, removing or changing
referral location frequently is not recommended. When relocating the target of a reference location, it is
suggested that the new location be populated along with changing the location information in the export's
referral specification. The data at the old location should be kept for several hours or even days to give
clients time to see and use the new location.
Both replication and referrals can only run on servers running the 64-bit kernel. Clients can run on both
the 32- and 64-bit kernels.
If you are going to specify replicas as read-write, you must keep the data on the replicas coherent with
the primary fileset.
Reordering the file system location list using the scatter option
The scatter option of the exportfs command enables you to change the order of the locations
specified in the file system location list that is set with either the refer option or the replicas option of
the exportfs command.
Using this option generates different combinations of server locations so that different lists have different
servers in the order of preference. Consequently, different clients have server location lists that are
different. This reordering helps load balancing because the first server in the location list of different
clients is a different server. Also, if a server goes down, the fail-over load is distributed across multiple
servers because the server in the next location in the server locations list is different. The scatter option
applies only to directories exported for access by the NFS version 4 protocol.
The scatter option can have the following values:
• full - All of the servers are reordered to form combinations of alternate locations. The total number of
combinations is limited to either 12 or the number of servers, whichever number is higher.
• partial - The first location for all of the server combinations generated is fixed to the first server in the
server list. The rest of the locations are listed as if a full reordering is used.
• none - No reordering of the file system location list is done. This is the default value for the scatter
option. Use this value to disable any previous reordering of the location list.
Note: If the noauto flag is not specified when you are using the exportfs command, then the location
list includes the primary host name as one of the replica locations.
To specify referrals for the /common/documents directory at hosts s1, s2, and s3, and then reorder them
using the full option, add the following line to the /etc/exports file and then export the /common/
documents directory:
To specify replicas for the /common/documents directory at hosts s1, s2, s3, and s4, and reorder them
partially (first fail-over server is s1 for all combinations), add the following line to the /etc/exports file
and then export the /common/documents directory:
This configures both EIM clients and servers to use a specific EIM server for identity mapping. If the host
name specified in the command is the local host name, then an LDAP server will also be setup.
After the configuration step is complete, the EIM administrator can populate the LDAP server with NFS
identity mapping data. An individual user or group, such as John Doe, is known as a mapping identity. The
NFS owner string of that user, johndoe@austin.ibm.com, is known as an identity mapping. To input the
LDAP server with this data, the following command should be run:
The mapping identity is the descriptive name of the user or group, and the identity mapping is the
name@domain NFS owner string. Realm to domain mappings are also stored in the LDAP server. To
input that the Kerberos realm kerb.austin.ibm.com maps to the NFS domain austin.ibm.com, the
following command should be run:
In order to configure NFS to use the mapping data in EIM, the NFS registry daemon needs to be restarted.
The NFS registry daemon checks for the availability of an EIM server upon startup, and if one is found, all
mapping functions will go through EIM and all local mappings will no longer be used.
For information on EIM, see Enterprise identity mapping in the Security.
smit mknfsexp
3. Specify appropriate values in the PATHNAME of directory to export, MODE to export directory, and
EXPORT directory now, system restart or both fields.
4. Specify any other optional characteristics you want, or accept the default values by leaving the
remaining fields as they are.
5. When you have finished making your changes, SMIT updates the /etc/exports file. If the /etc/
exports file does not exist, it is created.
6. Repeat steps 3 through 5 for each directory you want to export.
• To export an NFS file system using a text editor:
1. Open the /etc/exports file with your favorite text editor.
2. Create an entry for each directory to be exported using the full path name of the directory. List each
directory to be exported starting in the left margin. No directory should include any other directory
/usr/sbin/exportfs -a
The -a option tells the exportfs command to send all information in the /etc/exports file to the
kernel. If NFS is not running, start NFS using the instructions in “Starting the NFS daemons” on page
530.
• To temporarily export an NFS file system (without changing the /etc/exports file), type the following
command and press Enter:
exportfs -i /dirname
where dirname is the name of the file system you want to export. The exportfs -i command
specifies that the /etc/exports file is not to be checked for the specified directory, and all options are
taken directly from the command line.
The AIX NFS version 4 support allows the administrator to create and control an alternate namespace
that is rendered by the NFS server to clients. This is done using the exname export option. This support
can also be used to hide details of the server's local file system namespace from NFS clients.
After running this command, the system will ask for a Master Database password and a password
for the administrative principal.
c) Create principals for each user and host by running the /usr/krb5/sbin/kadmin.local
command on the KDC server. This example creates Kerberos principals that match the UNIX user
name of the associated user. The principal name will be mapped to the user name by NFS to
determine the UNIX credential associated with the principal. For a description of how to use more
general mappings between principals and user names, see “Identity mapping” on page 543. For
this network, we created the following principals:
• adam
• brian
• charlie
• dave
• eric
• nfs/alpha.austin.ibm.com
• nfs/beta.austin.ibm.com
• nfs/gamma.austin.ibm.com
Note: The chosen user principal names must match the corresponding user names in the system's
configured user registry (/etc/passwd, LDAP, NIS, and so on). NFS uses the principal name as a
user name to obtain user and group IDs on the local system. If the names do not match, the access
will be treated as an anonymous access.
The KDC is now configured.
2. Each NFS client and server will now be configured as Kerberos clients by using the config.krb5
command.
How this is done will depend on how the KDC was configured. In this scenario we ran the following
command on each NFS system:
It is now possible to kinit as any of the user principals on any of the configured systems . For
example, to kinit as user adam, run the following command:
/usr/krb5/bin/kinit adam
ktadd nfs/alpha.austin.ibm.com
c) Set up the gssd daemon to start up automatically by running the following command:
chnfs -S -B
chnfsdom austin.ibm.com
b) Set up the /etc/nfs/realm.map file; this file should contain one line, with the realm name
followed by the local domain.
For our example network, these two files should look like this on all of the NFS servers:
The realm entry in this file is not case-sensitive, so technically, this entry is not required.
c) For zeta.austin.ibm.com, which will not be an NFS server, start up the gssd daemon using the
chnfs -S -B command. Before trying any Kerberos client operations, the user must use kinit to
obtain valid credentials.
5. In this scenario, there is fast network link configure between alpha.austin.ibm.com
and beta.austin.ibm.com. Across this link, beta.austin.ibm.com will see
alpha.austin.ibm.com as fast_alpha.test.austin.ibm.com, and alpha.autsin.ibm.com
will see beta.austin.ibm.com as fast_beta.test.austin.ibm.com. Because neither nfs/
fast_alpha.test.austin.ibm.com nor nfs/fast_beta.test.austin.ibm.com are valid
principals, they will be unable to use this link for mounts.
To correct this, the nfshostmap command will be used, which will map principal to handle this
situation.
a) On alpha.austin.ibm.com, we ran the following command:
smit rmnfsexp
b) Enter the appropriate path name in the PATHNAME of exported directory to be removed field.
The directory is now removed from the /etc/exports file and is unexported.
If the directory was exported to clients using NFS version 4, the unexport may fail due to file state
on the server. File state means files in the exported directories are open by a client. You can either
take actions to stop applications using that data, or you can forcefully unexport (exportfs -F) the
data, which may result in failures for applications that are actively using the data.
• To unexport an NFS directory by using a text editor:
a) Open the /etc/exports file with your favorite text editor.
b) Find the entry for the directory you wish to unexport, and the delete that line.
c) Save and close the /etc/exports file.
d) If NFS is currently running, enter:
exportfs -u dirname
where dirname is the full path name of the directory you just deleted from the /etc/exports file.
If the unexport fails due to access by NFS V4 clients, you can add a -F option to force the directory
to be unexported.
exportfs -u /dirname
where dirname is the name of the file system you want to change.
2. Type:
smit chnfsexp
3. Enter the appropriate path name in the PATHNAME of exported directory field.
4. Make whatever changes you want.
exportfs /dirname
where dirname is the name of the file system you just changed.
• To change an exported NFS file system by using a text editor:
1. To unexport the file system, type:
exportfs -u /dirname
where dirname is the name of the file system you want to change.
2. Open the /etc/exports file with your favorite text editor.
3. Make whatever changes you want.
4. Save and close the /etc/exports file.
5. Reexport the file system by entering:
exportfs /dirname
where dirname is the name of the file system you just changed.
/usr/tps -root=hermes
specifies that the root user on host hermes may access the /usr/tps directory with root privileges.
showmount -e ServerName
where ServerName is the name of the NFS server. This command displays the names of the directories
currently exported from the NFS server. If the directory you want to mount is not listed, export the
directory from the server.
Note: The showmount command will not work for file systems that were exported only as NFS version
4 file systems. For NFS version 4, the client can mount the root filesystem for the server and traverse
the exported directory structure. Individual exported file systems do not have to be explicitly mounted
to be accessed by the client.
2. Establish the local mount point using the mkdir command.
where ServerName is the name of the NFS server, /remote/directory is the directory on the NFS
server you want to mount, and /local/directory is the mount point on the NFS client.
4. On the client machine, type the following SMIT fast path:
smit mknfsmnt
5. Make changes to the following fields that are appropriate for your network configuration.
Your configuration might not require completing all of the entries on this screen.
Note: If the SMIT interface is being used, press the Tab key to change to the correct value for each
field, but do not press Enter until completing step 7.
• PATHNAME of mount point.
• PATHNAME of remote directory.
• HOST where remote directory resides.
• MOUNT now, add entry to /etc/filesystems or both?
• /etc/filesystems entry will mount the directory on system RESTART.
• MODE for this NFS file system.
6. Change or use the default values for the remaining entries, depending on your NFS configuration.
7. When you finish making all the changes on this screen, SMIT mounts the NFS file system.
8. When the Command: field shows the OK status, exit SMIT.
The NFS file system is now ready to use.
Automount subsystem
The automount subsystem allows non-root users to mount remote file systems once the initial mount
points are specified by the root user.
The /etc/auto_master file specifies this information. These mount points, known as keys, have a
corresponding maps that determine which remote file system is mounted over it. The format of the /etc/
auto_master file is as follows:
/key map
Note: The /etc/auto_master file is read when the automount command is initially executed, and
changes to it will not take effect until the automount command is run again.
The most common maps are direct maps, indirect maps, and host maps.
Direct maps
Direct maps require a special key (/-) in the /etc/auto_master file.
The map is a file with the following format:
When a user accesses the /directkey directory, the automount daemon will mount server:/dir over /
directkey.
When a user accesses the /key/indirectkey directory, the automount daemon will mount server:/dir
over /key/indirectkey.
Host maps
Host maps require a special map (-hosts) in the /etc/auto_master file.
The automount daemon will create a subdirectory under the /key directory for every server listed in
the /etc/hosts file. When a user accesses the /key/server directory, the automount daemon will
mount the server's exported directories over the /key/server directory.
showmount -e ServerName
where ServerName is the name of the NFS server. This command displays the names of the directories
currently exported from the NFS server.
2. Create an AutoFS master file and map file. AutoFS mounts and unmounts the directories specified in
these map files.
For example, suppose you want AutoFS to mount the /local/dir1 and /local/dir2 directories as
needed from the serve1 server onto the /remote/dir1 and /remote/dir2 directories, respectively.
The auto_master file entry would be as follows:
/remote /tmp/mount.map
3. Ensure that the AutoFS kernel extension is loaded and the automountd daemon is running. This can
be accomplished in two ways:
a) Using the automount command: Issue /usr/sbin/automount -v.
kill automountd_PID
where automountd_PID is the process ID of the automountd daemon. (Running the ps -e command
displays the process ID of the automountd daemon.) The kill command sends a SIGTERM signal to
the automountd daemon.
smit mknfsmnt
b) Specify values in this screen for each mount you want to predefine. Specify a value for each
required field (those marked with an asterisk (*) in the left margin). Also specify values for the other
fields or accept their default values.
This method creates an entry in the /etc/filesystems file for the desired mount and attempts
the mount.
• To establish the NFS default mounts by editing the /etc/filesystems file:
a) Open the /etc/filesystems file with a text editor.
b) Add entries for each of the remote file systems to be mounted when the system is started. For
example:
/home/jdoe:
dev = /home/jdoe
mount = false
vfs = nfs
nodename = mach2
options = ro,soft
type = nfs_mount
This stanza directs the system to mount the /home/jdoe remote directory over the local mount
point of the same name. The file system is mounted as read-only (ro). Because it is also mounted
as soft, an error is returned in the event the server does not respond. By specifying the type
parameter as nfs_mount, the system attempts to mount the /home/jdoe file (along with any
other file systems that are specified in the type = nfs_mount group) when the mount -t
nfs_mount command is issued.
The example stanza below directs the system to mount the /usr/games file system at system
startup time. If the mount fails, the system continues to attempt to mount in the background.
/usr/games:
dev = /usr/games
mount = true
vfs = nfs
nodename = gameserver
The following parameters are required for stanzas pertaining to NFS mounts:
The following parameters are optional for stanzas pertaining to NFS mounts:
Item Description
type=type_name Defines the file system being mounted as part of the type_name
mount group. This parameter is used with the mount -t
command, which mounts groups of specified file systems at the
same time.
options=options Specifies one or more of the following options parameters:
biods=N
Specifies the maximum number of biod daemons to use.
The default is seven for NFS version 2, and four for NFS
version 3 and version 4.
bg
Specifies to try the mount again in the background if the first
mount attempt fails.
fg
Specifies to try the mount again in the foreground if the first
mount attempt fails.
noacl
Disables, for this mount only, the Access Control List (ACL)
support provided by the NFS journaled file system.
When used between two systems, NFS supports access
control lists. If the noacl option is used when mounting a
file system, NFS does not use ACLs. The effect of the noacl
option equals what happens when an NFS client on a system
mounts from an NFS server that does not support ACLs.
For more information about ACLs, refer to “NFS Access
Control Lists support” on page 521.
retry=n
Sets the number of times to try the mount.
rsize=n
Sets the read buffer size to the number of bytes specified by
n.
wsize=n
Sets the write buffer size to the number of bytes specified by
n.
timeo=n
Sets the NFS time out to the tenths of a second specified
by n. Use this variable to avoid situations that can occur
in networks where the server load can cause inadequate
response time.
retrans=n
Sets the number of NFS retransmissions to the number
specified by n.
port=n
Sets the server port to the number specified by n.
soft
Returns an error if the server does not respond.
hard
Continues to try the request until the server responds.
Note: When you specify a hard mount, it is possible that the
process can hang while waiting for a response. To be able to
interrupt the process and end it from the keyboard, use the
intr variable in the mount variables.
intr
Allows keyboard interrupts on hard mounts.
ro
Sets the read-only variable.
rw
Sets the read-write variable. Use the hard variable along
with this variable to avoid error conditions that can
conflict with applications if a soft mount is attempted as
read-write. See “NFS troubleshooting” on page 562 for
information on hard- and soft-mounted problems.
secure
Specifies to use a more secure protocol for NFS
transactions.
sec
The sec option specifies the security flavor list for the NFS
mount. The available flavors are des, unix, sys, krb5, krb5i,
and krb5p. This option only applies to AIX 5.3 or later.
actimeo=n
Extends flush time by n seconds for both regular files and
directories.
Note: The attribute cache retains file attributes on the client.
Attributes for a file are assigned a time to be erased. If
the file is modified before the flush time, then the flush
time is extended by the time since the previous modification
(under the assumption that recently changed files are likely
to change again soon). There are minimum and maximum
flush time extensions for regular files and for directories.
vers
Specifies NFS version. The default is the version of NFS
protocol used between the client and server and is the
highest one available on both systems. If the NFS server
does not support NFS Version 3, the NFS mount will use NFS
Version 2. Use the vers option to select the NFS version. By
default, the NFS mount will never use NFS Version 4 unless
specified.
acregmin=n
Holds cached attributes for at least n seconds after file
modification.
acregmax=n
Holds cached attributes for no more than n seconds after file
modification.
acdirmin=n
Holds cached attributes for at least n seconds after directory
update.
acdirmax=n
Holds cached attributes for no more than n seconds after
directory update.
cio
Specifies the file system to be mounted for concurrent
readers and writers. I/O on files in this file system will
behave as if they had been opened with O_CIO specified
in the open() system call. Using this option will prevent
access in any manner other than CIO. It is impossible to use
cached I/O on a file system mounted with the cio option.
This means that mapping commands such as mmap() and
shmat() will fail with EINVAL when used on any file in a file
system mounted with the cio option. One side effect of this
is that it is impossible to run binaries out of a cio-mounted
file system, since the loader may use mmap().
dio
Specifies that I/O on the file system will behave as if all
the files had been opened with O_DIRECT specified in the
open() system call.
Note: Using the -odio or -ocio flags can help performance on
certain workloads, but users should be aware that using these
flags will prevent file caching for these file systems. Because
readahead is disabled for these file systems, this may decrease
performance for large sequential reads.
maxpout=n
Specifies the page-out level for files on this file system at
which threads should be slept. If maxpout is specified, you
must also specify minpout. This value must be nonnegative
and greater than minpout. The default is the kernel
maxpout level.
minpout=n
Specifies the page-out level for files on this file system at
which threads should be readied. If minpout is specified,
you must also specify maxpout. This value must be
nonnegative. The default is the kernel minpout level.
rbr
Uses the release-behind-when-reading capability. When
sequential reading of a file in this file system is detected,
the real memory pages used by the file are released once
the pages are copied to internal buffers.
fg
retry=10000
rsize=8192
wsize=8192
timeo=7
retrans=5
port=NFS_PORT
hard
secure=off
acregmin=3
acregmax=60
acdirmin=30
acdirmax=60
c) Remove any directory entries that you do not want to mount automatically at system startup.
umount /directory/to/unmount
smit rmnfsmnt
PC-NFS
PC-NFS is a program for personal computers that enables the personal computer to mount file systems
exported by a Network File System (NFS) server.
The personal computer can also request network addresses and host names from the NFS server.
Additionally, if the NFS server is running the rpc.pcnfsd daemon, the personal computer can access
authentication and print-spooling services.
You might want to configure the rpc.pcnfsd daemon on the following:
• Systems that perform user authentication services
• Systems that offer print-spooling
• All Network Information Service (NIS) controller and worker servers.
Note: Because NIS networks are typically configured so that PC-NFS can pick any NIS server as the
default server, it is important that all servers have the rpc.pcnfsd daemon running. If running this
daemon on all NIS servers is not practical, or if you want to limit requests to a specific server, add a net
pcnfsd command to the autoexec.bat file on each personal computer to force it to use a specific NIS
server.
Related information
Network Information Services (NIS)
1. With a text editor, uncomment the following entry in the /etc/inetd.conf file:
if [ -f /usr/sbin/rpc.pcnfsd ] ; then
/usr/sbin/rpc.pcnfsd -s spooldir ; echo ' rpc.pcnfsd\c'
fi
where spooldir specifies the full path name of the spool directory.
Placing a pound sign (#) at the beginning of the line prevents the inetd daemon from starting the
rpc.pcnfsd daemon using the default spool directory.
4. Start the rpc.pcnfsd daemon print spooler by typing the following at the command line:
/usr/sbin/rpc.pcnfsd -s spooldir
where spooldir specifies the full path name of the spool directory.
For more information on updating the inetd configuration database, see “Configuring the inetd daemon”
on page 369.
Note: The default directory that the rpc.pcnfsd daemon uses cannot be changed from the inetd.conf
file.
where host specifies the host name of the system on which you are configuring rpc.pcnfsd, and 15001
is the RPC program number of the rpc.pcnfsd daemon. After you enter the command, you will receive a
message that the program is ready and waiting.
automount nis_ldap
In order to administer automount maps in LDAP, you need to create the appropriate LDIF files. You can
convert local automount map files to LDIF format using the nistoldif command. As an example, if the
LDAP server is named ldapserver, then its base suffix is dc=suffix, and the /etc/auto_home map
file contains the following lines:
user1 server1:/home/user1
user2 server1:/home/user2
user3 server1:/home/user3
Use the following commands to create the LDIF file for the /etc/auto_home map file, and add it to the
LDAP server:
In order to edit or remove existing automount entries from an LDAP server, the LDIF files must be created
manually. For example, if the home directory of user2 is now on server2, the following LDIF should be
created:
# cat /tmp/ch_user2.ldif
dn: automountKey=user2,automountMapName=auto_home,dc=suffix
changetype: modify
replace: automountInformation
automountInformation: server2:/home/user2
You must also create an LDIF file to remove a user. For example, to remove user3, create the following
LDIF:
# cat /tmp/rm_user3.ldif
dn: automountKey=user3,automountMapName=auto_home,dc=suffix
changetype: delete
WebNFS
The operating system provides NFS server capability for WebNFS.
Defined by Oracle, WebNFS is a simple extension of the NFS protocol that allows easier access to servers
and clients through Internet firewalls.
A WebNFS-enhanced web browser can use an NFS universal resource locator (URL) to access data
directly from the server. An example NFS URL is:
nfs://www.YourCompany.com/
WebNFS works in tandem with existing web-based protocols to provide data to clients.
WebNFS also takes advantage of the scalability of NFS servers.
if [ -x /usr/sbin/rpc.statd ]; then
startsrc -s rpc.statd
fi
if [ -x /usr/sbin/rpc.lockd ]; then
startsrc -s rpc.lockd
fi
3. If there is a pound sign (#) at the beginning of any of these lines, delete the character, then save
and exit the file. Then start the rpc.statd and rpc.lockd daemons by following the instructions in
“Starting the NFS daemons” on page 530.
Note: Sequence is important. Always start the statd daemon first.
4. If NFS is running and the entries in the /etc/rc.nfs file are correct, stop and restart the rpc.statd
and rpc.lockd daemons by following the instructions in “Stopping the NFS daemons” on page 530
and “Starting the NFS daemons” on page 530.
Note: Sequence is important. Always start the statd daemon first.
then the machine thinks there is another machine which needs to be informed that it might have to take
recovery measures. When a machine restarts, or when the rpc.lockd and the rpc.statd daemons
are stopped and restarted, machine names are moved from /var/statmon/sm to /var/statmon/
sm.bak and the rpc.statd daemon tries to inform each machine corresponding to each entry in /var/
statmon/sm.bak that recovery procedures are needed.
If the rpc.statd daemon can reach the machine, then its entry in /var/statmon/sm.bak is removed.
If the rpc.statd daemon cannot reach the machine, it will keep trying at regular intervals. Each time the
machine fails to respond, the timeout generates the above message. In the interest of locking integrity,
the daemon will continue to try; however, this can have an adverse effect on locking performance. The
handling is different, depending on whether the target machine is just unresponsive or semi-permanently
taken out of production. To eliminate the message:
1. Verify that the statd and lockd daemons on the server are running by following the instructions
in “Getting the current status of the NFS daemons” on page 530. (The status of these two daemons
should be active.)
2. If these daemons are not running, start the rpc.statd and rpc.lockd daemons on the server by
following the instructions in “Starting the NFS daemons” on page 530.
Note: Sequence is important. Always start the statd daemon first.
After you have restarted the daemons, remember that there is a grace period. During this time, the
lockd daemons allow reclaim requests to come from other clients that previously held locks with the
server, so you might not get a new lock immediately after starting the daemons.
Alternatively, eliminate the message by:
1. Stop the rpc.statd and rpc.lockd daemons on the client by following the instructions in “Stopping
the NFS daemons” on page 530.
2. On the client, remove the target machine entry from /var/statmon/sm.bak file by entering:
rm /var/statmon/sm.bak/TargetMachineName
This action keeps the target machine from being aware that it might need to participate in locking
recovery. It should only be used when it can be determined that the machine does not have any
applications running that are participating in network locking with the affected machine.
3. Start the rpc.statd and rpc.lockd daemons on the client by following the instructions in “Starting
the NFS daemons” on page 530.
If you are unable to obtain a lock from a client, do the following:
1. Use the ping command to verify that the client and server can reach and recognize each other. If
the machines are both running and the network is intact, check the host names listed in the /var/
statmon/hosts file for each machine. Host names must exactly match between server and client
for machine recognition. If a name server is being used for host name resolution, make sure the host
information is exactly the same as that in the /var/statmon/hosts file.
2. Verify that the rpc.lockd and rpc.statd daemons are running on both the client and the server by
following the instructions in “Getting the current status of the NFS daemons” on page 530. The status
of these two daemons should be active.
/usr/sbin/rpc.lockd -d1
When invoked with the -d1 flag, the lockd daemon provides diagnostic messages to syslog. At first,
there will be a number of messages dealing with the grace period; wait for them to time out. After the
grace period has timed out on both the server and any clients, run the application that is having lock
problems and verify that a lock request is transmitted from client to server and server to client.
You can restrict the number range of IP ports used by the NFS client for communication with the NFS
server by setting the NFS_PORT_RANGE variable in the /var/statmon/environment file.
NFS_PORT_RANGE=udp[4000-5000]:tcp[7000-8000]
In this example, UDP packets sent by the client have a source port in the range 4000 - 5000, and TCP
connections have a source port in the range 7000 - 8000. To avoid port reuse problems, the port numbers
that are specified in this range must not be used as fixed port numbers for any of the Network File System
(NFS) daemons in the /etc/services file.
NFS security
Information about NFS security can be found in several places.
The Network File System security topic in Security explains the details about DES security. For information
about Kerberos security, see “Setting up a network for RPCSEC-GSS” on page 544.
NFS troubleshooting
As with other network services, problems can occur on machines that use the Network File System (NFS).
Troubleshooting for these problems involves understanding the strategies for tracking NFS problems,
recognizing NFS-related error messages, and selecting the appropriate solutions.
When tracking down an NFS problem, isolate each of the three main points of failure to determine which
is not working: the server, the client, or the network itself.
Hard-mounted remote file systems cause programs to hang until the server responds because the client
retries the mount request until it succeeds. Use the -bg flag with the mount command when performing a
hard mount so if the server does not respond, the client will retry the mount in the background.
If a server fails to respond to a soft-mount request, NFS prints the message:
Soft-mounted remote file systems return an error after trying unsuccessfully for a while. Unfortunately,
many programs do not check return conditions on file system operations, so you do not see this error
message when accessing soft-mounted files. However, this NFS error message prints on the console.
/usr/bin/rpcinfo -p server_name
If the server is up, a list of programs, versions, protocols, and port numbers is printed, similar to the
following:
If the daemons are running at the server, the following responses are returned:
The program numbers correspond to the commands, respectively, as shown in the previous example.
If a similar response is not returned, log in to the server at the server console and check the status of
the daemons by following the instructions in “Getting the current status of the NFS daemons” on page
530.
6. Verify that the /etc/exports file on the server lists the name of the file system that the client wants
to mount and that the file system is exported. Do this by entering the command:
showmount -e server_name
This command lists all the file systems currently exported by the server_name.
7. For NFS version 4, verify that the NFSv4 domain is properly set.
8. For NFS version 4, verify that the nfsrgyd daemon is running.
9. If you are using enhanced security, see “RPCSEC-GSS problem determination” on page 569.
To increase transmit buffers, use the System Management Interface Tool (SMIT) fast path, smit
commodev. Then select your adapter type, and increase the number of transmit buffers.
/dancer.src:
dev=/usr/src
nodename = d61server
type = nfs
mount = false
then it performs the mount as if you had entered the following at the command line:
ps -ef
You should see the ypbind daemon in the list. Try using the rlogin command to log in remotely to
another machine, or use the rcp command to remote-copy something to another machine. If this also
fails, your ypbind daemon is probably stopped or hung.
If you only get this message for this host name, check the /etc/hosts entry on the NIS server.
mount: ... server not responding: port mapper failure - RPC timed out
Either the server you are trying to mount from is down or its port mapper is stopped or hung. Try
restarting the server to activate the inetd, portmap, and ypbind daemons.
If you cannot log in to the server remotely with the rlogin command but the server is up, check the
network connection by trying to log in remotely to some other machine. Also check the server network
connection.
mount: ... server not responding: program not registered
This means that the mount command got through to the port mapper, but the rpc.mountd NFS
mount daemon was not registered.
mount: access denied ...
Your machine name is not in the export list for the file system you are trying to mount from the server.
You can get a list of the server exported file systems by running the following command at the
command line:
showmount -e hostname
If the file system you want is not in the list, or your machine name or netgroup name is not in the
user list for the file system, log in to the server and check the /etc/exports file for the correct
file system entry. A file system name that appears in the /etc/exports file, but not in the output
from the showmount command, indicates a failure in the mountd daemon. Either the daemon could
not parse that line in the file, it could not find the directory, or the directory name was not a locally
Network connections
Use the nfsstat command to gather information about your network connections.
The nfsstat command determines whether you are dropping packets. Use the nfsstat -c
and nfsstat -s commands to determine if the client or server is retransmitting large blocks.
Retransmissions are always a possibility due to lost packets or busy servers. A retransmission rate of
five percent or more is considered high.
The probability of retransmissions can be reduced by changing communication adapter transmit queue
parameters. The SMIT menu can be used to change these parameters. For more information, refer to
Available system management interfaces in Operating system and device management.
The following values are recommended for NFS servers.
Note:
1. Apply these values to NFS clients if retransmissions persist.
2. All nodes on a network must use the same MTU size.
Table 93. Communication Adapter Maximum Transmission Unit (MTU) and Transmit Queue Sizes
Adapter MTU Transmit queue
Token Ring
4 Mb 1500 50
3900 40 (Increase if the nfsstat
command times out.)
The larger MTU sizes for each token-ring speed reduce processor use and significantly improve read/write
operations.
Hung programs
If programs hang during file-related work, the NFS server could have stopped.
In this case, the following error message may be displayed:
The NFS server (hostname) is down. This indicates a problem with the NFS server, the network
connection, or the NIS server.
Check the servers from which you have mounted file systems if your machine hangs completely. If one
or more of them is down, do not be concerned. When the server comes back up, your programs continue
automatically. No files are destroyed.
If a soft-mounted server dies, other work is not affected. Programs that time out while trying to access
soft-mounted remote files fail with the errno message, but you are still able to access your other file
systems.
If all servers are running, determine whether others who are using the same servers are having trouble.
More than one machine having service problems indicates a problem with the nfsd daemons on the
server. In this case, log in to the server and run the ps command to see if the nfsd daemon is running and
accumulating CPU time. If not, you might be able to stop and then restart the nfsd daemon. If this does
not work, you have to restart the server.
Check your network connection and the connection of the server if other systems seem to be up and
running.
The /home/bar directory is mounted from server bar onto client foo. If user B is editing files on the /
home/bar remote file system on client foo, confusion results when he saves files.
The server bar thinks the files belong to user G, because G is UID 200 on bar. If B logs on directly
to bar by using the rlogin command, he may not be able to access the files he just created while
working on the remotely mounted file system. G, however, is able to do so because the machines arbitrate
permissions by UID, not by name.
The only permanent solution to this is to reassign consistent UIDs on the two machines. For example, give
B UID 200 on server bar or 250 on client foo. The files owned by B would then need to have the chown
command run against them to make them match the new ID on the appropriate machine.
Because of the problems with maintaining consistent UID and GID mappings on all machines in a
network, NIS is often used to perform the appropriate mappings so that this type of problem is avoided.
/tmp -access=silly:funny
150.102.23.21 silly.domain.name.com
150.102.23.52 funny.domain.name.com
Notice that the names do not correspond exactly. When the server looks up the IP address-to-host-name
matches for the hosts silly and funny, the string names do not match exactly with the entries in the
access list of the export. This type of name resolution problem usually occurs when using the named
daemon for name resolution. Most named daemon databases have aliases for the full domain names
of hosts so that users do not have to enter full names when referring to hosts. Even though these
• Ensure the gssd daemon is running and responsive on the client and the server with the following
command:
If the gssd daemon is not responding, RPCSEC-GSS will fail; stopping and restarting the gssd daemon
may correct this problem.
• If you are getting write errors with integrity or privacy, make sure that you are using the kernel module.
Integrity and privacy are not supported without the kernel module. (The kernel module is the Kerberos
kernel module, /usr/lib/drivers/nfs.ext. It is installed with the modcrypt.base file set from
the expansion pack.)
• If specific users are experiencing denials when accessing data they should have access to, verify that
the involved principals in the KDC are properly synchronized with the user's AIX account name.
• Activate the system log. Most RPCSEC-GSS errors will be logged. The errors have two parts: the first is
the GSS error code (see RFC 2744 for details), and the second is a Kerberos error code.
Note: Activating the system log might affect system performance; therefore, the log should be
deactivated after the problem determination is complete.
Some common error codes and their solutions are as follows:
If the ibmslapd process is not running, type the following command to activate it:
/usr/sbin/ibmslapd
• If the nfsrgyd or chnfsim commands are able to connect to the EIM LDAP server but are
unable to perform any identity mapping operations, ensure the ibmslapd process is not running
in configuration-only mode.
This can happen if the ldapdb2 database is not running when the ibmslapd server is started. Follow
these steps:
a) Log in to the EIM LDAP server as the root user.
b) View the /var/ldap/ibmslapd.log file. Check when the last time the ibmslapd process
started. Also check whether the server was started in configuration-only mode because it couldn't
connect to the ldapdb2 database.
If the server was not able to connect to the ldapdb2 database, the database needs to be started.
Follow these steps to start the ldapdb2 database:
a) Log into the EIM LDAP server as the root user.
b) Type the following command to check if the ibmslapd process is active:
where pid is the process ID that was returned from the ps -ef command.
c) After the ibmslapd process is disabled, start the ldapdb2 database:
a. Log in to the EIM LDAP server as the ldapdb2 user.
b. Type db2start.
d) After the ldapdb2 database is started, activate the ibmslapd process:
a. Log in to the EIM LDAP server as the root user.
b. Type ibmslapd.
NFS files
The NFS files and their descriptions can be referenced here.
Item Description
bootparams Lists clients that diskless clients can use for booting.
exports Lists the directories that can be exported to NFS clients.
filesystem Lists all the file systems that are mounted at system restart.
s
hostkey Specifies the Kerberos host principal and the location of the keytab file.
local_doma Contains the local NFS domain of the system.
in
networks Contains information about networks on the Internet network.
pcnfsd.con Provides configuration options for the rpc.pcnfsd daemon.
f
NFS commands
The NFS commands and their descriptions can be referenced here.
Item Description
chnfs Starts a specified number of biod and nfsd daemons.
chnfsdom Changes the local NFS domain.
chnfsim Changes NFS foreign identity mappings.
chnfssec Changes the default security flavor used by the NFS client
chnfsrtd Changes the local NFS realm-to-domain mappings.
mknfs Configures the system to run NFS and starts NFS daemons.
nfso Configures NFS network options.
automount Mounts an NFS file system automatically.
chnfsexp Changes the attributes of an NFS-exported directory.
chnfsmnt Changes the attributes of an NFS-mounted directory.
exportfs Exports and unexports directories to NFS clients.
lsnfsexp Displays the characteristics of directories that are exported with NFS.
lsnfsmnt Displays the characteristics of mounted NFS systems.
mknfsexp Exports a directory using NFS.
mknfsmnt Mounts a directory using NFS.
nfshostkey Configure the host key for an NFS server.
nfs4cl Displays information about filesystems a client is accessing using NFS version 4.
nfs4smctl Administers revocation of NFS version 4 State
rmnfs Stops the NFS daemons.
rmnfsexp Removes NFS-exported directories from a server's list of exports.
rmnfsmnt Removes NFS-mounted file systems from a client's list of mounts.
NFS daemons
The NFS daemons and their descriptions can be referenced here.
Locking daemons
Item Description
lockd Processes lock requests through the RPC package.
Item Description
biod Sends the client read and write requests to the server.
mountd Answers requests from clients for file system mounts.
nfsrgyd Performs translation between security principals, NFS version 4 identity strings, and
their corresponding numeric system IDs. In addition, mapping of identity information
from foreign NFS version 4 domains is provided.
nfsd Starts the daemons that handle a client requests for file system operations.
nfsstat Displays information about the ability to receive calls for a particular machine.
on Executes commands on remote machines.
pcnfsd Handles service requests from PC-NFS clients.
portmap Maps RPC program numbers to Internet port numbers.
rexd Accepts request to run programs from remote machines.
rpcgen Generates C code to implement an RPC protocol.
rpcinfo Reports the status of RPC servers.
rstatd Returns performance statistics obtained from the kernel.
rup Shows the status of a remote host on the local network.
rusers Reports a list of users logged on to the remote machines.
rusersd Responds to queries from the rusers command.
rwall Sends messages to all users on the network.
rwalld Handles requests from the rwall command.
showmount Displays a list of all clients that have mounted remote file systems.
spray Sends a specified number of packets to a host.
sprayd Receives packets sent by the spray command.
Item Description
chkey Changes the user encryption key.
gssd Provides NFS with access to security services provided by Network Authentication
Services.
keyenvoy Provides an intermediary between user processes and the key server.
keylogin Decrypts and stores the user secret key.
keyserv Stores public and private keys.
mkkeyserv Starts the keyserv daemon and uncomments the appropriate entries in the /etc/
rc.nfs file.
newkey Creates a new key in the publickey file.
rmkeyserv Stops the keyserv daemon and comments the entry for the keyserv daemon in
the /etc/rc.nfs file.
For additional information on NFS security, see Network File System security in Security.
Sun diskless client support
Item Description
bootparamd Provides information necessary for booting to diskless clients.
NFS subroutines
The NFS subroutines are described here.
Item Description
cbc_crypt, des_setparity, or ecb_crypt Implements Data Encryption
Standard (DES) routines.
SMB protocol
The Server Message Block (SMB) protocol is a client-server communication protocol that is used for
shared access to files, directories, printers, serial ports, and other resources on a network. It also
provides an authenticated inter-process communication (IPC) mechanism.
You can specify mounting options by using the -o flag. Command line options must be separated only by
a comma, not a comma and a space. The options for the file system are:
Item Description
fmode Sets file or directory to octal mode. Default value is 755.
uid Assigns a UID to files during mount. The default is root.
gid Assigns a GID to files during mount. The default is system.
You can also mount the file system by using the SMIT utility, smit cifs_fs, which runs the mount
command after gathering all necessary information.
In order to mount an SMBFS, it is necessary to provide a user name and password to authenticate to
the server. This user name and password are used to perform all necessary file operations on the server.
The Password field in the SMIT panel is not marked as required. If the password field is not filled in,
the cifscred file is searched for matching credentials for the user or server that is provided. If there
is a match, the stored password from the cifscred file is used; otherwise, the user is prompted for a
password through the standard AIX password prompt. This way, the user can provide a password without
making it viewable.
Note: The password used for mounting SMBFS can be up to 14 character in length and the password can
contain special characters.
Whenever a file system command, such as read, is invoked on a file inside the SMBFS mount point,
a request is sent to the server to read the file. The user name and password are sent as part of this
request so that the server can determine whether the user has permission on the server to perform a read
operation on that file. Therefore, ultimate authority lies with the server as to whether an operation on a
file is permissible.
However, the fmode option of the mount command provides a way for the root user on the client system
to control access to the files on the server before the server is queried. If the fmode option is not provided
by the user, the default is 755. The following table illustrates how the fmode option works using a write
request:
Table 94. Five cases in which users were either allowed or denied access based on permissions given.
Case number User User on client Mount owner, Owner, group, Access
authenticated side wanting group, and and mode on allowed
to server write access mode server
Case 1 user1 user2 no
user1, staff user1, staff
rwxr-xr-x rwxrwxr-x
Stored passwords
SMBFS can store server/user/password credentials in the /etc/cifs_fs/cifscred file to allow
automatic retrieval of passwords when mounting SMBFS.
Credentials can be added, changed, and removed from this file with the mkcifscred, chcifscred, and
rmcifscred commands (located in the /usr/sbin file). Passwords added to this file are encrypted.
When mounting is attempted without providing a password, the cifscred file is searched for matching
credentials. If there is a match, the stored password from the cifscred file is used; otherwise, the user
is prompted for a password through the standard AIX password prompt.
Support for stored passwords comes with the following limitations:
• For stored password retrieval to work properly, the server naming convention must be consistent. For
example, if the credentials are added with an IP address rather than a host name or a fully qualified
domain name (FQDN), passwords will only be retrieved when mounting by IP address.
• Plain text password authentication is not supported with the stored password retrieval method. If the
server requires plain text passwords, authentication fails.
/etc/filesystems support
SMBFS supports /etc/filesystems to allow automated mounting at system startup.
Support for /etc/filesystems also provides access to stored server, user, password, and options data
when mounting. Use the mkcifsmnt, chcifsmnt, rmcifsmnt, and lscifsmnt commands (located
in /usr/sbin) to add, change, remove, and list, respectively, cifs stanzas in /etc/filesystems.
Credentials must be stored in the cifscred file.
Troubleshooting SMBFS
If the mount command or the smit cifs_fs fast path returns an error, consider the following
troubleshooting steps:
• Ensure the user name and password are correct. The user name and password need to allow access to
the share on the server.
• Ensure that the server name is correct. If the server name is correct, use the fully qualified host name in
case the server is not part of the same subnet as the client. You can also try using the server IP address.
The following SMB protocol 3.0.2 functions are available in the SMB client file system:
SMB 3.0.2 secure dialect negotiation
You can mount a share from the SMB server into the AIX virtual file system (VFS) by using SMB
protocol version 3.0.2.
The SMB 3.0.2 dialect server provides secure dialect negotiation to protect against security risks.
When the SMB 3.0.2 dialect is negotiated, the SMB client must send a mandatory signed request to
validate the negotiation information.
SMB 3.0.2 signing
The SMB protocol 3.0.2 uses a more recent encryption algorithm for signing. Advanced Encryption
Standard (AES)-cipher-based message authentication code (CMAC), AES-128-CMAC to ensure
integrity of messages that are exchanged between the SMB client and the SMB server by signing
the outgoing messages and by validating the incoming messages.
SMB 3.0.2 encryption
SMB encryption provides end-to-end encryption of SMB data and protects data from eavesdropping
occurrences on untrusted networks. SMB Encryption can be configured on a per share basis or for
the entire file server, and it can be enabled for various scenarios where data traverses untrusted
networks.
for example,
You can specify the following parameters with the -o flag of the mount command. The parameters must
be separated only by a comma. Do not insert a space before or after a comma.
fmode
Sets a file or directory to octal mode for access permissions. The default value is 755.
uid
Assigns a user ID to files during the mount operation. The default value is root.
gid
Assigns a group ID to files during the mount operation. The default value is system.
wrkgrp
Specifies the workgroup to which the SMB server belongs. This parameter is mandatory to mount the
SMB client file system.
port
Specifies the port number. Valid values are 445 and 139. The default value is 445. Port 139 is
supported only when the specified server address is in the IPv4 format.
pver
Specifies the SMB protocol version that is used to communicate with the SMB server. The valid values
are 2.1, 3.0.2, and auto. When you specify the auto value, SMB protocol version 2.1 or version 3.0.2
is used based on the specified SMB server.
signing
Specifies whether the SMB client file system requires a digital signature for communication. Valid
values are enabled and required. When the signing parameter is set to enabled, the SMB client
file system does not digitally sign the data packets unless the SMB server file system requires digital
signatures for communication. When the signing parameter is set to required, the SMB client file
system must digitally sign the data packets for communication. If you do not specify the value of the
signing parameter by using the mount command, a default value is used from the kernel tunable
parameter values that are set by using the smbctune command.
secure_negotiate
Specifies whether the SMB client file system requires a secure dialect negotiation capability. The valid
values are desired, required, and disabled. If you do not specify this parameter in the mount
command, a default value is used from the kernel tunable parameter values that are set by using the
smbctune command.
encryption
Specifies whether the SMB client file system requires encryption. The valid values are desired,
required, and disabled. If you do not specify this parameter in the mount command, a default
value is used from the kernel tunable parameter values that are set by using the smbctune command.
spn
Specifies the service principal name (SPN) that must be used in the SMB client mount points. The
format of the spn parameter is cifs/<smbServerHostName>, where smbServerHostName is the
fully qualified domain name (FQDN) of the SMB server or the name that the Kerberos resolves as
the SMB server. By default, SPN is constructed automatically by the SMB client file system as cifs/
<smbServerHostName>.
Table 95. Cases in which users are either allowed or denied access based on the specified access
permissions of the files or directories on the SMB server
Case number User User on the Mount owner, File or Access
authenticated client system group, and directory permission
to SMB server that requests access mode owner in the
write access SMB server,
group, and
access mode
on the SMB
server
Case 1 user1 user2 no
user1, staff, user1, staff,
rwxr-xr-x rwxrwxr-x
In Case 1, access to the file or directory is denied to user2 because the mount owner, group, and mode at
the mount point on the SMB client did not provide write access to user2.
In Case 2, access to the file or directory is denied to the root user. Even though the root user has all
access on the SMB client, the SMB server-authenticated user user1, does not have access to the file on
the SMB server.
In Case 3, user1 has access to the file or directory as user1 was the mount owner during the mount
operation, and user1, a member of the group staff on the SMB server, had access to the file on the
server.
Stored passwords
The SMB client file system can store server name, username, and password credentials in the /etc/
smbcred file to allow automatic retrieval of passwords when you mount the SMB client file system. You
can view, add, change, and remove the credentials from the /etc/smbcred file by using the lssmbcred,
mksmbcred, chsmbcred, and rmsmbcred commands that are located in the /usr/sbin/ directory.
Passwords that are added to the /etc/smbcred file are encrypted. When you mount the SMB client file
system without specifying a password, the /etc/smbcred file is searched for matching credentials. If a
match is found, the stored password from the /etc/smbcred file is used. Otherwise, you are prompted
for a password through the standard AIX password prompt.
Consider the following limitations about the stored passwords:
• To retrieve stored passwords, the server naming convention must be consistent. For example, if the
credentials are added by using an IP address rather than a hostname or a fully qualified domain name
(FQDN), passwords can be retrieved only when you mount the SMB client file system by using IP
address.
• Remove the credential entry from the /etc/filesystems file before you uninstall the smbc.rte
fileset.
To manage the SMB client file system in the /etc/filesystems file, you can use the lssmbcmnt,
mksmbcmnt, chsmbcmnt, and rmsmbcmnt commands. You can also add the SMB client file system
entries manually. When you add SMB client file system entries manually to the /etc/filesystems file,
you must store the SMB client file system credentials in the /etc/smbcred file.
Example:
$cat /etc/filesystems
.....................
.....................
.....................
/mnt1:
dev = /fvt_share
vfs = smbc
mount = true
options = "wrkgrp=SMB_21.FVT"
nodename = <servername>/<username>
/mnt:
dev = /fvt_share
vfs = smbc
mount = true
options = "wrkgrp=SMB_21.FVT,signing=required"
nodename = <servername>/<username>
You can use the SMIT interface to perform the following tasks:
• List the SMB client mount points.
• Display the SMB client tunable parameters.
• Configure the SMB client credentials.
• Add or mount an SMB client file system.
• Remove or unmount an SMB client file system.
• Change an SMB client file system.
In the SMIT interface, go to Communications Applications and Services > SMB Client for AIX to access
the SMB client file system options. You can also use the following SMIT fast path:
smit smbc
Asynchronous communications
AIX provides the following categories of asynchronous device drivers, also called tty device drivers:
• Drivers for the serial ports on the system planar
• Drivers for the serial ports connected to the system through an adapter
• Pseudo-tty drivers
Drivers in the first category are the PCI adapters. They include 2-port, 8-port and 128-port adapters.
In the second category, the 8-port and 128-port PCI adapters are called intelligent adapters, because
they use an Intel 8086 processor to offload much of the character processing from the host CPU.
These adapters are driven by a 20 ms poller instead of hardware interrupts and provide performance
characteristics well suited for the majority of serial devices and applications. As more devices are added
to the system, the system workload goes up very little, with the result that these adapters can support
a very large number of serial devices, many more than would be possible using hardware interrupts.
Also, because these adapters use a patented software performance enhancement, they can send and
receive large amounts of data faster and more efficiently than the native system ports, as long as the
data is being moved in large blocks. For more information, see the wantio description in the /usr/
include/sys/pse/README.pse file.
Note: Integrated POWER5 system ports are similar to serial ports except that system ports are available
only for specifically supported functions. Refer to “Functional differences between system ports and
serial ports” on page 589 for more information.
However, some devices and applications expect or require very low latency in single character processing,
so you may experience timing problems when connected to these intelligent adapters. Character latency,
or character echo, may be defined as the time it takes to receive a single character on a serial port, deliver
that character to an application, then echo the character back out the same serial port.
Because they use the highest priority interrupt on the system (INTCLASS0), interrupt-driven ports provide
latency values in the 0.10 to 0.20 ms range on an idle system. The 8-port PCI adapters provide latency
values averaging around 10 to 12 ms, with individual times varying by plus or minus 10 ms due to the
20 ms poller. The 128-port PCI adapters have the same 20 ms poller, which communicates over a polled
communications link to the Remote Access Nodes (RANs). RANs allow a polling driver to control the serial
ports. Latency values on these ports average around 30 ms, but can exceed 60 ms.
Latency values on the 8-port PCI and 128-port PCI adapters can be tuned for special applications using
the "event delay" (EDELAY) parameter. For maximum responsiveness when receiving a single character,
reduce the value of the EDELAY parameter. This minimizes the time required to get a single character from
Asynchronous adapters
Asynchronous communications products offer the advantages of low cost, multiuser, medium- to high-
performance terminal and device communications.
AIX allows many users to access system resources and applications. Each user must be connected
through a terminal session. The connection can be local or remote through a serial port.
Each system unit has at least one standard serial port available (some systems have three serial ports).
These ports can support asynchronous communication and device attachment.
Asynchronous ports allow attachment of asynchronous peripheral devices that meet EIA 232, EIA 422, or
RS-423 standards such as:
• Asynchronous modems
• Bar code scanners
Item Description
2-Port PCI Bus EIA 232 • PCI slot available.
• Up to two ports per adapter.
• Requires all EIA 232 ports.
• Asynchronous speeds to 230 Kbps.
128-Port Adapter (PCI) • A Micro Channel, ISA, or PCI bus slot available.
(For further information about Micro Channel or
ISA, see “128-Port adapter (Micro Channel, ISA)”
on page 679.)
• Sixteen ports now with expansion of up to 128
ports without additional slots.
• Most distant terminal located about 90 meters
(300 feet) from the system at maximum data rate
of 230 Kbps.
• Terminals planned: nearby or on premises,
distant on premises, and remote.
• Need high asynchronous throughput with low
processor demand.
• Need terminal attached printer capability.
• Need to connect to remote premises through
fiber-optic or synchronous modems.
Item Description
Real estate office • Simplicity and cost are high priority.
• Operating system and server.
• Six to ten devices tied into the server accessing the database.
• One slot is available for asynchronous communication.
• Devices are less than 61 meters (200 feet) from the server.
Solution:
8-port PCI.
Topology considerations
The asynchronous family of adapters offers a wide variety of choices where distance topology is
concerned.
The maximum cable lengths from the planar- and direct-attach adapters is generally the distance
between the port and the asynchronous device, operating at the maximum specified data rate. The
128-port adapter is measured from the adapter card to the daisy-chained RAN attached to it. With the
128-port, unlimited distances can effectively be achieved by using the EIA 422 synchronous modems to
attach the RANs to the adapter.
Proper cabling is extremely important and is unique to each environment.
Serial communication
Asynchronous communication standards, hardware, terminology, and concepts are described here.
Serial ports are used to physically connect asynchronous devices to a computer. They are located on the
back of the system unit, either integrated or using a multiport adapter, such as the 2-port, 8-port, 16-port,
and 128-port asynchronous adapters.
Note: The POWER5 integrated system ports are not general-purpose, full-function serial ports. See
“Functional differences between system ports and serial ports” on page 589 for more information.
To understand the functionality of a serial port, it is necessary to first examine parallel communications.
A standard parallel port uses eight pins, or wires, to simultaneously transmit the data bits, making up a
single character. The following illustration shows the parallel transmission of the letter a.
Serial ports require only a single pin, or wire, to send the same data character to the device. To
accomplish this, the data is converted from a parallel form (sent by the computer), to a sequential form,
where bits are organized one after the other in a series. The data is then transmitted to the device with
the least significant bit (or zero-bit) sent first. After the data is received by the remote device, the data is
converted back into parallel form. The following illustration shows the serial transmission of the letter a.
Serial transmissions of a single character are simple and straight forward; however, complications arise
when a large number of characters are transmitted in series as shown in the following illustration. The
receiving system does not know where one character ends and the other begins. To solve this problem,
both ends of the communication link must be synchronized or timed.
Synchronization
Synchronization is the process of timing the serial transmission to properly identify the data being sent.
The two most common modes are synchronous and asynchronous.
Synchronous transmission
The term synchronous is used to describe a continuous and consistent timed transfer of data blocks.
These types of connections are used when large amounts of data must be transferred very quickly from
one location to the other. The speed of the synchronous connection is attained by transferring data in
large blocks instead of individual characters.
After the syn characters are received by the remote device, they are decoded and used to synchronize the
connection. After the connection is correctly synchronized, data transmission may begin.
An analogy of this type of connection would be the transmission of a large text document. Before
the document is transferred across the synchronous line, it is first broken into blocks of sentences
or paragraphs. The blocks are then sent over the communication link to the remote site. With other
transmission modes, the text is organized into long strings of letters (or characters) that make up the
words within the sentences and paragraphs. These characters are sent over the communication link one
at a time and reassembled at the remote location.
The timing needed for synchronous connections is obtained from the devices located on the
communication link. All devices on the synchronous link must be set to the same clocking.
The following is a list of characteristics specific to synchronous communication:
• There are no gaps between characters being transmitted.
• Timing is supplied by modems or other devices at each end of the connection.
• Special syn characters precede the data being transmitted.
• The syn characters are used between blocks of data for timing purposes.
Asynchronous transmission
The term asynchronous is used to describe the process where transmitted data is encoded with start and
stop bits, specifying the beginning and end of each character.
An example of asynchronous transmission is shown in the following figure.
These additional bits provide the timing or synchronization for the connection by indicating when a
complete character has been sent or received; thus, timing for each character begins with the start bit and
ends with the stop bit.
When gaps appear between character transmissions, the asynchronous line is said to be in a mark state. A
mark is a binary 1 (or negative voltage) that is sent during periods of inactivity on the line as shown in the
following figure.
When the mark state is interrupted by a positive voltage (a binary 0), the receiving system knows that data
characters are going to follow. It is for this reason that the start bit, which precedes the data character, is
always a space bit (binary 0) and that the stop bit, which signals the end of a character, is always a mark
bit (binary 1).
Bits-per-character
The number of bits-per-character (bpc) indicates the number of bits used to represent a single data
character during serial communication.
This number does not reflect the total amount of parity, stop, or start bits included with the character. Two
possible settings for bpc are 7 and 8.
When using the seven bits-per-character setting, it is possible to only send the first 128 characters
(0-127) of the Standard ASCII character set. Each of these characters is represented by seven data bits.
The eight bits-per-character setting must be used to send the ASCII Extended character set (128-255).
Each of these characters may only be represented using eight data bits.
Bits-per-second (bps)
This provides a description of the bits-per-second statistic.
Bits-per-second (bps) is the number of data bits (binary 1's and 0's) that are transmitted per second over
the communication line.
Baud rate
The baud rate is the number of times per second a serial communication signal changes states; a state
being either a voltage level, a frequency, or a frequency phase angle.
If the signal changes once for each data bit, then one bps is equal to one baud. For example, a 300 baud
modem changes its states 300 times a second.
Parity bits
The parity bit, unlike the start and stop bits, is an optional parameter, used in serial communications to
determine if the data character being transmitted is correctly received by the remote device.
The parity bit can have one of the following five specifications:
Item Description
none Specifies that the local system must not create a parity bit for data characters being
transmitted. It also indicates that the local system does not check for a parity bit in data
received from a remote host.
even Specifies that the total number of binary 1s, in a single character, adds up to an even
number. If they do not, the parity bit must be a 1 to ensure that the total number of
binary 1s is even.
For example, if the letter a (binary 1100001) is transmitted under even parity, the
sending system adds the number of binary 1s, which in this case is three, and makes the
parity bit a 1 to maintain an even number of binary 1s. If the letter A (binary 1000001) is
transmitted under the same circumstances, the parity bit would be a 0, thus keeping the
total number of binary 1s an even number.
In EIA 232D, devices using pin 2 (TxD) for output (for example, computers and terminals) are given the
name data terminal equipment (DTE). Devices using pin 2 (TxD) for input (for example, modems) are given
the name data communication equipment (DCE).
EIA 232D also specifies the connectors. A DTE device normally has male connectors while DCE devices
have female connectors. This standard is not always adhered to by manufacturers; therefore users should
always review the device documentation before cable connection.
Flow control
Some type of data flow control is needed by the serial device to limit the amount of data transmitted by
the system.
Serial devices, such as printers and modems, do not process data as quickly or efficiently as the
computers they are connected to.
The term flow control is used to describe the method in which a serial device controls the amount of data
being transmitted to itself.
• Modems
• ASCII terminals
• System console (LFT)
• aixterm under AIXwindows
The tty devices can be added, deleted, listed, and changed like any other device on your system by using
the SMIT tool, or device-specific commands.
For information about the entries in the terminfo database, see the terminfo file format. To convert
termcap entries into terminfo entries, see the captoinfo command. (The termcap file contains the
terminal descriptions for older Berkeley systems.)
TTY characteristics
The line discipline provides the hardware-independent user interface for communicating between the
computer and an asynchronous device.
For example, a user is able to erase a single line or to interrupt a currently running process by typing a
particular sequence of characters. You can define the meaning of these character sequences as well as
set other terminal characteristics, such as the communication speed, by using the chdev command, the
System Management Interface Tool (SMIT), or the stty command.
Note:
1. Other flags may be used to further specify the new tty device. For example, to define and configure
an RS-232 tty device connected to port 0 on the 8-port asynchronous adapter sa3 with the speed
attribute set to 19200 and other attributes set to values retrieved from the foo file:
2. The mkdev and chdev commands support options that are not possible with SMIT.
3. Disable the tty before doing this task. See the pdisable command.
4. Use flags to change specific characteristics about a tty from the command line.
5. You can select a Posix baud rate from the List function, or you can type in non-Posix baud rate directly
into the field. If the selected baud rate cannot be supported by the modem's hardware, the system
displays an error message.
If adding or changing a tty from the command line, consult the following list to find out the Attribute
name to specify in the -a Attribute=Value flag for the characteristic you want to set. For example, specify
-a speed=Value to set the baud rate of a tty device.
TTY troubleshooting
There are several common TTY troubleshooting scenarios.
Common TTY troubleshooting scenarios include Respawning Too Rapidly errors, hung TTY ports, and
common error logging files, commands, and error report messages.
AT&C1
AT&W
Note:
a. See “Sending AT commands with the cu command” on page 611
b. See your modem documentation for further information.
• Disable the tty, remove the tty definition, or attach a device to the port:
– To disable the tty definition use the chdev command as follows:
After running this command, the tty does not become enabled after a system restart.
– To remove the tty definition:
1. Disable the tty port, use the pdisable command, enter:
pdisable ttyName
2. Remove the tty definition from the system. See “TTY device management” on page 595 for further
information.
• Check for bad cables or loose connections:
1. Check cabling. Tighten loose connections and replace damaged or inappropriate connectors.
2. Verify that the suspected cabling is IBM serial cable P/N 6323741 or that the cable meets the same
standard. Replace damaged or inappropriate cables.
• Eliminate noise on communication line:
1. Verify that cabling is correct length and impedance.
2. Ensure that toroid rings are in place where needed on longer cables.
3. Check routing of cables; they should not be close to fluorescent lights or motors.
• Check for corruption of, or tampering with, the /etc/environment or the /etc/inittab files:
1. If possible, compare these files against known good copies.
2. Copy the files as a backup and make changes as needed.
3. In the /etc/environment file, remove any lines that are not:
– blank lines
– comment lines
– variable=value
1. Determine whether the tty is currently handling any processes by typing the following:
ps -lt tty0
The Process ID (PID) here is 22566. To kill this process, type the following:
kill 22566
Ensure that the process was successfully cleared by typing the command ps -lt tty0. If the
process still exists, add the -9 flag to the kill command as shown in the example below.
Note: Do not use the -9 option to kill an slattach process. Killing an slattach process with the -9 flag
might cause a slip lock to remain in the /etc/locks file. Delete this lock file to clean up after slattach.
kill -9 22566
2. Determine if any process is attempting to use the tty by typing the following:
Note: If the ps -ef | grep tty command returns something similar to the following:
where the "-" is displayed between the date (Mar 06) and the time (0:00), this tty does not have the
correct cable. This status indicates that the system login process (getty) is attempting to open this tty,
and the open process is hanging because the RS-232 signal Data Carrier Detect (DCD) is not asserted.
You can fix this by using the correct null modem adapter in the cabling. When getty can open the tty
port, the "-" is replaced by the tty number. For more information on cables, see “Attaching the modem
with appropriate cables” on page 610.
pdisable tty0
If the process has been successfully cleared but the tty is still unresponsive, continue to the next step.
3. Type the following command:
fuser -k /dev/tty0
This will clear any process that can be found running on the port and display the PID. If the tty is still
unusable, continue to the next step.
4. Use the strreset command to flush outgoing data from the port that is hung due to data that cannot
be delivered because the connection to the remote end has been lost.
Note: If the strreset command fixes the hung port, the port has a cable or configuration problem
because the loss of the connection to the remote end should have caused buffered data to be flushed
automatically.
You need to first determine the major and minor device numbers for the tty by typing the following:
ls -al /dev/tty0
This indicates that tty0 has a major device number of 18 and a minor device number of 0. Specify
these numbers when using the strreset command as follows:
/usr/sbin/strreset -M 18 -m 0
The third column in the above output indicates the location code of the tty. In this example,
S1 indicates the serial port is configured for native serial port 1. For more information on
interpreting location codes, see ../devicemanagement/devloccodes.html in Operating system and
device management.
If the tty is still unusable, continue to the next step.
6. Flush the port using stty-cxma. Type the following:
This command is intended for the ttys configured on ports of the 8-port and 128-adapters. In some
cases, however, it can be used successfully to flush other tty ports.
If the tty is still unusable, continue to the next step.
7. On the keyboard of the hung terminal, hold down the Ctrl key and press Q. This will resume any
suspended output by sending an Xon character.
If the tty is still unusable, continue to the next step.
rmdev -l tty0
This command leaves the information concerning the tty in the database but makes the tty unavailable
on the system.
The following command reactivates the tty:
mkdev -l tty0
If the tty is still unusable, consider moving the device to another port and configuring a tty at that
location until the system can be rebooted. If rebooting does not clear the port, you most likely have a
hardware problem. Check the error report for port hardware problems by entering the following:
errpt -a | pg
Some of the preceding commands will not work, and they will give a method error indicating that the
device is busy. This is because of the process running on the tty. If none of the steps detailed above free
the hung tty, as a last resort, reboot the AIX system and flush the kernel so that the process will go away.
Modems
Modems provide serial communications across ordinary telephone lines. Modem concepts include
standards, general modem setup, and specific configuration tips for popular modems.
A modem is a device that allows you to connect one computer to another across ordinary telephone lines.
The current telephone system is incapable of carrying the voltage changes required for a direct digital
connection. A modem overcomes this limitation by modulating digital information into audio tones for
transmission across the phone line, and by demodulating those tones back into digital information on
reception. Modems are commonly used with Basic Network Utilities (BNU) or other implementations of
the UNIX-to-UNIX Copy Program (UUCP). A high-speed (14,400 bps or greater) modem can be used with
Serial Line Interface Protocol (SLIP) to provide Transmission Control Protocol/Internet Protocol (TCP/IP)
connectivity as well.
Often, the term baud is used to refer to modem speed instead of bps. Baud is actually a measurement
of the modulation rate. In older modems, only 1 bit was encoded in each signal change, so modem baud
rate was equal to modem speed. Modems that operate at higher speeds, however, still generally operate
at 2,400 (or even 1,200) baud, and encode two or more bits per signal change. A modem's bps rate is
calculated by multiplying the number of data bits per signal with the baud (for example, 2,400 baud x 6
bits per signal change = 14,400 bits per second). Most modern modems can communicate at a variety of
speeds (for example, 28,800, 14,400, 9,600, 7,800, 4,800, and 2,400 bps).
Telecommunications standards
The older speeds of 300, 1,200, and 2,400 bps were well defined. However, as modem manufacturers
began to devise methods for gaining higher speeds, each modem manufacturer started to use a
proprietary method incompatible with modems from other manufacturers. Today, the ITU-TSS (formerly
the United Nations Consultative Committee for International Telephony and Telegraphy, abbreviated
CCITT) defines standards for most high-speed communications.
Even high-speed modems are much slower than other methods of computer communication. A high-
speed modem can operate at 28,800 bps, but an Ethernet connection operates at 10,000,000 bps. To
boost data throughput, high-speed modems typically offer one or more data compression algorithms.
These algorithms can boost the throughput of a high-speed modem to speeds of 57,600 bps (if the
data rate is 14,400 bps) or 115,200 bps (if the data rate is 28,800 bps). Note that these compression
algorithms are sensitive to the data being transmitted. If the data has already been compressed (for
example, with the compress command), the data compression methods of high-speed modems offer
little or no benefit, and might even reduce data throughput. When using a modem with data compression
Item Description
V.29 ITU-TSS standard for half-duplex 9600 bps communications.
V.32 ITU-TSS standard for full-duplex 9600 bps communications.
V.32bis ITU-TSS standard for 14,400 communications. V.32bis is a revision to the V.32 standard.
V.34 ITU-TSS standard for 33,600 bps communications. Note that this standard achieves 33,600
bps data rates using multiple bit encoding, instead of the data compression scheme used by
MNP Class 9. This standard was previously referred to as V.fast.
V.42 ITU-TSS error correcting procedures for DCEs using asynchronous to synchronous
conversion.
V.42bis Revised ITU-TSS data compression standard.
Modem considerations
Modem interface requirements for the general user can vary.
The configuration of a modem attached to this operating system is different than that of a personal
computer (PC) or workstation.
Supported modems
Any modem that is EIA 232 compliant and capable of returning results in response to a command can be
attached to this operating system.
With serial communication on this operating system involving modems, as pictured in the above
illustration, there are three major considerations:
• DTE interface speed (server to modem). This is the speed the server communicates to the modem.
• DCE interface speed (modem to server) sometimes called the "serial port interface speed." This is the
speed at which the modem communicates to the server.
• Connection speed (modem to modem). This is the speed at which a modem communicates (or talks) to
another modem.
Most modern, high-speed modems allow the DCE interface speed to be different than the connection
speed. This allows the DTE speed to be locked at a single baud rate while allowing the connection speed
to fluctuate, up or down as needed, for proper communication between modems.
Modern high-speed modems hold the data to be transmitted to the server in a buffer and send it when the
system can accept it. They can also hold data to be transmitted to the other modem in a buffer and send
it as the remote is able to accept it. This kind of data transmission requires the modem and the server to
engage in flow control.
Signal Description
FG Frame Ground. Pin 1 of the EIA 232D specification that provides for a cable shield. Properly
used, the signal is attached at pin 1 on one side of the cable only and is connected to a
metal sheath around the cable.
TxD Transmit Data. Pin 2 of the EIA 232D specification. Data is transmitted on this signal.
Controlled by the server.
RxD Receive Data. Pin 3 of the EIA 232D specification. Data is received on this signal, controlled
by the modem, which is sent by the modem.
RTS Request To Send. Pin 4 of the EIA 232D specification. Used when RTS/CTS flow control is
enabled. This signal is brought high when the system is ready to send data and dropped
when the system wants the modem to stop sending data.
CTS Clear To Send. Pin 5 of the EIA 232D specification. Used when RTS/CTS flow control is
enabled. This signal will be brought high when the modem is ready to send or receive data.
It will be dropped when the modem wishes the server to stop sending data. Controlled by
the modem.
DSR Data Set Ready. Pin 6 of the EIA 232D specification. Signals the server that the modem is in
a state where it is ready for use. Controlled by the modem.
SG Signal Ground. Pin 7 of the EIA 232D specification. This signal provides a reference voltage
for the other signals.
DCD Data Carrier Detect. Pin 8 of the EIA 232D specification. This provides a signal to the
server that the modem is connected with another modem. When this signal is brought high,
programs running on the server will be able to open the port. Controlled by the modem.
DTR Data Terminal Ready. Pin 20 of the EIA 232D specification. This provides a signal to the
modem that the server is on and ready to accept a connection. This signal is dropped when
the server wishes the modem to drop connection to another modem. It is brought high
when the port is being opened. Controlled by the server.
RI Ring Indicate. Pin 22 of the EIA 232D specification. This provides a signal to the server that
the modem is receiving a call. It is seldom used and is not needed for common operations.
Controlled by the modem.
Modem cabling
These tables display a summary of the cable information needed to properly attach a modem to any of the
serial controllers.
Item Description
DISABLE No getty process is run on the port. Use this setting for dial-out only modem ports.
ENABLE A getty process is run on the port. Use this setting for dial-in modems only.
SHARE A getty process is run on the port, but the getty process allows programs to dial in and out
of this port without manually changing to disable or enable. Use this setting for bidirectional
port usage.
DELAY A getty is run on the port in bidirectional mode, but no herald is sent until the getty process
receives a keystroke from the user.
Item Description
Force Carrier or Ignore Carrier Detect disable*
Perform Cooked Processing in Adapter disable
Note: This setting indicated by an asterisk (*) is set to disabled if the 10 pin RJ-45 connector is used. This
setting should be enabled if the 8 pin RJ-45 connector is used.
This illustration shows an 8-port interface connected to a modem with a 6323741 cable.
Modem configuration
Use only one of the two methods presented here for configuring the modem.
If you have Basic Networking Utilities (BNU) installed, see “Sending AT commands with the cu command”
on page 611. If you do not have BNU installed, see “Sending AT commands using a C program” on page
612. For information on installing BNU, see “Basic Networking Utilities ” on page 445.
pdisable tty#
cu -ml tty#
AT
The modem should respond with OK. If it didn't, refer to “ Modem troubleshooting ” on page 614.
For additional AT commands and their descriptions, see “AT commands” on page 616.
5. Depending on which getty option you selected, enter one of the following commands. Substitute the
tty device for n.
• penable ttyn
• pshare ttyn
• pdelay ttyn
• pdisplay ttyn
/*************************************************************/
/* MoTalk - A "C" program for modem setup. */
/* This program is meant as an aid only and is */
/* not supported by IBM. */
/* compile: cc -o motalk motalk.c */
/* Usage: motalk /dev/tty? [speed] */
/*************************************************************/
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <fcntl.h>
#include <termio.h>
FILE *fdr, *fdw;
int fd;
struct termio term_save, stdin_save;
void Exit(int sig)
{
if (fdr) fclose(fdr);
if (fdw) fclose(fdw);
ioctl(fd, TCSETA, &term_save);
close(fd);
ioctl(fileno(stdin), TCSETA, &stdin_save);
exit(sig);
}
main(int argc, char *argv[])
{
char *b, buffer[80];
int baud=0, num;
struct termio term, tstdin;
if (argc < 2 || !strcmp(argv[1], "-?"))
{
fprintf(stderr, "Usage: motalk /dev/tty? [speed]\n");
exit(1);
}
if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0)
{
perror(argv[1]);
exit(errno);
}
if (argc > 2)
{
switch(atoi(argv[2]))
{
case 300: baud = B300;
break;
case 1200: baud = B1200;
break;
case 2400: baud = B2400;
break;
case 4800: baud = B4800;
break;
case 9600: baud = B9600;
break;
case 19200: baud = B19200;
break;
case 38400: baud = B38400;
break;
default: baud = 0;
fprintf(stderr, "%s: %s is an unsupported baud\n", argv[0],argv[2]);
exit(1);
}
}
/* Save stdin and tty state and trap some signals */
ioctl(fd, TCGETA, &term_save);
ioctl(fileno(stdin), TCGETA, &stdin_save);
signal(SIGHUP, Exit);
signal(SIGINT, Exit);
Modem troubleshooting
When encountering problems when you use a modem with your computer, keep in mind the following
points.
• Some modems are case-sensitive. Use uppercase letters for the AT commands.
• In normal operation, it is preferable for the modem to reset when the DTR is dropped (&D3 setting).
When the modem is being set up for the first time, however, it is advisable not to have the modem reset
if the DTR is dropped (&D2 setting). If the modem resets itself, all programmed settings that are not
saved in the modem's memory will be lost.
Not having the modem reset also protects changes when &C1 is set. Changing the Carrier Detect status
might cause the carrier detect line to toggle some modems, which causes the cu command to drop the
line. You might want to set up the modem to &D3 after the final setup is made.
• Although the commands given in this topic collection are standard for most Hayes-compatible modems,
there is no guarantee that they are standard for your modem. Compare the commands with your
modem documentation before proceeding.
A convenient way to debug any modem problem is to remove the modem and attach an ASCII terminal
(with an interposer or null modem) to the same port and cabling as the modem. Set up the terminal
with the same line speed, bits per character, and parity as the modem. If the port is enabled for login, a
login herald must be displayed on the screen. If the herald is displayed on the terminal screen, then the
problem is quickly isolated to the modem configuration.
The following tips help you in isolating problems that are associated with modem connections:
AT commands
The Hayes Smartmodem command set include the AT command set used by many popular modems.
This information comes from the Hayes Smartmodem 2400 Quick Reference Card, published by Hayes
Microcomputer Products, Inc. Consult the modem documentation for a list of relevant AT commands.
Item Description
AT Command prefix - precedes command line.
<CR> Carriage return (newline) character - terminated the command line.
A Go off-hook, remain in command mode.
A/ Repeat previous command line. This command is not preceded with AT or followed by
<CR>/.
B0 Select CCITT V.22 standard for 1200 bps communications.
B1 Select Bell 212A standard for 1200 bps communications.
D Enter originate mode, dial the number that follows, and attempt to go online. D is
usually followed by T for tone, P for pulse may also be used.
DS=n Dial the number stored in location n
E0 Disable character echo in the command state.
E1 Enable character echo in the command state.
H0 Go on-hook (hang up the phone).
H1 Operate switch-hook and auxiliary relay.
I0 Return product identification code.
I1 Perform checksum on firmware ROM; return checksum.
I2 Perform checksum on firmware ROM; returns OK or ERROR as the result.
L0 Speaker off.
L1 Low speaker volume.
L2 Medium speaker volume.
L3 High speaker volume.
M0 Speaker off.
M1 Speaker on until carrier detected.
M2 Speaker always on.
M3 Speaker on until carrier detected, except during dialing.
O0 Enter online state.
O1 Enter online state and initiate equalizer retrain.
S-register summary
The S-registers, their ranges, and their descriptions are outlined in the following table.
Dial modifiers
Dial modifiers and their descriptions can be referenced in the following table.
Item Description
0-9 # * A-D Digits and characters for dialing.
P Pulse dial.
T Tone dial.
, Delay processing of next character.
! Hookflash.
@ Wait for silence.
W Wait for dial tone.
; Return to command state after dialing.
R Reverse mode.
S=n Dial number stored at location n.
Modem assistance
When encountering problems with your modem, assistance is available in the following places.
• Your local area representative can assist in the modem configuration.
• There are many different support options available to customers in the Support Services offered,
including on-site assistance or over-the-phone support. Contact your nearest service representative for
assistance.
• Perhaps an often overlooked source of help is the modem manufacturer themselves. Most
manufacturers have some type of online assistance for their products.
With the above two entries made, use the following cu command to program the modem:
# COMPONENT_NAME: cmduucp
#
#
# (C) COPYRIGHT International Business Machines Corp. 1994
# Licensed Materials - Property of IBM
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM
# Corp.
################################################################
# Motorola UDS Modem
#
# Use udsmodemPROGRAM to program the modem.
# Port needs to have rts/cts set.
# Use uds or hayes dialer.
#
# The "udsmodemPROGRAM" line should be a single, continuous line
#
################################################################
udsmodemPROGRAM =,-, "" \dAT&FQ2\r\c OK
ATE0Y0&C1&D2&S1%B5%E0*LC\r\c OKAT&K3&W\r\c OK
#################################################################
#
# IBM 7855 Model 10
# Use IBMProgrm to program the modem.
# This sets rts/cts flow control, turns
# off xon/xoff, and sets the DTE speed at 19,200 bps.
# The modem will connect at the appropriate speed and
# flow control with the server.
# Port needs to have rts/cts set.
#
# The "IBMProgrm" line should be a single, continuous line
#
################################################################
IBMProgrm =,-, "" \dATQ0\r\c OK AT&F\r\c OK ATM1\r\c OK
AT&D3\r\c OK AT&C1\R2\Q2\M14\r\c OK AT&B8N1L0E0\A0\r\c OK
ATS0=1\r\c OK ATQ1&W0&Y0\r\c ""
#######################################################
# The following are used for Dialing out on a 7855
# regular ACU device. We have to turn on result
# codes (Q0) because they are turned off when we
# programmed it. (Keeps all upper case login from
# happening on dial in attempts.)
# We have to have an extra "\" before "\N" because
# the BNU programs strips it if it's before an "N".
########################################################
ibm =,-, "" \dATQ0\r\c OK ATDT\T\d\r\c CONNECT
################################################################
#
# Intel 9600EX Modem
# Use IntelProgram to program the modem.
# This sets rts/cts flow control, and turns
# off xon/xoff.
# Port needs to have rts/cts set. (Use hayes dialer)
#
# The "IntelProgram" line should be a single, continuous line
#
################################################################
#IntelProgram =,-, "" \d\dAT\r\c OK AT&F\r\c OK AT&S1M1\r\c OK
AT&D3\r\c OKAT&C1\r\c OK ATL0E0Y0&Y0\X1\r\c OK ATS0=1\r\c OK
AT&W\r\c OK
################################################################
# Practical Peripherals 1440FXMT Modem
# Use PracPerProgram144 to program the modem.
# This sets rts/cts flow control, and turns
# off xon/xoff. (Use hayes dialer)
# DTE speed will be locked at connect speed when
# the modem is programmed. (Suggestion: 38400 baud)
#
# The "PracPerProgram144" line should be a single, continuous
# line
################################################################
PracPerProgram144 =,-, "" \d\dAT\r\c OK AT&F\r\c OK ATM1\r\c OK
AT&D3\r\c OKAT&C1&K3\r\c OK ATQ2E1&Q9\r\c OK ATS0=1S9=20\r\c OK
AT&W\r\c OK
################################################################
# Practical Peripherals 9600 bps Modem
# Use PracPerProgram9600 to program the modem.
# This sets rts/cts flow control, and turns
# off xon/xoff. (Use hayes dialer)
#
# The "PracPerProgram144" line should be a single, continuous
# line
################################################################
PracPerProgram9600 =,-, "" \d\dAT\r\c OK AT&F\r\c OK ATM1\r\c OK
AT&D3\r\c OKAT&C1&K3\r\c OK ATL0E0\r\c OK ATS0=1S9=20\r\c OK
AT&W\r\c OK
################################################################
# Practical Peripherals 2400 bps Modem
# Use PracPerProgram to program the modem
#
# The "PracPerProgram2400" line should be a single, continuous
# line
################################################################
PracPerProgram2400 =,-, "" \d\dAT\r\c OK AT&F\r\c OK ATM1\r\c OK
AT&D3\r\c OKAT&C1\r\c OK ATL0E0\r\c OK ATS0=1S9=20\r\c OK AT&W\r\c OK
################################################################
# Hayes 2400 bps Modem
# Use HayesProgrm2400 to program the modem.
# (Use hayes dialer to dial)
#
# The "HayesProgrm2400" line should be a single, continuous line
#
################################################################
HayesProgrm2400 =,-, "" \d\dAT\r\c OK AT&F\r\c OK ATM1\r\c OK
AT&D3\r\c OKAT&C1\r\c OK ATL0E0\r\c OK AT S0=1\r\c OK AT&W\r\c OK
#################################################################
# Telebit t2000 Trailblazer Plus
# Use TelebitProgrm to program the modem
# This sets rts/cts flow control, and turns
# off xon/xoff and sets the Default DTE speed at
# 19,200 bps.
# Port needs to have rts/cts set.
# This sets modem to send PEP tones last as they can
# can confuse some other modems.
#
# 2400bps connection:
# 2400 MNP:
tb24mnp =,-, "" \dAT\r\c OK ATS0=0S95=2S50=3S41=0\r\c OK
ATDT\T\r\c CONNECT
# 1200 MNP:
tb12mnp =,-, "" \dAT\r\c OK ATS0=0S95=2S50=2S41=0\r\c OK
ATDT\T\r\c CONNECT
################################################################
# Telebit WorldBlazer
# WORLDBLAZERProgram sets the DTE speed at 38400, but
# you could set it higher if the DTE connection can
# handle it. We answer with PEP tones last so as not
# to confuse other modems. This turns off xon/xoff
# and turns on RTS/CTS flow control. The port should
# be locked to 38400 with these settings, and needs
# to have RTS/CTS turned on.
#
# The "WORLDBLAZERProgram" line should be a single, continuous
# line
################################################################
WORLDBLAZERProgram =,-, "" \dAT\r\c AT AT&F3M0\r\c AT
ATs51=253s92=1\r\c ATAT&W\r\c AT
#######################################################
# ACU Dialers for various BAUD rates for the
# WorldBlazer - each sets the modem to attempt to
# connect at a specific speed and lower. The
# WBlazer will accept whatever the remote modem can
# do. You will want to use PEP for other Telebits,
# so use WBlazer38400 or WBlazer19200 for those
#######################################################
# WBlazer =,-, "" \dAT\r\c OK ATDT\T\d\r\c CONNECT
WBlazer38400 =,-, "" \dATs50=255\r\c OK ATDT\T\d\r\c CONNECT
WBlazer19200 =,-, "" \dATs50=255\r\c OK ATDT\T\d\r\c CONNECT
# WBlazer14400 attempts to negotiate a V.42bis connection.
WBlazer14400 =,-, "" \dATs50=7\r\c OK ATDT\T\d\r\c CONNECT
1 DSR 6
2 RTS 4
3 (Chassis) GND SHELL
4 TxD 2
5 TxD 3
6 (Signal) GND 7
7 CTS 5
8 DTR 20
CD 8
Note: The physical location of DSR and CD may be swapped with the ALTPIN parameter when enabled
using the stty-cmxa command.
The following table shows the asynchronous signal communication between the system unit and an
attached modem. Here, data is being sent from the system unit to a remote system.
With no options, stty-cxma displays all special driver settings, modem signals, and all standard
parameters displayed by stty(1) for the tty device referenced by standard input. Command options
are provided to change flow control settings, set transparent print options, force modem control lines, and
display all tty settings. Any unrecognized options are passed to stty(1) for interpretation. The options
are:
-a
Displays all of the unique adapter option settings, as well as all of the standard tty settings reported
by the stty -a command.
ttyname
Sets and displays options for the given tty device, instead of standard input. This form can be used
with a tty path name prefixed by /dev/ or with a simple tty name beginning with tty. This option may
be used on a modem control line when no carrier is present.
Note:
1. Selecting this task destroys the existing information.
2. An alternative way to start PPP is to issue the startsrc -s pppcontrold command. However, the
SMIT interface also allows you to set PPP to start at boot time.
3. An alternative way to stop PPP is to issue the stopsrc -s pppcontrold command. However, the
SMIT interface also allows you to have PPP not start at boot time.
smit chglcp
lssrc -s pppcontrold
The amount of time it takes to completely stop the subsystem is dependent on the number of links
defined in the PPP configuration. The subsystem is completely shut down when the output of this
command shows a status of inoperative.
3. Start PPP using the smit startppp fast path (see the table in “Asynchronous Point-to-Point
Protocol configuration” on page 628).
• If PPP is not currently running, start PPP using the smit startppp fast path (see the table in
“Asynchronous Point-to-Point Protocol configuration” on page 628).
Configuring SLIP
There are two recommended steps to follow during SLIP configuration.
Using this two-step approach separates the hardware and machine-dependent configuration
requirements from the SLIP software and command syntax problems.
1. Use ATE or the cu utility to accomplish a successful login at the remote system.
This proves the usability and correctness of the physical link.
Note: Any line in the Devices file which begins with a # sign in the leftmost column is a comment.
2. Save and exit the file.
3. Type the following command on the command line:
cu -ml tty#
4. A connected message should appear on the screen indicating that the modem is connected and ready
to be programmed.
5. Type AT and press Enter.
The modem will respond with OK. If there is no response from the modem or if characters typed do not
appear on the screen, check the following:
• Verify modem cabling connections.
• Verify that modem is powered on.
• Observe the modem front panel lights when you press Enter. If the Receive Data (RD) and Send
Data (SD) lights flash, then the modem is communicating with the system and the problem may lie
with the current modem settings. If the lights do not flash, then the problem is with the modem
connection.
• Type the following and see if the condition changes:
ATE1 <enter>
ATQ0 <enter>
ATE1 turns the echo mode on which displays any typed characters to the screen. ATQ0 enables the
displaying of result codes.
6. Program the modem using the settings shown in the previous section, "Modem Considerations."
The following example demonstrates how to program and save basic settings for a Hayes-compatible
modem. Enter:
AT&F <enter>
AT&D2 <enter>
ATS0=1 <enter>
ATS9=12 <enter>
AT&C1 <enter>
AT&W <enter>
~. <enter>
Where &F is used to reset the modem to factory defaults, &D2 sets DTR, S0 and S9 set register values,
&C1 set carrier, and &W writes the settings to the modem. The tilde-period ends the connection.
cu -d telebit
The command will fail because you are not connecting to a system. Watch the debug output of the
command to see that ATE0X12&W is sent to the modem and that an OK is received. If so, then the
modem has been successfully programmed.
Problems can arise because of incorrect values placed in the Dialers file or because of the modem's
existing configuration. If this occurs, try programming the modem manually and enter the dialers strings
(in step 8) one by one.
smit maktty
ate
b) At the Unconnected Main Menu, select the Alter subcommand. Set the Rate to the baud rate of
your modem and the Device to tty1.
c) At the Unconnected Main Menu, select the Connect subcommand. When ATE prompts you for a
phone number, enter the phone number of gold and press Enter.
d) At this point, you should receive a login prompt for gold. Log in.
e) Return to the connected screen, log out from gold, press Ctrl-v (to get to the ATE CONNECTED
MAIN MENU), press the T key to terminate the connection, and press the Q key to exit ATE.
Note: If you do not receive a login prompt, return to step 1 and verify that your configuration is
correct. Do not proceed until you can log in to gold.
5. Because the tty configuration for use with ATE is slightly different from the configuration for use with
SLIP, you must make the following changes:
a) On bronze, type:
smit chgtty
b) On gold, type:
smit mkinet1sl
The name you assign must be unique. In other words, if the Token-Ring interface on bronze is already
assigned the name bronze, assign the SLIP interface a name such as bronze_slip.
Note: For a simplified interface to the slattach command, you might use the script /usr/sbin/
slipcall.
10. Test the SLIP connection.
a) On bronze, type:
ping gold
b) On gold, type:
ping bronze
If both tests succeed, the SLIP connection is ready for use. If not, return to step 5 and verify that the
configuration on both bronze and gold is correct.
smit maktty
ate
ate: 0828-010 The Connect command has made a connection through port tty1
d) Press Enter.
You should receive a login prompt for gold. Log in to gold.
e) Finally, return to the connected screen, log out from gold, press Ctrl-v (to get to the ATE
CONNECTED MAIN MENU), press the T key to terminate (end) the connection, and press the Q
key to exit ATE.
Note: If you do not receive a login prompt, return to step 1 and verify that your configuration is
correct. Do not proceed until you can log in to gold.
5. Because the tty configuration for use with ATE is slightly different from the configuration for use with
SLIP, you must make the following changes:
a) On bronze, type:
smit chgtty
b) Select tty1. Set the BAUD rate to 38400, and then exit SMIT.
c) On gold, type:
pdisable tty1
d) On gold, type:
smit chgtty
e) Select tty1. Set Enable LOGIN to disable, set the BAUD rate to 38400, and then exit SMIT.
6. Add the following line to the /usr/lib/uucp/Devices file on both bronze and gold:
smit mkinet1sl
130.130.130.1 bronze
130.130.130.2 gold
The name you assign must be unique. In other words, if the Token-Ring interface on bronze is already
assigned the name bronze, assign the SLIP interface a name such as bronze_slip.
10. Start SLIP on both bronze and gold. Type:
slattach tty1
ping gold
b) On gold, type:
ping bronze
If both tests succeed, the SLIP connection is ready for use. If not, return to step 5 and verify that the
configuration on both bronze and gold is correct.
Note the process numbers of processes associated with the slattach command.
2. For each process number, type:
kill process_number
3. Kill the slattach process using its process ID. For example, to kill the slattach process shown in
the preceding example, enter:
kill 1269
where 1269 is the slattach process ID. Do not remove the slattach process using the -9 flag of
the kill command.
The SLIP connection is now disabled.
ifconfig sl# up
SLIP troubleshooting
These commands are needed to debug SLIP problems.
Each command comes with an example of how the command is used for troubleshooting SLIP problems.
In addition, a list of common problems and error messages is provided for your reference.
netstat command
The netstat command works in conjunction with the ifconfig command to provide a status condition
of the TCP/IP network interface.
The command netstat -in for example uses the -i flag to present information on the network
interfaces while the -n flag prints the IP addresses instead of the host names. Use this command to verify
SLIP interfaces, addresses, and host names. The following section describes netstat -in output.
Program the modem using the settings shown in the section, “SLIP modem considerations” on page 632.
The following example demonstrates how to program and save basic settings for a Hayes-compatible
modem. Enter:
Notice the * next to the sl1 interface. This shows that the network interface is down or unavailable for use.
The user can correct this by issuing the ifconfig sl1 up command if it is a valid SLIP interface.
netstat provides statistics concerning input and output packet counts as well as input and output errors
that are helpful when troubleshooting SLIP connections.
For example, a user enters a ping to a remote host across a SLIP link and the ping command appears
to hang. The user quickly run a netstat -in command from another command shell and notice that
the Opkts are increasing but that there are no Ipkts from the remote host. This indicates that the
remote system is not returning (or not receiving) the information. The user must run the same netstat
command on the remote system to verify the receipt of the ping packets or rise in the error count.
The translation of hostnames versus Internet numbers is relative to name resolution and thus critical to
proper operation of a SLIP line. To debug host name, aliases, and routing problems, use the netstat
-rn command. The base name of the host or host name is the only name that should return from
the /etc/hosts file. If the machine is being serviced by a name server (that is, /etc/resolv.conf
exists), then the name-server will return the fully qualified-domain name in this command.
Item Description
POINTTOPOINT flag This flag should always be present on an operational SLIP link. If not,
the link could be in a down or disconnected state. Try issuing the
ifconfig sl# up and the ifconfig sl# commands again to see
if its condition changes.
UP flag Indicates that the network sl# interface is activated and should be
operational.
RUNNING flag Indicates that the slattach command was successful. In actuality, the
link is accessed, a dial is completed, the other end has answered, and
the remote end has returned CARRIER DETECT status. When the CD
status occurs the flags are updated with the running bit.
ps command
The ps command displays information about active processes to standard output.
Use this command to verify the existence (or nonexistence) of slattach processes that are used to
assign a tty line to network interfaces.
If netstat -in shows that the interface is down, the user should run the ps -ef | grep slat
command to see if an slattach process is currently running on the associated tty port. Note that
for a directly connected SLIP interface, broken connections are retried automatically without manual
intervention. For a SLIP interface connected by modem, broken connections must be manually redialed.
If a user supplies a dial string in the slattach command line, the user must reenter the command and
dial string to restore a broken connection.
lsdev -Cc if -s SL
lsattr -El sl0
Message:
SLIP Questionnaire
Use this questionnaire to record data on SLIP configurations.
Information collected on these sheets can be faxed to a service representative when additional
assistance with SLIP configuration is required.
1. Was this SLIP configuration working previously? (Y/N) ____
2. What are the machine types? (example: UNIX/PC, DOS/PC, etc.)
Local System: ________________ Remote System: _________________
If the host is not an IBM UNIX system, please name the type of software being used to establish the
SLIP connection.
lslpp -h bos.rte
8. If modems are in use, what is the phone carrier type? (leased-line or normal switched)
______________________________________________________________________
9. What hardware is the SLIP line being used on?
128-Port Adapter (with 16-port RAN(s)): ___
2-Port Adapter: ___
8-Port Adapter: ___
Native, S1 or S2 serial ports: ___
10. Is it possible to ping from the local system to the remote system?
(Y/N) ______ (on the local system enter: ping <remote address> )
11. Is it possible to ping from the remote system to the local system?
(Y/N) ______ (on the remote system enter: ping <local address> )
12. Are the tty ports disabled on both the local and remote systems?
(Y/N) ______
Use the command: pdisable | grep tty#. Only disabled tty numbers are displayed as output of
this command.
13. Are any error messages being displayed? If yes, please list them below:
Depending upon the connection type used, the user can configure ATE to connect either to a system in
the next room or to a system across the country. For a direct connection, the user must know the port to
use on their system. For a modem connection, users must know the port to use on his system and the
telephone number of the remote system. Users must also have a login ID and password on the remote
system.
ATE enables a user to run commands on the remote system, send and receive files, and use the xmodem
protocol to check the data integrity in the files transferred between systems. The user can also capture
and file incoming data from the remote system.
Note: You must be a member of the UNIX-to-UNIX Copy Program (UUCP) group in order to
use ATE. A user with root authority uses System Management Interface Tool (SMIT) to install
individual users in groups.
If ATE is not available on your system, install the bos.net.ate image from the installation media (tape,
diskette, or network server).
• If ATE is installed on the system, a list of files associated with this program can be displayed using the
following commands:
• The user must have root user authority to set up the port for the communications device.
ATE uses both direct (cabled) connections and modem connections. Local RS-232C connections allow a
maximum distance of 15 meters (50 feet) between machines, and RS-422A connections allow up to 1200
meters (4000 feet) between machines.
Before using ATE to call a remote system, verify that the remote system's tty device is ready to accept a
call.
To prepare ATE to run on the system, perform the following steps:
1. Install an asynchronous adapter card in an appropriate slot in the system unit, unless the system has a
built-in serial port.
2. Plug the RS-232C or RS-422A cable into the adapter card or the built-in serial port.
3. Add a tty device for the communications port using the smit mkdev fast path.
4. Select the terminal type to emulate with ATE and make the necessary adjustments for the
environment.
The most common changes are line speed, parity settings, number of bits per character, and whether
the line is to be driven as a remote or local line. Use bpc 8 and no parity if National Language Support
(NLS) is required.
5. Set up the port for the device.
To set up a port to call out with ATE, use the pdisable command. For example, to set up port tty1,
enter:
pdisable tty1
To set up a port so that others can call in, use the penable command. For example, to let other
systems call in to the tty2 port, enter:
penable tty2
6. Ensure the device has previously been defined to the remote system.
After the device is defined, the ATE program must be customized to reflect the device settings on the
remote system. Customize the default settings with the alter and modify subcommands or by editing
the ate.def default file. To change the default settings for a telephone connection, use a dialing
directory file entry.
From the Connected Main Menu, you can issue subcommands to:
• Send files to and receive files from the remote system (send, receive)
• Send a break signal to the remote system (break)
• End the connection to the remote system (terminate)
In addition, the modify, alter, help, perform, and quit subcommands perform the same functions as
those provided from the Unconnected Main Menu.
You can control certain actions of ATE with control key sequences. These key sequences are known as the
CAPTURE_KEY, the MAINMENU_KEY, and the PREVIOUS_KEY. The key sequences are discussed in “ATE
control key sequences” on page 647. ATE is installed with default key combinations for these keys, but
you can change the key combinations by modifying the ATE default file, ate.def.
Item Description
alter Temporarily changes data transmission characteristics, such as the speed of
transmission.
connect Makes a connection.
directory Displays a dialing directory.
help Displays help information.
Note: Of the control key sequences CAPTURE_KEY, MAINMENU_KEY, and PREVIOUS_KEY, only
PREVIOUS_KEY can be used from the ATE Unconnected Main Menu.
Item Description
alter Temporarily changes data transmission characteristics, such as the speed of
transmission.
break Sends a break signal to the remote system.
help Displays help information.
modify Temporarily modifies local settings used by the emulator, such as the capture file for
incoming data.
perform Allows you to perform workstation operating system commands within ATE.
quit Quits the ATE program.
receive Receives files from a remote system.
send Sends files to a remote system.
terminate Terminates the ATE connection.
All three ATE control key sequences can be used from the ATE Connected Main Menu.
PREVIOUS_KEY Returns to the previously displayed screen. The PREVIOUS_KEY is also used to
stop a file transfer operation. The default key sequence for the PREVIOUS_KEY is
Ctrl-R.
The PREVIOUS_KEY can be used from either ATE Main Menu.
MAINMENU_KEY Displays the Connected Main Menu so you can issue an ATE subcommand. The
default key sequence for the MAINMENU_KEY is Ctrl-V. Use this control key
to display the Connected Main Menu after a connection to a remote system is
established.
If you press the MAINMENU_KEY key sequence before a connection is
established, the next command entered is unsuccessful, and an error message
is displayed.
By customizing the ATE default file, you can permanently change the control key
settings and the capture file name. See “Editing the ATE default file” on page
656.
ATE customization
ATE creates the ate.def default file in the current directory the first time the user runs ATE. Edit the
ate.def file to customize various aspects of ATE.
For example, the user can change the name of the dialing directory file, the type of transfer protocols used
to send and receive files from the remote system, and the baud rate ATE expects the modem to use. Refer
to “Editing the ATE default file” on page 656 for more information on the ate.def file.
Users can also make temporary changes to certain aspects of ATE with the modify and alter
subcommands. These subcommands can change all of the ATE default values except the control key
sequences (which can only be changed by editing the default file) and the name of the dialing directory
(which can be changed with the directory subcommand or by editing the default file). Any changes
made with the modify, alter, or directory subcommands are effective only for that session of ATE.
The next time the user runs ATE, the settings used are those defined in the default file.
When using a modem with ATE, the user can create a dialing directory of up to 20 phone numbers. The
directory subcommand displays the telephone numbers in menu form and allows the user to select the
desired system to call. Refer to “Setting up an ATE dialing directory” on page 652 for more information.
By using a dialing directory, the user avoids having to look up the telephone number when calling
a particular system. The user can also specify certain data transmission characteristics in the dialing
directory file. This is useful if some connections use characteristics that differ from the ATE defaults.
LENGTH 8
STOP 1
PARITY 0
RATE 1200
DEVICE tty0
INITIAL ATDT
FINAL
WAIT 0
ATTEMPTS 0
TRANSFER p
CHARACTER 0
NAME kapture
LINEFEEDS 0
ECHO 0
VT100 0
WRITE 0
XON/XOFF 1
DIRECTORY /usr/lib/dir
CAPTURE_KEY 002
MAINMENU_KEY 026
PREVIOUS_KEY 022
Edit the ate.def file with any ASCII text editor to permanently change the values of these
characteristics. Temporarily change the values of these characteristics with the ATE alter and modify
subcommands, accessible from the ATE Main Menu.
Type parameter names in uppercase letters in the ate.def file. Spell the parameters exactly as they
appear in the original default file. Define only one parameter per line. An incorrectly defined value for
a parameter causes ATE to return a system message. However, the program continues to run using the
default value. These are the ate.def file parameters:
LENGTH
Specifies the number of bits in a data character. This length must match the length expected by the
remote system.
Options: 7 or 8
Default: 8
STOP
Specifies the number of stop bits appended to a character to signal that character's end during data
transmission. This number must match the number of stop bits used by the remote system.
Options: 1 or 2
Default: 1
PARITY
Checks whether a character is successfully transmitted to or from a remote system. Must match the
parity of the remote system.
RATE
Determines the baud rate, or the number of bits transmitted per second (bps). The speed must match
the speed of the modem and that of the remote system.
Options: 50,75,110,134,150,300,600,1200,1800,2400,4800,9600,19200
Default: 1200
DEVICE
Specifies the name of the asynchronous port used to make a connection to a remote system.
INITIAL
Defines the dial prefix, a string that must precede the telephone number when the user autodials with
a modem. For the proper dial commands, consult the modem documentation.
FINAL
Defines the dial suffix, a string that must follow the telephone number when the user autodials with a
modem. For the proper dial commands, consult the modem documentation.
WAIT
Specifies the time to wait between redialing attempts. The wait period does not begin until the
connection attempt times out or until it is interrupted. If the ATTEMPTS parameter is set to 0, no
redial attempt occurs.
ATTEMPTS
Specifies the maximum number of times the ATE program tries redial to make a connection. If the
ATTEMPTS parameter is set to 0, no redial attempt occurs.
TRANSFER
Defines the type of asynchronous protocol that transfers files during a connection.
p (pacing)
File transfer protocol controls the data transmission rate by waiting for a specified character or for
a certain number of seconds between line transmissions. This helps prevent loss of data when the
transmission blocks are either too large or sent too quickly for the system to process.
x (xmodem)
An 8-bit file transfer protocol to detect data transmission errors and retransmit the data.
Interval
Number of seconds the system waits between each line it transmits. The value of the Interval variable
must be an integer. The default value is 0, indicating a pacing delay of 0 seconds.
Default: 0.
NAME
File name for incoming data (capture file).
LINEFEEDS
Adds a line-feed character after every carriage-return character in the incoming data stream.
ECHO
Displays the user's typed input. For a remote computer that supports echoing, each character sent
returns and displays on the screen. When the ECHO parameter is on, each character is displayed
twice: first when it is entered, and again when it returns over a connection. When the ECHO parameter
is off, each character displays only when it returns over the connection.
VT100
The local console emulates a DEC VT100 terminal so DEC VT100 code can be used with the remote
system. With the VT100 parameter off, the local console functions like a workstation.
WRITE
Captures incoming data and routes it to the file specified in the NAME parameter as well as to the
display. Carriage-return or line-feed combinations are converted to line-feed characters before they
are written to the capture file. In an existing file, data is appended to the end of the file.
The CAPTURE_KEY (usually the Ctrl-B key sequence) can be used to toggle capture mode on or off
during a connection.
XON/XOFF
Controls data transmission at a port as follows:
• When an XOFF signal is received, transmission stops.
DIRECTORY
Names the file that contains the user's dialing directory.
CAPTURE_KEY
Defines the control key sequence that toggles capture mode. When pressed, the CAPTURE_KEY
(usually the Ctrl-B key sequence) starts or stops capturing (saving) the data that is displayed on the
screen during an active connection.
MAINMENU_KEY
Defines the control key sequence that returns the Connected Main Menu so the user can issue
a command during an active connection. The MAINMENU_KEY (usually the Ctrl-V key sequence)
functions only from the connected state.
PREVIOUS_KEY
Defines the control key sequence that displays the previous screen anytime during the program.
The screen displayed varies, depending on the screen in use when the user presses PREVIOUS_KEY
(usually the Ctrl-R key sequence).
Users can access the dialing directory information from within ATE by using the directory subcommand
available in the UNCONNECTED MAIN MENU. The screen will show the directory information as it would
appear from within the ATE program.
Users can have more than one dialing directory. To change the dialing directory file the ATE program uses,
the user must modify the ate.def file in the current directory.
Note: The dialing directory file can contain up to 20 lines (one entry per line). ATE ignores
subsequent lines.
The dialing directory file is similar to a page in a telephone book that contains entries for the remote
systems called with the ATE program. The format of a dialing directory entry is:
The fields must be separated by at least one space. More spaces can be used to make each entry easier to
read. The fields are:
Name
Identifies a telephone number. The name can be any combination of 20 or fewer characters. Use the _
(underscore) instead of a blank between words in a name, for example, data_bank.
Phone
The telephone number to be dialed. The number can be up to 40 characters. Consult the modem
documentation for a list of acceptable digits and characters. For example, if a 9 must be dialed to
access an outside line, include a 9, (the numeral 9 and a comma) before the telephone number as
follows: 9,1112222.
Although the telephone number can be up to 40 characters long, the directory subcommand displays
only the first 26 characters.
Rate
Transmission or baud rate in bits per second (bps). Determines the number of characters transmitted
per second. Select a baud rate that is compatible with the communication line being used. The
following are acceptable rates:
50, 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, or 19200.
For non-POSIX baud rates, setting the rate at 50 causes the ATE to use the configured baud rate set
through SMIT for that device.
Length
Number of bits that make up a character. The entry for the Length field can be 7 or 8.
StopBit
Stop bits signal the end of a character. The entry for the StopBit field can be 1 or 2.
Parity
Checks whether a character was successfully transmitted to or from a remote system. The entry for
the Parity field can be 0 (none), 1 (odd), or 2 (even).
Echo
Determines whether typed characters display locally. The entry for the Echo field can be 0 (off) or 1
(on).
Note: Changing or remapping may be necessary if control keys conflict across applications. For example,
if the control keys mapped for the ATE program conflict with those in a text editor, remap the ATE control
keys.
Note: The ASCII control character selected may be in octal, decimal, or hexadecimal format, as follows:
octal
000 through 037. The leading zero is required.
decimal
0 through 31.
hexadecimal
0x00 through 0x1F. The leading 0x is required. The x may be uppercase or lowercase.
Create an ate.def file that defines those characteristics to change characteristics of ATE emulation.
For example, to change the RATE to 300 bps, the DEVICE to tty3, the TRANSFER mode to x (xmodem
protocol), and the DIRECTORY to my.dir, create an ate.def with the following entries, in the directory
running the ATE program:
RATE 300
DEVICE tty3
TRANSFER x
DIRECTORY my.dir
The program uses the defined values from time the ATE program starts from that directory.
1. Create the dialing directory file:
a) Change to the directory where the dialing directory file will reside.
b) Copy the /usr/lib/dir file to use as a template. Rename the file to any valid file name.
c) Create telephone number entries using the format given in the dialing directory file format.
d) Save the file.
Note: If the new dialing directory file is to be the system-wide default file, save the file with the
name /usr/lib/dir.
2. If the dialing directory file name is not the default (/usr/lib/dir), edit the ate.def file in the
directory from which the ATE program is run. Change the DIRECTORY parameter in the ate.def file to
the new dialing directory file.
See “Editing the ATE default file” on page 656
3. Start ATE, and view the dialing directory with the directory subcommand.
ate
1. Run the following xmodem command on the remote system after logging in:
xmodem -r newfile
where r is the Xmodem flag to receive and newfile is the name of the file to be received. This name
does not need to be the same as the file being transferred.
2. Press Enter.
3. The following message is displayed:
ate: 0828-005 The system is ready to receive file newfile. Use Ctrl-X to stop xmodem.
If the message is not displayed, the system might not have the xmodem program installed or located
in its command PATH.
4. Press Ctrl-V to return to the ATE CONNECTED MAIN MENU.
5. Press the S key to send a file.
6. The following message is displayed:
Type the name of the file you wish to send and press Enter. To use the last
file name (), just press Enter.
ate: 0828-024 The program is ready to send file newfile. You will receive another
message when the file transfer is complete.
ate: 0828-025 The system is sending block 1.
ate: 0828-025 The system is sending block 2.
ate: 0828-015 The file transfer is complete.
ate: 0828-040 Press Enter
1. Run the following xmodem command on the remote system after logging in:
xmodem -s newfile
where s is the xmodem command to send and newfile is the name and full path of the file to be
transferred.
2. Press Enter.
3. The following message is displayed:
ate: 0828-005 The system is ready to send file newfile. Use ctrl-X to stop xmodem.
If the message is not displayed, the system may not have the xmodem program installed or located in
its command PATH.
4. Press Ctrl-V to return to the ATE CONNECTED MAIN MENU.
5. Press the R key to receive the file.
6. The following message is displayed:
Type the name of the file you wish to store the received data in and press
Enter. To use the last file name (), just press Enter.
ate: 0828-020 The program is ready to receive file newfile. You will
receive another message when the file transfer is complete.
ate: 0828-028 The system is receiving block 1.
ate: 0828-028 The system is receiving block 2.
ate: 0828-040 Press Enter.
ate: 0828-008 The system tried to open port /dev/tty0 but failed. If the port name is not
correct,
change it using the Alter menu. Or, take the action indicated by the system message shown
below.
Connect: The file access permissions do not allow the specified action.
ate: 0828-040 Press Enter.
Solution:
The Connect: line in the error message narrows down the problem. Verify that the user attempting to
run ATE is a member of the UUCP group. To check this, the user can enter id on the command line;
uucp should appear in the output listing.
Problem:
When attempting to make a connection with ATE, the following error is received:
ate: 0828-008 The system tried to open port /dev/tty0 but failed. If the port name is not
correct, change it using the Alter menu. Or, take the action indicated by the system
message shown below.
Solution:
An incorrect or unavailable tty was selected for use by ATE. Examine the Alter screen in ATE.
Problem:
The file transfers correctly, but the file size is larger than the original file.
Solution:
The xmodem protocol pads the file during transfer. To avoid this, use the tar command to compress
the file and transfer it. This is also a means of overcoming another xmodem limitation where only one
file is sent at a time. The user can tar several files together into a single tar image and transfer it
using xmodem.
In addition, the xmodem command is useful for transferring files with the xmodem protocol, which detects
data transmission errors during asynchronous transmission.
Item Description
ate.def Sets default settings for connections.
Dialing directory Defines telephone numbers and settings for specific modem connections.
See “ATE commands and subcommands” on page 657 for additional reference information.
Item Description
Select (see “dscreen Select keys” on page Selects a specified screen.
659)
Block (see “dscreen Block keys” on page Blocks all input and output.
660)
New (see “dscreen New keys” on page Starts a new screen session.
660)
End (see “dscreen End and Quit keys” on Ends the dscreen utility.
page 660)
Quit (see “dscreen End and Quit keys” on Quits the dscreen utility.
page 660)
Previous (see “dscreen Previous key” on Switches to previous screen.
page 660)
List (see “dscreen List key” on page 660) Lists the dscreen assigned keys and their actions.
The function of each key is dependent on the terminal and the terminal description in the /usr/
lbin/tty/dsinfo file.
# The Cartridge for Expansion (pn: 64F9314) needed for this entry
ibm3151|3151|IBM 3151,
dsks=\E!a^M|Shift-F1|, # Selects first screen
dsks=\E!b^M|Shift-F2|, # Selects second screen
dsks=\E!c^M|Shift-F3|, # Selects third screen
dsks=\E!d^M|Shift-F4|, # Selects fourth screen
dskc=\E!e^M|Shift-F5|, # Creates a new screen
dske=\E!f^M|Shift-F6|\E pA\EH\EJ, # Go to screen 1 and end
dskl=\E!g^M|Shift-F7|, # Lists function keys (help)
dskp=\E!h^M|Shift-F8|, # Go to previous screen
dskq=\E!i^M|Shift-F9|\E pA\EH\EJ, # Go to screen 1 and quit
dsp=\E pA|\EH\EJ, # Terminal sequence for screen 1
dsp=\E pB|\EH\EJ, # Terminal sequence for screen 2
dsp=\E pC|\EH\EJ, # Terminal sequence for screen 3
dsp=\E pD|\EH\EJ, # Terminal sequence for screen 4
dst=10, # Allow 1 second timeout buffer
Any other character preceded by a backslash will yield the character itself. The strings are entered as
type=string, where type is the type of string as listed below, and string is the string value.
It is important that the entry fields in thedsinfo file be separated by commas. If a comma is omitted or
truncated from the end of a dsinfo file entry, the file will become unreadable by the dscreen utility and
an error will be returned to the display.
Item Description
dskx A string type that starts with dsk describes a key. The type must be four letters long, and the
fourth letter x indicates what action is taken when the key is received. The key types are:
Type
Action
dsks
Switch Screens
dskb
Block Input and Output
dske
End dscreen
dskq
Quit dscreen (exit status=1)
dskc
Create New Screen
dskp
Switch to Previous Screen
dskl
List Keys and Actions
Any other key type (that is, a string type dskx that does not end in s, b, e, q, p, or l) will
cause no internal dscreen action, but will show up in the key listing and will be recognized
and acted on. A type of dskn (n for No Operation) should be used when no internal dscreen
action is desired.
The value string for each key has three substrings, which are separated by pipe ( | )
characters.
Note: Use \| to include the | character in one of the substrings.
The first substring is the sequence of characters that the terminal sends when the key is
pressed. The second substring is a label for the key that is printed when a list of keys is
displayed. The third substring is a sequence of characters that dscreen sends to the terminal
when this key is pressed before performing the action this key requests.
dst A String with a type of dst adjusts dscreen's input timeout. The value of the string is a
decimal number. The timeout value is in tenths of seconds and has a maximum value of
255 (default=1 [or 0.1 seconds]).
When dscreen recognizes a prefix of an input key sequence but does not have all the
characters of the sequence, it will wait for more characters to be sent until it is recognizable.
If the timeout occurs before more characters are received, the characters are sent on to
the virtual screen and dscreen will not consider these characters as part of an input key
sequence.
It may be necessary to raise this value if one or more of the keys dscreen is to trigger on is
actually a number of keystrokes (that is assigning Ctrl-Z 1, Ctrl-Z 2, Ctrl-Z 3, etc., for screen
selection and Ctrl-Z N for new screen and so on).
dysinfo examples
The following dysinfo examples are for Wyse-60 with three screen sessions.
dscreen must be run on both computers, with terminal type wy60-1 on the first computer and terminal
type wy60-2 on the second computer (using the -t option to dscreen). The wy60-1 entry will be
examined first.
The first two key entries are unchanged from the original wy60 entry. The third key, however, has type
dskb, which means block both input and output. When this key is pressed, the sequence:
is sent to the terminal; after this output is blocked and dscreen continues scanning input for key
sequences but discards all other input.
The sequence Esc d # puts the terminal in transparent print mode, which echoes all characters up to a
Ctrl-T out through the other serial port.
The characters Ctrl-A b CR are sent out the other serial port, informing the dscreen process on the
other computer that it should activate the window associated with the Shift-F3 key.
The Ctrl-T key sequence exits the transparent print mode. The Esc 9 key sequence causes the terminal to
switch to the other AUX serial port for data communications.
At this point, the other computer takes over, sends an Esc w 2 to switch to the third physical screen, and
then resumes normal communication.
The wy60-2 entry follows the same general pattern for keys Shift-F1 and Shift-F2:
• Switch to transparent print mode
• Send function key string to other computer
• Switch transparent print off
• Switch to the other serial port
The end key, Ctrl-F2, works the same for both computers; it sends the end key sequence to the other
computer through the transparent print mechanism, switches the terminal to window 0, clears the screen,
then exits.
External modem
RS/232
Ethernet Ethernet
LAN
RS/232
Ethernet Device Server (EDS)
(running on a TCP/IP Telnet
network41
AIX LPAR Server that supports RFC 2217)
(RFC 2217 client) External modem
Example:
2. Create a tty device by running the following command. Specify the SoE adapter (sa) device that is
displayed in the command output from step 1 and a TCP port.
Example:
This command creates a tty device in the /dev directory. Any application can use the newly created tty
device to communicate with the target device that is connected to the serial port on an EDS.
Note: Each serial port on an EDS must be configured with a unique TCP port, and each tty device that is
configured by using the SoE device driver must be mapped to this unique port. A tty port on an EDS cannot
be shared by multiple tty devices on the AIX LPAR.
For example, to move a tty terminal device from port 0 to port 1, enter the following command:
chdev -1 ttyX -w 1
To move a tty terminal device from one backing device to another backing device, the name of the target
device name must be specified as an option for the -p flag. A command syntax of the chdev command
follows:
To move a tty terminal device from one physical adapter device such as PCI 2-, 8-, or 128-port adapters
to a SoE device driver (RFC2217 compliant), a TCP port number must be specify through the -a flag as the
port_num attribute.
For example, to move a tty terminal device tty0 from an SA2 serial device to a SA3 serial device, enter the
following command:
The command syntax to move a tty terminal device from a SoE device driver that is backed by an EDS to
another SoE device that is backed by another EDS follows:
For example, to move a tty terminal device from an SA1 serial device (backed by EDS1) to an SA2 serial
device (backed by EDS2), enter the following command:
Tunable Parameters
The following tunables parameters are available to tune some of the attributes that the SoE device driver
uses:
• idle_timeout: Specifies the amount of time, which is measured in half seconds, which the TCP
connection between an SoE device driver and EDS is idle before TCP keepalive probes are sent to
the device. This value corresponds to the TCP network option tcp_keepidle that is set by an SoE
driver for this TCP connection. The default value is 360.
• probe_interval: Specifies the interval, which is measured in half seconds, between TCP keepalive
packets that are sent to validate the TCP connection that is established to EDS. This value corresponds
to the TCP network option tcp_keepintvl that is set by an SoE driver for this TCP connection. The
default value is 10.
• probe_count: Specifies the number of TCP keepalive probes that can be sent to the device before
terminating the TCP connection that is established with the EDS. This value corresponds to the TCP
network option tcp_keepcnt that is set by an SoE driver for this TCP connection. The default value is
24.
Item Description
Application User Resides above the kernel as an application or access method.
Kernel User Resides within the kernel as a kernel process or device manager.
File I/O Subsystem Converts the file-descriptor and file-pointer subroutines to file
pointer accesses of the switch table.
Buffer Pool Provides data-buffer services for the communications subsystem.
Comm I/O Device Driver Controls hardware adapter I/O and direct memory access (DMA)
registers, and routes receive packets to multiple DLCs.
Adapter Attaches to the communications media.
A device manager written in accordance with GDLC specifications runs on all the operating system
hardware configurations containing a communications device driver and its target adapter. Each device
manager supports multiple users above as well as multiple device drivers and adapters below. In general,
users operate concurrently over a single adapter, or each user operates over multiple adapters. DLC
device managers vary based on their protocol constraints.
Figure 43 on page 669 illustrates a multiple user configuration:
This illustration is another view of the kernel level between the application user and the adapter. It shows
multiple entities representing multiple users.
GDLC criteria
A GDLC interface must meet the following criteria.
• Be flexible and accessible to both application and kernel users.
• Have multiple user and multiple adapter capability, allowing protocols to take advantage of multiple
sessions and ports.
• Support both connection-oriented and connectionless services where possible.
• Allow transparent data transfer for special requirements beyond the scope of the DLC device manager in
use.
GDLC interface
Each DLC device manager is a standard /dev entry operating in the kernel as a multiplexed device
manager for a specified protocol.
For an adapter not in use by DLC, each open subroutine to a DLC device manager creates a kernel
process. An open subroutine is also issued to the target adapter device handler. If needed, issue
additional open subroutines for multiple DLC adapter ports of the same protocol. Any open subroutine
targeting the same port does not create additional kernel processes, but links the open subroutine with
the existing process. There is always one kernel process for each port in use.
This illustration shows the internal structure of a DLC device manager. This structure consists of a Write,
I/O Control, Read, Select, and Interrupt Handler. The Device Manager receives information from the user
where it is passed to the various areas before it is passed on to the Device Handler.
lslpp -h dlctype
Item Description
bos.dlc.8023 IEEE Ethernet (802.3) Data Link Control
bos.dlc.ether Standard Ethernet Data Link Control
bos.dlc.fddi FDDI Data Link Control
bos.dlc.sdlc SDLC Data Link Control
bos.dlc.token Token-Ring Data Link Control
Information about an installed DLC can be displayed through the System Management Interface Tool
(SMIT), or the command line. On heavily used systems or communications ports, it might be necessary
to change the DLC attributes to fine-tune the DLC performance. If receive performance is slow, and the
system error log indicates that ring queue overflow is occurring between the DLC and its device handler,
increase the DLC queue depth for incoming data. Finally, it is advisable to remove an installed DLC from
the kernel when it is not needed for a lengthy period of time. This removal does not remove the DLC
from the system, but allows kernel resources to be freed for other tasks until the DLC is needed again.
Instructions for all of these tasks are in “DLC device driver management” on page 673.
Item Description
Null SAP (0x00) Provides some ability to respond to remote nodes even
when no SAP has been enabled. This SAP supports only
connectionless service and responds only to exchange
identification (XID) and TEST Link Protocol Data Units
(LPDUs).
SNA Path Control (0x04) Denotes the default individual SAP address used by
Systems Network Architecture (SNA) nodes.
PC Network NETBIOS (0xF0) Used for all DLC communication that is driven by Network
Basic Input/Output System (NetBIOS) emulation.
Discovery SAP (0xFC) Used by the local area network (LAN) name-discovery
services.
Global SAP (0xFF) Identifies all active SAPs.
GDLC statistics
Both SAP and LS statistics can be queried by a GDLC user.
The statistics for a SAP consist of the current SAP state and information about the device handler.
LS statistics consist of the current station states and various reliability, availability, and serviceability
counters that monitor the activity of the station from the time it is started.
Item Description
Datagram Data Received Routine Called any time a datagram packet is received for
the kernel user.
Exception Condition Routine Called any time an asynchronous event occurs that
must notify the kernel user, such as SAP Closed or
Station Contacted.
I-Frame Data Received Routine Called each time a normal sequenced data packet
is received for the kernel user.
Network Data Received Routine Called any time network-specific data is received
for the kernel user.
XID Data Received Routine Called any time an exchange identification (XID)
packet is received for the kernel user.
The dlcread and dlcselect entry points for DLC are not called by the kernel user because the
asynchronous functional entries are called directly by the DLC device manager. Generally, any queuing
of these events must occur in the user's function handler. If, however, the kernel user cannot handle a
particular receive packet, the DLC device manager may hold the last receive buffer and enter one of two
special user-busy modes:
User-Terminated Busy Mode (I-frame only)
If the kernel user cannot handle a received I-frame (due to problems such as queue blockage), a
DLC_FUNC_BUSY return code is given back, and DLC holds the buffer pointer and enters local-busy
mode to stop the remote station's I-frame transmissions. The kernel user must call the Exit Local Busy
function to reset local-busy mode and start the reception of I-frames again. Only normal sequenced
I-frames can be stopped. XID, datagram, and network data are not affected by local-busy mode.
Timer-Terminated Busy Mode (all frame types)
If the kernel user cannot handle a particular receive packet and wants DLC to hold the receive buffer
for a short period and then re-call the user receive function, a DLC_FUNC_RETRY return code is given
back to DLC. If the receive packet is a sequenced I-frame, the station enters local-busy mode for that
period. In all cases, a timer is started; once the timer expires, the receive data functional entry is
called again.
Note:
1. The SMIT fast path for an Ethernet device manager includes both Standard Ethernet and IEEE 802.3
Ethernet device managers.
2. Details about command line options are provided in the command descriptions for the mkdev, chdev,
trace, trcstop, trcrpt, lsdev, lsattr, and rmdev commands.
3. A DLC must be installed and added before you can list, show, change, or remove its attributes (see
“GDLC data link controls” on page 670). An attribute change is only successful if there are no active
opens against the target DLC. Before issuing the change action, the user might have to stop services
such as SNA, OSI, or NetBIOS from using the DLC.
4. Changing the receive-queue size directly affects system resources. Make this change only if the DLC is
having receive-queue problems, such as sluggish performance or overflows between the DLC and its
device handler.
5. Exercise caution when enabling the monitor trace since it directly affects the performance of the DLCs
and their associates.
6. Removing a DLC is only successful if there are no active opens against the target DLC. Before issuing
the remove action, the user may have to stop services such as SNA, OSI, or NetBIOS from using the
DLC.
PCI adapters
Installation and configuration information for PCI adapters is introduced here.
Topics discussed are support and configuration for the PCI Wide Area Network (WAN) adapters (“2-Port
Multiprotocol HDLC network device driver ” on page 675 and “ARTIC960Hx PCI adapter” on page 676).
Table 114. Tasks for configuring the MPQP COMIO emulation driver
Task SMIT fast path
Add a device driver smit mktsdd
Reconfigure the MPQP COMIO emulation driver smit chtsdd
Remove a device driver smit rmtsdd
Configure a defined device driver smit cfgtsdd
Add a port smit mktsdports
Reconfigure an MPQP COMIO emulation port smit chtsdports
Remove a port smit rmtsdports
Configure a defined port smit cfgtsdports
Trace the MPQP COMIO emulation driver smit trace_link
Asynchronous adapters
The standard, 8-port, and 16-port asynchronous adapters that are listed in this table.
The following table summarizes these products:
Note:
1. Socket accepts 8p RJ-45, 6p RJ-11, or 4p RJ-11 plugs with a reduction in signals supported.
2. RTS is tied high (+12V) in the fanout connector box of the 16-port interface cable EIA 232 (FC 2996).
3. Micro Channel Only.
Each product offering is characterized by a representative scenario for its strengths. The following are
recommendations for each:
Related concepts
TTY terminal device
A tty terminal device is a character device that performs input and output on a character-by-character
basis.
Related information
2-Port Asynchronous EIA-232 PCI Adapter Installation and Using Guide
With no options, stty-cxma displays all special driver settings, modem signals, and all standard
parameters displayed by stty(1) for the tty device referenced by standard input. Command options
are provided to change flow control settings, set transparent print options, force modem control lines, and
display all tty settings. Any unrecognized options are passed to stty(1) for interpretation. The options
are the same as those used for PCI adapters. For more information, see “stty-cxma terminal options” on
page 625.
shutdown -F
2. When the shutdown command completes, turn the system power switch to the off position.
3. Open the system case and insert the 8-port asynchronous adapter into a free Micro Channel slot.
Only those adapters that are in an available state are ready for use by the system.
If the newly installed adapter is not available, then verify:
• The adapter is installed correctly into the Micro Channel slot.
• All necessary cabling is attached and fitted tightly into place.
• Run the command: errpt -a | pg and examine the system error report for problems relating to the
adapters.
• Run the command: cfgmgr -v | pg. This command will attempt to reconfigure the adapter without
rebooting. Observe the paged output for errors.
If running cfgmgr fails, a reboot will be necessary.
The interrupt arbitration logic sets priority for adapters according to the following scheme:
Adapter Priority
1 Highest
2 |
3 |
4 |
5 |
6 |
7 |
8 Lowest
Signal Definition
Tx Data Transmit Data
RTS Request To Send
CTS Clear To Send
DSR Data Set Ready
Rx Data Receive Data
DCD Data Carrier Detect
DTR Data Terminal Ready
RI Ring Indicator
Sig Gnd Signal Ground
Military standard MIL-STD 188 requires that adapters provide the capability to optionally invert the
polarities of the mark and space states of the transmit and receive lines. The capability is provided
independently on each port.
The DUART modem control register bit 3 (Out 2) is used for this purpose. When bit 3 is set to a value of 1,
the polarities for the mark and space states are set to the normal state. When bit 3 is set to a value of 0,
the polarities for the mark and space states are inverted.
The signal is in the space state when the voltage is less than -4 V dc with respect to the signal ground. The
signal is in the mark state when the voltage is greater than +4 V dc with respect to the signal ground.
The region between +4 V dc and -4 V dc is defined as the transition region and is not a valid level. The
voltage that is less than -6 V dc or greater than +6 V dc is also not a valid level.
The electrical characteristics of the 8-Port asynchronous MIL-STD 188 adapter ports conform to those
sections of MIL-STD 188-114 that address an unbalanced voltage interface. The standard is dated March
24, 1976.
The adapter ports meet the functional requirements for asynchronous operation (start-stop protocol) as
described in the EIA Standard 232C dated October 1969 and in the EIA Standard 232D dated January
1987.
Signal Definition
TxA Transmit Data
TxB Transmit Data
RxA Receive Data
RxB Receive Data
Sig Gnd Signal Ground
The 8-Port asynchronous EIA 422A adapter supports indoor cabling up to 1200 m (4000 ft) in length.
Cables of such lengths are susceptible to sudden voltage surges due to induced voltages such as indirect
lightning strikes. Secondary surge protection circuitry is implemented on the EIA 422A adapter to protect
Signal Definition
TxD Transmit Data
RTS Request To Send
CTS Clear To Send
DSR Data Set Ready
RxD Receive Data
DCD Data Carrier Detect
DTR Data Terminal Ready
RI Ring Indicator
Sig Gnd Signal Ground
The electrical characteristics of the 8-Port asynchronous EIA 232 adapter ports conform to the EIA
Standard 232C dated October 1969 and to the EIA Standard 232D dated January 1987.
The adapter ports meet the functional requirements for asynchronous operation (start-stop protocol) as
described in the EIA Standard 232C dated October 1969 and in the EIA Standard 232D dated January
1987.
shutdown -F
2. When the shutdown command completes, turn the system power switch to the "off" position.
3. Open the server case and insert the 16-port asynchronous adapter into a free Micro Channel slot.
4. Attach the 78-pin D-shell connector from the 16-port interface cable to the 16-port adapter.
5. Put cover panels back on the system unit.
Only those adapters in the available state are ready for use by the system.
If the newly installed adapter is NOT available, then verify the following:
1. The adapter is installed correctly into the Micro Channel slot.
2. All necessary cabling is attached and fitted tightly into place.
3. Run the command: errpt -a | pg and examine the system error report for problems relating to the
adapters.
4. Run the command: cfgmgr -v | pg. This command will attempt to reconfigure the adapter without
rebooting. Watch the paged output for errors.
5. If running cfgmgr fails, a reboot will be necessary.
Adapter Priority
0 Highest
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 Lowest
The DUART channels with pending interrupts are serviced according to a fixed-priority scheme. The
highest priority is assigned to port 0. Next in priority is port 1, and so forth. The lowest priority is port 15.
Signal Definition
TxD Transmit data
DCD Data carrier detect
DTR Data terminal ready
RxD Receive data
Sig Gnd Signal ground
The electrical characteristics of the 16-Port asynchronous EIA 232 adapter ports conform to the EIA
Standard 232C dated October 1969 and to the EIA Standard 232D dated January 1987.
The adapter ports meet the functional requirements for asynchronous operation (start-stop protocol) as
described in the EIA Standard 232C dated October 1969 and in the EIA Standard 232D dated January
1987.
Signal Definition
TxA Transmit Data
TxB Transmit Data
RxA Receive Data
RxB Receive Data
Sig Gnd Signal Ground
The 16-Port Asynchronous EIA 422A adapter supports indoor cabling up to 1200 m (4000 ft) in length.
Cables of such lengths are susceptible to sudden voltage surges due to induced voltages such as indirect
lightning strikes. Secondary surge protection circuitry is implemented on the EIA 422A adapter to protect
it from these voltage surges. The surge protection circuitry is implemented on the adapter interface data
lines.
Fail-safe circuitry has been added to the input leads of each EIA 422A receiver to prevent fault conditions
when the receiver is not connected to a driver (open cable). The fail-safe circuitry sets the receiver to the
mark state (binary 1) whenever the receiver is not connected to a driver.
The electrical characteristics of the 16-Port asynchronous EIA 422A adapter ports comply with the EIA
Standard 422A dated December 1978.
Table 124. Conversions between ASCII, decimal, hexadecimal, octal, and binary values
ASCII Decimal Hexadecimal Octal Binary
null 0 0 0 0
start of header 1 1 1 1
start of text 2 2 2 10
end of text 3 3 3 11
end of 4 4 4 100
transmission
enquire 5 5 5 101
TRC_LVL_ERROR = 1,
TRC_LVL_NORMAL = 3,
TRC_LVL_DETAIL = 7
Other standard AIX serviceability features, such as the AIX error log, can be useful for problem
determination. And the serviceability features of the underlying transport layer, such as the ibstat
command and InfiniBand component trace, are also helpful for diagnosing issues.
Item Description
dat_cr_handoff // In DAT 1.2
dat_ep_create_wi // In DAT 1.2
th_srq
dat_ep_recv_quer // In DAT 1.2
y
dat_ep_set_water // In DAT 1.2
mark
dat_srq_create // In DAT 1.2
dat_srq_post_rec // In DAT 1.2
v
dat_srq_resize // In DAT 1.2
dat_srq_set_lw // In DAT 1.2
dat_srq_free // In DAT 1.2
dat_srq_query // In DAT 1.2
Note: Replace entX with roceX if you are using the RoCE stack from a previous version.
b. Select the microcode that is saved in the /etc/microcode directory.
• Long path procedure
a. Enter the following command:
*diag
b. Click:
Task selection > Microcode tasks > Download microcode
.
c. Select entX or roceX.
d. Select the microcode that is saved in the /etc/microcode directory.
By default the adapter is configured to support the AIX RoCE mode. Complete the steps in the “AIX NIC +
OFED RDMA” on page 702 section to change it to the other mode.
2. Delete the entX instances that are related to the PCIe2 10 GbE RoCE Adapter by entering the following
command:
3. If there are one or more converged host bus adapters (hbaX) that are related to the PCIe2 10 GbE
RoCE Adapter, delete them by entering the following command:
4. Run the configuration manager to incorporate the changes by entering the following command:
# cfgmgr
Complete the following steps to switch over to the AIX NIC + OFED RoCE configuration from the AIX RoCE
configuration:
1. Stop all RDMA applications that are running on the PCIe2 10 GbE RoCE Adapter.
2. Delete or redefine the roceX instances by entering one of the following commands:
• # rmdev -d -l roce0
• # rmdev -l roce0
The rmdev -l roce0 command retains the definition of the roce0 configuration so you can use it
the next time to create instances.
3. Change the attribute of the hba stack_type setting from aix_ib (AIX RoCE) to ofed (AIX NIC + OFED
RoCE) by entering the following command:
4. Run the configuration manager tool so that the host bus adapter can configure the PCIe2 10 GbE RoCE
Adapter as a NIC adapter by entering the following command:
# cfgmgr
5. Verify that the adapter is now running in NIC configuration by entering the following command:
# lsdev -C -c adapter
The following example shows the results when you run the lsdev command on the adapter when it is
configured in AIX NIC + OFED RoCE mode:
Figure 45. Example output of lsdev command on an adapter with the AIX NIC + OFED RoCE
configuration
The RDMA mode is set before the en1 or en2 interfaces are configured.
3. You can disable the RDMA mode by entering the following command:
AIX RoCE
The PCIe2 10 GbE RoCE Adapter is preconfigured to operate in the AIX RoCE mode. A network that
uses RDMA provides better performance than an adapter that is used as a NIC for network-intensive
applications. This mode is often helpful for network storage or high-performance computing.
AIX RoCE configuration requires the use of libraries or interfaces such as the following:
• The Direct Access Programming Library (uDAPL), which is used by the DB2® database system
• The Message Passing Interface (MPI), which is used by high performance computing (HPC)
roce_rdmaconfiguration.dita#roce_rdmaconfiguration/figscreenrdma displays the output when the
adapter is running in the AIX RoCE mode.
The PCIe2 10 GbE RoCE Adapter shows only one adapter instance when it is in the AIX RoCE mode, but
it can have up to two ports. Use the ibstat command to determine how many ports are configured by
completing the following steps:
1. Determine whether the icm kernel extension is configured by entering the following command:
2. If the icm kernel is not configured, configure it by entering the following command:
# ibstat roce0
While the PCIe2 10 GbE RoCE Adapter is initially configured to use the AIX RoCE mode, you might need to
switch back from the AIX NIC + OFED RoCE configuration. To switch over from the AIX NIC + OFED RoCE
configuration to the AIX RoCE configuration, complete the following steps:
1. Verify that the adapter is in the AIX NIC + OFED RoCE mode by entering the following command:
# lsdev -C -c adapter
3. Delete or put the NIC instances in a defined state by entering one of the following commands:
• # rmdev -d -l ent1; rmdev -d -l ent2
• # rmdev -l ent1; rmdev -l ent2
5. Run the configuration manager tool so that the host bus adapter can configure the PCIe2 10 GbE RoCE
Adapter as an AIX RoCE adapter by entering the following command:
# cfgmgr
6. Verify that the adapter is now running in the AIX RoCE configuration by entering the following
command:
# lsdev -C -c adapter
The following example shows the results when you run the lsdev command for adapters, and the
adapter is configured in the AIX RoCE mode.
Figure 46. Example output of the lsdev command for the adapters when it is using the AIX RoCE
configuration
Note: If the Ethernet device belongs to the same host bus adapter (for example, hba0, hba1, and
so on), download the firmware to one of the ent devices.
b. Select the microcode that is saved in the /etc/microcode directory.
• Long path procedure
a. Enter the following command:
*diag
b. Click
Task selection > Microcode tasks > Download microcode
.
c. Select entX.
d. Select the microcode that is saved in the /etc/microcode directory.
Example:
The PCIe3 40 GbE RoCE adapter supports only the RoCE version 1 (RoCE v1) protocol. When you enable
the RoCE version 2 (RoCE v2) protocol mode by using the no command, the Remote Direct Memory
Access (RDMA) feature is disabled automatically for the PCIe3 40 GbE RoCE adapter.
For license inquiries regarding double-byte character set (DBCS) information, contact the IBM Intellectual
Property Department in your country or send inquiries, in writing, to:
Such information may be available, subject to appropriate terms and conditions, including in some cases,
payment of a fee.
Portions of this code are derived from IBM Corp. Sample Programs.
© Copyright IBM Corp. _enter the year or years_.
708 Notices
For more information about the use of various technologies, including cookies, for these purposes,
see IBM’s Privacy Policy at http://www.ibm.com/privacy and IBM’s Online Privacy Statement at http://
www.ibm.com/privacy/details the section entitled “Cookies, Web Beacons and Other Technologies”
and the “IBM Software Products and Software-as-a-Service Privacy Statement” at http://www.ibm.com/
software/info/product-privacy.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list of IBM trademarks is available on the web at
Copyright and trademark information at www.ibm.com/legal/copytrade.shtml.
INFINIBAND, InfiniBand Trade Association, and the INFINIBAND design marks are trademarks and/or
service marks of the INFINIBAND Trade Association.
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon,
Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or
its subsidiaries in the United States and other countries.
The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive
licensee of Linus Torvalds, owner of the mark on a worldwide basis.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or
its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Notices 709
710 AIX Version 7.3: Network management
Index
Index 711
adapters (continued) ate.def (continued)
PCI adapters (continued) parameters 649
ARTIC960Hx 676 ate.def file
add to heading subcommands 42 editing 656
add to message subcommands 42 file format 658
adding users to header fields 27 authentication methods
Address Resolution Protocol 142 Kerberos V.4 108
addresses Kerberos V.5 107, 108, 111
TCP/IP 168 Standard AIX 108
addressing mail authentication services
over a BNU or UUCP link 22 PC-NFS 556
to more than one user 20 autodialer connections
to users on a different network 21 device files 454
to users on local system 21 automount daemon
to users on your network 21 NFS (Network File System)
administrative logon file systems 550
BNU 467 autoprint option 39
alias subcommand 35
aliases
creating 35
B
listing 35 banner
Aliases, mail 44 controlling display of 39
alter subcommand 646, 647 Basic Networking Utilities
ARTIC960Hx 676 canceling remote jobs 477
asinfo file 660 communicating between local and remote 468
ask option 35 connected systems 472
askcc option 35 dialing multiple numbers 470
assigned numbers 159 dialing until a connection is made 469
asynchronous exchanging commands 472
options 584 exchanging files 470
asynchronous communication 590 full path names 464
asynchronous overview 582 identifying compatible systems 475
asynchronous point-to-point protocol job queue 472
user-level processes 628 ~[option] path names 464
Asynchronous Point-to-Point Protocol path names 464
configuration 628 printing files 474
asynchronous terminal emulation relative path names 464
command list 657 status of exchanges 472
Connected Main Menu 647 status of operations 472
control key sequences 647 system_name! path names 465
dialing directory 652 system_name!system_name! path names 465
editing default file 656 TCP/IP 102
file format list 658 bcc field 27
starting 646 Bellmail 7
Unconnected Main Menu 646 bellmail command 10
ATE binary mail options 34
command list 657 binding
Connected Main Menu 647 NFS (Network File System) 525
control key sequences 647 BINLD 334
customize 648 biod threads 529
dialing directory 652 BNU
dialing-out 654 canceling remote jobs 477
editing default file 656 communicating between local and remote 468
file format list 658 connected systems 472
overview 644 dialing multiple numbers 470
receiving a file 655 dialing until a connection is made 469
setup 645 exchanging commands 472
starting 646 exchanging files 470
transferring a file 655 full path names 464
troubleshooting 657 identifying compatible systems 475
Unconnected Main Menu 646 job queue 472
ate command 646, 657 ~[option] path names 464
ate.def overview 445
configuration file 649 path names 464
Index 713
commands (continued) configuration (continued)
requesting execution of 472 native 109
rexec 111, 443 TCP/IP 105
rlogin 107, 108, 111, 121, 443 configure
rm 31 8-port ISA 680
rsh 107, 108, 111, 443 ate.def 649
rwho 121, 443 EIA 232 680, 681
securetcpip 109 connect subcommand 646, 647, 657
smit 120, 443 Constant functions 94
spell 28 control key sequences
status 118, 119 ATE 647
talk 115, 443 CAPTURE_KEY 647
telnet 107, 108, 111, 114, 121, 435, 443 MAINMENU_KEY 647
tftp 115, 118, 119, 443 PREVIOUS_KEY 647
tic 435 control subcommands 41, 42
tip 468 creating
tn 111, 443 .forward file 31
tn3270 111, 443 .netrc file 109
touch 434 aliases 35
utftp 118 default folders 39
uucp 470 distribution lists 35
uudecode 470, 471 mail 20
uuencode 470, 471 new message 30
uuname 475 secret mail 32
uupick 470, 471 creating new mail subcommands 41
uupoll 472, 475 crt option 36
uuq 472 ct command 468–470
uusend 470 cu command
uusnap 472 manual modem programming using 632
uustat 472, 477 customer scenarios 588
uuto 470 customize ATE 648
uux 472 customizing
vacation -I 31 mail 33
whois 121, 443 TCP/IP 109
xget 43
xmodem 657
xsend 32, 43
D
Commands d subcommand 16, 39, 41, 43
/usr/sbin/mailstats 53 daemons
bugfiler 101 network services 572
comsat 101 secure NFS 572
mail 7 SRC 529
mailq 46, 101 talkd 115
mailstats 101 TCP/IP 368
mhmail 7 uucico 472, 475
newaliases 45, 101 uutx 472
sendbug 101 uuxqt 472
sendmail 46, 50, 101 Daemons
smdemon.cleanu 101 sendmail
communicating starting 50
between local and remote systems 468 stopping 50
by hardwire or modem 469 syslogd 50
by modem 469 Data access functions 62
using Basic Networking Utilities 468 data link control (DLC)
using BNU 468 device manager environment
communication components 668
asynchronous 590 structure 668
methods 593 generic 668
parameters 591 data terminal equipment 3
serial 588 data terminal ready/data set ready 594
synchronous 589 DCE configuration 109
communications priority 683 DDN 380
configuration dead.letter file
DCE 109 retrieving and appending 26
Index 715
file formats frames 122
ate.def 658 ftp command 107, 108, 115–118, 443
dialing directory 658 full path names 464
file handle
NFS (Network File System) 525
file subcommand 19
G
file systems 519 gateways
file transfer TCP/IP 372
TCP/IP 115 GDLC (generic data link control)
file transfer commands 443 controls
file transfers installing 670
BNU criteria 669
monitoring 474 interface
files implementing 669
.3270keys 109, 110 ioctl operations 670
.forward 30, 31 kernel services 672
.k5login 111 overview 668
.mailrc 11, 33–39 generic data link control 668
.netrc 109 get subcommand 118
.vacation.dir 31 get_auth_methods subroutine 108
.vacation.msg 31
.vacation.pag 31
/usr/share/lib/Mail.rc 33, 34, 37, 38 H
ASCII to binary 470, 471
h subcommand 13, 36, 41
ate.def 646, 647, 656
Hardwired connections
binary to ASCII 470, 471
Devices files for 453
copying from local host to remote host 118
header fields
copying from remote host to local host 117
adding to 26
dead.letter 11
changing 26
decoding 470, 471
listing ignored 38
encoding 470, 471
listing retained 38
exchanging 470
resetting 38
mbox 11
header information
printing 119, 474
adding or changing 26
receiving 471
help subcommand 646, 647, 657
sending 470
help, mail 33
transferring 115
hidden directories
vacation.def 31
BNU 447
Files
hierarchical network 104
/etc/mail/sendmail.cf 52
hop count 372
/etc/mail/statistics 52
host 103
/tmp/traffic 52
host addresses 168
/var/spool/mqueue/log 50
host command 121, 443
Files and directories
host connections
/usr/bin/bellmail 101
local to remote 111
/usr/bin/mail 101
telnet, tn, or tn3270 command 111
/usr/bin/Mail 101
host emulation 5
/usr/bin/mailx 101
host route 371
/usr/bin/rmail 101
/usr/share/lib/Mail.rc 101
/var/spool/mail 101 I
/var/spool/mqueue 101
$HOME/.mailrc 101 identifying compatible systems 475
$HOME/mbox 101 IEEE 802.3ad
finger command 121, 122, 443 managing
flat network 104 Change the Alternate Address 396
flow control 593 List Link Aggregations 395
fmt command 28 IEEE 802.3ad Link Aggregation
folder option 39 managing
folder subcommand 14, 19, 41 Remove 398
forwarding ifconfig command 640
all mail 30 ignore subcommand 35, 38, 41
mail messages 30 ignoring
selected messages 30 date header 38
Index 717
mail (continued) Mail (continued)
forwarding all 30 log file, managing 51
forwarding messages 30 logging 50
forwarding selected messages 30 mailers
help 33 bellmail 7
ignoring date header 38 BNU 7
ignoring from header 38 SMTP (Simple Mail Transfer Protocol) 7
ignoring to header 38 management tasks 43
including files with message 25 message access programs 97
incomplete messages 11 message routing program 7
long messages 36 POP (Post Office Protocol) 97
message list 36 queue
organizing 17 determine processing intervals 49
over a BNU or UUCP link 22 files 46
overview 8 forcing 49
personal mailbox 11 managing 46
queue printing 46
q control file 47 specify processing intervals 48
quitting 16 statistics
ranges of messages 13 statistics 53
reading messages 11, 15 system management overview 7
reading next message 15 traffic, logging 52
reading previous message 15 user interfaces 7
receiving 11 mail command 11, 12, 20–23, 28, 37, 39, 40, 115
receiving secret mail 32 mail editor
replying to 29 displaying a message 24
saving messages with headers 18 displaying lines of a message 24
saving messages without headers 18 editing a message 23
scrolling your mailbox 13 exiting without saving 25
secret mail 32 quitting 25
sending 20, 28 reformatting a message 28
sending secret mail 32 selecting an editor 40
sent messages 39 spell-checking 28
starting 12 starting 23
status 12 starting from the command line 23
storing 10 starting from the mailbox prompt 23
subcommands 40 subcommands 42
subject field 27, 35 MAIL environment variable 11
system commands 40 mail headers
text editors 40 controlling display of 38
to field 27 mail options
top lines of messages 37 binary 34
undeleting messages 16 valued 34
vacation message notices 31 mail program 8, 10
viewing enabled options 34 mailbox
Mail subcommands 41
aliases 44 system 11
aliases database 45 MAILCHECK environment variable 11
commands Mailers
mailq 46 bellmail 7
commands, list of BNU 7
IMAP and POP 102 MAILMSG environment variable 11
debugging 96 MAINMENU_KEY control key sequence 647
files man command 33
/etc/mail/aliases 44 managing TTY devices 595
/etc/mail/sendmail.cf 52 manual modem programming 632
/etc/mail/statistics 52 mapped file support
/etc/netsvc.conf 45 NFS (Network File System) 523
/var/spool/mqueue 46 mbox 11
/var/spool/mqueue/log 50 message handler program 9
files and directories, list of 101 Message handling functions 78
filter 53 message handling subcommands 41
IMAP (Internet Message Access Protocol) 97 Message modification functions 68
installation 7 message number
Index 719
NFS (Network File System) (continued) NFS files (continued)
kernel extension 571 list of 571
mapped files 523 NFS Replication
mount points 542 Global Namespace 533
mounting process 525 NFS servers
mounts hung programs 567
predefined 556 problem determination
types of 524 name resolution 568
network lock manager nfsd daemons
architecture 559 NFS (Network File System) 529
crash recovery process 560 NIC 702
grace period 560 NIC (Network Information Center) 380
how to start 560 NIS_LADP name resolution 187
network file locking process 560 no header option 39
troubleshooting 561 node-attached adapter 585
network services
list of 520
network status monitor 559
O
nfsd daemons options
how to change number of 529 ask 35
overview 519 askcc 35
PC-NFS autoprint 39
authentication services 556 crt 36
print-spooling services 557 editor 40
portmap daemon 528 escape 23
problem determination folder 39
authentication schemes 568 m 471
hard-mounted files 563 no header 39
hung programs 567 p 471
list of commands 562 q 471
permissions 568 quiet 39
soft-mounted files 563 record 39
RPC 528 screen 36
rpc. set folder 11
how to configure 557 toplines 37
rpc.pcnfsd visual 40
how to start 557 organizing mail 17
how to verify accessibility 558
secure NFS
networking daemons 572 P
networking utilities 572
p option 471
servers
p subcommand 15, 39
how to configure 541
P subcommand 38
stateless servers 520
packet 103
system startup
packets 122
how to start 541
parameters
XDR 528
baud rate 591
NFS commands
bits-per-character 591
list of 572
bits-per-second 591
NFS daemons
mark bits 592
command line arguments
parity 591
how to change 529
start 592
controlling 528
stop 592
how to get current status 530
Path MTU discovery 420
how to start 530
path names
how to stop 530
beginning with a tilde 464
locking
BNU 464
list of 572
full 464
secure NFS 572
home directory of user 464
NFS DIO and CIO Support 532
identifying on another system 465
NFS diskless support
identifying through multiple systems 465
SUN
~[option] 464
clients 572
relative 464
NFS files
Index 721
RFC 2574 482 serial (continued)
RFC 2575 482 transmission 588
RFC 791 144 serial line internet protocol 631
rlogin command 107, 108, 111, 121, 443 Serial Optical 165
rm command 31 Serial over Ethernet driver 664
rmail 101 serial ports
RoCE 702, 704 distinguished from system ports 589
route server
definition of 371 TCP/IP 107
routers servers
TCP/IP 372 NFS (Network File System)
routing stateless 520
TCP/IP 371 Servers
routing table 371 configuring IMAP 98
RPC configuring POP 98
NFS 528 service access point 671
rpcinfo command set folder option 11
NFS configuration 558 set folder subcommand 17
rsh command 107, 108, 111, 443 set subcommand 17, 34, 41
RTS/CTS set_auth_methods subroutine 108
definition 593 shell procedures
run-time static configuration 135 BNU 463
rwho command 121, 443 short-hold mode 672
SLIP
activating a connection 638
S configuration 631
s subcommand 17, 18, 41, 43 connection deactivation
SAP (service access point) temporary 638
definition 671 debugging problems 639
statistics questionnaire 642
querying 672 removing an interface 639
saving SMB 577
messages with headers 18 SMB client file system 577
messages without headers 18 SMBCFS 577
scenarios smfi_addheader 69
customer 588 smfi_addrcpt 75
screen option 36 smfi_addrcpt_par 75
Scripts smfi_chgfrom 74
/usr/lib/smdemon.cleanu 51 smfi_chgheader 71
scrolling your mailbox 13 smfi_delrcpt 76
secret mail smfi_getpriv 64
sending and receiving 32 smfi_getsymval 63
subcommands 43 smfi_insheader 72
secret mailbox smfi_main 62
subcommands 43 smfi_opensocket 55
secure rcmds smfi_progress 78
system configuration 108 smfi_quarantine 79
securetcpip command 109 smfi_register 56
security smfi_replacebody 77
BNU 466 smfi_setbacklog 60
selecting a mail editor 40 smfi_setconn 58
send subcommand 647, 657 smfi_setdbg 60
sending smfi_setmlreply 67
files 470 smfi_setpriv 65
mail 20, 28 smfi_setreply 65
secret mail 32 smfi_setsymlist 95
sendmail smfi_settimeout 59
filter 53 smfi_stop 61
Sendmail smfi_version 95
starting 50 smit command 120, 443
stopping 50 SMTP (Simple Mail Transfer Protocol 7
sendmail program 8 SNMP
serial introduction 482
communication 588 SNMPv1
Index 723
subcommands (continued) TCP/IP (continued)
terminate 647, 657 addresses (continued)
top 37, 38, 41 local loopback 172
u 16, 41 network 168
unalias 35 subnet 170
unset 34, 35 subnet masks 171
v 23, 24 zeros 170
w 17, 18, 41, 43 BINLD 334
x 17, 41 BNU
z 13, 36 devices files 455
subject field 27 BNU connections 466
subroutines client 103
get_auth_methods 108 client network services 370
kvalid_user 109 commands
set_auth_methods 108 file transfer 115
subservers list of 107
TCP/IP 369, 444 configuration 105
subsystems copying files 116, 118
TCP/IP 369, 444 daemons
synchronization 589 how to configure gated 377
synchronous communication 589 how to configure routed 377
SYSLOG Facility 100 inetd 369
system commands SRC (System Resource Controller) 434
sending secret mail 43 subservers 444
system mailbox 11 subsystems 444
system ports displaying logged-in users 121, 122
distinguished from serial ports 589 enqueuing a job with enq command 120
system_name! path names 465 enqueuing jobs using smit 120
system_name!system_name! path names 465 examples
BNU configuration 455
file transfer commands 116, 118, 443
T File Transfer Protocol (FTP) 115
t subcommand 15, 36, 38, 41 frames
T subcommand 38 definition 122
talk command 115, 443 host 103
talkd daemon 115 host connections 111
TCP/IP hosts 106
/etc/gated.conf 377 installation 105
/etc/gateways 377, 433 installation and configuration key set 110
/etc/hosts 104, 106, 173, 177, 179, 431 interfaces 162
/etc/named.boot 180 Internet Protocol Version 6 123
/etc/named.ca 180 key set 110
/etc/named.data 180 list of commands 440
/etc/named.local 180 list of daemons 444
/etc/named.rev 180 mail command 102
/etc/networks 377, 433 mail server 182
/etc/protocols 159 Message Handling commands 102
/etc/rc.net 105 methods 445
/etc/rc.tcpip 368, 377 name resolution
/etc/resolv.conf 177, 180, 431 how to perform local 179
/etc/sendmail.cf 177, 182 planning for domain 180
/etc/services 159 process 177
/etc/syslog.conf 432 troubleshooting 431
/usr/lib/sendmail.cf 182 name server
addresses configuration files 180
broadcast 172 how to configure host to use 184
class A 168 how to configure mail server 182
class B 169 zone of authority 174
class C 169 naming
comparison 172 authority 173
DHCP 188 conventions 174
DHCP proxy daemon 297 DNS (Domain Name Service) 173
host 168 domain 173
local 168 flat network 104, 173
Index 725
tftp command 115, 118, 119, 443 uucico daemon 465, 472, 475
tic command 435 uuclean command 463
tip command uucleanup command 463
configuring 476 UUCP 468
overview 475 UUCP (UNIX-to-UNIX Copy Program) 445, 467
variables uucp command 470
order of use 475 uucpd daemon 466
tn command 111, 443 uudecode command 470, 471
tn3270 command 111, 443 uudemon.admin command 463
to field 27 uudemon.cleanu command 463
Token-Ring 164 uuencode command 470, 471
top subcommand 37, 38, 41 uuname command 475
toplines option 37 uupick command 470, 471
topology uupoll command 463, 472, 475
overview 588 uuq command 463, 472
touch command 434 uusched daemon 466
transferring uusend command 470
files 115 uusnap command 463, 472
spooled jobs 475 uustat command 463, 472, 477
transferring a file with ATE 655 uuto command 470
Transmission Control Protocol 152 Uutry command 473, 474
Transmission Control Protocol/Internet Protocol 104 uutx daemon 472
transmitter on/transmitter off 594 uux command 472
Trivial File Transfer Protocol 118 uuxqt daemon 466, 472
troubleshooting
ATE 657
EtherChannel 405
V
Troubleshooting v subcommand 23, 24
SNMPv1 517 vacation message notices 31
SNMPv3 498 vacation-I command 31
TTY 597 vacation.def file 31
TTY valued mail options 34
configuring SLIP over a modem 634 variables
configuring SLIP over a Null Modem Cable 636 tip command
definition 594 order of use 475
examples 594 vi editor 23, 40
managing 595 viewing enabled mail options 34
tasks VIPA (Virtual IP Address) 383
setting tty characteristics 595 Virtual IP Address (VIPA) 383
using the Multiple Screen utility 658 visual option 40
troubleshooting
error log information 599
tty log identifiers 599 W
w subcommand 17, 18, 41, 43
U WAN (Wide Area Network) description 3
whois command 121, 443
u subcommand 16, 41 writing ftp macros 110
umount command
NFS (Network File System)
file systems 556 X
unalias subcommand 35
x subcommand 17, 41
undeleting messages 16
XDR
UNIX-to-UNIX copy program 445
NFS (Network File System) 528
unset subcommand 34, 35
xmodem protocol 657
User Datagram Protocol 147
XON/XOFF
user validation
definition 594
Kerberos V.5 109
xsend command 32
users
xtab file 527
adding to message header fields 27
xxfi_abort callback 90
utftp command 118
xxfi_body 89
utilities
xxfi_close 91
network services 572
xxfi_connect 82
NFS
xxfi_data 86
secure 572
Z
z subcommand 13, 36
Index 727
728 AIX Version 7.3: Network management
IBM®