AIX Version 7 - IBM · AIX Version 7 - IBM ... management - [PDF Document] (2024)

  • AIX Version 7.2

    Network management

    IBM

  • Note

    Before using this information and the product it supports, readthe information in “Notices” on page715.

    This edition applies to AIX Version 7.2 and to all subsequentreleases and modifications until otherwise indicated inneweditions.

    Copyright © 2011 IBM Corporation and its licensors, includingSendmail, Inc., and the Regents of the University ofCalifornia. Allrights reserved.© Copyright International Business MachinesCorporation 2015, 2019.US Government Users Restricted Rights – Use,duplication or disclosure restricted by GSA ADP Schedule ContractwithIBM Corp.

  • Contents

    About thisdocument............................................................................................viiHighlighting.................................................................................................................................................viiCase-sensitivityinAIX................................................................................................................................viiISO9000.....................................................................................................................................................vii

    Networkmanagement...........................................................................................1What'snew...................................................................................................................................................1Communications and networks..................................................................................................................1

    Communications.....................................................................................................................................1Networks................................................................................................................................................2Physicalnetworks..................................................................................................................................3Networksystems....................................................................................................................................4Communicationwith other operatingsystems......................................................................................6Hostemulationapplications..................................................................................................................6Communications systemcommands.....................................................................................................7

    Mailmanagement.........................................................................................................................................9Mailuser-agentprograms....................................................................................................................10Mailfunctions.......................................................................................................................................12Mail managementtasks.......................................................................................................................45Mailaliases...........................................................................................................................................46Mailqueue............................................................................................................................................48Maillogging...........................................................................................................................................52Thesendmail Mail FilterAPI................................................................................................................55Debug flags forsendmail.....................................................................................................................98Internet Message Access Protocol and Post OfficeProtocol..............................................................99Mailmanagement commands...........................................................................................................102Mailfiles anddirectories....................................................................................................................103IMAPand POPcommands.................................................................................................................104

    Transmission Control Protocol/Internet Protocol.................................................................................104TCP/IPterminology............................................................................................................................105Planning your TCP/IP network..........................................................................................................106InstallationofTCP/IP.........................................................................................................................106ConfigurationofTCP/IP.....................................................................................................................106Authentication and the securercmds...............................................................................................109TCP/IPcustomization........................................................................................................................111Methods for communicating with other systems andusers.............................................................113Filetransfers......................................................................................................................................116Printing files to a remotesystem.......................................................................................................120Printingfiles from a remotesystem..................................................................................................122Displaying statusinformation............................................................................................................122TCP/IPprotocols................................................................................................................................123TCP/IP local area network adaptercards..........................................................................................160TCP/IPnetworkinterfaces.................................................................................................................163TCP/IPaddressing..............................................................................................................................168TCP/IPnameresolution.....................................................................................................................173Planningand configuring for LDAP name resolution (IBM SecureWay Directoryschema)............. 201Planning and configuring NIS_LDAP nameresolution (RFC 2307 schema)....................................202TCP/IP address and parameter assignment - Dynamic HostConfiguration Protocol..................... 204Dynamic HostConfiguration Protocol version 6...............................................................................290PrebootExecution Environment Proxy DHCP daemon....................................................................313

    iii

  • Boot Image Negotiation Layerdaemon.............................................................................................350TCP/IPdaemons................................................................................................................................384TCP/IProuting....................................................................................................................................387MobileIPv6........................................................................................................................................396Virtual IPaddress...............................................................................................................................398EtherChanneland IEEE 802.3ad LinkAggregation...........................................................................401InternetProtocol over InfiniBand(IPoIB).........................................................................................420iSCSIsoftware initiator and softwaretarget.....................................................................................423Stream Control TransmissionProtocol.............................................................................................429Path MTUdiscovery............................................................................................................................434TCP/IPQuality ofService...................................................................................................................435TCP/IPtroubleshooting......................................................................................................................445TCP/IPcommands.............................................................................................................................454File transfercommands.....................................................................................................................456Remote logincommands...................................................................................................................457Statuscommands..............................................................................................................................457Remote communicationcommand...................................................................................................457Printcommands.................................................................................................................................457TCP/IPdaemons................................................................................................................................457Devicemethods..................................................................................................................................459Requestforcomments.......................................................................................................................459

    Basic Networking Utilities......................................................................................................................459How BNUworks.................................................................................................................................459BNU file and directorystructure........................................................................................................460ConfiguringBNU.................................................................................................................................462BNUmaintenance..............................................................................................................................475BNU pathnames................................................................................................................................477BNUdaemons....................................................................................................................................478BNUsecurity.......................................................................................................................................480Communicationbetween local and remotesystems........................................................................482Fileexchanges between local and remotesystems.........................................................................483Command and file exchange statusreports......................................................................................485Commandexchanges between local and remotesystems..............................................................486BNUtroubleshooting..........................................................................................................................490

    SNMP for networkmanagement.............................................................................................................495SNMPv3..............................................................................................................................................496SNMPv1..............................................................................................................................................513

    Network FileSystem................................................................................................................................532NFSservices.......................................................................................................................................532NFSAccess Control Listssupport......................................................................................................533CacheFile Systemsupport................................................................................................................534NFS mapped filesupport...................................................................................................................535NFS proxyserving..............................................................................................................................536Types of NFSmounts.........................................................................................................................536NFS exporting andmounting.............................................................................................................537/etc/exportsfile..................................................................................................................................538/etc/xtabfile.......................................................................................................................................539/etc/nfs/hostkeyfile...........................................................................................................................539/etc/nfs/local_domainfile..................................................................................................................539/etc/nfs/realm.mapfile......................................................................................................................539/etc/nfs/princmapfile........................................................................................................................540/etc/nfs/security_defaultfile.............................................................................................................540Remote Procedure CallProtocol.......................................................................................................540eXternal Data RepresentationProtocol.............................................................................................540portmapdaemon................................................................................................................................541NFSapplications andcontrol.............................................................................................................541NFSversion 4support........................................................................................................................543NFSserver graceperiod.....................................................................................................................544

    iv

  • NFS DIO and CIOsupport..................................................................................................................544NFSreplication and globalnamespace.............................................................................................545NFS server-clientdelegation.............................................................................................................551STNFS short-term network filesystems...........................................................................................552Checklist for configuringNFS.............................................................................................................553Startthe NFS daemons at systemstartup........................................................................................553Configuring an NFSserver..................................................................................................................554Configuringan NFSclient...................................................................................................................554Identitymapping................................................................................................................................555Exportingan NFS filesystem.............................................................................................................555Setting up a network forRPCSEC-GSS..............................................................................................556Unexporting an NFS filesystem.........................................................................................................559Changingan exported filesystem.....................................................................................................559Root user access to an exported filesystem....................................................................................560Mounting an NFS file systemexplicitly..............................................................................................560Automountsubsystem.......................................................................................................................561Establishingpredefined NFSmounts................................................................................................563Unmounting an explicitly or automatically mounted filesystem.....................................................568Removing predefined NFSmounts....................................................................................................568PC-NFS...............................................................................................................................................568LDAP automountmaps......................................................................................................................570WebNFS..............................................................................................................................................571Networklockmanager.......................................................................................................................571NFSsecurity.......................................................................................................................................574NFStroubleshooting..........................................................................................................................574NFSfiles..............................................................................................................................................583NFScommands..................................................................................................................................583NFSdaemons.....................................................................................................................................584NFSsubroutines.................................................................................................................................585

    SMBprotocol...........................................................................................................................................585Server Message Block (SMB) filesystem..........................................................................................585Server Message Block (SMB) client filesystem................................................................................588

    Asynchronouscommunications..............................................................................................................591Non-POSIX linespeeds......................................................................................................................592Asynchronousadapters.....................................................................................................................592Asynchronous communicationsoptions...........................................................................................592Product selectionconsiderations......................................................................................................594Topologyconsiderations....................................................................................................................597Serialcommunication........................................................................................................................597TTY terminaldevice...........................................................................................................................603Modems.............................................................................................................................................613stty-cxma terminaloptions................................................................................................................633AsynchronousPoint-to-Point Protocolsubsystem...........................................................................635Serial Line InternetProtocol..............................................................................................................639AsynchronousTerminalEmulation....................................................................................................651Dynamicscreenutility........................................................................................................................665Serialover Ethernet devicedriver.....................................................................................................671

    Generic data link controlenvironment...................................................................................................675GDLCcriteria......................................................................................................................................676GDLCinterface...................................................................................................................................676GDLC data linkcontrols......................................................................................................................677GDLCinterface ioctl entry pointoperations......................................................................................677GDLC special kernelservices.............................................................................................................679DLCdevice drivermanagement.........................................................................................................680

    Communications and networks adaptersreference..............................................................................682PCIadapters.......................................................................................................................................682Asynchronousadapters.....................................................................................................................683

    uDAPL (user-level Direct Access ProgrammingLibrary)........................................................................706

    v

  • uDAPL APIs supported inAIX............................................................................................................707Vendor-specificattributes foruDAPL................................................................................................707

    PCIe2 10 GbE RoCE Adaptersupport.....................................................................................................708AIXNIC + OFEDRDMA.......................................................................................................................709AIXRoCE............................................................................................................................................711

    PCIe3 40 GbE RoCE Adaptersupport.....................................................................................................712

    Notices..............................................................................................................715Privacypolicyconsiderations..................................................................................................................716Trademarks..............................................................................................................................................717

    Index................................................................................................................719

    vi

  • About this document

    This document provides application programmers with completeinformation about enabling applicationsfor globalization for theAIX® operating system. It also provides system administrators withcompleteinformation about enabling networked environments forglobalization for the AIX operating system.Programmers and systemadministrators can use this document to gain knowledge ofglobalizationguidelines and principles. Topics include locales,code sets, input methods, subroutines, converters,charactermapping, culture-specific information, and the messagefacility.

    HighlightingThe following highlighting conventions are used inthis document:

    Item Description

    Bold Identifies commands, subroutines, keywords, files,structures, directories, and otheritems whose names are predefinedby the system. Also identifies graphical objectssuch as buttons,labels, and icons that the user selects.

    Italics Identifies parameters whose actual names or values areto be supplied by the user.

    Monospace Identifies examples of specific data values, examplesof text similar to what youmight see displayed, examples ofportions of program code similar to what you mightwrite as aprogrammer, messages from the system, or information youshouldactually type.

    Case-sensitivity in AIXEverything in the AIX operating system iscase-sensitive, which means that it distinguishes betweenuppercaseand lowercase letters. For example, you can use the ls command tolist files. If you type LS,the system responds that the command isnot found. Likewise, FILEA, FiLea, and filea are threedistinct filenames, even if they reside in the same directory. To avoid causingundesirable actions to beperformed, always ensure that you use thecorrect case.

    ISO 9000ISO 9000 registered quality systems were used in thedevelopment and manufacturing of this product.

    © Copyright IBM Corp. 2015, 2019 vii

  • viii AIX Version 7.2: Network management

  • Network managementThis topic collections helps systemadministrators and users to perform a variety ofnetworkcommunications tasks. System administrators can findinformation in this topic collection about how toperform tasks suchas configuring TCP/IP settings, improving network security, andmonitoring yoursystem. Users can find complete information abouthow to perform tasks such as using communicationsapplications andservices for the operating system.

    What's new in Network managementRead about new or significantlychanged information for the Network management topiccollection.

    How to see what's new or changed

    To help you see where technical changes have been made, theinformation center uses:

    • The image to mark here new or changed information begins.

    • The image to mark where new or changed information ends.

    November 2019

    The following information is a summary of updates made to thistopic collection:

    • Added information about the submit.cf file in the followingtopics:

    – “Mail management” on page 9– “Mail files and directories” onpage 103– “Starting the sendmail daemon during system boot” on page45

    • Added information about the “Serial over Ethernet devicedriver” on page 671. You can create virtualserial device andteletype devices in the AIX logical partitions by using an EthernetDevice Server (EDS).

    • Added information about support for multiple iSCSI softwareinitiators in the following topics:

    – “Configuring multiple iSCSI software initiator devices” onpage 425– “Configuring iSCSI software initiator ” on page 423

    Communications and networksUnderstanding the general principlesof computer networking has a conceptual foundation.Systemadministrators unfamiliar with general networking principlesneed to read this topic. Those familiar withUNIX networking cansafely skip this topic.

    A network is the combination of two or more computers and theirconnecting links. A physical network isthe hardware (equipment suchas adapter cards, cables, and telephone lines) that makes up thenetwork.The software and the conceptual model make up the logicalnetwork. Different types of networks andemulators provide differentfunctions.

    CommunicationsNetworks allow for several user and applicationcommunication functions.

    For example, they enable a user to do the following:

    • Send electronic mail (e-mail)• Emulate another terminal or login to another computer• Transfer data

    © Copyright IBM Corp. 2015, 2019 1

  • • Run programs that reside on a remote node.

    One of the most popular applications for computer networks isemail, which allows a user to send amessage to another user. Thetwo users may be on the same system (in which case acommunicationsnetwork is not needed), different systems indifferent buildings, or even in different countries. Theunderlyinglayers of software and hardware, as well as the physical network,allow a user to generate,send, receive, and process messages,letters, memos, invitations, and data files. Thesecommunicationscan be to or from any other user who resides on thephysical network. Electronic mail has the capabilityfor messageannotation, message sequencing, message packing, date sorting, andmail foldermanagement.

    Through a communications network, one computer can emulate, ormimic, another and accessinformation as if it were a different typeof computer or terminal. Remote login capabilities providesuserswith an interactive command line interface to log in to aremote system and access the same programsand files as if they wereusing the machine locally.

    Networks also allow for the transfer of data from one system toanother. Files, directories, and entire filesystems can be migratedfrom one machine to another across a network, enabling remotebackup of data,as well as assuring redundancy in case of machinefailure. Password protection is usually provided as partof theprotocol. With a file transfer, there is a client/serverrelationship between the user initiating therequest and the remotesystem the user is accessing. Often a file transfer protocolincludes functions fordisplay and control so that users withread/write access can display, define, or delete filesanddirectories.

    Several different protocols exist that allow users andapplications on one system to invoke proceduresand applications onother systems. This can be useful for a number of environments,including theoffloading of many computer-intensive routines inengineering and scientific applications.

    NetworksThe complexity of modern computer networks has givenrise to several conceptual models for explaininghow networkswork.

    One of the most common of these models is the InternationalStandards Organization's Open SystemsInterconnection (OSI)Reference Model, also referred to as the OSI seven-layer model.

    The seven layers of the OSI model are numbered as follows:

    Item Description

    7 Application

    6 Presentation

    5 Session

    4 Transport

    3 Network

    2 Data Link

    1 Physical

    Levels 1 through 3 are network-specific, and differ depending onwhat physical network you are using.Levels 4 through 7 comprisenetwork-independent, higher-level functions. Each layer describesaparticular function (instead of a specific protocol) that occursin data communications. The seven layersfunction from lowest level(machine level) to highest level (the level at which most humaninteractiontakes place), as follows:

    Item Description

    Application Comprises the applications that use the network.

    Presentation Ensures that data is presented to the applicationsin a consistent fashion.

    2 AIX Version 7.2: Network management

  • Item Description

    Session Manages the connections between applications.

    Transport Ensures error-free data transmission.

    Network Manages the connections to other machines on thenetwork.

    Data Link Provides reliable delivery of data across the physicallayer (which is usuallyinherently unreliable).

    Physical Describes the physical media of the network. Forexample, the fiber optic cablerequired for a Fiber Distributed DataInterface (FDDI) network is part of thephysical layer.

    Note: While the OSI Reference Model is useful for discussingnetworking concepts, many networkingprotocols do not closely followthe OSI model. For example, when discussing TransmissionControlProtocol/Internet Protocol (TCP/IP), the Application andPresentation layer functions are combined, asare the Session andTransport layers and the Data Link and Physical layers.

    Each layer in the OSI model communicates with the correspondinglayer on the remote machine as shownin the OSI Reference Modelfigure.

    Figure 1. OSI Reference Model

    This illustration shows the various communication levels of theOSI Model as described in the above text.

    The layers pass data only to the layers immediately above andbelow. Each layer adds its own headerinformation (and footerinformation, in the case of the Data Link), effectivelyencapsulating theinformation received from the higher layers.

    Individual users as well as organizations use networks for manyreasons, including:

    • Data entry• Data queries• Remote batch entry• Resourcesharing• Data sharing• Electronic mail.

    Data entry consists of entering data directly into either localor remote data files. Increased accuracy andefficiency are naturalby-products of a one-step data transfer. Data queries entailsearching data files forspecified information. Data updatinginvolves altering, adding, or deleting data stored in local orremotefiles. Remote batch entry consists of entering batches ofdata from a remote location, an activity oftenperformed at night orduring periods of low system usage. Because of such diversecapabilities,communications and networks are not only desirable butnecessary.

    Sharing resources is another function of networks. Users canshare data as well as programs, file-storagespace, and peripheraldevices like printers, modems, terminals, and fixed disks. Sharingof systemresources is cost effective because it eliminates theproblems of keeping multiple copies of programs andit keeps dataconsistent (in the case of program and file sharing).

    Physical networksThe physical network consists of the cables(coaxial cable, twisted pair, fiber optic, and telephone lines)thatconnect the different hardware residing on the network, the adaptercards used on computers

    Network management 3

  • connected to the network (hosts), and any concentrators,repeaters, routers, or bridges used in thenetwork.

    Physical networks vary both in size and in the type of hardwareused. The two common kinds of networksare local area networks(LANs) and wide area networks (WANs). A LAN is a networkwherecommunications are limited to a moderately sized geographicarea of 1 to 10 km (1 to 6 miles), such as asingle office building,warehouse, or campus. A WAN is a network providing datacommunicationscapability throughout geographic areas larger thanthose serviced by LANs, such as across a country oracrosscontinents. An intermediate class of networks exists also, calledmetropolitan area networks(MANs). This guide does not generallydistinguish MANs; they are grouped with WANs.

    LANs commonly use Standard Ethernet, IEEE 802.3 Ethernet, ortoken-ring hardware for the physicalnetwork, while WANs andasynchronous networks use communications networks provided bycommoncarrier companies. Operation of the physical network in bothcases is usually controlled by networkingstandards fromorganizations such as the Electronics Industry Association (EIA) orthe InternationalTelecommunication Union (ITU).

    Network systemsAll network communications involve the use ofhardware and software. The system hardware andsoftwarecommunications support is determined by the hardware being used andthe software necessaryto run that hardware and interface with thenetwork.

    Hardware consists of the physical equipment connected to thephysical network. Software consists of theprograms and devicedrivers pertaining to the operation of a particular system. Thesystem hardwareconsists of adapter cards or other devices thatprovide a path or interface between the system softwareand thephysical network. An adapter card requires an input/output (I/O)card slot in the system. Theadapter card connects the data terminalequipment (DTE) to the data circuit-terminating equipment(DCE);that is, it provides physical local addressing to a DTE port.Other devices, such as modems, can beattached to one of thestandard ports on the computer.

    An adapter card prepares all inbound and outbound data; performsaddress searches; provides drivers,receivers, and surge protection;supports different interfaces; and in general relieves thesystemprocessor of many communications tasks. Adapter cards supportthe standards required by the physicalnetwork (for example, EIA232D, Smartmodem, V.25 bis, EIA 422A, X.21, or V.35) and may, atthe sametime, support software protocols, for example, synchronousdata link control (SDLC), high-level data linkcontrol (HDLC), andbisynchronous protocols. If the adapter does not contain softwaresupport, then thissupport must be provided by the adapter devicedriver.

    ProtocolsAll communications software use protocols, sets ofsemantical and syntactical rules that determine thebehavior offunctional units in achieving communication.

    Protocols define how information is delivered, how it isenclosed to reach its destination safely, and whatpath it follows.Protocols also coordinate the flow of messages and theiracknowledgments.

    Protocols exist at different levels within the kernel and cannotbe manipulated directly. However, they aremanipulated indirectly bywhat the user chooses to do at the application programminginterface (API)level. The choices a user makes when invoking filetransfer, remote login, or terminal emulation programsdefine theprotocols used in the execution of those programs.

    AddressesAddresses are associated with both software andhardware. The address is the means by which thesending or controlstation selects the station to which it sends data.

    Addresses identify receiving or storage locations. A physicaladdress is a unique code assigned to eachdevice or workstationconnected to a network.

    For example, on a token-ring network, the netstat -iv commanddisplays the token-ring card address.This is the physical networkaddress. The netstat -iv command also displays class-level anduser-level address information. Addresses are often defined bysoftware but can be created by the user aswell.

    4 AIX Version 7.2: Network management

  • DomainsAn aspect of addresses common to many communicationsnetworks is the concept of domains. Domainsput the data processingresources in a network under a common control.

    For example, the structure of the Internet illustrates howdomains define the Internet Protocol (IP)address. The Internet isan extensive network made up of many different smaller networks. Tofacilitaterouting and addressing, Internet addresses arehierarchically structured in domains, with very broadcategories atthe top such as com for commercial users, edu for educationalusers, and gov forgovernment users.

    Within the com domain are many smaller domains corresponding toindividual businesses; for example,ibm. Within the ibm.com domainare even smaller domains corresponding to the Internet addressesforvarious locations, such as austin.ibm.com or raleigh.ibm.com. Atthis level, we start seeing namesof hosts. A host, in this context,is any computer connected to the network. Withinaustin.ibm.com,there may be hosts with the names hamlet and lear,which are addressed hamlet.austin.ibm.comandlear.austin.ibm.com.

    Gateways and bridgesA wide variety of networks reside on theInternet, often using different hardware and runningdifferentsoftware. Gateways and bridges enable these differentnetworks to communicate with each other.

    A bridge is a functional unit that connects two LANs thatpossibly use the same logical link control (LLC)procedure, such asEthernet, but different medium access control (MAC) procedures. Agateway has abroader range than a bridge. It operates above thelink layer and, when required, translates the interfaceand protocolused by one network into those used by another distinct network.Gateways allow datatransfers across the various networks thatconstitute the Internet.

    Data routingUsing domain names for addressing and gateways fortranslation greatly facilitates the routing of the databeingtransferred. Routing is the assignment of a path by which a messagereaches its destination.

    The domain name effectively defines the message destination. Ina large network like the Internet,information is routed from onecommunications network to the next until that information reachesitsdestination. Each communications network checks the domain nameand, based on the domains withwhich that network is familiar,routes the information on to the next logical stop. In this way,eachcommunications network that receives the data contributes tothe routing process.

    Local and remote nodesA physical network is used by the hoststhat reside on that network. Each host is a node on the network.Anode is an addressable location in a communications network thatprovides host-processing services. Theintercommunication of thesevarious nodes are defined as local or remote.

    Local pertains to a device, file, or system accessed directlyfrom your system, without the use of acommunications line. Remotepertains to a device, file, or system accessed by your system overacommunications line. Local files reside on your system, whileremote files reside on a file server or atanother node with whichyou communicate using a physical network, for example, Ethernet,token-ring,or phone lines.

    Client and serverA server is a computer that contains data orprovides facilities to be accessed by other computers onthenetwork. A client is a computer requesting services or data froma server.

    Common server types are file servers, which store files; nameservers, which store names and addresses;and application servers,which store programs and applications; print servers, whichschedule and directprint jobs to their destination.

    A client can request updated program code or the use ofapplications from a code server. To obtain aname or address, aclient contacts a name server. A client could also request filesand data for data entry,inquiry, or record updating from a fileserver.

    Network management 5

  • Communication with other operating systemsDifferent types ofcomputers can be connected on a network. The computers can be fromdifferentmanufacturers or be different models from the samemanufacturer. Communication programs bridge thedifferences inoperating systems of two or more types of computers.

    Sometimes these programs require that another program haspreviously been installed on the network.Other programs may requirethat such communications connectivity protocols as TCP/IP orSystemsNetwork Architecture (SNA) exist on the network.

    Host emulation applicationsAn emulator is a software applicationthat allows your system to function as if you were using adifferentterminal or printer.

    A terminal emulator connects to a host system to access data orapplications. Some terminal emulatorsprovide a facility to transferfiles to and from the host. Others provide an applicationprogramminginterface (API) to allow program-to-programcommunication and automation of host tasks.

    A printer emulator allows the host either to print files on alocal printer or store them in printable form tobe printed oredited later.

    Several applications are available to allow your system toemulate other types of terminals. This topicprovides information onterminal or printer emulators.

    Note: The bterm command emulates terminals in bidirectional(BIDI) mode.

    TCP/IP commands for emulationThe Transmission ControlProtocol/Internet Protocol (TCP/IP) software includes the telnetand rlogincommands, which allow you to connect to and access aremote TCP/IP system.

    Item Description

    telnet Allows a user to log in to a remote host by implementingthe TELNET protocol. Itis different from the rlogin command in thatit is a trusted command. A trustedcommand is one that meets allsecurity levels configured on your computer.Systems that requireextra security should allow only trusted commands.Standards fortrusted commands, processes, and programs are set andmaintained bythe 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 differentfrom the telnetcommand in that it is a nontrusted command and canbe disabled if your systemneeds extra security.

    For more information about TCP/IP, see “Transmission ControlProtocol/Internet Protocol ” on page 104.

    BNU commands for emulationThe Basic Networking Utilities (BNU)software includes the ct, cu, and tip commands, which allow youtoconnect to a remote system that uses the AIX operating system.

    Item Description

    ct Enables a user on a remote terminal, such as a 3161, tocommunicate with anotherterminal over a telephone line. The user onthe remote terminal can then log in and workon the otherterminal.

    The ct command is similar to the cu command but not as flexible.For example, youcannot issue commands on the local system whileconnected to a remote system throughthe ct command. However, youcan instruct the ct command to continue dialing until theconnectionis established or to specify more than one telephone number at atime.

    6 AIX Version 7.2: Network management

  • Item Description

    cu Connects your terminal to another terminal connected toeither a UNIX or non-UNIXsystem.

    After the connection is established, you can be logged in onboth systems at the sametime, executing commands on either onewithout dropping the BNU communication link.If the remote terminalis also running under UNIX, you can transfer ASCII files betweenthetwo systems. You can also use the cu command to connect multiplesystems, andcommands can then be executed on any of the connectedsystems.

    tip Connects your terminal to a remote terminal and enables youto work on the remoteterminal as if logged in directly.

    You can use the tip command to transfer files to and from theremote system. You canuse scripting to record the conversations youhave with the tip command.

    Note: You must have a login on the remote system to use the tipcommand.

    For more information about BNU, see “Basic Networking Utilities” on page 459.

    Asynchronous Terminal EmulationThe Asynchronous TerminalEmulation (ATE) program enables your terminal to connect to mostsystemsthat support asynchronous terminals, including any systemthat supports RS-232C or RS-422Aconnections.

    ATE allows the remote system to communicate with your terminaleither as an asynchronous display or asa DEC VT100 terminal.

    ATE enables you to run commands on the remote system, send andreceive files, and check the dataintegrity in the files transferredbetween systems. You can also use a capture file to record, orcapture,incoming data from the remote system. ATE is menu-drivenand uses subcommands.

    When installed, ATE is accessible only to users who have beenregistered as a member of the UUCP groupby a user with rootauthority.

    For more information about ATE, see “Asynchronous TerminalEmulation” on page 651.

    Communications system commandsThis describes commands availablefor displaying information that identifies users on your system,thesystem you are using, and users logged in to other systems.

    See the following topics for the various commands used toprovide system and user information.

    Displaying your login nameUse the whoami command to determineyour login name.

    To display the name of the current user, enter:

    whoami

    A display similar to the following is returned:

    denise

    In this example, the login name is denise.

    Displaying your system nameUse the uname command to determineyour system name.

    1. To display the name of your system if you are on a network,enter:

    uname -n

    Network management 7

  • A display similar to the following is returned:

    barnard

    In this example, the system name is barnard.2. To find the nodename of another system, request that a user on that system enterthe uname -n

    command.

    Determining whether your system has accessUse the host todetermine whether your system has access to information thatdefines the other system.

    To access another system on the network, your local system musthave access to information that definesthe other system. Todetermine if your local system has this information, enter the hostcommand withthe name of the other system.

    To determine if your local system has routing information forsystem zeus, enter:

    host zeus

    If your system has the proper information, a display similar tothe following is returned:

    zeus is 192.9.200.4 (300,11,310,4)

    You can then send a message to system zeus. The address192.9.200.4 is used by the system to routethe mail. If your systemdoes not have the information, a display similar to the followingis returned:

    zeus: unknown host

    If you receive an unknown host message, then the requestedsystem name:

    • Is not correct (check the spelling in the address)• Is on yournetwork but not defined to your system (contact the personresponsible for setting up your

    network)• Is on another network (see “Addressing mail to userson a different network” on page 23) and requires

    more detailed addressing• Is not connected to your network

    You can also receive the unknown host message if your network isnot operating and your local systemdepends on a remote system tosupply network addresses.

    Displaying information about logged-in usersUse the finger or fcommand to display information about the current users on aspecified host.

    This information can include the user's login name, full name,and terminal name, as well as the date andtime of login.

    1. To display information about all users logged in to host@alcatraz, enter:

    finger @alcatraz

    A display similar to the following is returned:

    brown Console Mar 15 13:19smith pts0 Mar 15 13:01jones tty0 Mar15 13:01

    User brown is logged in at the console, user smith is logged infrom a pseudo teletype line pts0, anduser jones is logged in from atty0.

    2. To get information about the user brown from the precedingexample, enter:

    finger brown@alcatraz

    or

    8 AIX Version 7.2: Network management

  • finger brown

    A display similar to the following is returned:

    Login name: brownIn real life: Marta BrownDirectory:/home/brownShell: /bin/kshOn since May 8 07:13:49 on consoleNo Plan.

    Mail managementThe mail facility provides a method forexchanging electronic mail (e-mail) with users on the same systemoron multiple systems connected by a network. The mail system, thestandard mail user interface, theInternet Message Access Protocol(IMAP), and the Post Office Protocol (POP) are described here.

    The mail system is an internetwork mail delivery facility thatconsists of a user interface, a messagerouting program, and amessage delivery program (or mailer). The mail system relaysmessages from oneuser to another on the same host, between hosts,and across network boundaries. It also performs alimited amount ofmessage-header editing to put the message into a format that isappropriate for thereceiving host.

    A mail user interface enables users to create and send messagesto, and receive messages from, otherusers. The mail system providestwo user interfaces, mail and mhmail. The mail command isthestandard mail user interface available on all UNIX systems. Themhmail command is the MessageHandler (MH) user interface, anenhanced mail user interface designed for experienced users.

    A message routing program routes messages to their destinations.The mail system message routingprogram is the sendmail program,which is part of the Base Operating System (BOS) and is installedwithBOS. The sendmail program is a daemon that uses information inthe /etc/mail/sendmail.cfor /etc/mail/submit.cf configuration file,and the /etc/mail/aliases file to perform thenecessary routing.

    Depending on the type of route to the destination, the sendmailcommand uses different mailers todeliver messages.

    Figure 2. Mailers used by the sendmail command

    This illustration is a type of top-down organizational chartwith Mail and MH at the top. Branching fromthem are bellmail, BNUand SMTP. Underneath the previous level are local mailbox, UUCPlink, andTCP/IP link respectively. Beneath UUCP link is remotemailbox and under TCP/IP link is remote mailbox.

    As the figure illustrates:

    • To deliver local mail, the sendmail program routes messages tothe bellmail program. Thebellmail program delivers all local mailby appending messages to the user's system mailbox, whichis in the/var/spool/mail directory.

    Network management 9

  • • To deliver mail over a UNIX-to-UNIX Copy Program (UUCP) link,the sendmail program routesmessages using Basic Network Utilities(BNU).

    • To deliver mail routed through Transmission ControlProtocol/Internet Protocol (TCP/IP), thesendmail commandestablishes a TCP/IP connection to the remote system then usesSimple MailTransfer Protocol (SMTP) to transfer the message to theremote system.

    Mail user-agent programsBefore you can use the mail system, youmust select a user-agent program. You can choose a mailprogram(mail), message handler (mh), or the bellmail command.

    A user-agent program provides facilities for creating,receiving, sending, and filing mail. In addition, youneed atransport-agent program, sendmail, which distributes incoming mailfrom other systems orpackages and distributes each outgoing mailitem and then transmits it to a similar program in one ormoreremote systems.

    Note: The mail and mh programs are incompatible in the way theystore mail; you must chooseone mail handler or the other.

    Mail program interfaceThe mail program provides you with a userinterface to handle mail to and from both a local network userand aremote system user.

    A mail message can be text, entered using an editor, or an ASCIIfile. In addition to a typed message or afile, you can send:

    Item Description

    system message Informs users the system has been updated. Asystem message is similar toa broadcast message but is sent on thelocal network only.

    secret mail Used to send classified information. A secret mailmessage is encrypted.The recipient must enter a password to readit.

    vacation message Informs users you are on vacation. When yoursystem receives mail in yourabsence, it sends a message back to theorigin. The message states you areon vacation. Any mail you receivewhile on vacation can also be forwarded.

    When you receive mail using the mail subcommands, you can:

    • Leave the mail in the system mailbox.• Read and delete themail.• Forward the mail.• Add comments to the mail.• Store the mailin your personal mailbox (mbox).• Store the mail in a folder youhave created.• Create and maintain an alias file or a distributionfile, which directs the mail and mail messages.

    The installation of sendmail is automatic.

    For more information about the mail program, refer to “Mailfunctions” on page 12.

    Message handler (mh)The mh program is a collection of commandsthat enables you to perform each mail processing functiondirectlyfrom the command line.

    These commands provide a broader range of function than thesubcommands of mail. Also, because thecommands can be issued at anytime the command prompt is displayed, you gain power andflexibility increating mail and in processing received mail. Forexample, you can read a mail message, search a file orrun a programto find a particular solution, and answer the message, all withinthe same shell.

    10 AIX Version 7.2: Network management

  • The mh program enables you to create, distribute, receive, view,process, and store messages using thefollowing commands:

    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 maildirectory.

    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 modifiessequences.

    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.

    Network management 11

  • bellmail commandThe bellmail command is the original AT&TUNIX mail command, which handles mail for users on thesame systemand also for users on remote systems that can be accessed by meansof Basic NetworkUtilities (BNU), sometimes known as theUNIX-to-UNIX Copy Program (UUCP).

    These programs support only networks of systems connected bydialup or leased point-to-pointcommunication lines. The commandopens a shell whose subcommands allow you to:

    • Take data from standard input (typed in or redirected from anexisting file), add one or more addresses(supplied as arguments tothe command itself) and a timestamp, then append a copy toeachaddressee's system mailbox file (/var/spool/mail/UserID).

    • Read mail items from your system mailbox file.• Append mailitems to your personal mailbox file ($HOME/mbox) or to a specifiedfile.• Send mail using BNU to a user on another system.•Automatically redirect all mail from your system mailbox to one onanother 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 canmake full use of this mail handler. Formore information, refer tothe bellmail command.

    Mail functionsThe features of the mail program are introducedhere.

    The mail program enables you to receive, create, and send mailto users on a local or remote system.

    Mail storageMail is stored in different ways, depending on thespecific situation.

    When mail is sent to your address, it is stored in a systemdirectory that is specifically for mail. Thissystem directorycontains a file for every user on the local system. This directoryholds your mail until youdo something with it.

    System mailboxThe system mailbox is similar to a post officebox: the post office delivers letters addressed to the personwhoowns that box.

    Similarly, the system mailbox is a file where messages aredelivered to a particular user. If the file doesnot exist when mailarrives, it is created. The file is deleted when all messages havebeen removed.

    System mailboxes reside in the /var/spool/mail directory. Eachsystem mailbox is named by the userID associated with it. Forexample, if your user ID is karen, your system mailbox is:

    /var/spool/mail/karen

    Default personal mailboxYour personal mailbox is similar to anin-basket in an office. You put mail in the in-basket after youhavereceived it, but before you have filed it.

    Each user has a personal mailbox. When you read mail from thesystem mailbox, and if it is not marked fordeletion or saved to afile, it is written to your personal mailbox, $HOME/mbox ($HOME isyour logindirectory). The mbox file exists only when it contains amessage.

    dead.letter file for incomplete messagesIf you need to interrupta message you are creating to complete other tasks, the systemsaves incompletemessages in the dead.letter file in the $HOMEdirectory.

    If the dead.letter file does not exist, the file is created.Later you can edit the file to complete yourmessage.

    Attention: Do not use the dead.letter file to store messages.The content of this file isoverwritten each time an interrupt isissued to save a partial message to the dead.letter file.

    12 AIX Version 7.2: Network management

  • Mail foldersFolders enable you to save messages in an organizedfashion. Using the mail program, you can put amessage into a folderfrom the system mailbox, a personal mailbox, or another folder.

    Each folder is a text file. Each folder is placed in thedirectory you specify in your .mailrc file with theset folderoption. You must create this directory before using folders tostore messages. When thedirectory exists, the mail program createsthe folders in that directory as needed. If you do not specifyadirectory in your .mailrc file, folders are created in the currentdirectory. See “Organizing mail” on page18.

    Note: Several programs are available to send and receive mail,including Message Handler (MH)and the bellmail program. Whichprogram you use depends on what is installed andconfigured on yoursystem. For information on your system configuration, contact yoursystemadministrator.

    Mail handling and receivingThe mail program enables you toexamine each message in a mailbox and then delete or file amessagein a personal mail directory.

    The command shell notifies you that mail has arrived. Thenotification is displayed before the nextprompt, provided that theMAIL environment variable is set and provided that the intervalspecified byMAILCHECK has elapsed since the shell last checked formail. The notification message is the value of theMAILMSGenvironment variable. Depending on which shell you are using(bourne, korn, or C shell), thenotification is similar to thefollowing:

    YOU HAVE NEW MAIL

    Mailbox startupUse the mail command to read and remove messagesfrom your system mailbox.

    Do not use the system mailbox to store messages. Store messagesin your personal mailbox and in mailfolders.

    Checking your system mailbox for mailUse the mail command tocheck your system mailbox for mail.

    At your system command line prompt, enter the mail command:

    mail

    If there is no mail in your system mailbox, the system respondswith a message:

    No mail for YourID

    If there is mail in your mailbox, the system displays a listingof the messages in your system mailbox:

    Mail Type ? for help."/usr/mail/lance": 3 messages 3 new >N 1karen Tue Apr 27 16:10 12/321 "Dept Meeting" N 2 lois Tue Apr 2716:50 10/350 "System News" N 3 tom Tue Apr 27 17:00 11/356 "ToolsAvailable"

    The current message is always prefixed with a greater-thansymbol (>). Each one-line entry displays thefollowingfields:

    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 themail.

    date Specifies the date the message was received.

    Network management 13

  • Item Description

    size Defines the number of lines and characters contained in themessage (this includes theheader).

    subject Identifies the subject of the message, if it hasone.

    The status can be any of the following:

    Item

    Description

    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 themailbox the last time you used themail program, but the contentswere 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 beenread but has not been deleted or saved.

    Checking your personal mailbox or mail folder for mailYou canuse the mail command to check your personal mailbox or mail folderfor mail.

    At your system command line prompt, you can use the mail commandin the ways shown in the followingsteps:

    1. To display a listing of the messages in your personalmailbox, $HOME/mbox, enter:

    mail -f

    If there is no mail in your personal mailbox, the systemresponds with a message similar to thefollowing:

    "/u/george/mbox": 0 messages

    or

    A file or directory in the path name does not exist

    2. To display a listing of the messages in the dept folder,enter:

    mail -f +dept

    If there is no mail in your mail folder, the system respondswith a message similar to the following:

    A file or directory in the path name does not exist

    Mailbox content display optionsFrom the mailbox prompt, you canenter mailbox subcommands to manage the contents of themailbox.Prerequisites

    1. The mail program must be installed on your system.2. The mailprogram must be started.3. There must be mail in your mailbox.

    Ranges of messagesUse the h subcommand to view a messagecontained within a list of messages that you determine so thatyoudo not have to browse through all your messages.

    At your mailbox prompt, you can use the h subcommand in the waysshown in the following examples:

    14 AIX Version 7.2: Network management

  • Item Description

    h Approximately 20 messages are displayed at a time. The actualnumber displayed is determinedby the type of terminal being usedand the set screen option in your .mailrc file. If you enterthe hsubcommand again, the same range of messages is displayed.

    h 21 Message 21 and subsequent messages, up to and includingmessage 40 (if you have that numberof messages in your mailbox),are displayed. Continue typing the h subcommand with thesubsequentmessage number until all messages have been displayed.

    h 1 To return to the first group of 20 messages, enter anynumber within the range of 1-20.

    Mailbox scrollingUse the z subcommand to scroll through yourmailbox.

    At your mailbox prompt, you can use the z subcommand in the waysshown in the following examples:

    Item

    Description

    z Approximately 20 messages are displayed at a time. The actualnumber displayed is determined bythe type of terminal being usedand the set screen option in your .mailrc file. enter thezsubcommand again to scroll to the next 20 messages.

    z + The plus sign (+) argument scrolls to the next 20 messages.Message 21 and subsequentmessages, up to and including message 40(if you have that number of messages in your mailbox),aredisplayed. Continue typing the z+ subcommand until all messageshave been displayed. Thesystem will respond with the followingmessage:

    On last screenful of messages.

    z-

    The minus sign (-) argument scrolls to the previous 20 messages.When you reach the first set ofmessages, the system will respondwith the following message:

    On first screenful of messages.

    Message filtering for specific informationAt your mailboxprompt, you can use the f subcommand in the ways shown in thefollowing examples tofilter messages according to the informationthat you want.

    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 1through 10.

    f * Displays all messages.

    f ron Messages, if any, from user ron are displayed. Thecharacters entered for an address do notneed to exactly match theaddress; therefore, the request for address ron in eitheruppercaseor lowercase letters matches all of the following addresses:

    RoNron@topdoghronrOn

    Network management 15

  • Item Description

    fmeet Messages, if any, where the Subject: field contains theletters meet are displayed. Thecharacters entered for a pattern donot need to exactly match the Subject: field. They mustonly becontained in the Subject: field in either uppercase or lowercaseletters; therefore,the request for subject meet matches all of thefollowing subjects:

    Meeting on ThursdayCome to meeting tomorrowMEET ME IN ST.LOUIS

    Current message numbersThe = subcommand displays messagenumbers.

    At your mailbox prompt, you can use the = subcommand in the wayshown in the following example:

    Item

    Description

    = The current message number is displayed.

    Total number of messages in your mailboxUse the foldersubcommand to check how many messages are in your mailbox.

    At your mailbox prompt, you can use the folder subcommand in theway shown in the followingexample:

    Item Description

    folder Lists information about your folder or mailbox. Thesystem will respond similarly to thefollowing:

    "/u/lance/mbox": 29 messages.

    Reading mail optionsYou can read your mail in several ways.Examples of each method are described here.

    Choose the method you are most comfortable with, and use it toread your mail. Before attempting toread your mail, make sure thefollowing conditions are true:

    1. The mail program must be installed on your system.2. The mailprogram must be started.3. There must be mail in your systemmailbox.

    Reading messages in your mailboxUse the t or p subcommand toread messages in your mailbox.

    At your mailbox prompt, you can use the t or p subcommands inthe ways shown in the followingexamples:

    Item Description

    3 If you use the number of the message, by default, the text ofthe message is displayed.

    t If you use the t subcommand, by default, the text of thecurrent message is displayed.

    t 3 The text of message 3 is displayed.

    t 2 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 isdisplayed.

    t If you use the p subcommand, by default, the text of thecurrent message is displayed.

    p 3 The text of message 3 is displayed.

    16 AIX Version 7.2: Network management

  • Item Description

    p 2 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 isdisplayed.

    Reading the next message in your mailboxUse the n subcommand toread the next message in your mailbox.

    At your mailbox prompt, you can use the (n)ext or plus sign (+)subcommand in the way shown in thefollowing example:

    Item Description

    n or + Displays the text of the next message, and this messagebecomes the current message.

    You can also press the Enter key to display the text of the nextmessage.

    Reading the previous message in your mailboxUse the - subcommandto read the previous message.

    At your mailbox prompt, you can use the - subcommand in the wayshown in the following example:

    Item

    Description

    - The text of the previous message is displayed.

    Deleting mailWhen deleting a message, you can delete the currentmessage, delete a specific message, or delete arange ofmessages.

    You can also delete the current message and display the nextmessage by combining subcommands.Ensure that the followingconditions are met:

    1. The mail program must be installed on your system.2. Theremust be mail in your system mailbox.3. The mail program must bestarted.

    Deleting messagesUse various forms of the d subcommand to deletemessages.

    At your mailbox prompt, you can use the (d)elete subcommand inthe ways shown in the followingexamples:

    Item Description

    d The current message is deleted.

    dp or dt The current message is deleted and the next message isdisplayed. This also can beaccomplished by including the setautoprint option in the .mailrc file, which will setthe dsubcommand to function like the dp or dt subcommandcombination.

    d 4 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 messagesUse the u subcommand for undeletingmessages.

    At your mailbox prompt, you can use the u subcommand in the waysshown in the following examples:

    Network management 17

  • Item Description

    u The current message is undeleted.

    u 4 Undeletes the specific message 4.

    u 4-6 Undeletes a range of messages 4 through 6.

    u 2 6 8 Undeletes messages 2, 6, and 8.

    Exiting mailEnsure that the following requirements are metbefore exiting the mail program.

    1. The mail program must be installed on your system.2. Theremust be mail in your system mailbox.3. The mail program must bestarted.

    Exiting mail and saving changesUse the q subcommand to exit mailand save changes.

    If you are exiting the system mailbox:

    Item Description

    q The q subcommand leaves the system mailbox and returns to theoperating system. Whenyou leave the mailbox, all messages marked tobe deleted are removed from the mailboxand cannot be recovered. Themail program saves the messages you read in your personalmailbox(mbox). If you did not read any of your mail, the messages remainin the systemmailbox until acted upon.

    If you are exiting your personal mailbox or a mail folder:

    Item Description

    q When using the q subcommand in your personal mailbox or a mailfolder, messages readand not read will remain in your personalmailbox or in a mail folder until acted upon.

    Exiting mail without saving changesUse the x or ex subcommand toexit mail without making mailbox changes.

    Item Description

    x or ex The x or ex subcommand allows you to leave the mailboxand return to the operatingsystem without changing the originalcontents of the mailbox. The program ignores anyrequests you madeprior to the x request; however, if you did save a message toanotherfolder, the save will occur.

    Organizing mailUse folders to save messages in an organizedfashion.

    You can create as many folders as you need. Give each folder aname that pertains to the subject matterof the messages itcontains, similar to file folders in an office filing system. Eachfolder is a text file that isplaced in the directory you specify inyour .mailrc file with the set folder option. You must createthisdirectory before using folders to store messages. When thedirectory exists, the mail program createsthe folders in thatdirectory as needed. If you do not specify a directory with the setfolder option inyour .mailrc file, the folder is created in yourcurrent directory. Using the mail program, you can put amessageinto a folder from the system mailbox, a personal mailbox, oranother folder.

    You can add the contents of a message to a file or folder usingthe s or w subcommands. Both of thesesubcommands append informationto an existing file or create a new file if it does not exist.Informationcurrently in the file is not destroyed. If you save amessage from your system mailbox to a file or folder,the message isdeleted from your system mailbox and transferred to the file orfolder specified. If yousave a message from your personal mailboxor folder to another file or folder, the message is not deleted

    18 AIX Version 7.2: Network management

  • from your personal mailbox but is copied to the specified fileor folder. When using the s subcommand,you can read the folder likea mailbox because the messages and the header information areappended atthe end of the folder. When using the w subcommand, youcan read the folder like a file because themessage is appendedwithout header information at the end of the file.

    Before organizing mail, ensure that the following requirementsare met:

    1. The mail program must be installed on your system.2. Theremust be mail in your system mailbox, personal mailbox, or a folderyou have defined.3. The mail program must be started.

    Creating a letters mailbox directory to store messages infoldersMessages can be saved in a mailbox directory folder usingthe set folder subcommand.

    Use the following procedure to store messages in folders:

    1. To check if the set folder option has been enabled in the.mailrc file, enter the followingsubcommand at the mailboxprompt:

    set

    The set subcommand displays a list of the enabled mail optionsin your .mailrc file.

    If the set folder option has been enabled, the system respondswith a message similar to thefollowing:

    folder /home/george/letters

    In this example, letters is the directory in which mail folderswill 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 andletters is the directory in whichmail folders will be stored. Theset folder option enables you to use the plus sign (+)shorthandnotation at your mailbox prompt to save messages in yourletters directory.

    3. You must create a letters directory in your home directory.In your home directory at the systemcommand line prompt, type:

    mkdir letters

    Saving messages with headersThe s subcommand saves messages withheaders.

    Use the s subcommand in the following ways:

    Item Description

    s 1-4 notes Saves messages 1, 2, 3 and 4 with their headerinformation to a folder callednotes in the current directory.

    The mail program responds with the following message:

    "notes" [Appended] 62/1610

    Network management 19

  • Item Description

    s +admin Saves the current message to an existing folder calledadmin in your folderdirectory.

    If the folder directory is defined as /home/george/letters inyour .mailrc file,the system responds with:

    "/home/george/letters/admin" [Appended] 14/321

    s 6 +admin Saves message 6 to an existing folder called admin inyour folder directory.

    If the folder directory is defined as /home/george/letters inyour .mailrc file,the system responds with:

    "/home/george/letters/admin" [Appended] 14/321

    Saving messages without headersUse the w subcommand to save amessage as a file instead of as a folder.

    To read or edit a file saved with the w subcommand, you must usevi or some other text editor. At yourmailbox prompt, you can usethe w subcommand in the following ways:

    Item Description

    w 6 pass Saves only the text of message 6 to a file called passin the currentdirectory.

    If the pass file does not already exist, the system respondswith thefollowing message:

    "pass" [New file] 12/30

    If the pass file exists, the system responds with the followingmessage:

    "pass" [Appended] 12/30

    w 1-3 safety Saves only the text of the specific messages 1, 2,and 3 to a file calledsafety in the current directory.

    The text of the messages in this example will be appended oneafter theother into one file. If the safety file does not alreadyexist, the systemresponds with the following message:

    "safety" [New file] 12/30

    Determining the current mailbox or folderUse the foldersubcommand to determine the current mailbox or folder.

    Although the mail command displays the name of the currentmailbox when it starts, you might losetrack of which mailbox youare in. At your mailbox prompt, you can use the folder subcommandshownin the following example:

    20 AIX Version 7.2: Network management

  • Item Description

    folder Finds the name of your current mailbox or folder.

    If the current mailbox is /home/lance/mbox, the following isdisplayed:

    /home/lance/mbox: 2 messages 1 deleted

    This message indicates that /home/lance/mbox is the currentmailbox you are in, itcontains two messages, and one of thosemessages will be deleted when you finishwith this mailbox.

    Changing to another mailboxChanging to another mailbox is likequitting a mailbox or folder.

    Any messages that you marked to be deleted are deleted when youleave that mailbox. The deletedmessages cannot be recovered. Atyour mailbox prompt, you can use the file or folder subcommandshownin the following example:

    Item Description

    folder +project After the mail program is started with onemailbox, use the file orfolder subcommands to change to anothermailbox.

    If you change from the mbox file to the mbox folder and youhavedeleted all the messages in the mbox file, the mail programdisplays:

    /home/dee/mbox removed+project: 2 messages 2 new

    followed by a list of the messages in the project folder.

    Creating and sending mailYou can use the mail program to create,send, reply, and forward messages to other users or to sendASCIIfiles to other users.

    An ASCII file might, for example, be a document you have writtenusing a preferred editor or a source filefor a program.

    You can send messages and files to a user on your local system,on your network, or to a user on anotherconnected network. Therecipient does not need to be logged on to the system when you sendtheinformation. Mail is sent to a user's address.

    Addressing mailMail is sent to a user's address. The address,containing the login name and system name, directs thedelivery ofthe mail message.

    Generally, to send a message to another user, you must enter themail command and the address asfollows:

    mail User@Address

    The format of the Address parameter depends upon the location ofthe recipient. The concept is similar tohow you might address anote to a fellow worker in an office. To send a note to Ryan, whoworks in a smalldepartment of six to eight people, you might writethe name on an envelope and put it in the office mailsystem.However, if Ryan is in another department, you might have toprovide more information on theenvelope:

    RyanPayroll

    If Ryan is in another geographic location, you might need evenmore information to ensure that themessage reaches him:

    Network management 21

  • RyanPayrollGaithersburg

    To send mail electronically, use a similar addressingprogression:

    Item Description

    mail ryan To send mail to a user on your local system, the loginname is the only partof the address required.

    mail ryan@tybalt To send mail to a user on your local network,enter the full system (node)address.

    [emailprotected]

    To send mail to a user on another connected network, enter thefull systemaddress and network address.

    mail dept71 You can send mail to a specific group of people byusing an alias ordistribution list. To do so, you must create analias or distribution list inyour .mailrc file. If you needinformation on creating aliases, see “Aliasesand distributionlists” on page 37.

    Addressing mail to more than one userTo address mail to morethan one user at the same time, separate each user name with aspace.

    For example:

    ryan@tybalt suemc@julius dmorgan@ophelia

    Addressing mail to users on your local systemTo send a messageto a user on your local system (to someone whose login name islisted in your /etc/passwd file), use the login name for theaddress.

    At your system command line prompt, you can use the mail commandshown in the following example:

    mail LoginName

    Item Description

    mail ryan If Ryan is on your system and has the login name ryan,this command activates the mailprogram, enables you to create amessage, and tries to send the message to a local loginname ofryan. If the message is delivered successfully, you receive nonotification. IfRyan is not on your system, the mail systemimmediately returns an error message andreturns the unsent messageto your system mailbox.

    Addressing mail to users on your networkUse the mail command tosend a message to users on your network. Include the user's loginname andsystem name in the address.

    To send a message through a local network to a user on anothersystem, at the command line, type:

    22 AIX Version 7.2: Network management

  • Item Description

    mail LoginName@SystemName For example, if Ryan is on systemzeus, use the followingcommand to create and send a message tohim:

    mail ryan@zeus

    This command activates the mail program, enables you tocreate amessage, and tries to send the message to loginname ryan on systemzeus. If the message is deliveredsuccessfully, you receive thesystem prompt with nonotification. If the mail address isincorrect, you receive anerror message.

    Note: To send a message through a local network to a user onanother system, you must knowthe login name and the name of theother system. For more information about displayinginformation thatidentifies users, see “Communications system commands” on page7.

    Addressing mail to users on a different networkIf your networkis connected to other networks, you can send mail to users on theother networks.

    The address parameters differ depending on how your network andthe other networks address eachother and how they are connected.Depending on how your network configuration, take one oftheseactions:

    • If you are using a central database of names and addresses,use the mail command shown in thefollowing example:

    mail LoginName@SystemName

    If the networks use a central database of names, you do not needany additional information to sendmail to users on the connectednetworks. Use the same addressing format as for users on yourlocalnetwork.

    This type of addressing works well when the nature of thenetwork allows a central database of namesto be maintained.

    • If your network uses domain name addressing, use the mailcommand shown in the followingexample:

    mail [emailprotected]

    For networks that span large, unrelated networks in widespreadlocations, a central database of namesis not possible. TheDomainName parameter defines the remote network, relative to yourlocal network,within the defined structure for the larger group ofinterconnected networks.

    For example, if you enter the following command:

    mail [emailprotected]

    your mail is sent to user kelly on the system merlin, which ison a local network named odin that isconnected to a second networkwhose domain is called valrya

AIX Version 7 - IBM · AIX Version 7 - IBM ... management - [PDF Document] (2024)
Top Articles
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 6118

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.